From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.help Subject: RE: any way to get white margin around text? Date: Thu, 24 Dec 2020 13:47:47 -0800 (PST) Message-ID: <58f0e171-2c11-4c03-939a-0502e418a469@default> References: <87blej6nkk.fsf@omarpolo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26131"; mail-complaints-to="usenet@ciao.gmane.io" To: Jean Louis , help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Dec 24 22:48:22 2020 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ksYT8-0006hk-A9 for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 24 Dec 2020 22:48:22 +0100 Original-Received: from localhost ([::1]:50264 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ksYT7-0003fK-Af for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 24 Dec 2020 16:48:21 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53894) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ksYSi-0003f9-Jy for help-gnu-emacs@gnu.org; Thu, 24 Dec 2020 16:47:56 -0500 Original-Received: from aserp2120.oracle.com ([141.146.126.78]:52132) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ksYSg-0005re-GC for help-gnu-emacs@gnu.org; Thu, 24 Dec 2020 16:47:55 -0500 Original-Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0BOLUGtB150187; Thu, 24 Dec 2020 21:47:52 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=VS+QA8PRIWSJCbzDumDR9wC6gz1xfuZ9zGP5+XarGIA=; b=vo+ie3qbHo5kFwvPr8opNiUkemY1yPPQDVgrz1flPoBTrHUbpv/MPA48t7KK0hnVACPC Ka66mjYKUn4xXVAM4ojDWZyI7fZ6bQUTM+eoJMy4nUdMCoOftzyAG3X2S+IUc4PYS9SB eGrLutLsPqJwvsw1GGWVmuf3KsnE6ZmLgDUA8tdlgrdRrGZ71Kp/LLhiUjLsQLEJIh+W RsCMeEJFL33wGHzcDXsGk6wdqfzKMwq/e3Vpi6FERlicndG3ISQP2UPQHd495lJ4J0of IXfFNOmQ2T7GgYCdRY5cH7PHVQJU4uqXWRhMayuB0UR8hNvbuxeZyw83OcpWAMzrR7M9 aQ== Original-Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by aserp2120.oracle.com with ESMTP id 35k0cwcmtu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 24 Dec 2020 21:47:52 +0000 Original-Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0BOLTkjp028612; Thu, 24 Dec 2020 21:47:52 GMT Original-Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserp3030.oracle.com with ESMTP id 35k0ebd6ns-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 24 Dec 2020 21:47:52 +0000 Original-Received: from abhmp0005.oracle.com (abhmp0005.oracle.com [141.146.116.11]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 0BOLlmCh028480; Thu, 24 Dec 2020 21:47:48 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.5095.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9845 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 adultscore=0 bulkscore=0 mlxlogscore=999 phishscore=0 mlxscore=0 spamscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2012240135 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9845 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 lowpriorityscore=0 mlxlogscore=999 mlxscore=0 priorityscore=1501 impostorscore=0 suspectscore=0 phishscore=0 spamscore=0 clxscore=1015 malwarescore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2012240135 Received-SPF: pass client-ip=141.146.126.78; envelope-from=drew.adams@oracle.com; helo=aserp2120.oracle.com X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:126755 Archived-At: > (defun rcd-word-processing () > "Sets margins around `fill-column' and invokes `ruler-mode'" > (interactive) > (let ((fill-column (or fill-column 70)) > =09(width (window-total-width))) > (when (> width fill-column) > (let* ((left (/ (- width fill-column) 2)) > =09 (right (- width left fill-column))) > =09(set-window-margins (get-buffer-window) left right))) > (ruler-mode))) >=20 > 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)