Skip to main content
  1. Posts/

How I Use Emacs

·26 mins· 0 · ·
emacs tutorial
SummerEmacs
Author
SummerEmacs
Just an Emacs Girl. 🙃
Table of Contents
/img/pink-emacs-icon.png
Emacs in Pink is your Friend.

An explanation of how I use Emacs

  • I'm honoured that you all have invited me to share my thoughts, and I especially appreciate the $50,000 advanced speakers' fee.
  • A lot of people have asked me to write down how I use Emacs because they're curious how I use it every day since about a year.
  • First thing you should know: I'm not a programmer. I'm mostly a personal assistant and researcher, as well as a few other things. So my primary use for Emacs is a central point for information gathering, linking, and organising big and small projects. However, I'm not a stranger to the terminal, or git, or a few other things like that (like rsync for example).
  • I'm going to explain my setup on the hardware and software side.

The Hardware Setup:

  • I use all iOS and Mac devices (as does my boss, gf, and bffs/roomies).
  • I do have a Raspberry Pi and Mint Linux server in my home office. My boss said I can buy something way better and beefier but I like my little servers the way they are. They're sorta proof that I have some geek-cred. 🙃
  • My Mac/iOS devices are all automatically synced to iCloud so all my notes and files are available on all of my devices.
  • I run Syncthing to sync my files to my Raspberry Pi automatically. I have an rsync script running every night to mirror the two main drives of my NAS to my mirror backup drives.

The Software Setup

The folders/directories:

Everything I need is in ~/Documents/sync

Because ~/Documents is automatically synced to iCloud without me ever having to touch anything, everything in it is mirrored to all of my devices. From there, I have a folder inside called sync. So ~/Documents/sync which is the folder where all of my org files, notes, etc are located. This folder is automatically synced to my Raspberry Pi with Syncthing every few seconds. And that gets backed up every night to my mirror drives on my Raspberry Pi. Also, since ~/Documents is automatically backed up with Time Machine on my server as well, I have a second backup (also backed up to the mirror drives at night). This way, I have more than one independent backup going at all times so I shouldn't (ideally) ever lose my files. And I have access to all notes and files on all of my iOS devices at all times as well.

My second Linux machine

I also have an older Macbook in my home office. it runs Mint Linux - easy for a newbie like me to maintain and use via VNC (like I use my Raspberry Pi - I'm never actually at the keyboards for them, it's all done via VNC). Both machines have a DuckDNS.org DNS running on them with SSH so that I can access them from the outside with a private port. On my second machine, I run Emacs so that I can use it externally from one of my iPad Pros with the magic keyboard. All of my files are also mirrored to this machine and I have a nice config for it that I update once a month along with all of my systems via the terminal. This way, my packages are always fairly up to date as well as the OSes they're running on. I have a reminder on the first of every month to do this. Since I get up very early to work out every morning, I usually do this on the first of the month when I'm sitting down with my coffee and croissant and reviewing my daily task list etc…

I sorta live with reminders from Apple Reminders. They remind me on my phone, my iPads, my Macs/Macbook Pros, and my Apple Watch. I write down a reminder so I don't have to remember, but I also make it a habit to check my reminders every few hours. I often add reminders via Siri (you can use Google Assistant if that's what you have). I also have different reminder lists so I can categorise them on the go. That's very useful and I pin the most important ones so I have easy access to them. Also, some reminders are set to go off by geolocation. Super useful. 👍

