If I am on top of a URL and pressed Ctrl+Enter (C-m), it opens the link on my default browser. I just want to have default behavior of C-m, which is new-line. Is it possible to prevent this while keeping C-<mouse click on the URL> to open it browser enabled.

Definition for C-m key returns following:

RET runs the command org-return (found in org-mode-map), which is an interactive native compiled Lisp function in ‘org.el’.

It is bound to RET, .

(org-return &optional INDENT ARG INTERACTIVE)

Goto next table row or insert a newline.

Calls ‘org-table-next-row’ or ‘newline’, depending on context.

When optional INDENT argument is non-nil, call ‘newline-and-indent’ with ARG, otherwise call ‘newline’ with ARG and INTERACTIVE.

When ‘org-return-follows-link’ is non-nil and point is on a timestamp or a link, call ‘org-open-at-point’. However, it will not happen if point is in a table or on a "dead" object (e.g., within a comment). In these case, you need to use ‘org-open-at-point’ directly.

  • What is cmd? Are you on MacOS? Is cmd+ret really bound to the same function as cmd+m? What happens if org-returns-follows-link is set to nil? As you might be able to tell, I find your question confusing.
    – NickD
    Nov 30 '21 at 22:11
  • @NickD Sorry I meant cmd == Ctrl // (setq org-returns-follows-link nil) did not help still opens the URL in the browser.
    – alper
    Dec 1 '21 at 10:35
  • Oops - misspelt the variable: should be org-return-follows-link - can you try that?
    – NickD
    Dec 1 '21 at 12:43
  • No problem I just tried but still facing with the same issue :-(
    – alper
    Dec 1 '21 at 13:17

Your Answer

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

Browse other questions tagged or ask your own question.