From: Eli Zaretskii <eliz@gnu.org>
To: David Ponce <da_vid@orange.fr>
Cc: 65496@debbugs.gnu.org
Subject: bug#65496: 30.0.50; Issue with the regexp used to auto-detect PBM image data
Date: Tue, 05 Sep 2023 14:08:15 +0300 [thread overview]
Message-ID: <83ledk5140.fsf@gnu.org> (raw)
In-Reply-To: <6e4af25a-03b1-ef82-b1c0-2da81938e215@orange.fr> (message from David Ponce on Mon, 4 Sep 2023 23:43:56 +0200)
[I presume you didn't intend to discuss this only with me in private.]
> Date: Mon, 4 Sep 2023 23:43:56 +0200
> From: David Ponce <da_vid@orange.fr>
>
> On 04/09/2023 19:36, Eli Zaretskii wrote:
> >> Date: Mon, 4 Sep 2023 18:32:22 +0200
> >> From: David Ponce <da_vid@orange.fr>
> >>
> >> I wonder if it is expected that matching a regular expression
> >> against a string object depends on the syntax-table setup in current
> >> buffer? Shouldn't (standard-syntax-table) implied when matching a
> >> regexp against a string object, that is, regardless of any buffer
> >> context?
> >
> > Not necessarily, because you wouldn't expect, say, looking-at to
> > return a different result than (string-match-p (buffer-string)), would
> > you?
>
> Sure, from this perspective you are right. However, for other cases
> where the string object is not related to a buffer value, it's not so
> clear ;-)
>
> > This belongs to the gray areas of Emacs. The same situation exists
> > with functions like downcase, which use the buffer-local value of
> > case-table.
>
> I can understand that. Many things are not only black or white ;-)
>
> Maybe for the use case of auto-detecting image type from image data,
> my proposed patch to replace character class by a list of unambiguous
> explicit character values in the regexp could make sense?
Yes, it makes sense, but are you sure you mention there all the
characters that can happen in PBM images, and only those characters?
next prev parent reply other threads:[~2023-09-05 11:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-24 10:55 bug#65496: 30.0.50; Issue with the regexp used to auto-detect PBM image data David Ponce
2023-09-04 16:32 ` David Ponce
2023-09-04 17:36 ` Eli Zaretskii
[not found] ` <6e4af25a-03b1-ef82-b1c0-2da81938e215@orange.fr>
2023-09-05 11:08 ` Eli Zaretskii [this message]
2023-09-06 14:05 ` David Ponce
2023-09-06 16:00 ` Eli Zaretskii
2023-09-06 16:19 ` David Ponce
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=83ledk5140.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=65496@debbugs.gnu.org \
--cc=da_vid@orange.fr \
/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).