From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Richard Subject: Re: 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 Message-ID: <87lhekb4nv.fsf@members.fsf.org> References: <86615ocmug.fsf@members.fsf.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53697) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZEdEA-00011Z-Ei for emacs-orgmode@gnu.org; Mon, 13 Jul 2015 08:52:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZEdE7-0003NC-0U for emacs-orgmode@gnu.org; Mon, 13 Jul 2015 08:52:58 -0400 Received: from mxin.ulb.ac.be ([164.15.128.112]:65315) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZEdE6-0003My-Iz for emacs-orgmode@gnu.org; Mon, 13 Jul 2015 08:52:54 -0400 In-Reply-To: <86615ocmug.fsf@members.fsf.org> (Nicolas Richard's message of "Mon, 13 Jul 2015 13:34:47 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Nicolas Richard Cc: emacs-orgmode@gnu.org Nicolas Richard 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 +++ # @@ -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