GNU bug report logs - #47879
[PATCH] Ignore mode hooks when analysing diffs

Previous Next

Package: emacs;

Reported by: Philip Kaludercic <philipk <at> posteo.net>

Date: Sun, 18 Apr 2021 19:09:02 UTC

Severity: normal

Tags: patch

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Philip Kaludercic <philipk <at> posteo.net>
Cc: 47879 <at> debbugs.gnu.org
Subject: bug#47879: [PATCH] Ignore mode hooks when analysing diffs
Date: Sun, 18 Apr 2021 22:25:11 +0300
> From: Philip Kaludercic <philipk <at> posteo.net>
> Date: Sun, 18 Apr 2021 19:08:01 +0000
> 
> This fixes a bug related to log-edit-generate-changelog-from-diff.
> 
> When I tried to invoke this command in a commit buffer, the error
> 
>      signal: Unmatched bracket or quote
> 
> was raised. The reason was that I added paredit-mode to
> emacs-lisp-mode-hook, that when invoked calls check-parens. This raises
> an error when the diff contains a partial s-expression, which is almost
> always the case.
> 
> The least invasive approach I could come up with was to defer the mode
> hooks.

I rather think that the bug is either in the hook you added or in
paredit-mode, and should be solved there.  Otherwise, we'd need to
defer hooks every time we turn on a mode.  And who known what
deferring all the hooks could do to other hooks, which are entirely
legitimate and don't cause any problems.

IOW, I think what you suggest is too blunt a weapon, and could do more
harm than help.  Let's try to find a cleaner way of fixing the
problem, preferably where it happens, i.e. in the code that is run by
the hook.

Thanks.




This bug report was last modified 4 years and 17 days ago.

Previous Next


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