简体   繁体   中英

Keyboard shortcut for opening http link in emacs or org-mode

When I am in org-mode and I have http links in my todo lists and my cursor is in the middle of a huge http link, is there a keyboard shortcut to copy that link so that I can paste it in a browser?

Take care, Rajiv

I misunderstood you question at first, and I thought that you wanted to eg embed the link into an email.

Then this code should have worked.

(defun myorg-copy-link ()
  (interactive)
  (kill-new
   (save-excursion
     (skip-chars-forward "^]\n\r")
     (when (org-in-regexp org-bracket-link-regexp 1)
       (setq link 
             (org-link-unescape 
              (org-match-string-no-properties 1))))))

But if you only want browsing, org-open-at-point is enough.

如果您不处于组织模式,则“ browse-url”将在您的默认浏览器中打开一个URL。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM