unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: Susan Pinochet <sdpinochet@gmail.com>
Cc: acm@muc.de, 42143@debbugs.gnu.org
Subject: bug#42143: 26.1; auto-fill-mode
Date: 1 Jul 2020 17:53:00 -0000	[thread overview]
Message-ID: <20200701175300.57901.qmail@mail.muc.de> (raw)
In-Reply-To: <mailman.721.1593546663.2574.bug-gnu-emacs@gnu.org>

Hello, Susan.

In article <mailman.721.1593546663.2574.bug-gnu-emacs@gnu.org> you wrote:
> [-- text/plain, encoding quoted-printable, charset: UTF-8, 657 lines --]

> --text follows this line--

> ;; ———————————————————————————————————————————————————————

> ;; 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))

> ;; ———————————————————————————————————————————————————————

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.12001000
> System Description: Debian GNU/Linux 10 (buster)

[ .... ]

> Configured using:
>  'configure --build x86_64-linux-gnu --prefix=/usr
>  --sharedstatedir=/var/lib --libexecdir=/usr/lib
>  --localstatedir=/var/lib --infodir=/usr/share/info
>  --mandir=/usr/share/man --enable-libsystemd --with-pop=yes
>  --enable-locallisppath=/etc/emacs:/usr/local/share/emacs/26.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/26.1/site-lisp:/usr/share/emacs/site-lisp
>  --with-sound=alsa --without-gconf --with-mailutils --build
>  x86_64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib
>  --libexecdir=/usr/lib --localstatedir=/var/lib
>  --infodir=/usr/share/info --mandir=/usr/share/man --enable-libsystemd
>  --with-pop=yes
>  --enable-locallisppath=/etc/emacs:/usr/local/share/emacs/26.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/26.1/site-lisp:/usr/share/emacs/site-lisp
>  --with-sound=alsa --without-gconf --with-mailutils --with-x=yes
>  --with-x-toolkit=gtk3 --with-toolkit-scroll-bars 'CFLAGS=-g -O2
>  -fdebug-prefix-map=/build/emacs-StqULU/emacs-26.1+1=.
>  -fstack-protector-strong -Wformat -Werror=format-security -Wall'
>  'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2' LDFLAGS=-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:

[ .... ]

-- 
Alan Mackenzie (Nuremberg, Germany).






  parent reply	other threads:[~2020-07-01 17:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-30 19:32 bug#42143: 26.1; auto-fill-mode Susan Pinochet
     [not found] ` <mailman.721.1593546663.2574.bug-gnu-emacs@gnu.org>
2020-07-01 17:53   ` Alan Mackenzie [this message]
2020-07-05 14:52 ` Susan Pinochet

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=20200701175300.57901.qmail@mail.muc.de \
    --to=acm@muc.de \
    --cc=42143@debbugs.gnu.org \
    --cc=sdpinochet@gmail.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).