From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: column view with display-line-numbers-mode Date: Wed, 21 Mar 2018 00:48:49 +0100 Message-ID: <878tamb95q.fsf@gnu.org> References: <87bmfpfw84.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56113) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eyQzx-000542-Iv for emacs-orgmode@gnu.org; Tue, 20 Mar 2018 19:48:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eyQzw-0005Sx-Qc for emacs-orgmode@gnu.org; Tue, 20 Mar 2018 19:48:57 -0400 In-Reply-To: <87bmfpfw84.fsf@gmail.com> (Eric S. Fraga's message of "Thu, 15 Mar 2018 10:51:07 +0000") 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" To: Eric S Fraga Cc: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Eric, Eric S Fraga writes: > Not a major problem but I thought I would mention it. Affects the > =C3=A6sthetic in me. :-) can you try the attached patch against master? There is still a problem with big .org files, because we cannot recompute the colview header format depending on the width reserved for the line number... but it goes in the right direction. Thanks for testing, --=20 Bastien --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=org-colview.el.patch diff --git a/lisp/org-colview.el b/lisp/org-colview.el index cb5c091..dd97499 100644 --- a/lisp/org-colview.el +++ b/lisp/org-colview.el @@ -424,6 +424,7 @@ for the duration of the command.") "Overlay the newline before the current line with the table title." (interactive) (let ((title "") + (linum-offset (line-number-display-width 'columns)) (i 0)) (dolist (column org-columns-current-fmt-compiled) (pcase column @@ -435,7 +436,7 @@ for the duration of the command.") (setq-local org-previous-header-line-format header-line-format) (setq org-columns-full-header-line-format (concat - (org-add-props " " nil 'display '(space :align-to 0)) + (org-add-props " " nil 'display `(space :align-to ,linum-offset)) (org-add-props (substring title 0 -1) nil 'face 'org-column-title))) (setq org-columns-previous-hscroll -1) (add-hook 'post-command-hook 'org-columns-hscroll-title nil 'local))) --=-=-=--