* dimensions when doing text-scale-increase, and including minibuffer in text-scale-increase
@ 2019-12-10 19:28 Samuel Wales
2019-12-10 19:37 ` Eli Zaretskii
0 siblings, 1 reply; 5+ messages in thread
From: Samuel Wales @ 2019-12-10 19:28 UTC (permalink / raw)
To: help-gnu-emacs
question 1:
if i want to know the usable default dimensions in human lines and
columns terms, i can do:
(let ((r (list (frame-width)
(frame-height))))
(message "%s =frame width and height =(should be (110 32) at
/native resolution 1440/ with /dpi of 216/)"
r)
but if i do text-scale-increase the result is the same. i want to
know the same data about what is /there now/.
question 2 (only silghtly related):
i want to do text-scale increase on exactly the active buffer and
"its" minibuffer, but not any other buffers. i'd prefer modeline not
increase, however.
whenever i switch back to the increased buffer, i want it and "its"
echo area / minibuffer to still be increased.
thank you.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: dimensions when doing text-scale-increase, and including minibuffer in text-scale-increase
2019-12-10 19:28 dimensions when doing text-scale-increase, and including minibuffer in text-scale-increase Samuel Wales
@ 2019-12-10 19:37 ` Eli Zaretskii
2019-12-22 21:05 ` Samuel Wales
0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2019-12-10 19:37 UTC (permalink / raw)
To: help-gnu-emacs
> From: Samuel Wales <samologist@gmail.com>
> Date: Tue, 10 Dec 2019 12:28:29 -0700
>
> question 1:
>
> if i want to know the usable default dimensions in human lines and
> columns terms, i can do:
>
> (let ((r (list (frame-width)
> (frame-height))))
> (message "%s =frame width and height =(should be (110 32) at
> /native resolution 1440/ with /dpi of 216/)"
> r)
>
> but if i do text-scale-increase the result is the same.
Yes, because frame-width and frame-height return values in units of
the canonical character size.
> i want to know the same data about what is /there now/.
Then use frame-pixel-width and frame-pixel-height, and divide by
default-font-width and default-font-height to get the results in
columns and lines.
> i want to do text-scale increase on exactly the active buffer and
> "its" minibuffer, but not any other buffers. i'd prefer modeline not
> increase, however.
>
> whenever i switch back to the increased buffer, i want it and "its"
> echo area / minibuffer to still be increased.
For the echo area and the minibuffer you will have to use hooks,
because switching to another buffer doesn't switch the echo-area or
minibuffer. IOW, there's no separate echo-area/minibuffer for each
buffer.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: dimensions when doing text-scale-increase, and including minibuffer in text-scale-increase
2019-12-10 19:37 ` Eli Zaretskii
@ 2019-12-22 21:05 ` Samuel Wales
2019-12-23 13:23 ` Eli Zaretskii
2019-12-23 15:21 ` Michael Heerdegen
0 siblings, 2 replies; 5+ messages in thread
From: Samuel Wales @ 2019-12-22 21:05 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: help-gnu-emacs
On 12/10/19, Eli Zaretskii <eliz@gnu.org> wrote:
> For the echo area and the minibuffer you will have to use hooks,
> because switching to another buffer doesn't switch the echo-area or
> minibuffer. IOW, there's no separate echo-area/minibuffer for each
> buffer.
thank you.
i decided i am about equally ok with increasing all buffers including
minibuffer / echo area. i could not find a buffer switch hook.
however, i can't seem to find minibuffer or echo area buffer in the
buffer list:
(dolist (buffer (buffer-list))
(with-current-buffer buffer
(text-scale-increase amount)))
works for only regular buffers. i presume they are supposed to be
done separately?
i noticed that (default-font-width) is not in emacs 24. i presume it
got added in a later version.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: dimensions when doing text-scale-increase, and including minibuffer in text-scale-increase
2019-12-22 21:05 ` Samuel Wales
@ 2019-12-23 13:23 ` Eli Zaretskii
2019-12-23 15:21 ` Michael Heerdegen
1 sibling, 0 replies; 5+ messages in thread
From: Eli Zaretskii @ 2019-12-23 13:23 UTC (permalink / raw)
To: help-gnu-emacs
> From: Samuel Wales <samologist@gmail.com>
> Date: Sun, 22 Dec 2019 14:05:10 -0700
> Cc: help-gnu-emacs@gnu.org
>
> i could not find a buffer switch hook.
I think you want window-configuration-change-hook.
> however, i can't seem to find minibuffer or echo area buffer in the
> buffer list:
>
> (dolist (buffer (buffer-list))
> (with-current-buffer buffer
> (text-scale-increase amount)))
>
> works for only regular buffers. i presume they are supposed to be
> done separately?
Not sure, but buffer-list definitely returns minibuffers as well.
> i noticed that (default-font-width) is not in emacs 24. i presume it
> got added in a later version.
Yes, in Emacs 25.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: dimensions when doing text-scale-increase, and including minibuffer in text-scale-increase
2019-12-22 21:05 ` Samuel Wales
2019-12-23 13:23 ` Eli Zaretskii
@ 2019-12-23 15:21 ` Michael Heerdegen
1 sibling, 0 replies; 5+ messages in thread
From: Michael Heerdegen @ 2019-12-23 15:21 UTC (permalink / raw)
To: Samuel Wales; +Cc: help-gnu-emacs
Samuel Wales <samologist@gmail.com> writes:
> however, i can't seem to find minibuffer or echo area buffer in the
> buffer list:
AFAIK minibuffers get reset to defaults all the time, and new
minibuffers can be created on the fly anyway, so you want to do this in
a hook (`minibuffer-setup-hook' probably). Dunno about echo areas.
Michael.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-12-23 15:21 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-10 19:28 dimensions when doing text-scale-increase, and including minibuffer in text-scale-increase Samuel Wales
2019-12-10 19:37 ` Eli Zaretskii
2019-12-22 21:05 ` Samuel Wales
2019-12-23 13:23 ` Eli Zaretskii
2019-12-23 15:21 ` Michael Heerdegen
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).