all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Paul Rankin <hello@paulwrankin.com>
Cc: 28844@debbugs.gnu.org, agrambot@gmail.com,
	npostavs@users.sourceforge.net
Subject: bug#28844: 26.0.90; display-line-numbers-mode should call window-configuration-change-hook
Date: Sat, 09 Dec 2017 18:01:10 +0200	[thread overview]
Message-ID: <83vahfubzt.fsf@gnu.org> (raw)
In-Reply-To: <1512833441.1115759.1199488160.6523D7E7@webmail.messagingengine.com> (message from Paul Rankin on Sun, 10 Dec 2017 01:30:41 +1000)

> From: Paul Rankin <hello@paulwrankin.com>
> Date: Sun, 10 Dec 2017 01:30:41 +1000
> 
> I’m sorry Eli, and everyone else in this thread. I should have shown
> gratitude for your help instead of such arrogance.

Thanks.

> >                                                           For example,
> > what should happen if the user enlarges or makes smaller the default
> > face's font with the likes of "C-x +”?
> 
> The basic idea of the package is to take a text body width value
> (integer or float) and keep the margins balanced on either side in each
> window the buffer is displayed. Whenever anything display-related
> changes, the package calls olivetti-set-environment. This function calls
> olivetti-scale-width to account for any changes to the font size.

I see.  This does work with "C-x +", but when I try changing the font
size via mouse-appearance-menu (by clicking S-mouse-1), the margins
seem to not react to the change.  (I was mistaken above to ask about
"C-x +", the problem is with selecting a font from the font menu.)

> I’m going to implement post-command-hook as you suggested, and once the
> API for line-number-display-width is locked I will call that to account
> for display-line-numbers.

Sounds like a good idea.  Let me know if you need help in using the
current line-number-display-width as part of implementing this idea.
I think with the current APIs you want to call
line-number-display-width with the optional argument 'columns'.  This
is especially important if the 'line-number' face is customized to use
a font different from the one used to display the buffer text.

> You know, the silly thing is... olivetti is designed for prose writing,
> most people will never use it in conjunction with line numbers...

I know.  I myself never use line numbers, and only wrote the code
because so many people do via linum.el and similar packages, and then
complain that Emacs redisplay slows down too much.





  reply	other threads:[~2017-12-09 16:01 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-15  7:56 bug#28844: 26.0.90; display-line-numbers-mode should call window-configuration-change-hook Paul Rankin
2017-10-15  9:41 ` martin rudalics
2017-10-15 11:08   ` Paul Rankin
2017-10-15 12:12     ` martin rudalics
2017-10-15 13:27       ` Paul Rankin
2017-10-15 14:59         ` Eli Zaretskii
2017-10-16  3:22           ` Paul Rankin
2017-10-16  4:59             ` Alex
2017-10-16  5:14               ` Paul Rankin
2017-10-16 14:48                 ` Eli Zaretskii
2017-10-17  0:35                   ` Paul Rankin
2017-10-17  2:41                     ` Eli Zaretskii
2017-10-17  4:19                       ` Paul Rankin
2017-10-17  5:44                         ` Eli Zaretskii
2017-10-17  7:13                           ` Paul Rankin
2017-10-17  8:33                             ` Eli Zaretskii
2017-10-20  9:42                               ` Eli Zaretskii
2017-12-08  2:43                             ` Noam Postavsky
2017-12-08 14:48                               ` Eli Zaretskii
2017-12-09 15:30                               ` Paul Rankin
2017-12-09 16:01                                 ` Eli Zaretskii [this message]
2017-10-15 14:47       ` Eli Zaretskii
2017-10-16  7:41         ` martin rudalics
2017-10-22  7:20 ` Paul Rankin
2017-10-22 14:27   ` Eli Zaretskii
2017-12-08  2:14 ` Paul Rankin
2017-12-08 15:22   ` Eli Zaretskii

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

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

  git send-email \
    --in-reply-to=83vahfubzt.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=28844@debbugs.gnu.org \
    --cc=agrambot@gmail.com \
    --cc=hello@paulwrankin.com \
    --cc=npostavs@users.sourceforge.net \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.