From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#42143: 26.1; auto-fill-mode Date: 1 Jul 2020 17:53:00 -0000 Organization: muc.de e.V. Message-ID: <20200701175300.57901.qmail@mail.muc.de> References: 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="18885"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: tin/2.4.4-20191224 ("Millburn") (FreeBSD/11.3-RELEASE-p9 (amd64)) Cc: acm@muc.de, 42143@debbugs.gnu.org To: Susan Pinochet Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jul 01 19:54:13 2020 Return-path: Envelope-to: geb-bug-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 1jqgw0-0004jn-HA for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 01 Jul 2020 19:54:12 +0200 Original-Received: from localhost ([::1]:59492 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jqgvz-0002bH-IU for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 01 Jul 2020 13:54:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37444) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jqgvq-0002Yh-S1 for bug-gnu-emacs@gnu.org; Wed, 01 Jul 2020 13:54:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42181) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jqgvq-000782-Iz for bug-gnu-emacs@gnu.org; Wed, 01 Jul 2020 13:54:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jqgvq-0008EB-Bo for bug-gnu-emacs@gnu.org; Wed, 01 Jul 2020 13:54:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 01 Jul 2020 17:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42143 X-GNU-PR-Package: emacs Original-Received: via spool by 42143-submit@debbugs.gnu.org id=B42143.159362599131570 (code B ref 42143); Wed, 01 Jul 2020 17:54:02 +0000 Original-Received: (at 42143) by debbugs.gnu.org; 1 Jul 2020 17:53:11 +0000 Original-Received: from localhost ([127.0.0.1]:53727 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqgv1-0008D8-IJ for submit@debbugs.gnu.org; Wed, 01 Jul 2020 13:53:11 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:56352 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1jqguw-0008Ca-Vd for 42143@debbugs.gnu.org; Wed, 01 Jul 2020 13:53:09 -0400 Original-Received: (qmail 57902 invoked by uid 3782); 1 Jul 2020 17:53:00 -0000 In-Reply-To: X-Newsgroups: gnu.emacs.bug X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:182618 Archived-At: Hello, Susan. In article you wrote: > [-- text/plain, encoding quoted-printable, charset: UTF-8, 657 lines --= ] > --text follows this line-- > ;; =E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80= =94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94= =E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2= =80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80= =94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94= =E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2= =80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94 > ;; I found this week that auto-fill-mode wasn't working. How wasn't it working? What did Emacs do and/or fail to do, and what action were you taking when it did/didn't do this? > ;; The issue > ;; seemed to be some missing variables (`current-fill-column' and > ;; `right-margin') that were mentioned in the doc string .... Which doc string, exactly? > ;; .... but > ;; didn't show up in the actual code. current-fill-column is actually a function rather than a variable. right-margin is, I think, a variable which is bound locally within functions, but isn't in any sense a configuration variable. > ;; I cobbled together this > ;; workaround to get it going. > (use-package simple > :preface > ;; `auto-fill-mode': The doc string describes how > ;; `current-fill-column' is calculated, but the code fails to > ;; do so. This provides some values so `auto-fill-mode' can > ;; work. Without it, the mode does nothing. > (defvar right-margin 0 > "Supply right-margin if needed.") > (defvar current-fill-column 80 > "Supply current-fill-column if needed.") > (setq current-fill-column (- fill-column right-margin)) > :init > (defun auto-fill (&optional arg) > "Run `auto-fill-mode' with `current-fill-column' set." > ;; I reset `current-fill-column' here in case `fill-column' > ;; and/or `right-margin' have changed. > (setq current-fill-column (- fill-column right-margin)) > (auto-fill-mode arg)) > :hook (text-mode . auto-fill)) > ;; =E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80= =94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94= =E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2= =80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80= =94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94= =E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2= =80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94 Do you still see problems in auto-fill-mode when you start emacs with the -Q flag? If not, there could be something wrong with your configuration. > In GNU Emacs 26.1 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.5) > of 2019-09-22, modified by Debian built on x86-grnet-01 > Windowing system distributor 'The X.Org Foundation', version 11.0.12001= 000 > System Description: Debian GNU/Linux 10 (buster) [ .... ] > Configured using: > 'configure --build x86_64-linux-gnu --prefix=3D/usr > --sharedstatedir=3D/var/lib --libexecdir=3D/usr/lib > --localstatedir=3D/var/lib --infodir=3D/usr/share/info > --mandir=3D/usr/share/man --enable-libsystemd --with-pop=3Dyes > --enable-locallisppath=3D/etc/emacs:/usr/local/share/emacs/26.1/site-l= isp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/26.1/site-lisp:/usr= /share/emacs/site-lisp > --with-sound=3Dalsa --without-gconf --with-mailutils --build > x86_64-linux-gnu --prefix=3D/usr --sharedstatedir=3D/var/lib > --libexecdir=3D/usr/lib --localstatedir=3D/var/lib > --infodir=3D/usr/share/info --mandir=3D/usr/share/man --enable-libsyst= emd > --with-pop=3Dyes > --enable-locallisppath=3D/etc/emacs:/usr/local/share/emacs/26.1/site-l= isp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/26.1/site-lisp:/usr= /share/emacs/site-lisp > --with-sound=3Dalsa --without-gconf --with-mailutils --with-x=3Dyes > --with-x-toolkit=3Dgtk3 --with-toolkit-scroll-bars 'CFLAGS=3D-g -O2 > -fdebug-prefix-map=3D/build/emacs-StqULU/emacs-26.1+1=3D. > -fstack-protector-strong -Wformat -Werror=3Dformat-security -Wall' > 'CPPFLAGS=3D-Wdate-time -D_FORTIFY_SOURCE=3D2' LDFLAGS=3D-Wl,-z,relro' > Configured features: > XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY > ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB > TOOLKIT_SCROLL_BARS GTK3 X11 THREADS LIBSYSTEMD LCMS2 > Important settings: > value of $LANG: en_US.UTF-8 > locale-coding-system: utf-8-unix > Major mode: LispInt > Minor modes in effect: > display-line-numbers-mode: t > display-time-mode: t > show-paren-mode: t > global-hl-line-mode: t > homing-mode: t > recentf-mode: t > delete-selection-mode: t > cua-mode: t > override-global-mode: t > tooltip-mode: t > global-eldoc-mode: t > eldoc-mode: t > electric-indent-mode: t > mouse-wheel-mode: t > tool-bar-mode: t > menu-bar-mode: t > file-name-shadow-mode: t > global-font-lock-mode: t > font-lock-mode: t > auto-composition-mode: t > auto-encryption-mode: t > auto-compression-mode: t > size-indication-mode: t > column-number-mode: t > line-number-mode: t > transient-mark-mode: t > abbrev-mode: t > Load-path shadows: [ .... ] --=20 Alan Mackenzie (Nuremberg, Germany).