all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Interactive window resize feedback?
@ 2017-05-26 16:22 Skip Montanaro
  2017-05-26 17:12 ` Stephen Berman
  0 siblings, 1 reply; 3+ messages in thread
From: Skip Montanaro @ 2017-05-26 16:22 UTC (permalink / raw)
  To: help-gnu-emacs

I'm an old 80-column guy. Sometimes I need to widen a frame to view
more text without truncation or line wrappage, though. Is it possible
to get Emacs to provide a little interactive feedback as I resize the
frame? Alternatively, can I display frame or window dimensions in the
mode line? (I poked around some of the mode-line-format docs, but
honestly didn't understand what I was looking at.)

A bit of Googling and poking around in the customization didn't turn
anything up. I'm stuck on Windows with Emacs running on a Linux
server, so I can't go poking around window manager docs.

Thx,

Skip Montanaro



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Interactive window resize feedback?
  2017-05-26 16:22 Interactive window resize feedback? Skip Montanaro
@ 2017-05-26 17:12 ` Stephen Berman
  2017-05-26 18:34   ` Skip Montanaro
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Berman @ 2017-05-26 17:12 UTC (permalink / raw)
  To: Skip Montanaro; +Cc: help-gnu-emacs

On Fri, 26 May 2017 11:22:01 -0500 Skip Montanaro <skip.montanaro@gmail.com> wrote:

> I'm an old 80-column guy. Sometimes I need to widen a frame to view
> more text without truncation or line wrappage, though. Is it possible
> to get Emacs to provide a little interactive feedback as I resize the
> frame? Alternatively, can I display frame or window dimensions in the
> mode line? (I poked around some of the mode-line-format docs, but
> honestly didn't understand what I was looking at.)
>
> A bit of Googling and poking around in the customization didn't turn
> anything up. I'm stuck on Windows with Emacs running on a Linux
> server, so I can't go poking around window manager docs.

This will put frame-width and frame-height in the mode line:

(defvar my-frame-size-mode t)

(defun my-frame-size-mode (arg)
  "Toggle Frame Size mode.
With arg, turn Frame Size mode on iff arg is positive.  When
Frame Size mode is enabled, the frame's width and height appear
in the mode line."
  (interactive "P")
  (setq my-frame-size-mode
	(if (null arg) (not my-frame-size-mode)
	  (> (prefix-numeric-value arg) 0)))
  (force-mode-line-update))

(setq mode-line-position
      (append mode-line-position
	      '((my-frame-size-mode
		 (:eval (concat " W" (number-to-string
				      (frame-parameter nil 'width))
				" H" (number-to-string
				      (frame-parameter nil 'height))))))))

Steve Berman



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Interactive window resize feedback?
  2017-05-26 17:12 ` Stephen Berman
@ 2017-05-26 18:34   ` Skip Montanaro
  0 siblings, 0 replies; 3+ messages in thread
From: Skip Montanaro @ 2017-05-26 18:34 UTC (permalink / raw)
  To: Stephen Berman; +Cc: help-gnu-emacs

On Fri, May 26, 2017 at 12:12 PM, Stephen Berman <stephen.berman@gmx.net> wrote:
> This will put frame-width and frame-height in the mode line:

Perfect!

S



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-05-26 18:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-26 16:22 Interactive window resize feedback? Skip Montanaro
2017-05-26 17:12 ` Stephen Berman
2017-05-26 18:34   ` Skip Montanaro

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.