diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2016-01-21 00:51:13 +0100 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2016-01-21 00:51:13 +0100 |
commit | 0d53e5f9e85f29a0c0cbdb09283856bfde0b40df (patch) | |
tree | 29f10f72c53d5a37d2c0dd7c395b3432582b4923 | |
parent | ce80a0e727fb4152462641209f41fea735ee459f (diff) | |
download | org-mode-0d53e5f9e85f29a0c0cbdb09283856bfde0b40df.tar.gz |
org-colview: Fix column view editing
* lisp/org-colview.el (org-columns-next-allowed-value): Fix error when
trying to edit a column from a headline starting at the very beginning
of the buffer.
This patch also prepares for lexical binding.
Reported-by: "T.F. Torrey" <tftorrey@tftorrey.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/104370>
-rw-r--r-- | lisp/org-colview.el | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lisp/org-colview.el b/lisp/org-colview.el index 117fa49..eade725 100644 --- a/lisp/org-colview.el +++ b/lisp/org-colview.el @@ -607,7 +607,7 @@ an integer, select that value." (t (setq nval (car allowed))))) (cond ((equal major-mode 'org-agenda-mode) - (org-columns-eval '(org-entry-put pom key nval)) + (org-columns-eval `(org-entry-put ,pom ,key ,nval)) ;; The following let preserves the current format, and makes sure ;; that in only a single file things need to be updated. (let* ((org-agenda-overriding-columns-format org-columns-current-fmt) @@ -618,13 +618,13 @@ an integer, select that value." (org-agenda-columns))) (t (let ((inhibit-read-only t)) - (remove-text-properties (1- bol) eol '(read-only t)) + (remove-text-properties (max (1- bol) (point-min)) eol '(read-only t)) (unwind-protect (progn (setq org-columns-overlays (org-delete-all line-overlays org-columns-overlays)) (mapc 'delete-overlay line-overlays) - (org-columns-eval '(org-entry-put pom key nval))) + (org-columns-eval `(org-entry-put ,pom ,key ,nval))) (org-columns-display-here))) (org-move-to-column col) (and (nth 3 (assoc-string key org-columns-current-fmt-compiled t)) |