فهرست منبع

Make org-open-at-point only ask once whether new header should be created

* lisp/org.el (org-open-at-point): Make org-open-at-point only ask once
about creating a new headline

When following "thisfile" links org-open-at-point is kind enough to
retry org-link-search again after widening the buffer it can't be
found. However org-link-search also asks the question "No match -
create this as a new heading? (y or n)" when target can't be
found. This means that the question is asked twice when following a
nonexistent link and answering no.

This is fixed by setting org-link-search-inhibit-query in first try,
so only second invocation asks the question.

TINYCHANGE

Patch by Anders Waldenborg
Carsten Dominik 14 سال پیش
والد
کامیت
5147f6b008
1فایلهای تغییر یافته به همراه2 افزوده شده و 1 حذف شده
  1. 2 1
      lisp/org.el

+ 2 - 1
lisp/org.el

@@ -9527,7 +9527,8 @@ application the system uses for this file type."
 			      ((equal arg '(16)) ''org-occur)
 			      (t nil))
 		       ,pos)))
-	    (condition-case nil (eval cmd)
+	    (condition-case nil (let ((org-link-search-inhibit-query t))
+				  (eval cmd))
 	      (error (progn (widen) (eval cmd))))))
 
 	 (t