From: Michael Albinus <michael.albinus@gmx.de>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 48037@debbugs.gnu.org
Subject: bug#48037: 28.0.50; add-change-log-entry does not detect name with digit
Date: Tue, 27 Apr 2021 09:55:03 +0200 [thread overview]
Message-ID: <87zgxkjh60.fsf@gmx.de> (raw)
In-Reply-To: <874kfs18qu.fsf@gnus.org> (Lars Ingebrigtsen's message of "Tue, 27 Apr 2021 09:34:17 +0200")
Lars Ingebrigtsen <larsi@gnus.org> writes:
Hi Lars,
>
>>>> (defcustom add-log-current-defun-header-regexp
>>>> - "^\\([[:upper:]][[:upper:]_ ]*[[:upper:]_]\\|[-_[:alpha:]]+\\)[ \t]*[:=]"
>>>> + "^\\([[:upper:]][[:upper:]_ ]*[[:upper:]_]\\|[-_[:alnum:]]+\\)[ \t]*[:=]"
>>>> "Heuristic regexp used by `add-log-current-defun' for unknown major modes.
>
> [...]
>
>> Yes. However, the existing regexp hits also entries like
>>
>> -:
>> stage: slow
>>
>> Looks also strange. So my proposal won't get worse. Remember,
>> add-log-current-defun-header-regexp is just a heuristic.
>
> Sure, but why not improve the regexp at the same time? That is,
> require at least one [:alpha:] for an identifier -- I think that's
> pretty reasonable as heuristics go.
Wouldn't this be too complex for a simple heuristic? Something like
"^\\([[:upper:]][[:upper:]_ ]*[[:upper:]_]\\|[-_[:alnum:]]*[[:alpha:]][-_[:alnum:]]*\\)[ \t]*[:=]"
Note, that this regexp still doesn't fit all entries in gitlab-ci.yml,
for example entries with a dot, like '.job-template:'.
Best regards, Michael.
next prev parent reply other threads:[~2021-04-27 7:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-26 15:49 bug#48037: 28.0.50; add-change-log-entry does not detect name with digit Michael Albinus
2021-04-27 4:09 ` Lars Ingebrigtsen
2021-04-27 7:30 ` Michael Albinus
2021-04-27 7:34 ` Lars Ingebrigtsen
2021-04-27 7:55 ` Michael Albinus [this message]
2021-04-27 10:31 ` Michael Albinus
2021-04-27 23:17 ` Lars Ingebrigtsen
2021-04-28 8:07 ` Michael Albinus
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=87zgxkjh60.fsf@gmx.de \
--to=michael.albinus@gmx.de \
--cc=48037@debbugs.gnu.org \
--cc=larsi@gnus.org \
/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).