Browse Source

ol: Avoid initial input when completing function for storing link

* lisp/ol.el (org-store-link): Use completing-read's DEF argument
rather than INITIAL-INPUT, which is discouraged (see Elisp manual) and
may hide the other choices depending on the completion framework.

Reported-by: John Kitchin <jkitchin@andrew.cmu.edu>
Ref: https://orgmode.org/list/CAJ51ETqO9A8mE0W3pgU2cFzaZsESdYXAV0X-8veY+_V9AwPHdQ@mail.gmail.com
Kyle Meyer 4 năm trước cách đây
mục cha
commit
00b4de3294
1 tập tin đã thay đổi với 3 bổ sung3 xóa
  1. 3 3
      lisp/ol.el

+ 3 - 3
lisp/ol.el

@@ -1496,9 +1496,9 @@ non-nil."
 		  (apply #'org-link-store-props
 			 (cdr (assoc-string
 			       (completing-read
-				"Which function for creating the link? "
-				(mapcar #'car results-alist)
-				nil t (symbol-name name))
+                                (format "Store link with (default %s): " name)
+                                (mapcar #'car results-alist)
+                                nil t nil nil (symbol-name name))
 			       results-alist)))
 		  t))))
 	(setq link (plist-get org-store-link-plist :link))