1

I had a link to a headline in another org file that worked fine, but then I archived that subtree. I thought that updating the file to reflect the "_archive" part of the name would work, but C-c C-o does not work for such files. It does for .org files.

That is:

[[file:notes.org::*test%20heading%20here][this link works when the heading is there]]

[[file:notes.org_archive::*test%20heading%20here][this one doesn't, even if the heading is there]]

I'm on Windows and it looks like emacs is looking for another program to handle a org_archive file. How can I tell emacs/org-mode to treat .org_archive files like .org files?

2

You should be able to associate .org_archive extension with org-mode by adding this to your init file:

(add-to-list 'auto-mode-alist '("\\.org_archive\\'" . org-mode))

Emacs doesn't match file extensions in a fuzzy manner, so having an extension that just starts with .org isn't enough. If .org_archive isn't the only extension you're interested in, you can change the regular expression to match more variations.

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.