From unknown Thu Jun 19 12:38:07 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#24317 <24317@debbugs.gnu.org> To: bug#24317 <24317@debbugs.gnu.org> Subject: Status: 25.1.50; image-dired-rotate-original: regexp doesn't match .jpeg suffix Reply-To: bug#24317 <24317@debbugs.gnu.org> Date: Thu, 19 Jun 2025 19:38:07 +0000 retitle 24317 25.1.50; image-dired-rotate-original: regexp doesn't match .j= peg suffix reassign 24317 emacs submitter 24317 Tino Calancha severity 24317 minor thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 27 04:04:23 2016 Received: (at submit) by debbugs.gnu.org; 27 Aug 2016 08:04:23 +0000 Received: from localhost ([127.0.0.1]:41817 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bdYbG-0006lH-Q3 for submit@debbugs.gnu.org; Sat, 27 Aug 2016 04:04:23 -0400 Received: from eggs.gnu.org ([208.118.235.92]:54885) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bdYbE-0006l4-Ij for submit@debbugs.gnu.org; Sat, 27 Aug 2016 04:04:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bdYb8-0006T5-Aa for submit@debbugs.gnu.org; Sat, 27 Aug 2016 04:04:15 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_40,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:51472) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bdYb8-0006S0-8A for submit@debbugs.gnu.org; Sat, 27 Aug 2016 04:04:14 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45841) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bdYb5-00032s-S1 for bug-gnu-emacs@gnu.org; Sat, 27 Aug 2016 04:04:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bdYb1-0006R6-LU for bug-gnu-emacs@gnu.org; Sat, 27 Aug 2016 04:04:10 -0400 Received: from mail-pa0-x243.google.com ([2607:f8b0:400e:c03::243]:33819) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bdYb1-0006QZ-CE for bug-gnu-emacs@gnu.org; Sat, 27 Aug 2016 04:04:07 -0400 Received: by mail-pa0-x243.google.com with SMTP id hh10so5866379pac.1 for ; Sat, 27 Aug 2016 01:04:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:date:to:subject:message-id:user-agent:mime-version; bh=ApBnFWP7SpPG/3rRe9t0dSRhbYFctbZk2jwfffSneXg=; b=AVP4jiERU1yieRv4PqmDAiuFJXNFiq+u+zcqp90jkQbq0BtQtXzIEcj3WzDZVIGwll aqWdr5DtScse/3GmZVflrhtXmcRYuF0n095IwiGqjjcLQabG8gkl0xjM+z3+svs9oehI TBNTHk0jD067HCBsvuBLrZDf6yuL8l93lZwuV6UEUWDlwJ7PjjsVqzz98Aw8OOlYYyZ/ RFmIqihWiR/eq7qdFtLeMzo52bv0cyF+DTLnVS1wUKPrFSNddsx62ivs5P+hrDnGEPIA +MBSvnm02MQkSEcrJrHmH4Hs76QJN49m58PhfSi8p+4z3CH11irOZ3hs0aEmm6/bmA44 NomA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:date:to:subject:message-id:user-agent :mime-version; bh=ApBnFWP7SpPG/3rRe9t0dSRhbYFctbZk2jwfffSneXg=; b=F9gpWmgud1S08Ec+4JOviDeoz69tVzYr6K3MPapNpKWEdfOUp2V5d7tbJac7ZEGpJ4 miPo4Z893rimraXDZh+yOmgqAhprnw0vR9XAeMg9DE9B/OCVLYwmpV/bDiphcwFP5EE0 OplDw/2DcK853bCUW2gDyKemCNgt8mt3tZ1C6P17yL/UP60hrDwd2DqTxm5o+/yEOXB8 6nNa9epOZtzz2UL32W0phGkR/bdjmGmDLCdNVyDglm2dIHHGLhK1HKwozMZzSzjasAfz gQAwIbju7KVVDW5k+dg+IEA3DUFdz63cMkgT4gZ0C7E4lXLfHCBRTqw5hzdUCCxVjmCL stUg== X-Gm-Message-State: AE9vXwOcCuogrD0uhPBm3bZ29U4VkJLcYaysI/m9vO3FO1CNwtabajSIXW3vA9TtMRvIMw== X-Received: by 10.66.199.66 with SMTP id ji2mr13356693pac.42.1472285044536; Sat, 27 Aug 2016 01:04:04 -0700 (PDT) Received: from calancha-pc ([103.5.140.137]) by smtp.gmail.com with ESMTPSA id s1sm33943138paz.47.2016.08.27.01.04.02 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 27 Aug 2016 01:04:04 -0700 (PDT) From: Tino Calancha X-Google-Original-From: Tino Calancha Date: Sat, 27 Aug 2016 17:04:01 +0900 (JST) X-X-Sender: calancha@calancha-pc To: bug-gnu-emacs@gnu.org Subject: 25.1.50; image-dired-rotate-original: regexp doesn't match .jpeg suffix Message-ID: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) emacs -Q: ;; file: full name of a .jpeg file in your filesystem (let ((file "/tmp/bug24317.jpeg")) (require 'dired) (require 'image-dired) (dired file) (image-dired-display-thumbs) (image-dired-rotate-original 90)) ;; if: Only JPEG images can be rotated! ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; >From 4ea0333150937d3f2f615df1ed476e6279caf77b Mon Sep 17 00:00:00 2001 From: Tino Calancha Date: Sat, 27 Aug 2016 16:53:37 +0900 Subject: [PATCH] image-dired-rotate-original: regexp doesn't match .jpeg suffix * lisp/image-dired.el (image-dired-jpeg-suffix-regexp): New defvar. (image-dired-rotate-original, image-dired-get-exif-file-name): Use it (Bug#24317). --- lisp/image-dired.el | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lisp/image-dired.el b/lisp/image-dired.el index 67b023d..bb43a55 100644 --- a/lisp/image-dired.el +++ b/lisp/image-dired.el @@ -1906,13 +1906,16 @@ image-dired-refresh-thumb (clear-image-cache) (image-dired-create-thumb file (image-dired-thumb-name file)))) +(defvar image-dired-jpeg-suffix-regexp "\\.[Jj][Pp][Ee]?[Gg]$" + "Regexp to match JPEG file extensions.") + (defun image-dired-rotate-original (degrees) "Rotate original image DEGREES degrees." (if (not (image-dired-image-at-point-p)) (message "No image at point") (let ((file (image-dired-original-file-name)) command) - (if (not (string-match "\\.[jJ][pP[eE]?[gG]$" file)) + (if (not (string-match image-dired-jpeg-suffix-regexp file)) (error "Only JPEG images can be rotated!")) (setq command (format-spec image-dired-cmd-rotate-original-options @@ -1952,7 +1955,8 @@ image-dired-get-exif-file-name YYYY_MM_DD_HH_MM_DD_ORIG_FILE_NAME.jpg. Used from `image-dired-copy-with-exif-file-name'." (let (data no-exif-data-found) - (if (not (string-match "\\.[Jj][Pp][Ee]?[Gg]$" (expand-file-name file))) + (if (not (string-match image-dired-jpeg-suffix-regexp + (expand-file-name file))) (progn (setq no-exif-data-found t) (setq data -- 2.9.3 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; In GNU Emacs 25.1.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.20.9) of 2016-08-26 built on calancha-pc Repository revision: 1c7166a3ba399efbefc65feb8a6a41ef0dfa33a4 From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 27 04:20:58 2016 Received: (at 24317) by debbugs.gnu.org; 27 Aug 2016 08:20:58 +0000 Received: from localhost ([127.0.0.1]:41828 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bdYrK-00079O-HF for submit@debbugs.gnu.org; Sat, 27 Aug 2016 04:20:58 -0400 Received: from eggs.gnu.org ([208.118.235.92]:56762) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bdYrJ-00079B-0w for 24317@debbugs.gnu.org; Sat, 27 Aug 2016 04:20:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bdYrA-00016U-Sy for 24317@debbugs.gnu.org; Sat, 27 Aug 2016 04:20:51 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:34834) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bdYrA-000160-P9; Sat, 27 Aug 2016 04:20:48 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1193 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bdYr8-0002dp-Vi; Sat, 27 Aug 2016 04:20:47 -0400 Date: Sat, 27 Aug 2016 11:21:10 +0300 Message-Id: <83d1kud3m1.fsf@gnu.org> From: Eli Zaretskii To: Tino Calancha In-reply-to: (message from Tino Calancha on Sat, 27 Aug 2016 17:04:01 +0900 (JST)) Subject: Re: bug#24317: 25.1.50; image-dired-rotate-original: regexp doesn't match .jpeg suffix References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.3 (-----) X-Debbugs-Envelope-To: 24317 Cc: 24317@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.3 (-----) > From: Tino Calancha > Date: Sat, 27 Aug 2016 17:04:01 +0900 (JST) > > >From 4ea0333150937d3f2f615df1ed476e6279caf77b Mon Sep 17 00:00:00 2001 > From: Tino Calancha > Date: Sat, 27 Aug 2016 16:53:37 +0900 > Subject: [PATCH] image-dired-rotate-original: regexp doesn't match .jpeg > suffix > > * lisp/image-dired.el (image-dired-jpeg-suffix-regexp): New defvar. > (image-dired-rotate-original, image-dired-get-exif-file-name): > Use it (Bug#24317). I understand why we need to fix a typo in the regexp (which the log entry doesn't even mention, btw), but what's the rationale for making it a defvar? Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 27 04:54:01 2016 Received: (at 24317) by debbugs.gnu.org; 27 Aug 2016 08:54:01 +0000 Received: from localhost ([127.0.0.1]:41833 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bdZNJ-00084m-5f for submit@debbugs.gnu.org; Sat, 27 Aug 2016 04:54:01 -0400 Received: from mail-pa0-f43.google.com ([209.85.220.43]:36108) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bdZNI-00084a-5H for 24317@debbugs.gnu.org; Sat, 27 Aug 2016 04:54:00 -0400 Received: by mail-pa0-f43.google.com with SMTP id di2so34267121pad.3 for <24317@debbugs.gnu.org>; Sat, 27 Aug 2016 01:54:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:date:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=RI23J6OkLiz11eqPF/hNLLeddXogQ+pnoF3DFwY1WUs=; b=pMsUlP2Wym44f+osWqX7qOuK4ilfxkFGag8VQZ+Q2N6fJRTrSwHUnnjugCYYsflEPc eAoIW8psVX+AQkuwXWLIK2ZRHwgAEf35nG1Ui7FlsUSo47qNKWcOEQfpVc9x70CaKX7j wFG5+O0EHuZfm+WsZLQ+BG9k40AjKGlnPiT++HIQ6PplHA5Djp2Mo4NFwjgn461uErfo nMbCGCJCgJ64Ce3cSSBVyH+b4B1JrTgvopJaORzuAlRvn6f4e4P7S67qQvCMx45OkTQo 3Yzgj1tDkMPiwUmrKL8yTZLy2WHdl5vexo4UJGGrYkXyklWG8VlDcSmfX4D2RFzYu9LS Lpmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:date:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=RI23J6OkLiz11eqPF/hNLLeddXogQ+pnoF3DFwY1WUs=; b=imXbX4g+En6nEEmiDAmXymgd3yavHWXhZMWy3GMn7B4MwkiShLTBbJV9GRhvfI1/nc XzTjbUdkMQN4ws1/p1r3YP43zBw7h1WjB7q3kclcK7a6ItjNfij7wFwmvUzZhhybQuRE 7/oM6NhAaxO2ua0nBUdZBLUXZmiEaJHPI3zgWQG7r2UfZgkSNw8eueQy4WqV5g1CPGUE w7/KRZBrWFM6tXNAWH9CiOF97h0BNA4tMY/Vath0Vt4HM+IoKKkZeNVxP8dtF21hWHPG 6NCkCtzjO0+NYfKgjTQomNy9mr8fWP3WiycdMD3XA1DLyFZCvyhlcchlXlMOL91/IExt v86g== X-Gm-Message-State: AE9vXwONYKVCbng0gPY970/i86uLJq3weaZy/d7V+XNzDbxdPNCoGO9DmsF6oxmsWAbzDA== X-Received: by 10.66.78.35 with SMTP id y3mr13395257paw.40.1472288034331; Sat, 27 Aug 2016 01:53:54 -0700 (PDT) Received: from calancha-pc ([103.5.140.168]) by smtp.gmail.com with ESMTPSA id c125sm34331593pfc.40.2016.08.27.01.53.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 27 Aug 2016 01:53:53 -0700 (PDT) From: Tino Calancha X-Google-Original-From: Tino Calancha Date: Sat, 27 Aug 2016 17:53:49 +0900 (JST) X-X-Sender: calancha@calancha-pc To: Eli Zaretskii Subject: Re: bug#24317: 25.1.50; image-dired-rotate-original: regexp doesn't match .jpeg suffix In-Reply-To: <83d1kud3m1.fsf@gnu.org> Message-ID: References: <83d1kud3m1.fsf@gnu.org> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 24317 Cc: 24317@debbugs.gnu.org, Tino Calancha X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) > I understand why we need to fix a typo in the regexp (which the log > entry doesn't even mention, btw), but what's the rationale for making > it a defvar? I made a defvar because it was used in 2 functions: only one show the typo. Do you prefer just the simple 1-line fix? (ie., just correct the typo) From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 27 04:57:36 2016 Received: (at 24317) by debbugs.gnu.org; 27 Aug 2016 08:57:36 +0000 Received: from localhost ([127.0.0.1]:41837 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bdZQm-00089q-LF for submit@debbugs.gnu.org; Sat, 27 Aug 2016 04:57:36 -0400 Received: from eggs.gnu.org ([208.118.235.92]:33992) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bdZQk-00089c-Sb for 24317@debbugs.gnu.org; Sat, 27 Aug 2016 04:57:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bdZQc-00022u-6G for 24317@debbugs.gnu.org; Sat, 27 Aug 2016 04:57:29 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:35088) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bdZQc-00022p-2w; Sat, 27 Aug 2016 04:57:26 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1440 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bdZQa-00048m-A5; Sat, 27 Aug 2016 04:57:24 -0400 Date: Sat, 27 Aug 2016 11:57:47 +0300 Message-Id: <83a8fyd1x0.fsf@gnu.org> From: Eli Zaretskii To: Tino Calancha In-reply-to: (message from Tino Calancha on Sat, 27 Aug 2016 17:53:49 +0900 (JST)) Subject: Re: bug#24317: 25.1.50; image-dired-rotate-original: regexp doesn't match .jpeg suffix References: <83d1kud3m1.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.3 (-----) X-Debbugs-Envelope-To: 24317 Cc: 24317@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.3 (-----) > From: Tino Calancha > Date: Sat, 27 Aug 2016 17:53:49 +0900 (JST) > cc: Tino Calancha , 24317@debbugs.gnu.org > > > I understand why we need to fix a typo in the regexp (which the log > > entry doesn't even mention, btw), but what's the rationale for making > > it a defvar? > I made a defvar because it was used in 2 functions: only one show the > typo. In that case, why not make a function that does the string-match as well, in which case you won't need a variable, because it will appear in a single place, and will also have the test localized to a single function? Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 27 05:21:37 2016 Received: (at 24317) by debbugs.gnu.org; 27 Aug 2016 09:21:37 +0000 Received: from localhost ([127.0.0.1]:41842 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bdZo1-0000Hp-KS for submit@debbugs.gnu.org; Sat, 27 Aug 2016 05:21:37 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:33486) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bdZo0-0000Hc-9s for 24317@debbugs.gnu.org; Sat, 27 Aug 2016 05:21:36 -0400 Received: by mail-pf0-f193.google.com with SMTP id i6so6174059pfe.0 for <24317@debbugs.gnu.org>; Sat, 27 Aug 2016 02:21:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:date:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=lXGoUmiytTa/i1Sz8C+28YnlQPI9N0sw2C3wvYrPGUc=; b=SgUnsiXqacdYMPKfDMr0e8eHBVKPio5++gWDxDunrphnFxYdn4asyOsaIyMEV7MeXl xQSOWlYQ58AKijy3u69CyjGOcgoi2OdtF9ARNO+bTc2ciAto8BvnTh+7rSBsx0H8yP2j EwkWZ6mesuq5Kvf1WXfBOPRCg0ZFu20gn9um3GVCi1yLjvTiU83ykPh5bRn6sPYjwBhK tuJr5nQHZDQP5pEiEXKc8RxiQcRVYx7aBQrFBknO48oalU7dPZgJlw8CHfj9jQ8C1neC I2utyjZ9Q1NmDorRYID5AbxhTbHzq9mUlhwjgxljCW76rPmix3iKG7y5P3n7+xVSBaAv kvtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:date:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=lXGoUmiytTa/i1Sz8C+28YnlQPI9N0sw2C3wvYrPGUc=; b=dNYY7D0KE1K+n/5iv6iaFEI7njRLHECL/SdX7TGUXyYxYMIF5S1XuJOSALWyGXA6iB nyTJcK7Ao91+Kmv2K/XhCVEh6Z2GEasnfTzHiXU+2mIvbJvqtp6rZ5N5wpUJfBO7x2ck T6thsRx3ZwPimv7s4QKhRhMrbsfjzyIKEiPVHm8YDJMdmJdwsQR2QOo7InWNW+9luOZa 3V+y9o3WAbMVRv+Tx7MZ8Tu+53/QafHgBZUO2d0aiTWsfkq/Z3hA9bieM3SgnyUNKoUR x+UiUMdRZDKtvtVDPBwnXJzT77tkT6qR+9OI/Y/26szYa6LndORiBuX8yxYtvflQiUzF XrlA== X-Gm-Message-State: AE9vXwPhFhkN5jcGh6wAr8tFH2LdYgkXnsucmucnMnmb0YrYHRx3ZR98MDyNi5dYvwYThw== X-Received: by 10.98.5.133 with SMTP id 127mr13658552pff.40.1472289690384; Sat, 27 Aug 2016 02:21:30 -0700 (PDT) Received: from calancha-pc ([103.5.140.167]) by smtp.gmail.com with ESMTPSA id p64sm34567625pfd.11.2016.08.27.02.21.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 27 Aug 2016 02:21:29 -0700 (PDT) From: Tino Calancha X-Google-Original-From: Tino Calancha Date: Sat, 27 Aug 2016 18:21:25 +0900 (JST) X-X-Sender: calancha@calancha-pc To: Eli Zaretskii Subject: Re: bug#24317: 25.1.50; image-dired-rotate-original: regexp doesn't match .jpeg suffix In-Reply-To: <83a8fyd1x0.fsf@gnu.org> Message-ID: References: <83d1kud3m1.fsf@gnu.org> <83a8fyd1x0.fsf@gnu.org> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 24317 Cc: 24317@debbugs.gnu.org, Tino Calancha X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) > In that case, why not make a function that does the string-match as > well, in which case you won't need a variable, because it will appear > in a single place, and will also have the test localized to a single > function? > > Thanks. I see. Its good idea. I have choose a defsubst because it is small function. I am not sure if it is recommended or if people prefers always defun's. Please, et me know if the doc string reads weird and need some tunning ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; >From 0be47e3968d898bf8f44e5c37f9035be3147a4a2 Mon Sep 17 00:00:00 2001 From: Tino Calancha Date: Sat, 27 Aug 2016 18:16:25 +0900 Subject: [PATCH] image-dired-rotate-original: Fix regexp typo * lisp/image-dired.el (image-dired-jpeg-file-p): New defsubst; Return non-nil if a file has a JPEG extension. (image-dired-rotate-original, image-dired-get-exif-file-name): Use it (Bug#24317). --- lisp/image-dired.el | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lisp/image-dired.el b/lisp/image-dired.el index 67b023d..7c8d43b 100644 --- a/lisp/image-dired.el +++ b/lisp/image-dired.el @@ -1205,6 +1205,10 @@ image-dired-dired-file-marked-p (beginning-of-line) (not (looking-at "^ .*$")))) +(defsubst image-dired-jpeg-file-p (file) + "Return non-nil if FILE has a JPEG extension." + (string-match-p "\\.[Jj][Pp][Ee]?[Gg]$" (expand-file-name file))) + (defun image-dired-modify-mark-on-thumb-original-file (command) "Modify mark in dired buffer. COMMAND is one of `mark' for marking file in dired, `unmark' for @@ -1912,7 +1916,7 @@ image-dired-rotate-original (message "No image at point") (let ((file (image-dired-original-file-name)) command) - (if (not (string-match "\\.[jJ][pP[eE]?[gG]$" file)) + (if (not (image-dired-jpeg-file-p file)) (error "Only JPEG images can be rotated!")) (setq command (format-spec image-dired-cmd-rotate-original-options @@ -1952,7 +1956,7 @@ image-dired-get-exif-file-name YYYY_MM_DD_HH_MM_DD_ORIG_FILE_NAME.jpg. Used from `image-dired-copy-with-exif-file-name'." (let (data no-exif-data-found) - (if (not (string-match "\\.[Jj][Pp][Ee]?[Gg]$" (expand-file-name file))) + (if (not (image-dired-jpeg-file-p file))) (progn (setq no-exif-data-found t) (setq data -- 2.9.3 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 27 05:27:40 2016 Received: (at 24317) by debbugs.gnu.org; 27 Aug 2016 09:27:40 +0000 Received: from localhost ([127.0.0.1]:41846 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bdZts-0000Qn-9w for submit@debbugs.gnu.org; Sat, 27 Aug 2016 05:27:40 -0400 Received: from mail-pf0-f175.google.com ([209.85.192.175]:36539) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bdZtr-0000Qb-1H for 24317@debbugs.gnu.org; Sat, 27 Aug 2016 05:27:39 -0400 Received: by mail-pf0-f175.google.com with SMTP id h186so36076185pfg.3 for <24317@debbugs.gnu.org>; Sat, 27 Aug 2016 02:27:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:date:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=u6uEEjkGb62b/x9HsEgsuFIElFm8UOirmhQxHl9cmIo=; b=ALjVAXWLbLB/5X26/GPi87XrydpJ3H0aRlj03v6cB5UrUNeQYdfwRnpJsD4o6tI24z Gy1M17CG9YP3KoCb0r1rfYkqRfkoD1vsJI/5iw9e0CbtbdePK7nauUjEP6Rxy5/UBFqA T5l18o5hv9qbs/DrTQ6L4zBb8nRS++i7O6ve6CZ0+13jOwDt8MCXab0J1lq6bbYWZZ9U /eHxDvwHwCTLFPba+R7+gvYRq7wiiEnth5Hb9AnKCgaN1u+Y4fUABjat1gDKTIP4qYvj uoxzzFLSTcXvszFhsWpJu9IQlPjbRLkWMqWiJULFYFRF24kKZPuhNfEel8hILFw2Dwl9 vMRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:date:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=u6uEEjkGb62b/x9HsEgsuFIElFm8UOirmhQxHl9cmIo=; b=LIjzY9it3+30+v1BQK6S6W0/O4u2cAF8I9ktPyiXuzPQ7plum6FiwZxACCYoEs7MLE X9+7Kp+waV7kftaTK731xNiOBIcDoQnVO35LAdhTgcLT2e057gyCLQ9bp2F5EWyh8/Rl v1VeHLOfGZcqkQ4TDDyXDtbMKDA2D3Vodz9EZ+ZNC8hmqbjfhfzSJKAALe+6rPMQls7Z 8OxsTy2Uog/NfdQoe46xi80Z4w5qnpEf007MlJvZqdgInbpQ7oDk3KLhBnm1iTVEGsk4 3IJTsyG9QuS+Hw+z1BD5i7OZJYvHKyZt0dSApgySV8KETe4ooMSViS6HGj82spB3pC+l P1yA== X-Gm-Message-State: AE9vXwMc/rNCAitIQQZgnGQSa2zTuItEHHepjZR5q52ud4pUZIELHoWx89tk7kE5WQpVWg== X-Received: by 10.98.89.210 with SMTP id k79mr13734601pfj.43.1472290053253; Sat, 27 Aug 2016 02:27:33 -0700 (PDT) Received: from calancha-pc ([103.5.140.167]) by smtp.gmail.com with ESMTPSA id t7sm34643669paz.21.2016.08.27.02.27.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 27 Aug 2016 02:27:32 -0700 (PDT) From: Tino Calancha X-Google-Original-From: Tino Calancha Date: Sat, 27 Aug 2016 18:27:30 +0900 (JST) X-X-Sender: calancha@calancha-pc To: Tino Calancha Subject: Re: bug#24317: 25.1.50; image-dired-rotate-original: regexp doesn't match .jpeg suffix In-Reply-To: Message-ID: References: <83d1kud3m1.fsf@gnu.org> <83a8fyd1x0.fsf@gnu.org> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 24317 Cc: Eli Zaretskii , 24317@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On Sat, 27 Aug 2016, Tino Calancha wrote: > - (if (not (string-match "\\.[Jj][Pp][Ee]?[Gg]$" (expand-file-name file))) > + (if (not (image-dired-jpeg-file-p file))) I added one extra paren, it should read of course: - (if (not (string-match "\\.[Jj][Pp][Ee]?[Gg]$" (expand-file-name file))) + (if (not (image-dired-jpeg-file-p file)) Sorry for that. From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 27 05:51:11 2016 Received: (at 24317) by debbugs.gnu.org; 27 Aug 2016 09:51:11 +0000 Received: from localhost ([127.0.0.1]:41855 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bdaGd-0000zh-HC for submit@debbugs.gnu.org; Sat, 27 Aug 2016 05:51:11 -0400 Received: from mail.agora-net.com ([67.59.132.6]:41972) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bdaGb-0000zX-Bp for 24317@debbugs.gnu.org; Sat, 27 Aug 2016 05:51:09 -0400 Received: from ttn by mail.agora-net.com with local (Exim 4.82) (envelope-from ) id 1bdaGX-0005co-Pk; Sat, 27 Aug 2016 05:51:05 -0400 Received: from ttn by zigzag.favinet with local (Exim 4.80) (envelope-from ) id 1bda8O-0006sy-5J; Sat, 27 Aug 2016 11:42:40 +0200 From: Thien-Thi Nguyen To: Tino Calancha Subject: Re: bug#24317: 25.1.50; image-dired-rotate-original: regexp doesn't match .jpeg suffix References: <83d1kud3m1.fsf@gnu.org> <83a8fyd1x0.fsf@gnu.org> Date: Sat, 27 Aug 2016 11:42:31 +0200 In-Reply-To: (Tino Calancha's message of "Sat, 27 Aug 2016 18:21:25 +0900 (JST)") Message-ID: <87oa4e1raw.fsf@zigzag.favinet> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: ttn@gnuvola.org X-SA-Exim-Scanned: No (on mail.agora-net.com); SAEximRunCond expanded to false X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 24317 Cc: Eli Zaretskii , 24317@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable () Tino Calancha () Sat, 27 Aug 2016 18:21:25 +0900 (JST) I see. Its good idea. Another idea is to use function =E2=80=98image-type=E2=80=99, which can handle a filename as its SOURCE argument. =2D-=20 Thien-Thi Nguyen ----------------------------------------------- (defun responsep (type via) (case type (technical (eq 'mailing-list via)) ...)) 748E A0E8 1CB8 A748 9BFA =2D-------------------------------------- 6CE4 6703 2224 4C80 7502 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAlfBYIoACgkQZwMiJEyAdQJXZwCgl5STcpKoXls8hOmdn8+MWnOn gdcAn1IoO9krs8VOVIV4Tm171SJ3bLfz =Glnn -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 27 07:28:28 2016 Received: (at 24317) by debbugs.gnu.org; 27 Aug 2016 11:28:28 +0000 Received: from localhost ([127.0.0.1]:41875 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bdbml-0003Ql-R2 for submit@debbugs.gnu.org; Sat, 27 Aug 2016 07:28:28 -0400 Received: from eggs.gnu.org ([208.118.235.92]:54672) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bdbml-0003QX-3i for 24317@debbugs.gnu.org; Sat, 27 Aug 2016 07:28:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bdbmc-0003b5-OK for 24317@debbugs.gnu.org; Sat, 27 Aug 2016 07:28:21 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:36268) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bdbmQ-0003VG-He; Sat, 27 Aug 2016 07:28:06 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1533 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bdbmN-0004Od-Jf; Sat, 27 Aug 2016 07:28:05 -0400 Date: Sat, 27 Aug 2016 14:28:20 +0300 Message-Id: <838tvicuy3.fsf@gnu.org> From: Eli Zaretskii To: Thien-Thi Nguyen In-reply-to: <87oa4e1raw.fsf@zigzag.favinet> (message from Thien-Thi Nguyen on Sat, 27 Aug 2016 11:42:31 +0200) Subject: Re: bug#24317: 25.1.50; image-dired-rotate-original: regexp doesn't match .jpeg suffix References: <83d1kud3m1.fsf@gnu.org> <83a8fyd1x0.fsf@gnu.org> <87oa4e1raw.fsf@zigzag.favinet> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.3 (-----) X-Debbugs-Envelope-To: 24317 Cc: 24317@debbugs.gnu.org, tino.calancha@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.3 (-----) > From: Thien-Thi Nguyen > Cc: Eli Zaretskii , 24317@debbugs.gnu.org > Date: Sat, 27 Aug 2016 11:42:31 +0200 > > Another idea is to use function ‘image-type’, > which can handle a filename as its SOURCE argument. That is better, yes. Except that (let ((case-fold-search)) (image-type-from-file-name "foo.JPEG")) => nil So I guess that function needs a minor change to be more robust. From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 27 08:18:50 2016 Received: (at 24317) by debbugs.gnu.org; 27 Aug 2016 12:18:50 +0000 Received: from localhost ([127.0.0.1]:41894 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bdcZV-0006QA-W7 for submit@debbugs.gnu.org; Sat, 27 Aug 2016 08:18:50 -0400 Received: from mail-pa0-f66.google.com ([209.85.220.66]:34548) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bdcZU-0006Py-FF for 24317@debbugs.gnu.org; Sat, 27 Aug 2016 08:18:48 -0400 Received: by mail-pa0-f66.google.com with SMTP id hh10so6116418pac.1 for <24317@debbugs.gnu.org>; Sat, 27 Aug 2016 05:18:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:date:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=GmNaghJzpwzpcNPdP92FOXP7MVCYv9N6kYHemFS9xac=; b=y9bxQTX+NsDsAP7QgjwH8aimNmP2HTJ8Gnvui5oy/X3vMn089Jt3TTwu1UxZna/6I5 MiUCFgW3O8pQeedWcBNK4DEmJklINGn/WtaX28KLLmbIVGbK1MazKqba9YBe839Z2IWf M9DgkGU5mzY//fdtD+0FwVDOr46yeLSvuPAwTCdwEs7kYT7I57ldDQxzmSoTrJyikP2q gIuwWv1YS1aPfcY+j3gDunJxE5Wlzoo3slovMVa8+3nnil+my4NjVlJXs334DnPs1CkS /iebYwQu1wiWLJCFr7DkbP3ddQVQDYQh2RBQyIHo7lUpD6sJ4e1wd7Tv9cj712vin2hj sOfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:date:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=GmNaghJzpwzpcNPdP92FOXP7MVCYv9N6kYHemFS9xac=; b=cYaW/6/BxxxpCqDVC0RBoHRHP4d//cUKFKpeHjk2AXjvjV7yPoWgDVr4seGvtbx5a5 ZVENXhIwcYUil93BO+Bdivhy/8qyXIXEoeQVN557/7n4z+AynQ2ltgjpmLXHI5cpBiBE Cny9OWXbKZLd7hI9GjL6G4QrzUMoVupV5BRvZy4tsLrrreamqcn38qMZPfU8bB51Ea0K XIdZ57AmJW4fead/5u7uTX2Tk9/lI0fDN9QHG0rAcXcwaIjNmc64XYUf4y6u70Vsx0+U li5Pn457wcs7BsHj+tIlU/G080+tMN26oBLginbLfFBVAnQI2Pw0YFfqs8HDlDCnwRIF 1jnA== X-Gm-Message-State: AE9vXwPBjeXpYKpDOp3Wne9n32ehhLXib8oXos3rXq/9uO4+VQw7677FE1IyG/Xy2c1g9Q== X-Received: by 10.66.147.234 with SMTP id tn10mr15118957pab.144.1472300322493; Sat, 27 Aug 2016 05:18:42 -0700 (PDT) Received: from calancha-pc ([103.5.140.155]) by smtp.gmail.com with ESMTPSA id k78sm35877754pfa.78.2016.08.27.05.18.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 27 Aug 2016 05:18:41 -0700 (PDT) From: Tino Calancha X-Google-Original-From: Tino Calancha Date: Sat, 27 Aug 2016 21:18:37 +0900 (JST) X-X-Sender: calancha@calancha-pc To: Eli Zaretskii Subject: Re: bug#24317: 25.1.50; image-dired-rotate-original: regexp doesn't match .jpeg suffix In-Reply-To: <838tvicuy3.fsf@gnu.org> Message-ID: References: <83d1kud3m1.fsf@gnu.org> <83a8fyd1x0.fsf@gnu.org> <87oa4e1raw.fsf@zigzag.favinet> <838tvicuy3.fsf@gnu.org> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: multipart/mixed; BOUNDARY="8323329-2103133435-1472300320=:20460" X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 24317 Cc: Thien-Thi Nguyen , 24317@debbugs.gnu.org, tino.calancha@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-2103133435-1472300320=:20460 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8BIT On Sat, 27 Aug 2016, Eli Zaretskii wrote: >> From: Thien-Thi Nguyen >> Cc: Eli Zaretskii , 24317@debbugs.gnu.org >> Date: Sat, 27 Aug 2016 11:42:31 +0200 >> >> Another idea is to use function ‘image-type’, >> which can handle a filename as its SOURCE argument. > > That is better, yes. Except that > > (let ((case-fold-search)) (image-type-from-file-name "foo.JPEG")) > => nil > > So I guess that function needs a minor change to be more robust. That's right. It wuld be worth take a look on 'image-type-from-file-name'. I have corrected previous patch. I drop expand-file-name from 'image-dired-jpeg-file-p'. I also corrected the extra paren mentioned before. If people is happy with it i will apply this patch. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; >From 9d95e361e45df393feaf3f6c451878e794c924eb Mon Sep 17 00:00:00 2001 From: Tino Calancha Date: Sat, 27 Aug 2016 18:41:44 +0900 Subject: [PATCH] image-dired-rotate-original: Fix regexp typo * lisp/image-dired.el (image-dired-jpeg-file-p): New defsubst; Return non-nil if a file has a JPEG extension. (image-dired-rotate-original, image-dired-get-exif-file-name): Use it (Bug#24317). --- lisp/image-dired.el | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lisp/image-dired.el b/lisp/image-dired.el index 67b023d..61b0751 100644 --- a/lisp/image-dired.el +++ b/lisp/image-dired.el @@ -1205,6 +1205,10 @@ image-dired-dired-file-marked-p (beginning-of-line) (not (looking-at "^ .*$")))) +(defsubst image-dired-jpeg-file-p (file) + "Return non-nil if FILE has a JPEG extension." + (string-match-p "\\.[Jj][Pp][Ee]?[Gg]$" file)) + (defun image-dired-modify-mark-on-thumb-original-file (command) "Modify mark in dired buffer. COMMAND is one of `mark' for marking file in dired, `unmark' for @@ -1912,7 +1916,7 @@ image-dired-rotate-original (message "No image at point") (let ((file (image-dired-original-file-name)) command) - (if (not (string-match "\\.[jJ][pP[eE]?[gG]$" file)) + (if (not (image-dired-jpeg-file-p file)) (error "Only JPEG images can be rotated!")) (setq command (format-spec image-dired-cmd-rotate-original-options @@ -1952,7 +1956,7 @@ image-dired-get-exif-file-name YYYY_MM_DD_HH_MM_DD_ORIG_FILE_NAME.jpg. Used from `image-dired-copy-with-exif-file-name'." (let (data no-exif-data-found) - (if (not (string-match "\\.[Jj][Pp][Ee]?[Gg]$" (expand-file-name file))) + (if (not (image-dired-jpeg-file-p (expand-file-name file))) (progn (setq no-exif-data-found t) (setq data -- 2.9.3 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; --8323329-2103133435-1472300320=:20460-- From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 27 08:55:18 2016 Received: (at 24317) by debbugs.gnu.org; 27 Aug 2016 12:55:18 +0000 Received: from localhost ([127.0.0.1]:41900 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bdd8o-0007Gr-19 for submit@debbugs.gnu.org; Sat, 27 Aug 2016 08:55:18 -0400 Received: from eggs.gnu.org ([208.118.235.92]:40346) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bdd8m-0007Gf-Lo for 24317@debbugs.gnu.org; Sat, 27 Aug 2016 08:55:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bdd8g-0007A3-JV for 24317@debbugs.gnu.org; Sat, 27 Aug 2016 08:55:11 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_20,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:37302) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bdd8W-00072S-T2; Sat, 27 Aug 2016 08:55:00 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2109 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bdd8U-00063T-WD; Sat, 27 Aug 2016 08:54:59 -0400 Date: Sat, 27 Aug 2016 15:55:22 +0300 Message-Id: <837fb2cqx1.fsf@gnu.org> From: Eli Zaretskii To: Tino Calancha In-reply-to: (message from Tino Calancha on Sat, 27 Aug 2016 21:18:37 +0900 (JST)) Subject: Re: bug#24317: 25.1.50; image-dired-rotate-original: regexp doesn't match .jpeg suffix References: <83d1kud3m1.fsf@gnu.org> <83a8fyd1x0.fsf@gnu.org> <87oa4e1raw.fsf@zigzag.favinet> <838tvicuy3.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.3 (-----) X-Debbugs-Envelope-To: 24317 Cc: ttn@gnu.org, 24317@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.3 (-----) > From: Tino Calancha > Date: Sat, 27 Aug 2016 21:18:37 +0900 (JST) > cc: Thien-Thi Nguyen , tino.calancha@gmail.com, > 24317@debbugs.gnu.org > > > That is better, yes. Except that > > > > (let ((case-fold-search)) (image-type-from-file-name "foo.JPEG")) > > => nil > > > > So I guess that function needs a minor change to be more robust. > That's right. It wuld be worth take a look on > 'image-type-from-file-name'. > > I have corrected previous patch. I drop expand-file-name from > 'image-dired-jpeg-file-p'. I also corrected the extra paren mentioned > before. > If people is happy with it i will apply this patch. I think we should indeed use image-type instead of having yet another function that recognizes JPEG. The problem I pointed out should be fixed in image-type-from-file-name, regardless. Sorry this wasn't clear enough from what I wrote before. From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 28 02:22:36 2016 Received: (at 24317) by debbugs.gnu.org; 28 Aug 2016 06:22:36 +0000 Received: from localhost ([127.0.0.1]:42443 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bdtUK-0007FN-B5 for submit@debbugs.gnu.org; Sun, 28 Aug 2016 02:22:36 -0400 Received: from mail-out.m-online.net ([212.18.0.9]:38692) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bdtUI-0007FF-Vr for 24317@debbugs.gnu.org; Sun, 28 Aug 2016 02:22:35 -0400 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 3sMPpK4pJbz3hjNn; Sun, 28 Aug 2016 08:22:33 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.68]) by mail.m-online.net (Postfix) with ESMTP id 3sMPpK3S3Fzvkcr; Sun, 28 Aug 2016 08:22:33 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.68]) (amavisd-new, port 10024) with ESMTP id 6NaHEmYVyplh; Sun, 28 Aug 2016 08:22:32 +0200 (CEST) X-Auth-Info: PdXb5DUHjeh2vfMY2MWT2JLzhBNgZ8D4FHueg0e3tS1jdpDM5J4rrr1NSCXO3mBU Received: from igel.home (ppp-88-217-9-85.dynamic.mnet-online.de [88.217.9.85]) by mail.mnet-online.de (Postfix) with ESMTPA; Sun, 28 Aug 2016 08:22:32 +0200 (CEST) Received: by igel.home (Postfix, from userid 1000) id 0B4A92C31C1; Sun, 28 Aug 2016 08:22:32 +0200 (CEST) From: Andreas Schwab To: Tino Calancha Subject: Re: bug#24317: 25.1.50; image-dired-rotate-original: regexp doesn't match .jpeg suffix References: <83d1kud3m1.fsf@gnu.org> <83a8fyd1x0.fsf@gnu.org> <87oa4e1raw.fsf@zigzag.favinet> <838tvicuy3.fsf@gnu.org> X-Yow: I'm GLAD I remembered to XEROX all my UNDERSHIRTS!! Date: Sun, 28 Aug 2016 08:22:32 +0200 In-Reply-To: (Tino Calancha's message of "Sat, 27 Aug 2016 21:18:37 +0900 (JST)") Message-ID: <87bn0dpg47.fsf@linux-m68k.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 24317 Cc: Thien-Thi Nguyen , Eli Zaretskii , 24317@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On Aug 27 2016, Tino Calancha wrote: > diff --git a/lisp/image-dired.el b/lisp/image-dired.el > index 67b023d..61b0751 100644 > --- a/lisp/image-dired.el > +++ b/lisp/image-dired.el > @@ -1205,6 +1205,10 @@ image-dired-dired-file-marked-p > (beginning-of-line) > (not (looking-at "^ .*$")))) > > +(defsubst image-dired-jpeg-file-p (file) > + "Return non-nil if FILE has a JPEG extension." > + (string-match-p "\\.[Jj][Pp][Ee]?[Gg]$" file)) FWIW, the regexp should end in "\\'". Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 28 08:26:35 2016 Received: (at 24317) by debbugs.gnu.org; 28 Aug 2016 12:26:35 +0000 Received: from localhost ([127.0.0.1]:42591 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bdzAZ-00027b-L1 for submit@debbugs.gnu.org; Sun, 28 Aug 2016 08:26:35 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:34172) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bdzAY-00027M-1h for 24317@debbugs.gnu.org; Sun, 28 Aug 2016 08:26:34 -0400 Received: by mail-pf0-f193.google.com with SMTP id g202so7636421pfb.1 for <24317@debbugs.gnu.org>; Sun, 28 Aug 2016 05:26:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:date:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=cu5TPxXJ3cN0y4IofXJT8EH4oHtXK+3lkf+Y0uZfvi0=; b=0o06x4zFtqS5SBLzEw/ke4OJWmKkkUVtZgikJvoUiQwOy5jG9hWIucZvw+udFkFRUX UicVX3YCs/vsrcI5HF34XbP4imRDi6NzLBknSo7xvkpapL0PLcU2oq1xvXsKBai19yt0 SpXVEAziiny/r3Q1uiJ/cb6nju7scNihN82E02hMEWdTAa3G4cCKLp38DNI94Y0In4bG yKRzpmcSZKo8QTSQXHcQ+rL5dUwd43ltv1YEHLFXncqUqVkBO8V5chQVhK9fMZRLP0Xk k9Ls6BngllxRLCuF74MjFE4T+FKGAmVz5am7cIZbeoitbsdH5t8hTlyuLl1IpOV8Xr4F IyzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:date:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=cu5TPxXJ3cN0y4IofXJT8EH4oHtXK+3lkf+Y0uZfvi0=; b=lhFswToEj6zh+fbTv8GpR8kVbu71KxvqWBQh8v3VChcGpNkg3PZjDXz2LEx13V+iCe ZpfYNQMB8XNuUm3wvzNf5187uqc2SP8deLHW+WeK0fPLOaQWFA/jZm6hIzbq7Y/UrQTW 8VOE3GOEKlQkiLrF9LMdxbO1EJsqjnFRUPu8LeBR0o+5Z3/M/IhmzfTwpDXpn87UnhLN nPyUNqfpTYtZQ8ZNGBIEGZLY4W0eTGsZ0i8eTZ7vGPzxIoQLcHwdzfzBxWvKdpJ4wsvq U6faokW1aMNZdiJ5Y4oxIh2ab1nVxZeDD+W5qut0WHHdyXMi5FFuUN93LDPBM8eLMx8F JI+w== X-Gm-Message-State: AE9vXwMKYGR985T7oC8QgqVmS1faEVYpCioLYB4cfWJSpnLofAeaV5v28LglFHQjLzqXDw== X-Received: by 10.98.63.1 with SMTP id m1mr22905845pfa.14.1472387188196; Sun, 28 Aug 2016 05:26:28 -0700 (PDT) Received: from calancha-pc ([103.5.140.164]) by smtp.gmail.com with ESMTPSA id tm1sm41854892pac.23.2016.08.28.05.26.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 28 Aug 2016 05:26:27 -0700 (PDT) From: Tino Calancha X-Google-Original-From: Tino Calancha Date: Sun, 28 Aug 2016 21:26:23 +0900 (JST) X-X-Sender: calancha@calancha-pc To: Eli Zaretskii Subject: Re: bug#24317: 25.1.50; image-dired-rotate-original: regexp doesn't match .jpeg suffix In-Reply-To: <837fb2cqx1.fsf@gnu.org> Message-ID: References: <83d1kud3m1.fsf@gnu.org> <83a8fyd1x0.fsf@gnu.org> <87oa4e1raw.fsf@zigzag.favinet> <838tvicuy3.fsf@gnu.org> <837fb2cqx1.fsf@gnu.org> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 24317 Cc: ttn@gnu.org, 24317@debbugs.gnu.org, schwab@linux-m68k.org, Tino Calancha X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On Sat, 27 Aug 2016, Eli Zaretskii wrote: > I think we should indeed use image-type instead of having yet another > function that recognizes JPEG. The problem I pointed out should be > fixed in image-type-from-file-name, regardless. I see. I have prepared following new patch: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; >From b953d600a295e4e0aa58b85126296663e7f02472 Mon Sep 17 00:00:00 2001 From: Tino Calancha Date: Sun, 28 Aug 2016 21:20:22 +0900 Subject: [PATCH] image-type-from-file-name: Perform a case insensitive match Fix Bug#24317 * lisp/image.el (image-type-from-file-name): Bind case-fold-search to a non-nil value to force a case insensitive match. * lisp/image-dired.el (image-dired-rotate-original): Use image-type (Bug#24317). (image-dired-get-exif-file-name): Idem. Set 'no-exif-data-found' and 'data' in same setq call. Use file-attribute-modification-time. --- lisp/image-dired.el | 19 +++++++++---------- lisp/image.el | 2 +- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/lisp/image-dired.el b/lisp/image-dired.el index 67b023d..34e4eae 100644 --- a/lisp/image-dired.el +++ b/lisp/image-dired.el @@ -1912,8 +1912,8 @@ image-dired-rotate-original (message "No image at point") (let ((file (image-dired-original-file-name)) command) - (if (not (string-match "\\.[jJ][pP[eE]?[gG]$" file)) - (error "Only JPEG images can be rotated!")) + (unless (eq 'jpeg (image-type file)) + (error "Only JPEG images can be rotated!")) (setq command (format-spec image-dired-cmd-rotate-original-options (list @@ -1952,15 +1952,14 @@ image-dired-get-exif-file-name YYYY_MM_DD_HH_MM_DD_ORIG_FILE_NAME.jpg. Used from `image-dired-copy-with-exif-file-name'." (let (data no-exif-data-found) - (if (not (string-match "\\.[Jj][Pp][Ee]?[Gg]$" (expand-file-name file))) - (progn - (setq no-exif-data-found t) - (setq data - (format-time-string - "%Y:%m:%d %H:%M:%S" - (nth 5 (file-attributes (expand-file-name file)))))) + (if (not (eq 'jpeg (image-type (expand-file-name file)))) + (setq no-exif-data-found t + data (format-time-string + "%Y:%m:%d %H:%M:%S" + (file-attribute-modification-time + (file-attributes (expand-file-name file))))) (setq data (image-dired-get-exif-data (expand-file-name file) - "DateTimeOriginal"))) + "DateTimeOriginal"))) (while (string-match "[ :]" data) (setq data (replace-match "_" nil nil data))) (format "%s%s%s" data diff --git a/lisp/image.el b/lisp/image.el index 272cee5..d1cdc44 100644 --- a/lisp/image.el +++ b/lisp/image.el @@ -343,7 +343,7 @@ image-type-from-file-name "Determine the type of image file FILE from its name. Value is a symbol specifying the image type, or nil if type cannot be determined." - (let (type first) + (let (type first (case-fold-search t)) (catch 'found (dolist (elem image-type-file-name-regexps first) (when (string-match-p (car elem) file) -- 2.9.3 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; In GNU Emacs 25.1.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.20.9) of 2016-08-27 Repository revision: 7fcce24e75b8281621a0b8816dc58cbdc05fdc91 From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 28 10:31:53 2016 Received: (at 24317) by debbugs.gnu.org; 28 Aug 2016 14:31:53 +0000 Received: from localhost ([127.0.0.1]:42854 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1be17p-00057j-N2 for submit@debbugs.gnu.org; Sun, 28 Aug 2016 10:31:53 -0400 Received: from eggs.gnu.org ([208.118.235.92]:52541) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1be17o-00057W-99 for 24317@debbugs.gnu.org; Sun, 28 Aug 2016 10:31:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1be17g-0006Jv-31 for 24317@debbugs.gnu.org; Sun, 28 Aug 2016 10:31:47 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_20,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:50669) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1be17W-0006IQ-C1; Sun, 28 Aug 2016 10:31:34 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1749 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1be17T-0000RE-S2; Sun, 28 Aug 2016 10:31:32 -0400 Date: Sun, 28 Aug 2016 17:31:22 +0300 Message-Id: <831t19c6dh.fsf@gnu.org> From: Eli Zaretskii To: Tino Calancha In-reply-to: (message from Tino Calancha on Sun, 28 Aug 2016 21:26:23 +0900 (JST)) Subject: Re: bug#24317: 25.1.50; image-dired-rotate-original: regexp doesn't match .jpeg suffix References: <83d1kud3m1.fsf@gnu.org> <83a8fyd1x0.fsf@gnu.org> <87oa4e1raw.fsf@zigzag.favinet> <838tvicuy3.fsf@gnu.org> <837fb2cqx1.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -6.5 (------) X-Debbugs-Envelope-To: 24317 Cc: ttn@gnu.org, 24317@debbugs.gnu.org, schwab@linux-m68k.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.5 (------) > > I think we should indeed use image-type instead of having yet another > > function that recognizes JPEG. The problem I pointed out should be > > fixed in image-type-from-file-name, regardless. > I see. I have prepared following new patch: > > ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; > >From b953d600a295e4e0aa58b85126296663e7f02472 Mon Sep 17 00:00:00 2001 > From: Tino Calancha > Date: Sun, 28 Aug 2016 21:20:22 +0900 > Subject: [PATCH] image-type-from-file-name: Perform a case insensitive > match > > Fix Bug#24317 > * lisp/image.el (image-type-from-file-name): Bind case-fold-search > to a non-nil value to force a case insensitive match. > * lisp/image-dired.el (image-dired-rotate-original): > Use image-type (Bug#24317). > (image-dired-get-exif-file-name): Idem. > Set 'no-exif-data-found' and 'data' in same setq call. > Use file-attribute-modification-time. Thanks, this looks good to me. Please push in a few days if no additional comments are posted. From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 28 10:49:28 2016 Received: (at 24317) by debbugs.gnu.org; 28 Aug 2016 14:49:28 +0000 Received: from localhost ([127.0.0.1]:42868 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1be1Oq-0005XD-MJ for submit@debbugs.gnu.org; Sun, 28 Aug 2016 10:49:28 -0400 Received: from mail-pf0-f174.google.com ([209.85.192.174]:36835) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1be1Op-0005X2-Nr for 24317@debbugs.gnu.org; Sun, 28 Aug 2016 10:49:28 -0400 Received: by mail-pf0-f174.google.com with SMTP id h186so43213955pfg.3 for <24317@debbugs.gnu.org>; Sun, 28 Aug 2016 07:49:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:date:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=6zZA3/OWF9e7RGJbJ7Lixma+eXM6Vdo3OejBdKA+vTc=; b=fxtP/QXmn001Cm9Bl4KBihjeU05uW4VcQwGvjimDvx8xRgwLHr4rUy6CuuC1rJI29v uFFPrIA0UOcAxWdjWlx3YiCOmNEK7Bi2s4kfXtiZr+a19GxA0CKXHCd8cp8Vyxn4bCjS BrOLHz/4pObemFRGkJtWYuxnOa88XIE/GorAmtBdYQPjtx9/sVyVbKQ/dSHfKA5WHazT GIy1vimrOTjOrWXWfmO8W5CAlURohAm8JtHolpBHtXgyPE9R5uAUobukVcO+EwyPD3FQ XLq0DcSGFJJ8LcHfMFr26wQdkuCDmgyuoGRQyZOn568fcp4M4suiO97Bh3lxZrrwbd9l ykAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:date:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=6zZA3/OWF9e7RGJbJ7Lixma+eXM6Vdo3OejBdKA+vTc=; b=ezLZ8QM42lTcpHSdKT4hYtVM32qgXxyIEedBsfasSztfYCy/IsS5mfFhC14O8Bt83Q M/k5UiWQbLdys0AofulGNL8UzqaJrcwzK/gGk7B04ky6Xm3Q/U6qx6/fqgcj7Uxcuhpt zZTfQHaQexKiVnLS42V+DC/Na2qHHP3olTAiimPym1oF5zmhm7BC8AeW4XwVw2zAtqLP uRzLktiC3fOgrOroXkmG/abBPmng1YmpnIv8YaUqnteqaFu+qiNNb7I1Qe4PBZ3b6OXR cpkJKjNVn923zReSIMC5ZLZuoEOzfmiO+f+ezkn+eRyuoGfsBtCYS+Ox35WNJYJKkrw7 raig== X-Gm-Message-State: AE9vXwPPeLh4vv+oXm29Duh97g+x4kyScwSD9JV1QJ6f9VKdYIc4E8blpnN2BLTIuNMpzA== X-Received: by 10.98.93.25 with SMTP id r25mr23965481pfb.122.1472395761008; Sun, 28 Aug 2016 07:49:21 -0700 (PDT) Received: from calancha-pc ([210.160.37.25]) by smtp.gmail.com with ESMTPSA id a21sm42413006pfe.81.2016.08.28.07.49.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 28 Aug 2016 07:49:20 -0700 (PDT) From: Tino Calancha X-Google-Original-From: Tino Calancha Date: Sun, 28 Aug 2016 23:49:17 +0900 (JST) X-X-Sender: calancha@calancha-pc To: Eli Zaretskii Subject: Re: bug#24317: 25.1.50; image-dired-rotate-original: regexp doesn't match .jpeg suffix In-Reply-To: <831t19c6dh.fsf@gnu.org> Message-ID: References: <83d1kud3m1.fsf@gnu.org> <83a8fyd1x0.fsf@gnu.org> <87oa4e1raw.fsf@zigzag.favinet> <838tvicuy3.fsf@gnu.org> <837fb2cqx1.fsf@gnu.org> <831t19c6dh.fsf@gnu.org> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 24317 Cc: ttn@gnu.org, 24317@debbugs.gnu.org, schwab@linux-m68k.org, Tino Calancha X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On Sun, 28 Aug 2016, Eli Zaretskii wrote: > Thanks, this looks good to me. Please push in a few days if no > additional comments are posted. Thank you very much Eli. I promise I will be patient :-) From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 03 22:19:12 2016 Received: (at 24317-done) by debbugs.gnu.org; 4 Sep 2016 02:19:13 +0000 Received: from localhost ([127.0.0.1]:49038 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bgN1c-0004ml-OA for submit@debbugs.gnu.org; Sat, 03 Sep 2016 22:19:12 -0400 Received: from mail-pf0-f179.google.com ([209.85.192.179]:34414) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bgN1a-0004mW-EC for 24317-done@debbugs.gnu.org; Sat, 03 Sep 2016 22:19:10 -0400 Received: by mail-pf0-f179.google.com with SMTP id p64so54094081pfb.1 for <24317-done@debbugs.gnu.org>; Sat, 03 Sep 2016 19:19:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:date:to:subject:in-reply-to:message-id:references:user-agent :mime-version; bh=3KnLpDowvn6+xiqDR1YMQT6ZdP9g9Y4a9mQs+kzE0Po=; b=xq4fERQWDGjhOvura+j9rJRXt0MRooOjtSJvmbLi0IHVqi/8u6nUIqhmnYBaMmp1Wd rFyCiZ1RmvYiqVct4S5ShpfTQhF1FI3yfZ57+zF5DkVHqvpx2rm6JDPWpsdE4Nrv50+n x3SNhuHetk5FJK2VHrCVUWuTxakjX48IrCqXUz+HzTNY/QzTWgXk5CxFOwVzj+vTGird tKP/nrJfZXhkn/WgVOPuTay6S6cb9PFL8X+NOESe04ScQ2EfKoA+nZ9ubO43trHH2ldg 6rkyjU6n2DDvVTvVgoTuz7h2LsUt0k5iruCc9wGktZlIhuFwSroqdtQC6vBy0QZcdFLA OuOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:date:to:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=3KnLpDowvn6+xiqDR1YMQT6ZdP9g9Y4a9mQs+kzE0Po=; b=kbDiBst/nNz8s5k5LemHpnooTRMAQ+B0kRpkWyvXolRSN2F/IcWmtpdewZaULHuCqX NLfOHAxJh8IbD6kJKkDoH6cYy+CNyrXGUQe53xzZPs2R1Wtjyz7ccArQ/8dFOHg9K9yn AsUHQXAUVzNtWhUTy+UPjEr6akJ8K4FYk+rYLDjOZa+Deh8LISOTtlesxNmKW6YQQn1T Lrop5S4gAijO9p7UecG+CFqk9Xh+Tm+G0jxv7Jao6oiFUIQ09LOxXscyFCdXUXQUI/0w LQWBcvIeduyLODo/LzZoeegzKx+JnYvn7gJLmxo+E97MA9OVQsrmNMEb87kmqb4wHH2H /p8A== X-Gm-Message-State: AE9vXwNmnWITwh/VrNTD+A76GlMHVwIuXV0wm10uBr1gUBSQzhYKXKBtb0lw8453f4iQaQ== X-Received: by 10.98.25.66 with SMTP id 63mr5566295pfz.94.1472955544574; Sat, 03 Sep 2016 19:19:04 -0700 (PDT) Received: from calancha-pc (69.191.218.133.dy.bbexcite.jp. [133.218.191.69]) by smtp.gmail.com with ESMTPSA id e187sm10608544pfg.19.2016.09.03.19.19.03 for <24317-done@debbugs.gnu.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 03 Sep 2016 19:19:04 -0700 (PDT) From: Tino Calancha X-Google-Original-From: Tino Calancha Date: Sun, 4 Sep 2016 11:19:01 +0900 (JST) X-X-Sender: calancha@calancha-pc To: 24317-done@debbugs.gnu.org Subject: Re: bug#24317: 25.1.50; image-dired-rotate-original: regexp doesn't match .jpeg suffix In-Reply-To: <831t19c6dh.fsf@gnu.org> Message-ID: References: <83d1kud3m1.fsf@gnu.org> <83a8fyd1x0.fsf@gnu.org> <87oa4e1raw.fsf@zigzag.favinet> <838tvicuy3.fsf@gnu.org> <837fb2cqx1.fsf@gnu.org> <831t19c6dh.fsf@gnu.org> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 24317-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On Sun, 28 Aug 2016, Eli Zaretskii wrote: > Thanks, this looks good to me. Please push in a few days if no > additional comments are posted. Fixed in master branch. From unknown Thu Jun 19 12:38:07 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 02 Oct 2016 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator