emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bastien <bzg@gnu.org>
To: Eric S Fraga <esflists@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: column view with display-line-numbers-mode
Date: Wed, 21 Mar 2018 00:48:49 +0100	[thread overview]
Message-ID: <878tamb95q.fsf@gnu.org> (raw)
In-Reply-To: <87bmfpfw84.fsf@gmail.com> (Eric S. Fraga's message of "Thu, 15 Mar 2018 10:51:07 +0000")

[-- Attachment #1: Type: text/plain, Size: 438 bytes --]

Hi Eric,

Eric S Fraga <esflists@gmail.com> writes:

> Not a major problem but I thought I would mention it.  Affects the
> æsthetic 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,

-- 
 Bastien

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: org-colview.el.patch --]
[-- Type: text/x-diff, Size: 945 bytes --]

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)))

  parent reply	other threads:[~2018-03-20 23:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-15 10:51 column view with display-line-numbers-mode Eric S Fraga
2018-03-16 22:04 ` Nicolas Goaziou
2018-03-16 22:51   ` Eric S Fraga
2018-03-20 23:48 ` Bastien [this message]
2018-04-26 23:34   ` Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878tamb95q.fsf@gnu.org \
    --to=bzg@gnu.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=esflists@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).