Explorar o código

org-pcomplete.el: Ignore trailing whitespaces while looking-back at properties.

* org-pcomplete.el (org-thing-at-point): Ignore trailing
whitespaces while looking-back at properties.

Thanks to David Coate who reported a related issue.
Bastien Guerry %!s(int64=12) %!d(string=hai) anos
pai
achega
9b264cf3a0
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      lisp/org-pcomplete.el

+ 3 - 1
lisp/org-pcomplete.el

@@ -91,7 +91,9 @@ The return value is a string naming the thing at point."
 	   (save-excursion
 	     (move-beginning-of-line 1)
 	     (skip-chars-backward "[ \t\n]")
-	     (or (looking-back org-drawer-regexp)
+	     ;; org-drawer-regexp matches a whole line but while
+	     ;; looking-back, we just ignore trailing whitespaces
+	     (or (looking-back (substring org-drawer-regexp 0 -1))
 		 (looking-back org-property-re))))
       (cons "prop" nil))
      ((and (equal (char-before beg1) ?:)