GNU bug report logs - #72329
Avoid recursion in gnus-message-citation-mode

Previous Next

Package: emacs;

Reported by: Thuna <thuna.cing <at> gmail.com>

Date: Sun, 28 Jul 2024 01:32:01 UTC

Severity: normal

To reply to this bug, email your comments to 72329 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#72329; Package emacs. (Sun, 28 Jul 2024 01:32:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Thuna <thuna.cing <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 28 Jul 2024 01:32:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Thuna <thuna.cing <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Avoid recursion in gnus-message-citation-mode
Date: Sun, 28 Jul 2024 03:30:40 +0200
In `gnus-message-citation-mode' the

  (if (not font-lock-mode)
      (gnus-message-citation-mode (font-lock-mode 1))
    ...)

can lead to excessive nesting if font-lock-mode fails to be set (quick
enough or altogether).  Changing this with

  (while (not font-lock-mode) (font-lock-mode 1))
  ...

should be better, assuming it is necessary for `font-lock-mode' to be
called repeatedly, otherwise

  (font-lock-mode 1)
  (while (not font-lock-mode))
  ...

might also work, or simply

  (font-lock-mode 1)
  ...

if it is not necessary to wait.

One possible problem with these arrangements is that it may be desirable
to error in case there is an issue which prevents font-lock-mode from
being set perpetually, in which case something like

  (font-lock-mode 1)
  (with-timeout (<however-long-before-giving-up>
                 (error "Failed to enable `font-lock-mode'."))
    (while (not font-lock-mode)))
  ...

might be preferable.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#72329; Package emacs. (Fri, 02 Aug 2024 07:29:02 GMT) Full text and rfc822 format available.

Message #8 received at 72329 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Thuna <thuna.cing <at> gmail.com>, eric <at> ericabrahamsen.net
Cc: 72329 <at> debbugs.gnu.org
Subject: Re: bug#72329: Avoid recursion in gnus-message-citation-mode
Date: Fri, 02 Aug 2024 10:27:54 +0300
> From: Thuna <thuna.cing <at> gmail.com>
> Date: Sun, 28 Jul 2024 03:30:40 +0200
> 
> In `gnus-message-citation-mode' the
> 
>   (if (not font-lock-mode)
>       (gnus-message-citation-mode (font-lock-mode 1))
>     ...)
> 
> can lead to excessive nesting if font-lock-mode fails to be set (quick
> enough or altogether).  Changing this with
> 
>   (while (not font-lock-mode) (font-lock-mode 1))
>   ...
> 
> should be better, assuming it is necessary for `font-lock-mode' to be
> called repeatedly, otherwise
> 
>   (font-lock-mode 1)
>   (while (not font-lock-mode))
>   ...
> 
> might also work, or simply
> 
>   (font-lock-mode 1)
>   ...
> 
> if it is not necessary to wait.
> 
> One possible problem with these arrangements is that it may be desirable
> to error in case there is an issue which prevents font-lock-mode from
> being set perpetually, in which case something like
> 
>   (font-lock-mode 1)
>   (with-timeout (<however-long-before-giving-up>
>                  (error "Failed to enable `font-lock-mode'."))
>     (while (not font-lock-mode)))
>   ...
> 
> might be preferable.

Thanks.

Eric, any comments or suggestions?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#72329; Package emacs. (Sat, 17 Aug 2024 07:31:01 GMT) Full text and rfc822 format available.

Message #11 received at 72329 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: eric <at> ericabrahamsen.net
Cc: 72329 <at> debbugs.gnu.org, thuna.cing <at> gmail.com
Subject: Re: bug#72329: Avoid recursion in gnus-message-citation-mode
Date: Sat, 17 Aug 2024 10:29:31 +0300
Ping! Eric, any comments?

> Cc: 72329 <at> debbugs.gnu.org
> Date: Fri, 02 Aug 2024 10:27:54 +0300
> From: Eli Zaretskii <eliz <at> gnu.org>
> 
> > From: Thuna <thuna.cing <at> gmail.com>
> > Date: Sun, 28 Jul 2024 03:30:40 +0200
> > 
> > In `gnus-message-citation-mode' the
> > 
> >   (if (not font-lock-mode)
> >       (gnus-message-citation-mode (font-lock-mode 1))
> >     ...)
> > 
> > can lead to excessive nesting if font-lock-mode fails to be set (quick
> > enough or altogether).  Changing this with
> > 
> >   (while (not font-lock-mode) (font-lock-mode 1))
> >   ...
> > 
> > should be better, assuming it is necessary for `font-lock-mode' to be
> > called repeatedly, otherwise
> > 
> >   (font-lock-mode 1)
> >   (while (not font-lock-mode))
> >   ...
> > 
> > might also work, or simply
> > 
> >   (font-lock-mode 1)
> >   ...
> > 
> > if it is not necessary to wait.
> > 
> > One possible problem with these arrangements is that it may be desirable
> > to error in case there is an issue which prevents font-lock-mode from
> > being set perpetually, in which case something like
> > 
> >   (font-lock-mode 1)
> >   (with-timeout (<however-long-before-giving-up>
> >                  (error "Failed to enable `font-lock-mode'."))
> >     (while (not font-lock-mode)))
> >   ...
> > 
> > might be preferable.
> 
> Thanks.
> 
> Eric, any comments or suggestions?
> 
> 
> 
> 




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#72329; Package emacs. (Sat, 31 Aug 2024 07:59:02 GMT) Full text and rfc822 format available.

