0

I am using emacs inside the terminal. In org-mode when the cursor on top of a hyperlink and I press enter the URL opens in the default browser.

* hello

[[www.google.com]]  // cursor is on the `google` key and `Ctrl+m` opens it in the browser

Is it possible to prevent this behavior while allowing it when there is a mouse click on the URL could open the url in the browser.

1 Answer 1

1

Set org-return-follows-link to nil. In my case, I set it to t and C-h v org-return-follows-link says:

org-return-follows-link is a variable defined in ‘org-keys.el’.

Its value is t
Original value was nil

Non-nil means on links RET will follow the link.
In tables, the special behavior of RET has precedence.

You probably set it to t in your init/custom file.

5
  • You are right, I had (setq org-return-follows-link t) in my config file, I am not sure was it set to t by default
    – alper
    Aug 15, 2022 at 19:18
  • No, the default value is nil as the docstring states.
    – NickD
    Aug 15, 2022 at 19:20
  • Hm when I removed (setq org-return-follows-link t) something else still set it to t I am not sure which functions sets it, to be safe I have set it to nil at the end of the config file
    – alper
    Aug 15, 2022 at 19:22
  • Do you have a custom file? What does C-h v custom-file say?
    – NickD
    Aug 15, 2022 at 19:26
  • 1
    it returns: "~/.emacs.d/config/custom.el" and ah its org-return-follows-link t in it as well . I was aonly looking into ~/emacs file
    – alper
    Aug 15, 2022 at 19:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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