all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#72329: Avoid recursion in gnus-message-citation-mode
@ 2024-07-28  1:30 Thuna
  2024-08-02  7:27 ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Thuna @ 2024-07-28  1:30 UTC (permalink / raw)
  To: 72329

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.





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#72329: Avoid recursion in gnus-message-citation-mode
  2024-07-28  1:30 bug#72329: Avoid recursion in gnus-message-citation-mode Thuna
@ 2024-08-02  7:27 ` Eli Zaretskii
  2024-08-17  7:29   ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2024-08-02  7:27 UTC (permalink / raw)
  To: Thuna, eric; +Cc: 72329

> From: Thuna <thuna.cing@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?





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#72329: Avoid recursion in gnus-message-citation-mode
  2024-08-02  7:27 ` Eli Zaretskii
@ 2024-08-17  7:29   ` Eli Zaretskii
  2024-08-31  7:56     ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2024-08-17  7:29 UTC (permalink / raw)
  To: eric; +Cc: 72329, thuna.cing

Ping! Eric, any comments?

> Cc: 72329@debbugs.gnu.org
> Date: Fri, 02 Aug 2024 10:27:54 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> 
> > From: Thuna <thuna.cing@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?
> 
> 
> 
> 





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#72329: Avoid recursion in gnus-message-citation-mode
  2024-08-17  7:29   ` Eli Zaretskii
@ 2024-08-31  7:56     ` Eli Zaretskii
  2024-09-14  7:33       ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2024-08-31  7:56 UTC (permalink / raw)
  To: eric; +Cc: thuna.cing, 72329

Ping! Ping!  Eric, any comments?

> Cc: 72329@debbugs.gnu.org, thuna.cing@gmail.com
> Date: Sat, 17 Aug 2024 10:29:31 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> 
> Ping! Eric, any comments?
> 
> > Cc: 72329@debbugs.gnu.org
> > Date: Fri, 02 Aug 2024 10:27:54 +0300
> > From: Eli Zaretskii <eliz@gnu.org>
> > 
> > > From: Thuna <thuna.cing@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?
> > 
> > 
> > 
> > 
> 
> 
> 
> 





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#72329: Avoid recursion in gnus-message-citation-mode
  2024-08-31  7:56     ` Eli Zaretskii
@ 2024-09-14  7:33       ` Eli Zaretskii
  0 siblings, 0 replies; 5+ messages in thread
From: Eli Zaretskii @ 2024-09-14  7:33 UTC (permalink / raw)
  To: eric; +Cc: 72329, thuna.cing

Ping! Ping! Ping! Eric, are you there?

> Cc: thuna.cing@gmail.com, 72329@debbugs.gnu.org
> Date: Sat, 31 Aug 2024 10:56:58 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> 
> Ping! Ping!  Eric, any comments?
> 
> > Cc: 72329@debbugs.gnu.org, thuna.cing@gmail.com
> > Date: Sat, 17 Aug 2024 10:29:31 +0300
> > From: Eli Zaretskii <eliz@gnu.org>
> > 
> > Ping! Eric, any comments?
> > 
> > > Cc: 72329@debbugs.gnu.org
> > > Date: Fri, 02 Aug 2024 10:27:54 +0300
> > > From: Eli Zaretskii <eliz@gnu.org>
> > > 
> > > > From: Thuna <thuna.cing@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?
> > > 
> > > 
> > > 
> > > 
> > 
> > 
> > 
> > 
> 
> 
> 
> 





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-09-14  7:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-28  1:30 bug#72329: Avoid recursion in gnus-message-citation-mode Thuna
2024-08-02  7:27 ` Eli Zaretskii
2024-08-17  7:29   ` Eli Zaretskii
2024-08-31  7:56     ` Eli Zaretskii
2024-09-14  7:33       ` Eli Zaretskii

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.