Message #14 received at 72329 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: eric <at> ericabrahamsen.net
Cc: thuna.cing <at> gmail.com, 72329 <at> debbugs.gnu.org
Subject: Re: bug#72329: Avoid recursion in gnus-message-citation-mode
Date: Sat, 31 Aug 2024 10:56:58 +0300
Ping! Ping!  Eric, any comments?

> Cc: 72329 <at> debbugs.gnu.org, thuna.cing <at> gmail.com
> Date: Sat, 17 Aug 2024 10:29:31 +0300
> From: Eli Zaretskii <eliz <at> gnu.org>
> 
> Ping! Eric, any comments?
> 
> > Cc: 72329 <at> debbugs.gnu.org
> > Date: Fri, 02 Aug 2024 10:27:54 +0300
> > From: Eli Zaretskii <eliz <at> gnu.org>
> > 
> > > From: Thuna <thuna.cing <at> gmail.com>
> > > Date: Sun, 28 Jul 2024 03:30:40 +0200
> > > 
> > > In `gnus-message-citation-mode' the
> > > 
> > >   (if (not font-lock-mode)
> > >       (gnus-message-citation-mode (font-lock-mode 1))
> > >     ...)
> > > 
> > > can lead to excessive nesting if font-lock-mode fails to be set (quick
> > > enough or altogether).  Changing this with
> > > 
> > >   (while (not font-lock-mode) (font-lock-mode 1))
> > >   ...
> > > 
> > > should be better, assuming it is necessary for `font-lock-mode' to be
> > > called repeatedly, otherwise
> > > 
> > >   (font-lock-mode 1)
> > >   (while (not font-lock-mode))
> > >   ...
> > > 
> > > might also work, or simply
> > > 
> > >   (font-lock-mode 1)
> > >   ...
> > > 
> > > if it is not necessary to wait.
> > > 
> > > One possible problem with these arrangements is that it may be desirable
> > > to error in case there is an issue which prevents font-lock-mode from
> > > being set perpetually, in which case something like
> > > 
> > >   (font-lock-mode 1)
> > >   (with-timeout (<however-long-before-giving-up>
> > >                  (error "Failed to enable `font-lock-mode'."))
> > >     (while (not font-lock-mode)))
> > >   ...
> > > 
> > > might be preferable.
> > 
> > Thanks.
> > 
> > Eric, any comments or suggestions?
> > 
> > 
> > 
> > 
> 
> 
> 
> 




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#72329; Package emacs. (Sat, 14 Sep 2024 07:34:01 GMT) Full text and rfc822 format available.

Message #17 received at 72329 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: eric <at> ericabrahamsen.net
Cc: 72329 <at> debbugs.gnu.org, thuna.cing <at> gmail.com
Subject: Re: bug#72329: Avoid recursion in gnus-message-citation-mode
Date: Sat, 14 Sep 2024 10:33:07 +0300
Ping! Ping! Ping! Eric, are you there?

