From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Manuel Giraud via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#68637: 30.0.50; image-dired-mark-tagged-files and ls -F Date: Sun, 21 Jan 2024 22:44:28 +0100 Message-ID: <87a5oywedf.fsf@ledu-giraud.fr> References: <87mssyak4w.fsf@epfl.ch> Reply-To: Manuel Giraud Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3219"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: contovob@tcd.ie, stefankangas@gmail.com To: 68637@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jan 21 22:45:39 2024 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 1rRfdK-0000dY-Kb for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 21 Jan 2024 22:45:38 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rRfcm-00007L-FO; Sun, 21 Jan 2024 16:45:04 -0500 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 1rRfch-00006l-FB for bug-gnu-emacs@gnu.org; Sun, 21 Jan 2024 16:44:59 -0500 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 1rRfch-0008Cp-6e for bug-gnu-emacs@gnu.org; Sun, 21 Jan 2024 16:44:59 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rRfck-0006uC-Qt for bug-gnu-emacs@gnu.org; Sun, 21 Jan 2024 16:45:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Manuel Giraud Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 21 Jan 2024 21:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68637 X-GNU-PR-Package: emacs X-Debbugs-Original-To: "Basil L. Contovounesios" via "Bug reports for GNU Emacs, the Swiss army knife of text editors" X-Debbugs-Original-Cc: "Basil L. Contovounesios" , 68637@debbugs.gnu.org, Stefan Kangas Original-Received: via spool by submit@debbugs.gnu.org id=B.170587349026497 (code B ref -1); Sun, 21 Jan 2024 21:45:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 21 Jan 2024 21:44:50 +0000 Original-Received: from localhost ([127.0.0.1]:39154 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rRfcY-0006tJ-0S for submit@debbugs.gnu.org; Sun, 21 Jan 2024 16:44:50 -0500 Original-Received: from lists.gnu.org ([2001:470:142::17]:60684) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rRfcS-0006sv-QP for submit@debbugs.gnu.org; Sun, 21 Jan 2024 16:44:47 -0500 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 1rRfcJ-00005r-Oi for bug-gnu-emacs@gnu.org; Sun, 21 Jan 2024 16:44:35 -0500 Original-Received: from ledu-giraud.fr ([51.159.28.247]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rRfcH-00089c-Vb for bug-gnu-emacs@gnu.org; Sun, 21 Jan 2024 16:44:35 -0500 DKIM-Signature: v=1; a=ed25519-sha256; c=simple/simple; s=ed25519; bh=xvSAazRE nSPslf3vxXT7DZEklqzJJ0CihcfTStjHNfg=; h=date:references:in-reply-to: subject:cc:to:from; d=ledu-giraud.fr; b=VPeuBY0aEXC/oYHJAuApS5RG2KP02h eewgSPF2c9WnFo2t68OeofklcUn13kty8sw27Sdl3Av8Y2LPjgOzV7Aw== DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=rsa; bh=xvSAazREnSPslf3v xXT7DZEklqzJJ0CihcfTStjHNfg=; h=date:references:in-reply-to:subject: cc:to:from; d=ledu-giraud.fr; b=LNs9XE9kf+edNwcWEsge9TuOhpkznGTsCpqout zrdj16/UmJETT2LND3d0HN2YKUEMzB0e3USfI0Ixs9kb5ZdFww9M3zTk6FJVr4Sgwb/vfA ulr2NkL7WnQZxvuqpwWP/+FqB/h16m08RzpM9nXGq7c7To+/UlSr8A9wcW+jE2ZCc8TrgE 5VPC20v6Xfhne/qoCS1yD1lL48Cdb2qjpt1W0V/jS5h4OlbhHIvWRDKLRbssW3H9XWUjzP VLzPXWJgy6Cr+r4FwK9RccefpW1YjgpsvD4A5C4poIGg19X4xkMl9FUGgCRO5+vojU4ZOc zopK8RTYGZZWdquop/nu9ihQ== Original-Received: from computer ( [10.1.1.1]) by ledu-giraud.fr (OpenSMTPD) with ESMTPSA id 83e3a6f6 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Sun, 21 Jan 2024 22:44:29 +0100 (CET) In-Reply-To: <87mssyak4w.fsf@epfl.ch> (Basil L. Contovounesios's message of "Sun, 21 Jan 2024 14:30:55 +0100") Received-SPF: pass client-ip=51.159.28.247; envelope-from=manuel@ledu-giraud.fr; helo=ledu-giraud.fr X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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:278684 Archived-At: "Basil L. Contovounesios" via "Bug reports for GNU Emacs, the Swiss army knife of text editors" writes: [...] > At first glance it looks like the > > (search-forward-regexp (format "\\s %s$" curr-file) nil t) > > in image-dired-mark-tagged-files doesn't take into account any of the > indicators that 'ls -F' may append to file names. Thanks for this insight. The following patch seems to do the trick. I think we can limit ourselves to executable and symlink since I can't see how directories, pipes, sockets or doors(?) could be regular image files. diff --git a/lisp/image/image-dired-dired.el b/lisp/image/image-dired-dired.el index f4778d8e121..7219a106ca8 100644 --- a/lisp/image/image-dired-dired.el +++ b/lisp/image/image-dired-dired.el @@ -383,7 +383,7 @@ image-dired-mark-tagged-files (file-name-directory curr-file))) (setq curr-file (file-name-nondirectory curr-file)) (goto-char (point-min)) - (when (search-forward-regexp (format "\\s %s$" curr-file) nil t) + (when (search-forward-regexp (format "\\s %s[*@]?$" curr-file) nil t) (setq hits (+ hits 1)) (dired-mark 1)))) (message "%d files with matching tag marked" hits))) > The commentary suggests using dired-mark-files-regexp would be too slow. > I wonder if that's still the case, or if there are any faster > alternatives without loss of generality? I did not try this alternative. -- Manuel Giraud