unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: James Cherti <contact@jamescherti.com>
To: Joost Kremers <joostkremers@fastmail.fm>, Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Should text-scale trigger hooks?
Date: Thu, 7 Nov 2024 09:16:18 -0500	[thread overview]
Message-ID: <6b70013d-8a2d-4302-821e-24c4b1e49cf6@jamescherti.com> (raw)
In-Reply-To: <86o72rcrc2.fsf@fastmail.fm>

I tested adding a function to `text-scale-mode-hook` that executes:
(run-hooks 'window-configuration-change-hook)

And it solved the issue in both packages (`eat` and `visual-fill-column`).

After further consideration, I believe that this is not an Emacs core 
issue, but rather a problem caused by the implementation of those 
packages. It doesn't make sense for text scaling to run the 
window-configuration-change-hook functions.

--
James Cherti
https://www.jamescherti.com/

On 2024-11-07 04:42, Joost Kremers wrote:
> On Thu, Nov 07 2024, Eli Zaretskii wrote:
>> The need for adjusting the margins in this case is specific to how the
>> visual-fill-column package uses the margins, it is not a general need.
> 
> Yes, true.
> 
>> What are the problems of using text-scale-mode-hook?  Or even using
>> add-variable-watcher to cause Emacs call your function when
>> face-remapping-alist changes?
> 
> I haven't actually tried those methods, since I rarely use
> text-scale-adjust and James's is the first user request I received about it
> in a long time.
> 
>> IOW, why do you think this is a core Emacs issue, not an issue with
>> how visual-fill-column is implemented?
> 
> Reading your message, I'm not sure that it is. But I guess this is also a
> question for James.
> 



  reply	other threads:[~2024-11-07 14:16 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-07  1:17 Should text-scale trigger hooks? James Cherti
2024-11-07  1:52 ` James Cherti
2024-11-07  6:55 ` Eli Zaretskii
2024-11-07  8:21   ` Joost Kremers
2024-11-07  8:58     ` Eli Zaretskii
2024-11-07  9:42       ` Joost Kremers
2024-11-07 14:16         ` James Cherti [this message]
2024-11-08 17:47           ` [External] : " Drew Adams
2024-11-07  8:10 ` Joost Kremers

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.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=6b70013d-8a2d-4302-821e-24c4b1e49cf6@jamescherti.com \
    --to=contact@jamescherti.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=joostkremers@fastmail.fm \
    /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.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).