> Cc: thuna.cing <at> gmail.com, 72329 <at> debbugs.gnu.org
> Date: Sat, 31 Aug 2024 10:56:58 +0300
> From: Eli Zaretskii <eliz <at> gnu.org>
> 
> Ping! Ping!  Eric, any comments?
> 
> > Cc: 72329 <at> debbugs.gnu.org, thuna.cing <at> gmail.com
> > Date: Sat, 17 Aug 2024 10:29:31 +0300
> > From: Eli Zaretskii <eliz <at> gnu.org>
> > 
> > Ping! Eric, any comments?
> > 
> > > Cc: 72329 <at> debbugs.gnu.org
> > > Date: Fri, 02 Aug 2024 10:27:54 +0300
> > > From: Eli Zaretskii <eliz <at> gnu.org>
> > > 
> > > > From: Thuna <thuna.cing <at> gmail.com>
> > > > Date: Sun, 28 Jul 2024 03:30:40 +0200
> > > > 
> > > > In `gnus-message-citation-mode' the
> > > > 
> > > >   (if (not font-lock-mode)
> > > >       (gnus-message-citation-mode (font-lock-mode 1))
> > > >     ...)
> > > > 
> > > > can lead to excessive nesting if font-lock-mode fails to be set (quick
> > > > enough or altogether).  Changing this with
> > > > 
> > > >   (while (not font-lock-mode) (font-lock-mode 1))
> > > >   ...
> > > > 
> > > > should be better, assuming it is necessary for `font-lock-mode' to be
> > > > called repeatedly, otherwise
> > > > 
> > > >   (font-lock-mode 1)
> > > >   (while (not font-lock-mode))
> > > >   ...
> > > > 
> > > > might also work, or simply
> > > > 
> > > >   (font-lock-mode 1)
> > > >   ...
> > > > 
> > > > if it is not necessary to wait.
> > > > 
> > > > One possible problem with these arrangements is that it may be desirable
> > > > to error in case there is an issue which prevents font-lock-mode from
> > > > being set perpetually, in which case something like
> > > > 
> > > >   (font-lock-mode 1)
> > > >   (with-timeout (<however-long-before-giving-up>
> > > >                  (error "Failed to enable `font-lock-mode'."))
> > > >     (while (not font-lock-mode)))
> > > >   ...
> > > > 
> > > > might be preferable.
> > > 
> > > Thanks.
> > > 
> > > Eric, any comments or suggestions?
> > > 
> > > 
> > > 
> > > 
> > 
> > 
> > 
> > 
> 
> 
> 
> 




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#72329; Package emacs. (Sat, 28 Sep 2024 08:49:02 GMT) Full text and rfc822 format available.

Message #20 received at 72329 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: eric <at> ericabrahamsen.net
Cc: thuna.cing <at> gmail.com, 72329 <at> debbugs.gnu.org
Subject: Re: bug#72329: Avoid recursion in gnus-message-citation-mode
Date: Sat, 28 Sep 2024 11:48:00 +0300
Ping! Ping! Ping! Ping!

> Cc: 72329 <at> debbugs.gnu.org, thuna.cing <at> gmail.com
> Date: Sat, 14 Sep 2024 10:33:07 +0300
> From: Eli Zaretskii <eliz <at> gnu.org>
> 
> Ping! Ping! Ping! Eric, are you there?
> 
> > Cc: thuna.cing <at> gmail.com, 72329 <at> debbugs.gnu.org
> > Date: Sat, 31 Aug 2024 10:56:58 +0300
> > From: Eli Zaretskii <eliz <at> gnu.org>
> > 
> > Ping! Ping!  Eric, any comments?
> > 
> > > Cc: 72329 <at> debbugs.gnu.org, thuna.cing <at> gmail.com
> > > Date: Sat, 17 Aug 2024 10:29:31 +0300
> > > From: Eli Zaretskii <eliz <at> gnu.org>
> > > 
> > > Ping! Eric, any comments?
> > > 
> > > > Cc: 72329 <at> debbugs.gnu.org
> > > > Date: Fri, 02 Aug 2024 10:27:54 +0300
> > > > From: Eli Zaretskii <eliz <at> gnu.org>
> > > > 
> > > > > From: Thuna <thuna.cing <at> gmail.com>
> > > > > Date: Sun, 28 Jul 2024 03:30:40 +0200
> > > > > 
> > > > > In `gnus-message-citation-mode' the
> > > > > 
> > > > >   (if (not font-lock-mode)
> > > > >       (gnus-message-citation-mode (font-lock-mode 1))
> > > > >     ...)
> > > > > 
> > > > > can lead to excessive nesting if font-lock-mode fails to be set (quick
> > > > > enough or altogether).  Changing this with
> > > > > 
> > > > >   (while (not font-lock-mode) (font-lock-mode 1))
> > > > >   ...
> > > > > 
> > > > > should be better, assuming it is necessary for `font-lock-mode' to be
> > > > > called repeatedly, otherwise
> > > > > 
> > > > >   (font-lock-mode 1)
> > > > >   (while (not font-lock-mode))
> > > > >   ...
> > > > > 
> > > > > might also work, or simply
> > > > > 
> > > > >   (font-lock-mode 1)
> > > > >   ...
> > > > > 
> > > > > if it is not necessary to wait.
> > > > > 
> > > > > One possible problem with these arrangements is that it may be desirable
> > > > > to error in case there is an issue which prevents font-lock-mode from
> > > > > being set perpetually, in which case something like
> > > > > 
> > > > >   (font-lock-mode 1)
> > > > >   (with-timeout (<however-long-before-giving-up>
> > > > >                  (error "Failed to enable `font-lock-mode'."))
> > > > >     (while (not font-lock-mode)))
> > > > >   ...
> > > > > 
> > > > > might be preferable.
> > > > 
> > > > Thanks.
> > > > 
> > > > Eric, any comments or suggestions?
> > > > 
> > > > 
> > > > 
> > > > 
> > > 
> > > 
> > > 
> > > 
> > 
> > 
> > 
> > 
> 
> 
> 
> 




This bug report was last modified 262 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.