[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org 1a62cd94cf: org-pcomplete: Fix completion inside br
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org 1a62cd94cf: org-pcomplete: Fix completion inside bracketed link |
Date: |
Fri, 7 Oct 2022 03:57:54 -0400 (EDT) |
branch: externals/org
commit 1a62cd94cfc92c3ce6eadb2ffc1d6a18e8caee86
Author: Ihor Radchenko <yantar92@gmail.com>
Commit: Ihor Radchenko <yantar92@gmail.com>
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
---
lisp/org-pcomplete.el | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/lisp/org-pcomplete.el b/lisp/org-pcomplete.el
index b4f5f67ed0..225cdc093c 100644
--- a/lisp/org-pcomplete.el
+++ b/lisp/org-pcomplete.el
@@ -364,7 +364,11 @@ This needs more work, to handle headings with lots of
spaces in them."
(pcomplete-uniquify-list tbl)))
;; When completing a bracketed link, i.e., "[[*", argument
;; 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 ()
"Complete a tag name. Omit tags already set."
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/org 1a62cd94cf: org-pcomplete: Fix completion inside bracketed link,
ELPA Syncer <=