2

I found this today by chance: I visited the help file on split-string with C-h f split-strings:

split-string is a compiled Lisp function in ‘subr.el’.

(split-string STRING &optional SEPARATORS OMIT-NULLS TRIM)

except that subr.el is underlined like a hyperlink and doing RET with point on it opens the source code.

I copied it this section to a Markdown file and the text was still underlined. I did RET with point on it and it also opened the source code!

I have these modes active in the document: [(Markdown ElDoc Wrap Fill)]. If I type the same characters as in ‘subr.el’ (copy-pasting the quotes, which I don't have in my keyboard), it is not highlighted and RET does not follow the link.

Including hyperlinks like this one in Markdown is the one thing where I see org mode as superior to markdown mode.

Is it possible to add my own links to other files in markdown mode?

Update: The ability to follow the link with RET is lost when killing and yanking the text that contains ‘subr.el’., or closing and opening the buffer for the file, so I believe this is some special ability in Emacs that comes from copying text from a documentation file and not a feature of Markdown mode.

3

markdown-follow-thing-at-point (C-c C-o) and also markdown-follow-link-at-point will follow links. If you have a link like [filelink](/path/to/file.md) then calling one of the above functions while cursor is on the markdown link will take you to the file.

  • Yes, both work. I checked that the ability to follow the link is lost in some cases and I updated the question. Do you know what's the feature that makes Emacs follow the link copied from the documentation with RET? – miguelmorin Oct 3 at 9:51
  • It's much easier to link to info files via org mode -- see this SE discussion. I'm not sure how to do it in straightforward fashion with markdown. – mclear Oct 3 at 16:17
  • I agree with you and I use Org mode a lot, but for just text I prefer markdown. – miguelmorin Oct 6 at 15:41

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.