From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs 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 Message-ID: <83ledk5140.fsf@gnu.org> References: <2fea228e-a8e8-5b8e-b91d-2d808d624649@orange.fr> <83wmx54z95.fsf@gnu.org> <6e4af25a-03b1-ef82-b1c0-2da81938e215@orange.fr> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15139"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 65496@debbugs.gnu.org To: David Ponce Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Sep 05 13:09:20 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qdTvr-0003kv-LF for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 05 Sep 2023 13:09:19 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qdTvd-0002YL-Ao; Tue, 05 Sep 2023 07:09:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qdTva-0002Xx-CF for bug-gnu-emacs@gnu.org; Tue, 05 Sep 2023 07:09:03 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qdTvZ-0002Rl-Nf for bug-gnu-emacs@gnu.org; Tue, 05 Sep 2023 07:09:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qdTvZ-0008Uo-Tz for bug-gnu-emacs@gnu.org; Tue, 05 Sep 2023 07:09:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 05 Sep 2023 11:09:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65496 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 65496-submit@debbugs.gnu.org id=B65496.169391212032627 (code B ref 65496); Tue, 05 Sep 2023 11:09:01 +0000 Original-Received: (at 65496) by debbugs.gnu.org; 5 Sep 2023 11:08:40 +0000 Original-Received: from localhost ([127.0.0.1]:54382 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qdTvE-0008UB-9b for submit@debbugs.gnu.org; Tue, 05 Sep 2023 07:08:40 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42532) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qdTvC-0008Tv-3k for 65496@debbugs.gnu.org; Tue, 05 Sep 2023 07:08:39 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qdTv6-0002GT-C2; Tue, 05 Sep 2023 07:08:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=mVYfWsWmFVdBERpeQJJFPEJ7LviEqg695N6XheUb4YI=; b=shPDE5seU4I7 u+QDNe4GZHPErx6FFRr5zDFnkOm5YmNywyaf/epAA+BcPfw2686L/hrnD/6SsL3u23LwgOcKMayHb 0lhtkP2X2L5/3CkFEgoHet+c0XeTwikaKoI4v0kSSOBXkrV//R+3J2RB0jSDRA/mTGixbApRtN7Sf 3iF0yU02cI3KRp0dmoJr4Gqx4kR9JTjby6tNmNAAOdNfroMrOUK8eRaQ+J9zVBRB2BMa83OLCNeQC J94NuB5fraCXC2dVuogPbnYqW/65VNOPI62fkADTednsQSWxz+s/Ts5huLFYY4lul/X7HwT6zNENM YQso33uWaOd1LVsiFx2tow==; In-Reply-To: <6e4af25a-03b1-ef82-b1c0-2da81938e215@orange.fr> (message from David Ponce on Mon, 4 Sep 2023 23:43:56 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:269342 Archived-At: [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 > > On 04/09/2023 19:36, Eli Zaretskii wrote: > >> Date: Mon, 4 Sep 2023 18:32:22 +0200 > >> From: David Ponce > >> > >> 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?