GNU bug report logs -
#46193
Enabling Auto Fill mode
Previous Next
Reported by: jai-bholeki <at> gmx.com
Date: Sat, 30 Jan 2021 16:14:02 UTC
Severity: normal
Tags: notabug
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 46193 in the body.
You can then email your comments to 46193 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#46193
; Package
emacs
.
(Sat, 30 Jan 2021 16:14:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
jai-bholeki <at> gmx.com
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sat, 30 Jan 2021 16:14:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
In the documentation for (auto-fill-mode &optional ARG), it says that
if called from Lisp, enable the mode if ARG is omitted or nil.
Enabling a mode using nil seems counter-intuitive to me.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#46193
; Package
emacs
.
(Sat, 30 Jan 2021 18:33:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 46193 <at> debbugs.gnu.org (full text, mbox):
Am Sa., 30. Jan. 2021 um 17:14 Uhr schrieb <jai-bholeki <at> gmx.com>:
>
>
> In the documentation for (auto-fill-mode &optional ARG), it says that
> if called from Lisp, enable the mode if ARG is omitted or nil.
>
> Enabling a mode using nil seems counter-intuitive to me.
>
Maybe, but it's the universal convention for minor modes. See "Minor
mode conventions" in the ELisp manual.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#46193
; Package
emacs
.
(Sat, 30 Jan 2021 20:04:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 46193 <at> debbugs.gnu.org (full text, mbox):
I have noticed that enabling a minor-mode using texinfo-mode-hook fails after
setting auto-fill comments using a hook.
(add-hook 'texinfo-mode-hook
(lambda () ((set (make-local-variable 'comment-auto-fill-only-comments) t)))
(auto-fill-mode)
;; crucible-mode not enabled after setting comment-auto-fill-only-comments
(add-hook 'texinfo-mode-hook 'crucible-mode)
> Sent: Sunday, January 31, 2021 at 6:31 AM
> From: "Philipp Stephani" <p.stephani2 <at> gmail.com>
> To: jai-bholeki <at> gmx.com
> Cc: 46193 <at> debbugs.gnu.org
> Subject: bug#46193: Enabling Auto Fill mode
>
> Am Sa., 30. Jan. 2021 um 17:14 Uhr schrieb <jai-bholeki <at> gmx.com>:
> >
> >
> > In the documentation for (auto-fill-mode &optional ARG), it says that
> > if called from Lisp, enable the mode if ARG is omitted or nil.
> >
> > Enabling a mode using nil seems counter-intuitive to me.
> >
>
>
> Maybe, but it's the universal convention for minor modes. See "Minor
> mode conventions" in the ELisp manual.
>
>
>
>
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#46193
; Package
emacs
.
(Mon, 01 Feb 2021 09:20:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 46193 <at> debbugs.gnu.org (full text, mbox):
Philipp Stephani <p.stephani2 <at> gmail.com> writes:
> Am Sa., 30. Jan. 2021 um 17:14 Uhr schrieb <jai-bholeki <at> gmx.com>:
>>
>> In the documentation for (auto-fill-mode &optional ARG), it says that
>> if called from Lisp, enable the mode if ARG is omitted or nil.
>>
>> Enabling a mode using nil seems counter-intuitive to me.
>
> Maybe, but it's the universal convention for minor modes. See "Minor
> mode conventions" in the ELisp manual.
Indeed, so I'm closing this bug report.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Added tag(s) notabug.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Mon, 01 Feb 2021 09:20:03 GMT)
Full text and
rfc822 format available.
bug closed, send any further explanations to
46193 <at> debbugs.gnu.org and jai-bholeki <at> gmx.com
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Mon, 01 Feb 2021 09:20:03 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#46193
; Package
emacs
.
(Mon, 01 Feb 2021 09:21:02 GMT)
Full text and
rfc822 format available.
Message #21 received at 46193 <at> debbugs.gnu.org (full text, mbox):
jai-bholeki <at> gmx.com writes:
> I have noticed that enabling a minor-mode using texinfo-mode-hook fails after
> setting auto-fill comments using a hook.
>
> (add-hook 'texinfo-mode-hook
> (lambda () ((set (make-local-variable
> 'comment-auto-fill-only-comments) t)))
> (auto-fill-mode)
>
> ;; crucible-mode not enabled after setting comment-auto-fill-only-comments
> (add-hook 'texinfo-mode-hook 'crucible-mode)
(add-hook 'texinfo-mode-hook
(lambda () ((set (make-local-variable 'comment-auto-fill-only-comments) t)))
That's not valid syntax -- you have one extra pair of () around the
`set' function call.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#46193
; Package
emacs
.
(Mon, 01 Feb 2021 12:00:02 GMT)
Full text and
rfc822 format available.
Message #24 received at 46193 <at> debbugs.gnu.org (full text, mbox):
I have now made the following function. Would I better make the
functionality to be buffer-local?
(defvar dfv-break-long-lines-state nil)
(defun cycle-break-long-lines-din ()
"Breaks long lines using auto-fill tool."
(interactive)
;;
(pcase dfv-break-long-lines-state
;;
(1 (setq fill-column 72)
(setq comment-auto-fill-only-comments t)
(auto-fill-mode)
(message "%s" "Enable: Break only comments")
(setq dfv-break-long-lines-state 2))
;;
(2 (setq comment-auto-fill-only-comments nil)
(message "%s" "Enable: Break all long lines")
(setq dfv-break-long-lines-state 1))
;;
(_ (setq comment-auto-fill-only-comments nil)
(auto-fill-mode 0)
(message "%s" "Disable: Break long lines")
(setq dfv-break-long-lines-state 0)) ))
(defun break-long-lines-din ()
"Breaks long lines using auto-fill."
(setq dfv-break-long-lines-state 1)
(cycle-break-long-lines-din))
> Sent: Monday, February 01, 2021 at 9:20 PM
> From: "Lars Ingebrigtsen" <larsi <at> gnus.org>
> To: jai-bholeki <at> gmx.com
> Cc: "Philipp Stephani" <p.stephani2 <at> gmail.com>, 46193 <at> debbugs.gnu.org
> Subject: Re: bug#46193: Enabling Auto Fill mode
>
> jai-bholeki <at> gmx.com writes:
>
> > I have noticed that enabling a minor-mode using texinfo-mode-hook fails after
> > setting auto-fill comments using a hook.
> >
> > (add-hook 'texinfo-mode-hook
> > (lambda () ((set (make-local-variable
> > 'comment-auto-fill-only-comments) t)))
> > (auto-fill-mode)
> >
> > ;; crucible-mode not enabled after setting comment-auto-fill-only-comments
> > (add-hook 'texinfo-mode-hook 'crucible-mode)
>
> (add-hook 'texinfo-mode-hook
> (lambda () ((set (make-local-variable 'comment-auto-fill-only-comments) t)))
>
> That's not valid syntax -- you have one extra pair of () around the
> `set' function call.
>
> --
> (domestic pets only, the antidote for overdose, milk.)
> bloggy blog: http://lars.ingebrigtsen.no
>
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 01 Mar 2021 12:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 4 years and 193 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.