From dbd8745c29d7eab5059cecff9e22878cd6591d86 Mon Sep 17 00:00:00 2001 From: Bastien Guerry Date: Tue, 10 Apr 2012 23:37:12 +0200 Subject: [PATCH 1/2] Fix bug in org-pcomplete.el. * org-pcomplete.el (org-thing-at-point): Also match line options like LATEX_CLASS when pcompleting from LATEX_. --- lisp/org-pcomplete.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org-pcomplete.el b/lisp/org-pcomplete.el index 0ca877787..f04beffd5 100644 --- a/lisp/org-pcomplete.el +++ b/lisp/org-pcomplete.el @@ -69,7 +69,7 @@ The return value is a string naming the thing at point." (re-search-backward "^[ \t]*#\\+\\([A-Z_]+\\):.*" (line-beginning-position) t)) (cons "file-option" (match-string-no-properties 1))) - ((string-match "\\`[ \t]*#\\+[a-zA-Z]*\\'" line-to-here) + ((string-match "\\`[ \t]*#\\+[a-zA-Z_]*\\'" line-to-here) (cons "file-option" nil)) ((equal (char-before beg) ?\[) (cons "link" nil)) From 9586c880b7dcb5b042d63e61f6460fb5b5bbb78b Mon Sep 17 00:00:00 2001 From: Bastien Guerry Date: Tue, 10 Apr 2012 23:39:09 +0200 Subject: [PATCH 2/2] org-pcomplete.el: Fix bug in `pcomplete/org-mode/file-option'. * org-pcomplete.el (pcomplete/org-mode/file-option): Fix bug in `pcomplete/org-mode/file-option'. Before this fix, completing #+ATTR worked only once, as `org-additional-option-like-keywords' was modified. --- lisp/org-pcomplete.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org-pcomplete.el b/lisp/org-pcomplete.el index f04beffd5..5950d8e26 100644 --- a/lisp/org-pcomplete.el +++ b/lisp/org-pcomplete.el @@ -144,7 +144,7 @@ When completing for #+STARTUP, for example, this function returns (if (string-match "^#\\+\\([A-Z_]+:?\\)" x) (match-string 1 x))) (org-split-string (org-get-current-options) "\n")) - org-additional-option-like-keywords))))) + (copy-sequence org-additional-option-like-keywords)))))) (substring pcomplete-stub 2))) (defvar org-startup-options)