From: Drew Adams <drew.adams@oracle.com>
To: Jean Louis <bugs@gnu.support>, help-gnu-emacs@gnu.org
Subject: RE: any way to get white margin around text?
Date: Thu, 24 Dec 2020 13:47:47 -0800 (PST) [thread overview]
Message-ID: <58f0e171-2c11-4c03-939a-0502e418a469@default> (raw)
In-Reply-To: <X+TrDPccPj6olC01@protected.rcdrun.com>
> (defun rcd-word-processing ()
> "Sets margins around `fill-column' and invokes `ruler-mode'"
> (interactive)
> (let ((fill-column (or fill-column 70))
> (width (window-total-width)))
> (when (> width fill-column)
> (let* ((left (/ (- width fill-column) 2))
> (right (- width left fill-column)))
> (set-window-margins (get-buffer-window) left right)))
> (ruler-mode)))
>
> The above function is not handling zooming and set-fill-column
> automatically. It is still more enjoyable with margins.
1. I don't see the problem with setting the fill-column.
But maybe you want to also turn on `auto-fill-mode'.
Or maybe you want to refill the existing text
(`fill-region' or similar).
2. If you use library `zoom-frm.el' zooming works fine.
That is to say that frame-zooming takes care of the
margin also. But buffer-zooming (aka text-scaling)
does not. (`C-u' with a zooming command flips between
frame-zooming and buffer-zooming.)
In addition to the recommended key bindings, you might
want to add bindings for the margins, such as these
same as the recommended ones, but for use in the
margins:
(global-set-key [left-margin C-wheel-down] 'zoom-in)
(global-set-key [right-margin C-wheel-down] 'zoom-in)
(global-set-key [left-margin C-wheel-up] 'zoom-out)
(global-set-key [right-margin C-wheel-up] 'zoom-out)
next prev parent reply other threads:[~2020-12-24 21:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-24 18:39 any way to get white margin around text? Jean Louis
2020-12-24 18:55 ` Omar Polo
2020-12-24 19:04 ` Drew Adams
2020-12-24 19:19 ` Omar Polo
2020-12-24 19:25 ` Jean Louis
2020-12-24 21:47 ` Drew Adams [this message]
2020-12-24 22:54 ` Jean Louis
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=58f0e171-2c11-4c03-939a-0502e418a469@default \
--to=drew.adams@oracle.com \
--cc=bugs@gnu.support \
--cc=help-gnu-emacs@gnu.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.
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).