All reminders that are added are later reviewed and I add an Emoji in front of the reminder to categorise it (and it lets me also know that I've reviewed it and filed it where it belongs). This all happens outside of Emacs. I'll get to the Emacs part soon.

How did I train myself to always look at my reminders and task list and calendar etc…? Well, I made reminders. Yup, I had reminders telling me every 2 hours to check my task list, my calendar, etc…I also had reminders telling me to check stuff every morning when I woke up, and reminders to do the same a few hours before bed. Computers are here to help us manage our lives, so use what they have to do just that. You don't have to remember it to make it a habit - you just have to be reminded. Constantly. (Okay, I used to be a cheerleader for a little bit in high school so…please excuse my aggressively positive attitude).

Emacs

Okay, so that's the basic setup for the system. Now we get to what you guys really wanna know about, right? Emacs.

IMPORTANT: Here is how I don't use Emacs:

I don't use Emacs for reminders, or most scheduling (like meetings, fashion shows, art shows, etc…). I don't use it that way because even though I have both Beorg and Plain Org for IOS, and Beorg can even remind me on my watch, I can't share those like that with my boss or my roomies/gf. They don't use Emacs and they barely know what it is (they know I use it and they love that it's pink and looks really nice though and what I can do with it). They use iOS/Mac and so I share stuff to that system. Also, putting stuff into Apple Reminders/Calendar/Notes/Freeform etc…that's a final step. It sorta means I've dealt with it on every level and it's ready for dissemination to everyone. It's like "Okay, this is dealt with". It's a good feeling.

How do I use Emacs?

Well, that's a good question, and I'm glad you asked! I use Emacs as a central point for gathering data/info and managing it. I use it for big projects to break down in org mode. I use it to collect as much as I can from everywhere and then organise it there. Emacs is like the central point to which everything flows and from which everything flows as well. Everything gets referenced in Emacs with Denote (you can use Org Roam for this too if you want instead of Denote - it's up to you). However, I use Emacs mostly at home. I don't tend to use it outside of the house much (sometimes on my iPad like I said, but it's rare). So how do I deal? I mean, I go out a lot, so what do I do when I'm outside of the house? Well, again: I use Apple stuff: Photos, Notes, etc…. In meetings I generally write in Apple Notes (or GoodNotes) with my Apple Pencil. Sometimes I type on my magic keyboard, but not all of the time. Writing is nice and I love the pencil. I can also draw with it and that's important. I take a lot of pictures of fashion stuff like jewelry, shoes, etc…and art (old and new) as well as antiques and the like. So how do I incorporate it into Emacs?

Well, it's simple. On MacOS, you can (for instance) click on the "Share" button of a Note and copy the link to it. Then you can paste the link to that note into an Emacs document. When you do that, you can click that link later and it'll open it up in Notes. It's like a bookmark on your system. I use this a lot. When I'm out, I'm always making notes of stuff if it's for business and whatevs, so I'll come home and review it. I'll copy/paste the text bits to a new Denote file, and I'll copy the link and paste it into that file so that any drawings can be referenced directly. Sometimes I'll use inbox.org first to put the info inside (I'll get to that).

In Apple Notes, I have a top level folder called "Field Notes" with subfolders where everything gets put in when I'm out of the house. I break that down by folders and I use tags (Apple has built in tags into their system which are universal for all your devices). I use the same tags in Emacs so it's easy to organise. In Emacs, I have a master tags list that I've keyed with Consult Bookmarks. This way I can open it right away and check all necessary and relevant tags and add more tags categories/subjects as needed. I use Consult Bookmarks a lot for all the important files that I reference all of the time.

Here's how it works:

I get home (or have breakfast after my morning workout), I sit down, and I review my Apple Notes. I also review any links in Safari reading list. I have a shortcut on the Mac to share stuff from Safari directly to my inbox.org using org capture (I made it Control-Option-Command-x) This will add the Safari URL with the time and date. Once I'm done reviewing stuff and adding it to my inbox.org, I work in Emacs. First, I made a new Denote org note and give it the appropriate tags. Then I copy/paste or refile (I'll get to that) all the info I need to the new document. It's an org doc so I break it down with all the headers/subheaders that I need. If it involves emails as well, I'll use my mu4e org capture to capture the link to that as well. 95% of the time, I use Apple Mail because that's what we all use, but I also use mu4e to capture emails directly and easily into projects. This way I can reference them later during negotiations etc…

Once I put everything into that document, I also make a top level header at the start of the document which breaks down the project. All of the info I put in will end up at the bottom for reference. This way, I have a clean new project breakdown. From there, if it references other Denote notes, I'll link them with org link shortcuts. If the Project references many other projects, I'll typically make a master project doc that is separate as a sort of meta-project document and will reference all of the other sub-project documents that are denote docs as well.

Don't worry, if it sounds confusing, I'll detail it simply further down.

Big projects like this are, of course, all done and managed in Emacs in org mode.

After I'm done with all of this, and I've done further research and linked everything, I revise the project and then Copy/Paste the necessary steps/appointments/calendar events/info/reminders to shared Apple Notes/Reminders/Calendar etc…. that way everyone concerned has the processed data and reminders automatically set on their own devices. They don't have to do a thing - I do it for them. That's part of my job. All they have to do is do what the reminders and/or notes say. Typically I'll also send a message with Messages to let them know everything is added. Usually with a ❤️😁

The files setup

Okay, so this is probably the part you're all really interested in because it's all about how I use Emacs directly. Keep in mind that I mirror this setup with the way I have my Apple Notes folders set up. That way, everything is always organised in the same structure, even if it's not in Emacs. Same folder structure, same tags, etc….

You start with ~/Documents/sync

sync (like I said) is my top level folder. In there, I have an 'org' folder. I do this because I have other folders in sync that I use which aren't necessarily related to org, but most everything is in org.

Note: Anytime I build an organising system, I always build in a few "misc" options. Meaning: I always have the option to do something that isn't part of my system and figure it out later. But when I do something like that, I always make a reminder to check up on it later so I don't let things gather dust. That's just another little personal tip. 🙃

So the folder list from org is as such: (This isn't everything, it's just a short little demonstration)

archives

2022
2023
2024

notes

art
articles
fashion
finances
journal
lists
misc
quotes
realestate
reference
travel

refile

inbox.org
links-art.org
links-articles.org
links-comics.org (I love a few online comics)
links-cooking.org
links-emacs.org (for Emacs-related stuff only)
links-fashion.org
links-gaming.org (I love playing some games sometimes and I like to save info/commands/tuts about some)
links-misc.org
links-music.org
links-realeastate.org
links-tech.org (this has to do with any tech and computers but not Emacs)
links-videos.org
repeat-tasks.org (I keep this as a master list of repeat reminders/tasks I put in Apple apps)
todo.org

images

2022
2023
2024

Note: I'm not including all the files in this setup, just the ones I typically use most. If it seems like some are missing, it's cuz I just didn't bother to put them in. This is just to give you an idea. Also, in my top level org folder I have some files like tags.org etc…that I use as master lists. I don't put them in refile because they don't belong there.

All my images are kept in Apple Photos, but I have images in org for things I want to reference directly in org mode, for instance. So I'll copy them there into project subfolders.

Okay, so how does it work?

Well, it's pretty organic but also structured. Meaning: It just makes sense. You have major categories that you start with. All info that goes into Emacs is tagged using :tags: (C-c C-q). Because of this, I can search by tag which are the same all across my entire system of devices and computers (I have several in different locations).

I have org-refile set up so it can refile to anything in the 'refile' directory as well as a few other locations in the 'notes' directory (such as lists). Here's my refile code:

  ;; Org Agenda Files Location
  (setq org-agenda-files '("~/Documents/sync/org/refile"
                           "~/Documents/sync/org/notes/lists"
                           "~/Documents/sync/org/notes/reference"))

  ;; There's a few more but I took them out for brevity.

  (setq org-refile-targets '((org-agenda-files :maxlevel . 3)))

  (setq org-outline-path-complete-in-steps nil)         ; Refile in a single go
  (setq org-refile-use-outline-path t)                  ; Show full paths for refiling

  ;; Allow org-refile to create parent header nodes
  (setq org-refile-allow-creating-parent-nodes 'confirm)

Note that I do not have my entire notes directory or subdirs as refile locations. The reason for this is simple: When I'm working with denote on a note, I typically split my frame into two windows. So if I'm reviewing stuff on the left side that I want to put in my note on the right side, I can just select, yank, and put it on the right side in the right location. It only takes a few keystrokes and I'm done. I don't typically put stuff in a note with refile just because it's kinda a PITA to remember where it's supposed to go if I'm not looking at it. It's just easier to see where it's supposed to go when I can see all the subheaders, or need to make a new subheader etc…it just makes more sense to me, and it doesn't clutter up my refile with tons of files I won't be refiling to. I don't have to keystroke every single thing in Emacs to get the job done quickly. You can if you want, but I'm not gonna.

Info: I have many lists. I love lists. They're organised and nice to look at. With org mode I can make checkboxes or even tables. I use all of this for different types of lists. It's practical and it's part of my GTD process: make a list and then you can break it into one small step at a time to get stuff done.

Tabs: A lesson in being organised

I use tabs in Emacs. And my tabs setup is very structured. I don't have too many (Typically 10). I'll sometimes add an extra tab or two if I'm working on a lot more documents, but generally it's 10. As follows:

    1. Dash (for my dashboard or scratch or messages)
    1. Commands (I'll explain this below)
    1. Inbox (for my inbox.org)
    1. Todo (for my todo.org)
    1. Notes (just for taking notes so it's always there)
    1. Journal (I start a new denote journal every morning)
    1. Apps (for when I want to pull up mu4e or other applications like dired or ibuffer etc)
    1. Misc 1
    1. Misc 2
    1. Misc 3

    The Misc tabs are all just that: where I open up most buffers to look at them, review them, reference them, etc…. My tabs are keyed to prev/next with Command-1 (prev) and Command-2 (Next). This would be Alt on the PC. This way, I can flip through them real fast using C-1 and C-2. I like tabs because, again, I like visual cues with what I'm doing or doing next or need to remember. If you like dealing with no visual cues and no organised setup and just C-x b, that's your thing and please don't include me in your headspace insanity. 🙃

    Note: I do use C-x b a lot too, but the visual thing is a big part of me. Yes, I know that consult previews the buffers when I flip through them this way, but I like my listed buffers to be organised for the most part.

    Okay, so Commands tab. This is where I keep a bookmarked file of all the Emacs commands I need to refer to sometimes. Like keybinds and what they do for each thing. For instance, keybinds for Consult, or Dired etc… also commands for Org mode which I don't usually remember. I have each "App" or system in a subheader with the most important keybinds listed below. This file is bookmarked with consult bookmarks and resides in my top level org directory called emacscommand.org. It's almost always open because:

      1. I often forget keybinds I haven't used in a while and
      1. I am literally a blonde.

      What else does this tab do? Well, it's where I will always open my config.org file. This file is also bookmarked with Consult Bookmarks (C-x r b). I actually don't touch config all that much but when I do, I like to know where I've opened it. I don't know why, but I think by now you get that I'm pretty organised….it's just a thing for me. Also, before I touch my config.org, I do a git and commit. Every time. And after I make a change, I restart Emacs twice to make sure nothing is screwed up before I commit again. (I took a course on git and how to use it. I love git).

Journaling: I journal every day in Denote with the denote journal command. I have a little template with headers for Weather, Goals, and "I'm grateful for". I keep this open all day in that tab and add to it often. It's okay to miss a day or two here and there - I do that sometimes, especially on weekends, but generally, I journal almost every day. Sometimes it's just a few lines, and sometimes it's a few pages. It depends. I start it with my coffee every morning before I start to review my tasks so I can add info about stuff I might need to do. I also tag things in my journal using the same tags I use everywhere. Not everything, but a lot of things. Also, I'll link to other denote notes in my journal at times for either personal or business stuff so I have redundancy when I search and even more context. I don't do this all the time, but sometimes if it's relevant or important.

Note: When I'm travelling a lot, I'll journal with my iPad mini or iPad Pro and the Apple Pencil. I tend to doodle when I do that. Later, I'll reference those entries in my updated Journal in Emacs.

For search, I use consult ripgrep (M-s r) to search everything in my org files. It previews every single result as I flip through in the minibuffer into the buffer above and I love that. I get the line where the search result is and the context of the entire buffer page. It makes it super easy to find things. I use search a lot.

Refiling

Okay, this is a major part of my workflow and org-mode is a godsend because of this. As you see, I have a structure for everything and everything gets put into a place where I can easily find it later. Even if ripgrep breaks one day, I can still find everything very quickly and easily. I'm not saying that this will ever happen, but I like to keep everything neat and tidy.

Let's start with my Inbox.

As I've said: Everything first goes to my inbox. Links from Safari, links from Apple notes, etc…they all end up here. That's why it has its own tab. I just hit F5 to refresh it every time I visit and it's there. I share stuff on my phone to inbox.org using Beorg (also on my iPad). It's…well…my inbox. On my desk virtual desk. And it holds everything that has to be done or requires attention or reviewed etc…

From there, I decide if it's a todo or if it goes someplace else. For instance, let's say I see a funny or nice video on YouTube. I'll share/capture it to inbox.org. From there, I'll add tags to it (and sometimes add a quick note in properties) and then usually refile it to links-videos.org. This is all searchable so I can find whatever I like in there.

If it's a todo for todo.org, I'll refile it there. My todo.org is always open and has many different headers and subheaders broken down by subject. For instance:

Computer Projects   computer

General Computer Stuff   general
Emacs Stuff   emacs
Correspondence   email facetime zoom

These subheaders can contain links to Emacs packages I want to learn about/review, general computer stuff like stuff I want to install/review on my laptops or desktops, or general correspondence I want to take care of at some point.

Now, I know that I've pretty much hammered in how I don't use Emacs for my general daily task list, and I don't. But that's because before stuff goes into my Apple Reminders, etc…I organise them as tasks in Emacs. They aren't there as my final reminder: They're there to be worked on or reviewed. It's a place where I put stuff to figure out how I'm going to deal with it before making a final task out of it which will remind me. Anything in my todo.org means "Deal with this". If I'm out and about, I won't be looking at my todo.org list - ever. I'll be looking at my iPhone Apple apps. I only look at todo.org when I'm sitting down and working at home (or maybe at a cafe or whatevs).

Again: my final todos/meetings/etc…are not in Emacs. I've found it very unhelpful to have everything in Emacs as your final stuff when it's a bit convoluted to deal with on the iPhone or iPad and you're out and about. When I'm travelling or out of the house in general, I want stuff available at my fingertips with no effort. Organising your life around Emacs org-mode agenda and all that is great for people who are at their laptops 99% of the time. That's not me. I go out almost every day and sometimes every night for weeks at a time. I can't have all that important stuff sitting in Emacs and not being available. Even with Beorg and Plain Org, it's a bit hard to deal with (much as I love them). So I don't.

Note: If you're at your laptop or desktop a lot more than I am, and you want to organise everything with reminders in Emacs, I say: Go for it. I'm only adding another level of functionality because I need to. But it works out well for me. Always do what works best for you and gets the job done.

Once I'm done with a task, I archive it (C-c $) and it goes to the appropriate archive list in /archives sorted by year. That way, I have a list of all the tasks I dealt with. it adds a time/date stamp and I can add a note before I close it and it gets whisked away. This is also searchable.

Since I'm not contracted and I don't deal with time stuff for certain projects (I mean I don't need to know how much time I've spent on it), I don't use that aspect for tasks in org-mode. It's amazing for people who need it, but that's not me so it isn't an issue for me. My work is entirely results-oriented. If it gets done on schedule or ahead of schedule, that's all my boss wants to know. She doesn't care if I spend 1 hour on it or 3 weeks. As long as it gets done, I'm good. I do add scheduled times to tasks though and I do use agenda to see what's next that I have to deal with. Usually, with business (or even some personal) tasks, I'll do a C-c C-s to add a schedule time to it. You can add deadlines too if you want - it's up to you. As long as you can see it in your agenda and refer to that frequently (I look at it all the time in Emacs), you're good to go. You know what you need to do next and have a general idea of how long you have to deal with it.

So: Tasks that are done from todo.org get sent to the archives. Links and references get sent to links-whateves.org as reference. Everything is tagged, everything is filed, everything is organised. It's all good, right?

Denote

Well, no. That's only the general/task stuff. Actually doing the tasks - the research, the email correspondence chains - all of that has to go into project notes. As I said: major projects are broken down like that. References, steps to be taken, all the rest is broken down. Denote is great because I don't need a database that has a complex system to sync between more than one system. Prot designed denote to work out of the box on any system or setup you have - no database required. And how, you might ask? Well, you might very well ask that, you might indeed! That is, if you didn't pay careful attention to his demonstration video where he unveiled it.

Like him, I use dired. I've learned to use it for a ton of things. And because of tags (which also mirror the same tags I use Apple-wide and Emacs-wide), I can find things very easily. Each denote file is created with a timestamp (very useful) and tags. This makes organising a breeze. I love it. It's simple and effective and that's all that I need. I can make small notes, large ones, medium-sized ones - it all works. I can easily find stuff when I want to backlink to other notes. Everything is easy to find. I've found it much more useful than org roam for my needs. But if org roam is your thing, that'll work too. I'm not putting it down - I'm just saying that I don't need a database like that. I don't know code and I know I'd just end up screwing up the database anyway. I tried it and database SQL stuff (is it even that? See? I don't know.) is beyond me. I don't know how to maintain it or upgrade it…it's something I don't want to have to deal with. SQL scares me and looks very pointy with claws. So I use Denote.

Note: I know that you don't need to know SQL to use org roam - I know because, again, I did use it for a bit. But the idea of syncing databases across different computers and all that kind of scares me.

All of my Denote notes are org mode notes. I know that you can do other formats like .txt and .md but I just don't bother since everything I need is in org mode.

When I'm working in a project, I'll usually split the frame in half (I use fullscreen for Emacs half the time). On the left are the references, on the right is the note. Flipping between windows is super fast and easy and I do that all the time. I also use avy to jump to different parts of the buffer or, most of the time, I just use meow "visit" with the v key. That works really well for me. How you jump around is up to you, but jumping around is important. Like most Emacs users, I almost never, ever touch the trackpad or mouse. I don't have to. I love that. I'm faster and better without it. Plus, I type super fast.

links-X.org

I structure all of my 'links' notes in refile with subheaders. For instance: For music, I have subheaders for 60s, 70s, 80s, 90s, 00s, 10s, 20s to categorise music. For fashion, I have brand names like: Cartier, Valentino, Armani, Hermes, YSL, etc…. For real estate, it's first broken down by country/city etc…. so like France and then subheader Paris, etc…. That sorta thing. So when I hit refile on something, I just type a few breakdown keywords and I get the relevant file and header/subheader that I need. This way, it takes me about 3 seconds to refile something at most.

Stuff that goes into links-X.org never gets a TODO. It's not a TODO - it's a reference. It's a thing to look up. Everything in todo.org gets a TODO, but not stuff that goes to "refile". It has tags, and it has a date and time and even sometimes notes, but it doesn't have a TODO.

Also: Stuff that goes into my 'notes' doesn't have a TODO. If it has a TODO, it's in todo.org. A todo may reference something in refile or notes, but stuff in there isn't an action (a TODO).

repeat-tasks.org

As I said: My repeats are actually in my reminders/calendar. BUT, I have a repeat-tasks.org as a master list, broken down the same way, so that I can have a master list to reference to in Emacs. It's just more organised that way. If you're gonna put a repeat into your life, there better be a good reason for it. It better be worth it. And if it's worth it, it's worth noting down so you don't forget any relevant details. Such as adding a note to it with pertinent info and maybe even a link to a file in notes with even more info (maybe like a journal entry) about why I wanted to add this into my life so that it bugs me every day or week or whatever. It may be important. If it's gonna bug you, it probably is important, so write it down so you don't forget.

With all that said

You can see the general structure I use to organise everything. I'll have a record of everything I do, about what I'm thinking, about events in my life, habits I want to pick up, changes I want to make, things I want to learn, business deals I need to follow up on, items of interest my boss wants to buy or look into, real estate she's interested in acquiring, and more. Much more. Everything, really. It's all categorised, tagged, broken down, refiled, archived, added to my notes, referenced, linked - all from Emacs. Then it gets put into the Apple system to be shared with my boss and my gf and roomies/bffs. Travel plans are broken down the same way including ticket info, prices, links to the site I got them from, etc…. meetings are set up the same way with any emails linked, links from online dealing with that info, my own notes, etc… everything is there. It's also backed up in safe places (more than one) so that if anything happens, I have it all available (and still available during such a crisis) on my other devices. It's all text files so anything can read it.

I hope that this helped 🙃