Browse Source

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 12 years ago
parent
commit
9b264cf3a0
1 changed files with 3 additions and 1 deletions
  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) ?:)