all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* zoom features
@ 2010-01-04  6:01 Joseph Brenner
  2010-01-04  9:29 ` Miles Bader
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Joseph Brenner @ 2010-01-04  6:01 UTC (permalink / raw
  To: help-gnu-emacs


I put aside my own custom zoom.el package (never quite finished, and
thus never released) to try to use the feature built into Gnu emacs
these days: "text-scale-adjust", which is bound by default to: "C-x
C--". and "C-x C-+" (and also the unshifted "C-x C-=").

In some ways I find it works pretty well, but in a few respects is
disappointing:

(1) As you zoom in it does not automatically increase the size of the
window, so you have fewer columns displayed.

(2) when I try to re-size the window (for example, to try to maintain a
fixed display of 80 columns), my window manager (icewm) tells me the
wrong effective window width.

(3) text-scale-adjust only effects the current window, but if you need
to increase the size of text in one window, it's likely you're going to
want it in all of them (at least in the current frame).

Are there any standard fixes for these problems kicking around?


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

* Re: zoom features
  2010-01-04  6:01 zoom features Joseph Brenner
@ 2010-01-04  9:29 ` Miles Bader
  2010-01-05 20:25 ` Drew Adams
  2010-01-06  1:00 ` Joseph Brenner
  2 siblings, 0 replies; 4+ messages in thread
From: Miles Bader @ 2010-01-04  9:29 UTC (permalink / raw
  To: help-gnu-emacs

Joseph Brenner <doom@kzsu.stanford.edu> writes:
> Are there any standard fixes for these problems kicking around?

They are not problems, they are intentional.

You apparently want a different functionality; it isn't hard to write a
"global" zoom by frobbing the height of the default face, e.g.:

   (defun increase-default-face-height (&optional steps)
     "Increase the height of the default face by STEPS steps.
   Each step multiplies the height by 1.2; a negative number of steps
   decreases the height by the same amount."
     (interactive
      (list
       (cond ((eq current-prefix-arg '-) -1)
             ((numberp current-prefix-arg) current-prefix-arg)
             ((consp current-prefix-arg) -1)
             (t 1))))
     (let ((frame (selected-frame)))
       (set-face-attribute 'default frame
                           :height (floor
                                    (* (face-attribute 'default :height frame)
                                       (expt 1.3 steps))))))

   (defun decrease-default-face-height (&optional steps)
     "Decrease the height of the default face by STEPS steps.
   Each step divides the height by 1.2; a negative number of steps
   increases the height by the same amount."
     (interactive
      (list
       (cond ((eq current-prefix-arg '-) -1)
             ((numberp current-prefix-arg) current-prefix-arg)
             ((consp current-prefix-arg) -1)
             (t 1))))
     (increase-default-face-height (- steps)))

   (global-set-key [(control =)] 'increase-default-face-height)
   (global-set-key [(control +)] 'increase-default-face-height)
   (global-set-key [(control -)] 'decrease-default-face-height)

-miles

-- 
Success, n. The one unpardonable sin against one's fellows.


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

* RE: zoom features
  2010-01-04  6:01 zoom features Joseph Brenner
  2010-01-04  9:29 ` Miles Bader
@ 2010-01-05 20:25 ` Drew Adams
  2010-01-06  1:00 ` Joseph Brenner
  2 siblings, 0 replies; 4+ messages in thread
From: Drew Adams @ 2010-01-05 20:25 UTC (permalink / raw
  To: 'Joseph Brenner', help-gnu-emacs

> I put aside my own custom zoom.el package (never quite finished, and
> thus never released) to try to use the feature built into Gnu emacs
> these days: "text-scale-adjust", which is bound by default to: "C-x
> C--". and "C-x C-+" (and also the unshifted "C-x C-=").
> 
> In some ways I find it works pretty well, but in a few respects is
> disappointing:
> 
> (1) As you zoom in it does not automatically increase the size of the
> window, so you have fewer columns displayed.
> 
> (2) when I try to re-size the window (for example, to try to 
> maintain a fixed display of 80 columns), my window manager
> (icewm) tells me the wrong effective window width.
> 
> (3) text-scale-adjust only effects the current window, but if you need
> to increase the size of text in one window, it's likely 
> you're going to want it in all of them (at least in the current frame).
> 
> Are there any standard fixes for these problems kicking around?

Library `zoom-frm.el' does what you're asking - see commands `zoom-in' and
`zoom-out'.

You can either zoom a frame (and its font) or zoom a buffer's text (in all
windows showing that buffer). You can zoom in/out using a key or the mouse
wheel.

See http://www.emacswiki.org/emacs/SetFonts#ZoomFrame and
http://www.emacswiki.org/emacs/SetFonts#ZoomBuffer (same Web page, different
section; same commands `zoom-in', `zoom-out').

If you also use library `face-remap+.el' (with Emacs 23), then an option lets
you automatically scale the window size (horizontally, vertically, or both) when
you scale text (i.e. zoom a buffer). This lets you recuperate wasted space when
you zoom out, freeing it up for other windows.






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

* Re: zoom features
  2010-01-04  6:01 zoom features Joseph Brenner
  2010-01-04  9:29 ` Miles Bader
  2010-01-05 20:25 ` Drew Adams
@ 2010-01-06  1:00 ` Joseph Brenner
  2 siblings, 0 replies; 4+ messages in thread
From: Joseph Brenner @ 2010-01-06  1:00 UTC (permalink / raw
  To: help-gnu-emacs


Joseph Brenner <doom@kzsu.stanford.edu> writes:

> I put aside my own custom zoom.el package (never quite finished, and
> thus never released) to try to use the feature built into Gnu emacs
> these days: "text-scale-adjust", which is bound by default to: "C-x
> C--". and "C-x C-+" (and also the unshifted "C-x C-=").
>
> In some ways I find it works pretty well, but in a few respects is
> disappointing:
>
> (1) As you zoom in it does not automatically increase the size of the
> window, so you have fewer columns displayed.
>
> (2) when I try to re-size the window (for example, to try to maintain a
> fixed display of 80 columns), my window manager (icewm) tells me the
> wrong effective window width.
>
> (3) text-scale-adjust only effects the current window, but if you need
> to increase the size of text in one window, it's likely you're going to
> want it in all of them (at least in the current frame).
>
> Are there any standard fixes for these problems kicking around?

Drew Adams pointed me at his zoom-frm.el, which does indeed do precisely
what I wanted.

It's up on the emacswiki, along with it's dependencies:

  http://www.emacswiki.org/emacs/download/frame-frm.el
  http://www.emacswiki.org/emacs/download/frame-cmds.el
  http://www.emacswiki.org/emacs/download/frame-fns.el




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

end of thread, other threads:[~2010-01-06  1:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-04  6:01 zoom features Joseph Brenner
2010-01-04  9:29 ` Miles Bader
2010-01-05 20:25 ` Drew Adams
2010-01-06  1:00 ` Joseph Brenner

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.