emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Bug: org-columns adds spaces [8.3beta (release_8.3beta-1286-g207


From: Nicolas Richard
Subject: Re: [O] Bug: org-columns adds spaces [8.3beta (release_8.3beta-1286-g20795f @ /home/youngfrog/sources/org-mode/lisp/)]
Date: Mon, 13 Jul 2015 14:52:52 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Nicolas Richard <address@hidden> writes:
> The buffer is still marked "unmodified" but there are five space
> characters at the end of the headline. (and this will later confuse org
> element cache which thus give errors, but I guess that's to be
> expected.)

Meanwhile I had a look and it's due to this part of
org-columns-display-here :
    (org-unmodified (insert " "))

(http://orgmode.org/cgit.cgi/org-mode.git/tree/lisp/org-colview.el?h=maint#n247)

Inserting characters in the buffer for the sake of columnview seems
wrong to me. Even more so if this is done silently.

I tried removing the whole (if then) block. That not only helps with the
spurious spaces, but also makes the column view work better in my
original usecase. OTOH I don't know what it will break.

--- /home/youngfrog/sources/org-mode/lisp/org-colview.el
+++ #<buffer org-colview.el>
@@ -224,13 +224,7 @@
        (overlay-put ov 'org-columns-pom pom)
        (overlay-put ov 'org-columns-format f)
        (overlay-put ov 'line-prefix "")
-       (overlay-put ov 'wrap-prefix ""))
-      (if (or (not (char-after beg))
-             (equal (char-after beg) ?\n))
-         (let ((inhibit-read-only t))
-           (save-excursion
-             (goto-char beg)
-             (org-unmodified (insert " ")))))) ;; FIXME: add props and remove 
later?
+       (overlay-put ov 'wrap-prefix "")))
     ;; Make the rest of the line disappear.
     (org-unmodified
      (setq ov (org-columns-new-overlay beg (point-at-eol)))

-- 
Nicolas Richard



reply via email to

[Prev in Thread] Current Thread [Next in Thread]