diff --git a/lisp/oc-basic.el b/lisp/oc-basic.el index 1dd433cde..25bbe3784 100644 --- a/lisp/oc-basic.el +++ b/lisp/oc-basic.el @@ -73,6 +73,7 @@ (require 'seq) (declare-function org-open-at-point "org" (&optional arg)) +(declare-function org-open-file "org" (path &optional in-emacs line search)) (declare-function org-element-interpret-data "org-element" (data)) (declare-function org-element-property "org-element" (property element)) diff --git a/lisp/ox-ascii.el b/lisp/ox-ascii.el index 3c39225a3..cfc2bc5fd 100644 --- a/lisp/ox-ascii.el +++ b/lisp/ox-ascii.el @@ -953,9 +953,10 @@ channel." (org-export-resolve-fuzzy-link link info) ;; Ignore broken links. On broken link, ;; `org-export-resolve-id-link' will throw an - ;; error and `ignore-error' will return nil. - (ignore-error 'org-link-broken - (org-export-resolve-id-link link info))))) + ;; error and we will return nil. + (condition-case nil + (org-export-resolve-id-link link info) + (org-link-broken nil))))) (when dest (concat (org-ascii--fill-string diff --git a/lisp/ox-md.el b/lisp/ox-md.el index c268aa5dd..50db53910 100644 --- a/lisp/ox-md.el +++ b/lisp/ox-md.el @@ -195,8 +195,9 @@ of contents can refer to headlines." (lambda (link) (equal headline ;; Ignore broken links. - (ignore-error 'org-link-broken - (org-export-resolve-link link info)))) + (condition-case nil + (org-export-resolve-id-link link info) + (org-link-broken nil)))) info t)))) (defun org-md--headline-title (style level title &optional anchor tags) diff --git a/testing/org-test.el b/testing/org-test.el index d19c7f044..0520e82f9 100644 --- a/testing/org-test.el +++ b/testing/org-test.el @@ -471,12 +471,12 @@ TIME can be a non-nil Lisp time value, or a string specifying a date and time." (or time ,at) args))) ((symbol-function 'decode-time) (lambda (&optional time zone form) - (condition-case err + (condition-case nil (funcall ,(symbol-function 'decode-time) (or time ,at) zone form) - ;; Fallback for Emacs <27.1. - (error (funcall ,(symbol-function 'decode-time) - (or time ,at) zone))))) + (wrong-number-of-arguments + (funcall ,(symbol-function 'decode-time) + (or time ,at)))))) ((symbol-function 'encode-time) (lambda (time &rest args) (apply ,(symbol-function 'encode-time) (or time ,at) args))) @@ -492,7 +492,7 @@ TIME can be a non-nil Lisp time value, or a string specifying a date and time." (funcall ,(symbol-function 'set-file-times) file (or time ,at)))) ((symbol-function 'time-add) (lambda (a b) (funcall ,(symbol-function 'time-add) - (or a ,at) (or b ,at)))) + (or a ,at) (or b ,at)))) ((symbol-function 'time-equal-p) (lambda (a b) (funcall ,(symbol-function 'time-equal-p) (or a ,at) (or b ,at))))