From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Lundin Subject: [Bug] org-open-at-point no longer unescapes shell/elisp links Date: Mon, 03 Mar 2014 07:52:48 -0600 Message-ID: <87mwh7o0cv.fsf@fastmail.fm> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51227) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKTIe-0008OK-6R for emacs-orgmode@gnu.org; Mon, 03 Mar 2014 08:53:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WKTIY-0006H8-BR for emacs-orgmode@gnu.org; Mon, 03 Mar 2014 08:52:56 -0500 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:41145) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKTIY-0006Gx-30 for emacs-orgmode@gnu.org; Mon, 03 Mar 2014 08:52:50 -0500 Received: from archeee (unknown [50.172.132.15]) by mail.messagingengine.com (Postfix) with ESMTPA id B177368027D for ; Mon, 3 Mar 2014 08:52:48 -0500 (EST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: org-mode Mailing List When I create a link with org-insert-link, it automatically escapes spaces. E.g.,=20 C-c C-l shell:ls *.org [RET] a shell link [RET] results in [[shell:ls%20*.org][a shell link]] The problem is that the recent rewrite of org-open-at-point (commit fc9ce86cfc1ecf7e86028027a12875a26500e774) removed all invocations of org-unescape-link. As a result, if I use org-open-at-point on the link above, it sends the string "ls%20*.org" to my shell, which complains:=20 "zsh:1: no matches found: ls%20*.org" At the bottom of the mail you'll find the backtrack that results when I call org-open-at-point on an elisp link: [[elisp:(org-agenda%20"a")][agenda]] Thanks, Matt Debugger entered--Lisp error: (void-function org-agenda%20) (org-agenda%20 "a") eval((org-agenda%20 "a")) (if (eq (string-to-char cmd) 40) (eval (read cmd)) (call-interactively (r= ead cmd))) (message "%s =3D> %s" cmd (if (eq (string-to-char cmd) 40) (eval (read cm= d)) (call-interactively (read cmd)))) (if (or (and (org-string-nw-p org-confirm-elisp-link-not-regexp) (org-str= ing-match-p org-confirm-elisp-link-not-regexp cmd)) (not org-confirm-elisp-= link-function) (funcall org-confirm-elisp-link-function (format "Execute \"= %s\" as elisp? " (org-add-props cmd nil (quote face) (quote org-warning))))= ) (message "%s =3D> %s" cmd (if (eq (string-to-char cmd) 40) (eval (read cm= d)) (call-interactively (read cmd)))) (error "Abort")) (let ((cmd path)) (if (or (and (org-string-nw-p org-confirm-elisp-link-no= t-regexp) (org-string-match-p org-confirm-elisp-link-not-regexp cmd)) (not = org-confirm-elisp-link-function) (funcall org-confirm-elisp-link-function (= format "Execute \"%s\" as elisp? " (org-add-props cmd nil (quote face) (quo= te org-warning))))) (message "%s =3D> %s" cmd (if (eq (string-to-char cmd) = 40) (eval (read cmd)) (call-interactively (read cmd)))) (error "Abort"))) (cond ((equal type "file") (if (string-match "[*?{]" (file-name-nondirect= ory path)) (dired path) (apply (or (let ((app ...)) (nth 1 (assoc ... org-l= ink-protocols))) (function org-open-file)) path arg (let ((option (org-elem= ent-property :search-option context))) (cond ((not option) nil) ((org-strin= g-match-p "\\`[0-9]+\\'" option) (list ...)) (t (list nil option))))))) ((a= ssoc type org-link-protocols) (funcall (nth 1 (assoc type org-link-protocol= s)) path)) ((equal type "help") (let ((f-or-v (intern path))) (cond ((fboun= dp f-or-v) (describe-function f-or-v)) ((boundp f-or-v) (describe-variable = f-or-v)) (t (error "Not a known function or variable"))))) ((equal type "ma= ilto") (let ((cmd (car org-link-mailto-program)) (args (cdr org-link-mailto= -program)) (spec (format-spec-make 97 path 115 (let (...) (if ... "" ...)))= ) final-args) (apply cmd (dolist (arg args (nreverse final-args)) (if (not = (stringp arg)) (push arg final-args) (push (format-spec arg spec) final-arg= s)))))) ((member type (quote ("http" "https" "ftp" "news"))) (browse-url (o= rg-link-escape-browser (concat type ":" path)))) ((equal type "doi") (brows= e-url (org-link-escape-browser (concat org-doi-server-url path)))) ((equal = type "message") (browse-url (concat type ":" path))) ((equal type "shell") = (let ((buf (generate-new-buffer "*Org Shell Output")) (cmd path)) (if (or (= and (org-string-nw-p org-confirm-shell-link-not-regexp) (string-match org-c= onfirm-shell-link-not-regexp cmd)) (not org-confirm-shell-link-function) (f= uncall org-confirm-shell-link-function (format "Execute \"%s\" in shell? " = (org-add-props cmd nil ... ...)))) (progn (message "Executing %s" cmd) (she= ll-command cmd buf) (when (featurep (quote midnight)) (setq clean-buffer-li= st-kill-buffer-names (cons buf clean-buffer-list-kill-buffer-names)))) (err= or "Abort")))) ((equal type "elisp") (let ((cmd path)) (if (or (and (org-st= ring-nw-p org-confirm-elisp-link-not-regexp) (org-string-match-p org-confir= m-elisp-link-not-regexp cmd)) (not org-confirm-elisp-link-function) (funcal= l org-confirm-elisp-link-function (format "Execute \"%s\" as elisp? " (org-= add-props cmd nil ... ...)))) (message "%s =3D> %s" cmd (if (eq (string-to-= char cmd) 40) (eval (read cmd)) (call-interactively (read cmd)))) (error "A= bort")))) ((equal type "id") (require (quote ord-id)) (funcall (nth 1 (asso= c "id" org-link-protocols)) path)) ((member type (quote ("coderef" "custom-= id" "fuzzy" "radio"))) (unless (run-hook-with-args-until-success (quote org= -open-link-functions) path) (if (not arg) (org-mark-ring-push) (switch-to-b= uffer-other-window (org-get-buffer-for-internal-link (current-buffer)))) (l= et ((cmd (\` (org-link-search ... ... ...)))) (condition-case nil (let ((or= g-link-search-inhibit-query t)) (eval cmd)) (error (progn (widen) (eval cmd= ))))))) (t (browse-url-at-point))) (save-current-buffer (set-buffer (or reference-buffer (current-buffer))) = (cond ((equal type "file") (if (string-match "[*?{]" (file-name-nondirector= y path)) (dired path) (apply (or (let (...) (nth 1 ...)) (function org-open= -file)) path arg (let ((option ...)) (cond (... nil) (... ...) (t ...))))))= ((assoc type org-link-protocols) (funcall (nth 1 (assoc type org-link-prot= ocols)) path)) ((equal type "help") (let ((f-or-v (intern path))) (cond ((f= boundp f-or-v) (describe-function f-or-v)) ((boundp f-or-v) (describe-varia= ble f-or-v)) (t (error "Not a known function or variable"))))) ((equal type= "mailto") (let ((cmd (car org-link-mailto-program)) (args (cdr org-link-ma= ilto-program)) (spec (format-spec-make 97 path 115 (let ... ...))) final-ar= gs) (apply cmd (dolist (arg args (nreverse final-args)) (if (not ...) (push= arg final-args) (push ... final-args)))))) ((member type (quote ("http" "h= ttps" "ftp" "news"))) (browse-url (org-link-escape-browser (concat type ":"= path)))) ((equal type "doi") (browse-url (org-link-escape-browser (concat = org-doi-server-url path)))) ((equal type "message") (browse-url (concat typ= e ":" path))) ((equal type "shell") (let ((buf (generate-new-buffer "*Org S= hell Output")) (cmd path)) (if (or (and (org-string-nw-p org-confirm-shell-= link-not-regexp) (string-match org-confirm-shell-link-not-regexp cmd)) (not= org-confirm-shell-link-function) (funcall org-confirm-shell-link-function = (format "Execute \"%s\" in shell? " ...))) (progn (message "Executing %s" c= md) (shell-command cmd buf) (when (featurep ...) (setq clean-buffer-list-ki= ll-buffer-names ...))) (error "Abort")))) ((equal type "elisp") (let ((cmd = path)) (if (or (and (org-string-nw-p org-confirm-elisp-link-not-regexp) (or= g-string-match-p org-confirm-elisp-link-not-regexp cmd)) (not org-confirm-e= lisp-link-function) (funcall org-confirm-elisp-link-function (format "Execu= te \"%s\" as elisp? " ...))) (message "%s =3D> %s" cmd (if (eq ... 40) (eva= l ...) (call-interactively ...))) (error "Abort")))) ((equal type "id") (re= quire (quote ord-id)) (funcall (nth 1 (assoc "id" org-link-protocols)) path= )) ((member type (quote ("coderef" "custom-id" "fuzzy" "radio"))) (unless (= run-hook-with-args-until-success (quote org-open-link-functions) path) (if = (not arg) (org-mark-ring-push) (switch-to-buffer-other-window (org-get-buff= er-for-internal-link (current-buffer)))) (let ((cmd (\` ...))) (condition-c= ase nil (let (...) (eval cmd)) (error (progn ... ...)))))) (t (browse-url-a= t-point)))) (with-current-buffer (or reference-buffer (current-buffer)) (cond ((equal= type "file") (if (string-match "[*?{]" (file-name-nondirectory path)) (dir= ed path) (apply (or (let (...) (nth 1 ...)) (function org-open-file)) path = arg (let ((option ...)) (cond (... nil) (... ...) (t ...)))))) ((assoc type= org-link-protocols) (funcall (nth 1 (assoc type org-link-protocols)) path)= ) ((equal type "help") (let ((f-or-v (intern path))) (cond ((fboundp f-or-v= ) (describe-function f-or-v)) ((boundp f-or-v) (describe-variable f-or-v)) = (t (error "Not a known function or variable"))))) ((equal type "mailto") (l= et ((cmd (car org-link-mailto-program)) (args (cdr org-link-mailto-program)= ) (spec (format-spec-make 97 path 115 (let ... ...))) final-args) (apply cm= d (dolist (arg args (nreverse final-args)) (if (not ...) (push arg final-ar= gs) (push ... final-args)))))) ((member type (quote ("http" "https" "ftp" "= news"))) (browse-url (org-link-escape-browser (concat type ":" path)))) ((e= qual type "doi") (browse-url (org-link-escape-browser (concat org-doi-serve= r-url path)))) ((equal type "message") (browse-url (concat type ":" path)))= ((equal type "shell") (let ((buf (generate-new-buffer "*Org Shell Output")= ) (cmd path)) (if (or (and (org-string-nw-p org-confirm-shell-link-not-rege= xp) (string-match org-confirm-shell-link-not-regexp cmd)) (not org-confirm-= shell-link-function) (funcall org-confirm-shell-link-function (format "Exec= ute \"%s\" in shell? " ...))) (progn (message "Executing %s" cmd) (shell-co= mmand cmd buf) (when (featurep ...) (setq clean-buffer-list-kill-buffer-nam= es ...))) (error "Abort")))) ((equal type "elisp") (let ((cmd path)) (if (o= r (and (org-string-nw-p org-confirm-elisp-link-not-regexp) (org-string-matc= h-p org-confirm-elisp-link-not-regexp cmd)) (not org-confirm-elisp-link-fun= ction) (funcall org-confirm-elisp-link-function (format "Execute \"%s\" as = elisp? " ...))) (message "%s =3D> %s" cmd (if (eq ... 40) (eval ...) (call-= interactively ...))) (error "Abort")))) ((equal type "id") (require (quote = ord-id)) (funcall (nth 1 (assoc "id" org-link-protocols)) path)) ((member t= ype (quote ("coderef" "custom-id" "fuzzy" "radio"))) (unless (run-hook-with= -args-until-success (quote org-open-link-functions) path) (if (not arg) (or= g-mark-ring-push) (switch-to-buffer-other-window (org-get-buffer-for-intern= al-link (current-buffer)))) (let ((cmd (\` ...))) (condition-case nil (let = (...) (eval cmd)) (error (progn ... ...)))))) (t (browse-url-at-point)))) (let ((type (org-element-property :type context)) (path (org-element-prop= erty :path context))) (with-current-buffer (or reference-buffer (current-bu= ffer)) (cond ((equal type "file") (if (string-match "[*?{]" (file-name-nond= irectory path)) (dired path) (apply (or (let ... ...) (function org-open-fi= le)) path arg (let (...) (cond ... ... ...))))) ((assoc type org-link-proto= cols) (funcall (nth 1 (assoc type org-link-protocols)) path)) ((equal type = "help") (let ((f-or-v (intern path))) (cond ((fboundp f-or-v) (describe-fun= ction f-or-v)) ((boundp f-or-v) (describe-variable f-or-v)) (t (error "Not = a known function or variable"))))) ((equal type "mailto") (let ((cmd (car o= rg-link-mailto-program)) (args (cdr org-link-mailto-program)) (spec (format= -spec-make 97 path 115 ...)) final-args) (apply cmd (dolist (arg args ...) = (if ... ... ...))))) ((member type (quote ("http" "https" "ftp" "news"))) (= browse-url (org-link-escape-browser (concat type ":" path)))) ((equal type = "doi") (browse-url (org-link-escape-browser (concat org-doi-server-url path= )))) ((equal type "message") (browse-url (concat type ":" path))) ((equal t= ype "shell") (let ((buf (generate-new-buffer "*Org Shell Output")) (cmd pat= h)) (if (or (and ... ...) (not org-confirm-shell-link-function) (funcall or= g-confirm-shell-link-function ...)) (progn (message "Executing %s" cmd) (sh= ell-command cmd buf) (when ... ...)) (error "Abort")))) ((equal type "elisp= ") (let ((cmd path)) (if (or (and ... ...) (not org-confirm-elisp-link-func= tion) (funcall org-confirm-elisp-link-function ...)) (message "%s =3D> %s" = cmd (if ... ... ...)) (error "Abort")))) ((equal type "id") (require (quote= ord-id)) (funcall (nth 1 (assoc "id" org-link-protocols)) path)) ((member = type (quote ("coderef" "custom-id" "fuzzy" "radio"))) (unless (run-hook-wit= h-args-until-success (quote org-open-link-functions) path) (if (not arg) (o= rg-mark-ring-push) (switch-to-buffer-other-window (org-get-buffer-for-inter= nal-link ...))) (let ((cmd ...)) (condition-case nil (let ... ...) (error .= ..))))) (t (browse-url-at-point))))) (cond ((not context) (user-error "No link found")) ((and (memq type (quot= e (headline inlinetask))) (progn (save-excursion (beginning-of-line) (looki= ng-at org-complex-heading-regexp)) (or (not (match-beginning 5)) (< (point)= (match-beginning 5))))) (let* ((data (org-offer-links-in-entry (current-bu= ffer) (point) arg)) (links (car data)) (links-end (cdr data))) (if links (d= olist (link (if (stringp links) (list links) links)) (search-forward link n= il links-end) (goto-char (match-beginning 0)) (org-open-at-point)) (require= (quote org-attach)) (org-attach-reveal (quote if-exists))))) ((> (point) (= save-excursion (goto-char (org-element-property :end context)) (skip-chars-= backward " ") (point))) (user-error "No link found")) ((eq type (quote tim= estamp)) (org-follow-timestamp-link)) ((and (memq type (quote (headline inl= inetask))) (progn (save-excursion (beginning-of-line) (looking-at org-compl= ex-heading-regexp)) (and (match-beginning 5) (>=3D (point) (match-beginning= 5))))) (org-tags-view arg (substring (match-string 5) 0 -1))) ((eq type (q= uote link)) (let ((type (org-element-property :type context)) (path (org-el= ement-property :path context))) (with-current-buffer (or reference-buffer (= current-buffer)) (cond ((equal type "file") (if (string-match "[*?{]" ...) = (dired path) (apply ... path arg ...))) ((assoc type org-link-protocols) (f= uncall (nth 1 ...) path)) ((equal type "help") (let (...) (cond ... ... ...= ))) ((equal type "mailto") (let (... ... ... final-args) (apply cmd ...))) = ((member type (quote ...)) (browse-url (org-link-escape-browser ...))) ((eq= ual type "doi") (browse-url (org-link-escape-browser ...))) ((equal type "m= essage") (browse-url (concat type ":" path))) ((equal type "shell") (let (.= .. ...) (if ... ... ...))) ((equal type "elisp") (let (...) (if ... ... ...= ))) ((equal type "id") (require (quote ord-id)) (funcall (nth 1 ...) path))= ((member type (quote ...)) (unless (run-hook-with-args-until-success ... p= ath) (if ... ... ...) (let ... ...))) (t (browse-url-at-point)))))) ((or (e= q type (quote footnote-reference)) (and (eq type (quote footnote-definition= )) (save-excursion (skip-chars-forward " ") (let ((begin ...)) (if begin (= < ... begin) (=3D ... ...)))))) (org-footnote-action)) (t (user-error "No l= ink found"))) (let* ((context (org-element-context)) type) (while (and (not (memq (setq= type (org-element-type context)) (quote (headline inlinetask link footnote= -definition footnote-reference timestamp)))) (setq context (org-element-pro= perty :parent context)))) (cond ((not context) (user-error "No link found")= ) ((and (memq type (quote (headline inlinetask))) (progn (save-excursion (b= eginning-of-line) (looking-at org-complex-heading-regexp)) (or (not (match-= beginning 5)) (< (point) (match-beginning 5))))) (let* ((data (org-offer-li= nks-in-entry (current-buffer) (point) arg)) (links (car data)) (links-end (= cdr data))) (if links (dolist (link (if ... ... links)) (search-forward lin= k nil links-end) (goto-char (match-beginning 0)) (org-open-at-point)) (requ= ire (quote org-attach)) (org-attach-reveal (quote if-exists))))) ((> (point= ) (save-excursion (goto-char (org-element-property :end context)) (skip-cha= rs-backward " ") (point))) (user-error "No link found")) ((eq type (quote = timestamp)) (org-follow-timestamp-link)) ((and (memq type (quote (headline = inlinetask))) (progn (save-excursion (beginning-of-line) (looking-at org-co= mplex-heading-regexp)) (and (match-beginning 5) (>=3D (point) (match-beginn= ing 5))))) (org-tags-view arg (substring (match-string 5) 0 -1))) ((eq type= (quote link)) (let ((type (org-element-property :type context)) (path (org= -element-property :path context))) (with-current-buffer (or reference-buffe= r (current-buffer)) (cond ((equal type "file") (if ... ... ...)) ((assoc ty= pe org-link-protocols) (funcall ... path)) ((equal type "help") (let ... ..= .)) ((equal type "mailto") (let ... ...)) ((member type ...) (browse-url ..= .)) ((equal type "doi") (browse-url ...)) ((equal type "message") (browse-u= rl ...)) ((equal type "shell") (let ... ...)) ((equal type "elisp") (let ..= . ...)) ((equal type "id") (require ...) (funcall ... path)) ((member type = ...) (unless ... ... ...)) (t (browse-url-at-point)))))) ((or (eq type (quo= te footnote-reference)) (and (eq type (quote footnote-definition)) (save-ex= cursion (skip-chars-forward " ") (let (...) (if begin ... ...))))) (org-fo= otnote-action)) (t (user-error "No link found")))) (if (run-hook-with-args-until-success (quote org-open-at-point-functions)= ) nil (let* ((context (org-element-context)) type) (while (and (not (memq (= setq type (org-element-type context)) (quote (headline inlinetask link foot= note-definition footnote-reference timestamp)))) (setq context (org-element= -property :parent context)))) (cond ((not context) (user-error "No link fou= nd")) ((and (memq type (quote (headline inlinetask))) (progn (save-excursio= n (beginning-of-line) (looking-at org-complex-heading-regexp)) (or (not ...= ) (< ... ...)))) (let* ((data (org-offer-links-in-entry ... ... arg)) (link= s (car data)) (links-end (cdr data))) (if links (dolist (link ...) (search-= forward link nil links-end) (goto-char ...) (org-open-at-point)) (require (= quote org-attach)) (org-attach-reveal (quote if-exists))))) ((> (point) (sa= ve-excursion (goto-char (org-element-property :end context)) (skip-chars-ba= ckward " ") (point))) (user-error "No link found")) ((eq type (quote times= tamp)) (org-follow-timestamp-link)) ((and (memq type (quote (headline inlin= etask))) (progn (save-excursion (beginning-of-line) (looking-at org-complex= -heading-regexp)) (and (match-beginning 5) (>=3D ... ...)))) (org-tags-view= arg (substring (match-string 5) 0 -1))) ((eq type (quote link)) (let ((typ= e (org-element-property :type context)) (path (org-element-property :path c= ontext))) (with-current-buffer (or reference-buffer (current-buffer)) (cond= (... ...) (... ...) (... ...) (... ...) (... ...) (... ...) (... ...) (...= ...) (... ...) (... ... ...) (... ...) (t ...))))) ((or (eq type (quote fo= otnote-reference)) (and (eq type (quote footnote-definition)) (save-excursi= on (skip-chars-forward " ") (let ... ...)))) (org-footnote-action)) (t (us= er-error "No link found"))))) (unless (run-hook-with-args-until-success (quote org-open-at-point-functi= ons)) (let* ((context (org-element-context)) type) (while (and (not (memq (= setq type (org-element-type context)) (quote (headline inlinetask link foot= note-definition footnote-reference timestamp)))) (setq context (org-element= -property :parent context)))) (cond ((not context) (user-error "No link fou= nd")) ((and (memq type (quote (headline inlinetask))) (progn (save-excursio= n (beginning-of-line) (looking-at org-complex-heading-regexp)) (or (not ...= ) (< ... ...)))) (let* ((data (org-offer-links-in-entry ... ... arg)) (link= s (car data)) (links-end (cdr data))) (if links (dolist (link ...) (search-= forward link nil links-end) (goto-char ...) (org-open-at-point)) (require (= quote org-attach)) (org-attach-reveal (quote if-exists))))) ((> (point) (sa= ve-excursion (goto-char (org-element-property :end context)) (skip-chars-ba= ckward " ") (point))) (user-error "No link found")) ((eq type (quote times= tamp)) (org-follow-timestamp-link)) ((and (memq type (quote (headline inlin= etask))) (progn (save-excursion (beginning-of-line) (looking-at org-complex= -heading-regexp)) (and (match-beginning 5) (>=3D ... ...)))) (org-tags-view= arg (substring (match-string 5) 0 -1))) ((eq type (quote link)) (let ((typ= e (org-element-property :type context)) (path (org-element-property :path c= ontext))) (with-current-buffer (or reference-buffer (current-buffer)) (cond= (... ...) (... ...) (... ...) (... ...) (... ...) (... ...) (... ...) (...= ...) (... ...) (... ... ...) (... ...) (t ...))))) ((or (eq type (quote fo= otnote-reference)) (and (eq type (quote footnote-definition)) (save-excursi= on (skip-chars-forward " ") (let ... ...)))) (org-footnote-action)) (t (us= er-error "No link found"))))) (if (call-interactively (function org-babel-open-src-block-result)) nil (= org-load-modules-maybe) (move-marker org-open-link-marker (point)) (setq or= g-window-config-before-follow-link (current-window-configuration)) (org-rem= ove-occur-highlights nil nil t) (unless (run-hook-with-args-until-success (= quote org-open-at-point-functions)) (let* ((context (org-element-context)) = type) (while (and (not (memq (setq type ...) (quote ...))) (setq context (o= rg-element-property :parent context)))) (cond ((not context) (user-error "N= o link found")) ((and (memq type (quote ...)) (progn (save-excursion ... ..= .) (or ... ...))) (let* ((data ...) (links ...) (links-end ...)) (if links = (dolist ... ... ... ...) (require ...) (org-attach-reveal ...)))) ((> (poin= t) (save-excursion (goto-char ...) (skip-chars-backward " ") (point))) (us= er-error "No link found")) ((eq type (quote timestamp)) (org-follow-timesta= mp-link)) ((and (memq type (quote ...)) (progn (save-excursion ... ...) (an= d ... ...))) (org-tags-view arg (substring (match-string 5) 0 -1))) ((eq ty= pe (quote link)) (let ((type ...) (path ...)) (with-current-buffer (or refe= rence-buffer ...) (cond ... ... ... ... ... ... ... ... ... ... ... ...))))= ((or (eq type (quote footnote-reference)) (and (eq type ...) (save-excursi= on ... ...))) (org-footnote-action)) (t (user-error "No link found"))))) (m= ove-marker org-open-link-marker nil) (run-hook-with-args (quote org-follow-= link-hook))) (unless (call-interactively (function org-babel-open-src-block-result)) (= org-load-modules-maybe) (move-marker org-open-link-marker (point)) (setq or= g-window-config-before-follow-link (current-window-configuration)) (org-rem= ove-occur-highlights nil nil t) (unless (run-hook-with-args-until-success (= quote org-open-at-point-functions)) (let* ((context (org-element-context)) = type) (while (and (not (memq (setq type ...) (quote ...))) (setq context (o= rg-element-property :parent context)))) (cond ((not context) (user-error "N= o link found")) ((and (memq type (quote ...)) (progn (save-excursion ... ..= .) (or ... ...))) (let* ((data ...) (links ...) (links-end ...)) (if links = (dolist ... ... ... ...) (require ...) (org-attach-reveal ...)))) ((> (poin= t) (save-excursion (goto-char ...) (skip-chars-backward " ") (point))) (us= er-error "No link found")) ((eq type (quote timestamp)) (org-follow-timesta= mp-link)) ((and (memq type (quote ...)) (progn (save-excursion ... ...) (an= d ... ...))) (org-tags-view arg (substring (match-string 5) 0 -1))) ((eq ty= pe (quote link)) (let ((type ...) (path ...)) (with-current-buffer (or refe= rence-buffer ...) (cond ... ... ... ... ... ... ... ... ... ... ... ...))))= ((or (eq type (quote footnote-reference)) (and (eq type ...) (save-excursi= on ... ...))) (org-footnote-action)) (t (user-error "No link found"))))) (m= ove-marker org-open-link-marker nil) (run-hook-with-args (quote org-follow-= link-hook))) org-open-at-point(nil) call-interactively(org-open-at-point) org-return() call-interactively(org-return nil nil)