1

I've just started to use org-mode in emacs (spacemacs). One simple thing that is confusing me is how to quickly access my org files. What is a solid and simple strategy for quickly pulling up a list of org files?

By way of example, let's say I have a directory where I store org files (though the solution I'm looking for would hopefully work for multiple directories). I want to be able to quickly access that directory, search for a specific file, and load it. How would I do that?

The functionality I am thinking of here is similar to that the the projectile project provides for a coding project...

  • 2
    Org files can be anywhere so there is no simple answer to this. Are you talking about your agenda files perhaps? Those tend to be in one directory (but not necessarily), so accessing the directory will give you access to all of them. But without knowing your situation, it's impossible to answer. – NickD Jul 20 at 17:34
  • Yeah, it doesn't matter specifically what kind of org files I would say, but let's say there is a directory (or directories) that I would like to quickly access/search and load from. For a coding project, this gets handled with the idea of a "project" in projectile. I guess what I wonder is whether there is a similar tool or customization technique to make it possible to quickly access files in a similar manner. I'll try to update the question to be a bit more specific. – fraxture Jul 20 at 18:51
1

Emacs provides a lot of different ways to quickly find files, and even more are available with add on packages. For your specific case, finding org files in a particular directory, you could use the built-in ido-find-file-in-dir:

(ido-find-file-in-dir "~/org/")

Running this command will open an interactive file selection dialogue in the "~/org/" directory. You'll see a list of all the files that are present, and you can progressively narrow that list by typing in part of the name you are looking for.

If that's good enough, you'll need to create a keybinding:

(defun my-org-finder ()
  (interactive)  
  (ido-find-file-in-dir "~/org/"))

(global-set-key (kbd "C-c f") 'my-org-finder)

The sky is the limit here. If you have a specific requirement, be explicit, and there will likely be something available for you.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.