1

I have this function to open links in firefox with mu4e, which I found somewhere here.

;; open with firefox
    (defun my-browse-url-firefox-new-tab (url &optional new-window)
      "Open URL in a new tab in Firefox."
      (interactive (browse-url-interactive-arg "URL: "))
      (let ((cmd (shell-command-to-string
          (concat "~/src/firefox/mozilla-xremote-client -a any 'openURL("
              url ",new-tab)'"))))
    (unless (string= "" cmd)
      (message "Starting Firefox...")
      (start-process (concat "firefox " url) nil "/usr/bin/firefox" url)
      (message "Starting Firefox...done"))))

(define-key mu4e-view-mode-map (kbd "C-c C-o") #'my-browse-url-firefox-new-tab)

My problem is that it only works for "direct" links, not hypertext. If I have a link such as mylink, it displays URL: http://mylink, not URL http://www.example.com. Can anyone help?

  • What version of Org mode are you using? I believe this was a bug that was introduced recently and has been been fixed very recently in the master branch (as far as I know, the bug never made it to the stable branch). The bug was caused by commit d07d8ff4, dated Aug. 29. It was fixed by commit 1fd07c1e, dated Sep. 18. – NickD Sep 30 at 11:11
  • Thanks Nick. I had 9.1.9 (built-in) installed. I then went an installed 9.2.6 (gnu), by going M-x package-list-packages > org > Other versions > Install. This didn't fix it, but it broke my automatic agenda which I have loading on start up, and I don't know how to delete the new org version again, as it doesn't seem to have a delete button. I know have to "orgs" in the package list, one is the old built-in and the other says "Status: Installed in ‘org-9.2.6/’, shadowing a built-in package. – Bertil Johannes Ipsen Oct 1 at 9:24
  • M-x package-delete RET TAB should give you a list of installed packages - clicking on the appropriate Org mode package should get rid of it and get you back to the pre-installed version. – NickD Oct 1 at 15:33
  • Thanks so much! I had to go a delete a few packages, but it eventually worked. Any idea on how to solve the original issue now? – Bertil Johannes Ipsen Oct 3 at 17:20
  • Sorry, no: it sounded a bit like the bug I mentioned, but since it's not, I cannot think of any other reason. BTW, eventually you'll have to upgrade, so you might want to investigate why your automatic agenda broke. It might prevent a panic moment in the future (DAMHIKT). – NickD Oct 3 at 18:05
0

For email in text format, g will prompt you for the url you want to visit, which you select by number. (The numbers appear next to the link in the message).

For emails in html format, put your cursor on the url you want to visit and type M-RET. Please, find more info about Mu4e keybindings here.

You may also be interested by opening the whole email in the browser; by defining a custom action

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.