org-pcomplete: Fix completion inside bracketed link
* lisp/org-pcomplete.el (pcomplete/org-mode/searchhead): Drop closing brackets when completing inside bracketed link [[*head<point>]]. Reported-by: Carlos Pita <carlosjosepita2@gmail.com> Link: https://orgmode.org/list/87r1cfvvd0.fsf@localhost
This commit is contained in:
parent
fc8e375b9b
commit
1a62cd94cf
|
@ -364,7 +364,11 @@ This needs more work, to handle headings with lots of spaces in them."
|
||||||
(pcomplete-uniquify-list tbl)))
|
(pcomplete-uniquify-list tbl)))
|
||||||
;; When completing a bracketed link, i.e., "[[*", argument
|
;; When completing a bracketed link, i.e., "[[*", argument
|
||||||
;; starts at the star, so remove this character.
|
;; starts at the star, so remove this character.
|
||||||
(substring pcomplete-stub 1))))
|
;; Also, if the completion is done inside [[*head<point>]],
|
||||||
|
;; drop the closing parentheses.
|
||||||
|
(replace-regexp-in-string
|
||||||
|
"\\]+$" ""
|
||||||
|
(substring pcomplete-stub 1)))))
|
||||||
|
|
||||||
(defun pcomplete/org-mode/tag ()
|
(defun pcomplete/org-mode/tag ()
|
||||||
"Complete a tag name. Omit tags already set."
|
"Complete a tag name. Omit tags already set."
|
||||||
|
|
Loading…
Reference in New Issue