unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: carlmarcos@tutanota.com, 56357@debbugs.gnu.org
Subject: bug#56357: Request for font size adaptation that fits window
Date: Mon, 04 Jul 2022 14:42:31 +0300	[thread overview]
Message-ID: <83y1x985p4.fsf@gnu.org> (raw)
In-Reply-To: <871qv187lr.fsf@gnus.org> (message from Lars Ingebrigtsen on Mon,  04 Jul 2022 13:01:20 +0200)

> Cc: 56357@debbugs.gnu.org
> From: Lars Ingebrigtsen <larsi@gnus.org>
> Date: Mon, 04 Jul 2022 13:01:20 +0200
> 
> carlmarcos@tutanota.com writes:
> 
> > Suppose a user uses a 13 pt font size.  Let there be some space
> > between the longest line in the buffer and the edge of the window.  It
> > would be super if the font size could be automatically increased, such
> > that the difference between the longest line and the window size in
> > minimised.
> 
> I think that sounds like a useful feature, and I'm kinda surprised that
> it doesn't exist yet.  Or does it?  Anybody know?
> 
> To implement this, I guess the obvious thing would be to have a global
> minor mode that'd listen to frame size changes, and then adjust the font
> size up/down to reach the desired number of characters in a frame?  So
> we'd have a user option font-size-adjust-target (defaulting to 80)
> and a font-size-adjust-mode?

That's not what the feature request asked for, AFAIU: it wanted
dynamic resizing, and it wanted the size to depend on the "longest
line" (not clear if "longest in the window" or "longest in the
buffer").

With your proposal, how would you determine the target value?  If it's
just an arbitrary value (80 sounds like an arbitrary one to me), then
the recently-added global-text-scale-adjust-resizes-frames variable
does the same, just from the other end: the user enlarges the font and
the frame follows suit.  And since our default frame width is already
set for 80 characters, it sounds like we already have the feature you
envisioned, no?





  reply	other threads:[~2022-07-04 11:42 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-02 12:17 bug#56357: Request for font size adaptation that fits window carlmarcos--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-07-03  3:39 ` Richard Stallman
2022-07-04 11:01 ` Lars Ingebrigtsen
2022-07-04 11:42   ` Eli Zaretskii [this message]
2022-07-04 13:54     ` Lars Ingebrigtsen
2022-07-04 14:05       ` Eli Zaretskii
2022-07-04 19:25     ` carlmarcos--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-07-05 11:11       ` Lars Ingebrigtsen
2022-07-05 15:33         ` Christopher Dimech
2022-07-04 15:54   ` Drew Adams

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=83y1x985p4.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=56357@debbugs.gnu.org \
    --cc=carlmarcos@tutanota.com \
    --cc=larsi@gnus.org \
    /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).