GNU logs - #9516, boring messages


Message sent to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#9516: imagemagick-register-types and image-file-name-extensions
Resent-From: Juri Linkov <juri@HIDDEN>
Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Resent-To: owner <at> debbugs.gnu.org
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 15 Sep 2011 18:56:01 +0000
Resent-Message-ID: <handler.9516.B.131611293515480 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 9516
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: 9516 <at> debbugs.gnu.org
X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.131611293515480
          (code B ref -1); Thu, 15 Sep 2011 18:56:01 +0000
Received: (at submit) by debbugs.gnu.org; 15 Sep 2011 18:55:35 +0000
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1R4H5y-00041U-Ne
	for submit <at> debbugs.gnu.org; Thu, 15 Sep 2011 14:55:35 -0400
Received: from eggs.gnu.org ([140.186.70.92])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <juri@HIDDEN>) id 1R4H5q-000411-3o
	for submit <at> debbugs.gnu.org; Thu, 15 Sep 2011 14:55:28 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <juri@HIDDEN>) id 1R4H1I-00085M-UJ
	for submit <at> debbugs.gnu.org; Thu, 15 Sep 2011 14:50:46 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE
	autolearn=unavailable version=3.3.1
Received: from lists.gnu.org ([140.186.70.17]:56707)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <juri@HIDDEN>) id 1R4H1I-00085H-St
	for submit <at> debbugs.gnu.org; Thu, 15 Sep 2011 14:50:44 -0400
Received: from eggs.gnu.org ([140.186.70.92]:51221)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <juri@HIDDEN>) id 1R4H1H-0007XK-Pi
	for bug-gnu-emacs@HIDDEN; Thu, 15 Sep 2011 14:50:44 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <juri@HIDDEN>) id 1R4H1F-00081n-AO
	for bug-gnu-emacs@HIDDEN; Thu, 15 Sep 2011 14:50:43 -0400
Received: from smarty.dreamhost.com ([208.113.175.8]:54900)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <juri@HIDDEN>) id 1R4H1F-000817-6I
	for bug-gnu-emacs@HIDDEN; Thu, 15 Sep 2011 14:50:41 -0400
Received: from ps18281.dreamhostps.com (ps18281.dreamhost.com [69.163.218.105])
	by smarty.dreamhost.com (Postfix) with ESMTP id BF6826E804F
	for <bug-gnu-emacs@HIDDEN>; Thu, 15 Sep 2011 11:50:40 -0700 (PDT)
Received: from localhost (ps18281.dreamhostps.com [69.163.218.105])
	by ps18281.dreamhostps.com (Postfix) with ESMTP id 1C8EE451C3FB
	for <bug-gnu-emacs@HIDDEN>; Thu, 15 Sep 2011 11:50:39 -0700 (PDT)
From: Juri Linkov <juri@HIDDEN>
Organization: JURTA
Date: Thu, 15 Sep 2011 21:34:10 +0300
Message-ID: <87wrda6k5p.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 140.186.70.17
X-Spam-Score: -4.6 (----)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -4.6 (----)

In Dired typing `C-t C-t' (`image-dired-dired-toggle-marked-thumbs')
doesn't show images supported by ImageMagick.

It gets file extensions of supported image types by calling the function
`image-file-name-regexp' and it gets them from the variable
`image-file-name-extensions' that currently misses file extensions
supported by ImageMagick.

I propose a fix that adds them to `image-file-name-extensions'
in `imagemagick-register-types':

=== modified file 'lisp/image.el'
--- lisp/image.el	2011-07-25 08:23:29 +0000
+++ lisp/image.el	2011-09-15 18:32:51 +0000
@@ -699,11 +699,11 @@ (defun imagemagick-register-types ()
       (dolist (im-inhibit imagemagick-types-inhibit)
 	(setq im-types (delq im-inhibit im-types)))
       (dolist (im-type im-types)
-	(let ((extension
-	       (concat "\\." (downcase (symbol-name im-type))
-		       "\\'")))
-	  (push (cons extension 'image-mode) auto-mode-alist)
-	  (push (cons extension 'imagemagick)
+	(let* ((extension (downcase (symbol-name im-type)))
+	       (extension-regexp (concat "\\." extension "\\'")))
+	  (push extension image-file-name-extensions)
+	  (push (cons extension-regexp 'image-mode) auto-mode-alist)
+	  (push (cons extension-regexp 'imagemagick)
 		image-type-file-name-regexps))))))

There are other packages that rely on image file extensions
defined in image-file.el:

./iimage.el:61:				     image-file-name-extensions)
./iimage.el:62:			     image-file-name-extensions)
./image-dired.el:548:  (unless (string-match (image-file-name-regexp) file)
./image-dired.el:656:     (when (and image-file (string-match-p (image-file-name-regexp) image-file))
./image-dired.el:867:  (dired-mark-files-regexp (image-file-name-regexp))
./org/org.el:19319:  (if (and (not extensions) (fboundp 'image-file-name-regexp))
./org/org.el:19320:      (image-file-name-regexp)
./org/org.el:19321:    (let ((image-file-name-extensions
./org/org.el:19327:					 image-file-name-extensions)
./org/org.el:19328:				 image-file-name-extensions)
./thumbs.el:228:	    (directory-files (thumbs-thumbsdir) t (image-file-name-regexp)))
./thumbs.el:411:   (directory-files dir t (or reg (image-file-name-regexp)))

I suppose all they will benefit from this fix as well.




Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: Juri Linkov <juri@HIDDEN>
Subject: bug#9516: Acknowledgement (imagemagick-register-types and
 image-file-name-extensions)
Message-ID: <handler.9516.B.131611293515480.ack <at> debbugs.gnu.org>
References: <87wrda6k5p.fsf@HIDDEN>
X-Gnu-PR-Message: ack 9516
X-Gnu-PR-Package: emacs
Reply-To: 9516 <at> debbugs.gnu.org
Date: Thu, 15 Sep 2011 18:56:02 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 bug-gnu-emacs@HIDDEN

If you wish to submit further information on this problem, please
send it to 9516 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
9516: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D9516
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems


Message sent to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#9516: imagemagick-register-types and image-file-name-extensions
Resent-From: Stefan Monnier <monnier@HIDDEN>
Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Resent-To: owner <at> debbugs.gnu.org
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Fri, 16 Sep 2011 02:29:02 +0000
Resent-Message-ID: <handler.9516.B9516.131614009516343 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 9516
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Juri Linkov <juri@HIDDEN>
Cc: 9516 <at> debbugs.gnu.org
Received: via spool by 9516-submit <at> debbugs.gnu.org id=B9516.131614009516343
          (code B ref 9516); Fri, 16 Sep 2011 02:29:02 +0000
Received: (at 9516) by debbugs.gnu.org; 16 Sep 2011 02:28:15 +0000
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1R4OA3-0004FY-5w
	for submit <at> debbugs.gnu.org; Thu, 15 Sep 2011 22:28:15 -0400
Received: from ironport2-out.teksavvy.com ([206.248.154.181]
	helo=ironport2-out.pppoe.ca)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <monnier@HIDDEN>) id 1R4OA1-0004FR-GT
	for 9516 <at> debbugs.gnu.org; Thu, 15 Sep 2011 22:28:14 -0400
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: AkwJAC6yck5FpYYd/2dsb2JhbABBmEyPDHmBUwEBBVYjEAs0EhQYDSS9KoZ0BKBJhEQ
X-IronPort-AV: E=Sophos;i="4.68,391,1312171200"; d="scan'208";a="136659020"
Received: from 69-165-134-29.dsl.teksavvy.com (HELO ceviche.home)
	([69.165.134.29])
	by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA;
	15 Sep 2011 22:23:30 -0400
Received: by ceviche.home (Postfix, from userid 20848)
	id B9A7D660B6; Thu, 15 Sep 2011 22:23:29 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
Message-ID: <jwvfwjxjkeu.fsf-monnier+emacs@HIDDEN>
References: <87wrda6k5p.fsf@HIDDEN>
Date: Thu, 15 Sep 2011 22:23:29 -0400
In-Reply-To: <87wrda6k5p.fsf@HIDDEN> (Juri Linkov's message of "Thu,
	15 Sep 2011 21:34:10 +0300")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.1 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.1 (--)

> +	       (extension-regexp (concat "\\." extension "\\'")))

You forgot a regexp-quote.


        Stefan




Message sent to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#9516: imagemagick-register-types and image-file-name-extensions
Resent-From: Stefan Monnier <monnier@HIDDEN>
Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Resent-To: owner <at> debbugs.gnu.org
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Fri, 16 Sep 2011 13:40:02 +0000
Resent-Message-ID: <handler.9516.B9516.131618034416897 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 9516
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Juri Linkov <juri@HIDDEN>
Cc: 9516 <at> debbugs.gnu.org
Received: via spool by 9516-submit <at> debbugs.gnu.org id=B9516.131618034416897
          (code B ref 9516); Fri, 16 Sep 2011 13:40:02 +0000
Received: (at 9516) by debbugs.gnu.org; 16 Sep 2011 13:39:04 +0000
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1R4YdE-0004OU-6a
	for submit <at> debbugs.gnu.org; Fri, 16 Sep 2011 09:39:04 -0400
Received: from ironport2-out.teksavvy.com ([206.248.154.183]
	helo=ironport2-out.pppoe.ca)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <monnier@HIDDEN>) id 1R4YdC-0004OC-Gs
	for 9516 <at> debbugs.gnu.org; Fri, 16 Sep 2011 09:39:02 -0400
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: Av0EAC5Pc05FpYYd/2dsb2JhbABCp1p4gVMBAQQBViMFCws0EhQYDSSICrQBhngEoE6ERA
X-IronPort-AV: E=Sophos;i="4.68,393,1312171200"; d="scan'208";a="136700052"
Received: from 69-165-134-29.dsl.teksavvy.com (HELO pastel.home)
	([69.165.134.29])
	by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA;
	16 Sep 2011 09:34:17 -0400
Received: by pastel.home (Postfix, from userid 20848)
	id 779F158F87; Fri, 16 Sep 2011 09:34:17 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
Message-ID: <jwvsjnwtxwg.fsf-monnier+emacs@HIDDEN>
References: <87wrda6k5p.fsf@HIDDEN>
Date: Fri, 16 Sep 2011 09:34:17 -0400
In-Reply-To: <87wrda6k5p.fsf@HIDDEN> (Juri Linkov's message of "Thu,
	15 Sep 2011 21:34:10 +0300")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.1 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.1 (--)

> I propose a fix that adds them to `image-file-name-extensions'
> in `imagemagick-register-types':

There's something I don't understand:
- why do we have both image-file-name-extensions and image-file-name-regexps?
- why doesn't image-file.el use image-type-file-name-regexps?


        Stefan




Message sent to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#9516: imagemagick-register-types and image-file-name-extensions
Resent-From: Juri Linkov <juri@HIDDEN>
Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Resent-To: owner <at> debbugs.gnu.org
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Fri, 16 Sep 2011 20:14:02 +0000
Resent-Message-ID: <handler.9516.B9516.13162040411269 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 9516
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Stefan Monnier <monnier@HIDDEN>
Cc: 9516 <at> debbugs.gnu.org
Received: via spool by 9516-submit <at> debbugs.gnu.org id=B9516.13162040411269
          (code B ref 9516); Fri, 16 Sep 2011 20:14:02 +0000
Received: (at 9516) by debbugs.gnu.org; 16 Sep 2011 20:14:01 +0000
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1R4enQ-0000KJ-UG
	for submit <at> debbugs.gnu.org; Fri, 16 Sep 2011 16:14:01 -0400
Received: from smarty.dreamhost.com ([208.113.175.8])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <juri@HIDDEN>) id 1R4enL-0000K8-83
	for 9516 <at> debbugs.gnu.org; Fri, 16 Sep 2011 16:13:55 -0400
Received: from ps18281.dreamhostps.com (ps18281.dreamhost.com [69.163.218.105])
	by smarty.dreamhost.com (Postfix) with ESMTP id 73A53498205;
	Fri, 16 Sep 2011 07:14:55 -0700 (PDT)
Received: from localhost (ps18281.dreamhostps.com [69.163.218.105])
	by ps18281.dreamhostps.com (Postfix) with ESMTP id 07235451C40B;
	Fri, 16 Sep 2011 07:11:23 -0700 (PDT)
From: Juri Linkov <juri@HIDDEN>
Organization: JURTA
References: <87wrda6k5p.fsf@HIDDEN>
	<jwvsjnwtxwg.fsf-monnier+emacs@HIDDEN>
Date: Fri, 16 Sep 2011 17:09:49 +0300
In-Reply-To: <jwvsjnwtxwg.fsf-monnier+emacs@HIDDEN> (Stefan Monnier's message
	of "Fri, 16 Sep 2011 09:34:17 -0400")
Message-ID: <874o0cd1ea.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.6 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.6 (--)

>> I propose a fix that adds them to `image-file-name-extensions'
>> in `imagemagick-register-types':
>
> There's something I don't understand:
> - why do we have both image-file-name-extensions and image-file-name-regexps?

I guess for historical reasons.

> - why doesn't image-file.el use image-type-file-name-regexps?

It seems image-file.el is semi-obsoleted by image-mode.el,
so it should use more general settings from image-type-file-name-regexps.
And other packages should be fixed to use more general settings
from image.el instead of relying on definitions from image-file.el.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#9516: imagemagick-register-types and image-file-name-extensions
Resent-From: Chong Yidong <cyd@HIDDEN>
Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Fri, 23 Sep 2011 21:35:02 +0000
Resent-Message-ID: <handler.9516.B9516.13168136803639 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 9516
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Juri Linkov <juri@HIDDEN>
Cc: 9516 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>
Received: via spool by 9516-submit <at> debbugs.gnu.org id=B9516.13168136803639
          (code B ref 9516); Fri, 23 Sep 2011 21:35:02 +0000
Received: (at 9516) by debbugs.gnu.org; 23 Sep 2011 21:34:40 +0000
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1R7DOK-0000we-1v
	for submit <at> debbugs.gnu.org; Fri, 23 Sep 2011 17:34:40 -0400
Received: from vm-emlprdomr-06.its.yale.edu ([130.132.50.147])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <cyd@HIDDEN>) id 1R7DOG-0000wW-S6
	for 9516 <at> debbugs.gnu.org; Fri, 23 Sep 2011 17:34:37 -0400
Received: from furball (dhcp-128-36-14-81.central.yale.edu [128.36.14.81])
	(authenticated bits=0)
	by vm-emlprdomr-06.its.yale.edu (8.14.4/8.14.4) with ESMTP id
	p8NLY78H009582
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT);
	Fri, 23 Sep 2011 17:34:07 -0400
From: Chong Yidong <cyd@HIDDEN>
References: <87wrda6k5p.fsf@HIDDEN>
	<jwvsjnwtxwg.fsf-monnier+emacs@HIDDEN>
	<874o0cd1ea.fsf@HIDDEN>
Date: Fri, 23 Sep 2011 17:34:07 -0400
In-Reply-To: <874o0cd1ea.fsf@HIDDEN> (Juri Linkov's message of "Fri,
	16 Sep 2011 17:09:49 +0300")
Message-ID: <87k48zeyeo.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Scanned-By: MIMEDefang 2.71 on 130.132.50.147
X-Spam-Score: -2.7 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.7 (--)

Juri Linkov <juri@HIDDEN> writes:

> It seems image-file.el is semi-obsoleted by image-mode.el,
> so it should use more general settings from image-type-file-name-regexps.
> And other packages should be fixed to use more general settings
> from image.el instead of relying on definitions from image-file.el.

Sounds right, though I think that can wait till post-release.

Please go ahead and commit your patch (with the regexp-quote).




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#9516: imagemagick-register-types and image-file-name-extensions
Resent-From: Chong Yidong <cyd@HIDDEN>
Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Fri, 23 Sep 2011 21:42:02 +0000
Resent-Message-ID: <handler.9516.B9516.13168140854215 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 9516
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Juri Linkov <juri@HIDDEN>
Cc: 9516 <at> debbugs.gnu.org
Received: via spool by 9516-submit <at> debbugs.gnu.org id=B9516.13168140854215
          (code B ref 9516); Fri, 23 Sep 2011 21:42:02 +0000
Received: (at 9516) by debbugs.gnu.org; 23 Sep 2011 21:41:25 +0000
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1R7DUq-00015v-Lr
	for submit <at> debbugs.gnu.org; Fri, 23 Sep 2011 17:41:25 -0400
Received: from vm-emlprdomr-06.its.yale.edu ([130.132.50.147])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <cyd@HIDDEN>) id 1R7DUo-00015o-JE
	for 9516 <at> debbugs.gnu.org; Fri, 23 Sep 2011 17:41:23 -0400
Received: from furball (dhcp-128-36-14-81.central.yale.edu [128.36.14.81])
	(authenticated bits=0)
	by vm-emlprdomr-06.its.yale.edu (8.14.4/8.14.4) with ESMTP id
	p8NLerjp012523
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT);
	Fri, 23 Sep 2011 17:40:53 -0400
From: Chong Yidong <cyd@HIDDEN>
References: <87wrda6k5p.fsf@HIDDEN>
	<jwvsjnwtxwg.fsf-monnier+emacs@HIDDEN>
	<874o0cd1ea.fsf@HIDDEN> <87k48zeyeo.fsf@HIDDEN>
Date: Fri, 23 Sep 2011 17:40:53 -0400
In-Reply-To: <87k48zeyeo.fsf@HIDDEN> (Chong Yidong's message of
	"Fri, 23 Sep 2011 17:34:07 -0400")
Message-ID: <87fwjney3e.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Scanned-By: MIMEDefang 2.71 on 130.132.50.147
X-Spam-Score: -2.7 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.7 (--)

Chong Yidong <cyd@HIDDEN> writes:

> Please go ahead and commit your patch (with the regexp-quote).

On second thought, there is a problem---image-file-name-extensions is a
defcustom, so your patch would trigger a "changed outside customize"
warning if the user tries customizing it after calling
imagemagick-register-types.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#9516: imagemagick-register-types and image-file-name-extensions
Resent-From: Juri Linkov <juri@HIDDEN>
Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 25 Sep 2011 14:16:02 +0000
Resent-Message-ID: <handler.9516.B9516.131696012015338 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 9516
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Chong Yidong <cyd@HIDDEN>
Cc: 9516 <at> debbugs.gnu.org
Received: via spool by 9516-submit <at> debbugs.gnu.org id=B9516.131696012015338
          (code B ref 9516); Sun, 25 Sep 2011 14:16:02 +0000
Received: (at 9516) by debbugs.gnu.org; 25 Sep 2011 14:15:20 +0000
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1R7pUF-0003yU-Ot
	for submit <at> debbugs.gnu.org; Sun, 25 Sep 2011 10:15:20 -0400
Received: from smarty.dreamhost.com ([208.113.175.8])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <juri@HIDDEN>) id 1R7pUD-0003tT-5d
	for 9516 <at> debbugs.gnu.org; Sun, 25 Sep 2011 10:15:18 -0400
Received: from ps18281.dreamhostps.com (ps18281.dreamhost.com [69.163.218.105])
	by smarty.dreamhost.com (Postfix) with ESMTP id 516496E804D;
	Sun, 25 Sep 2011 07:14:38 -0700 (PDT)
Received: from localhost (ps18281.dreamhostps.com [69.163.218.105])
	by ps18281.dreamhostps.com (Postfix) with ESMTP id 62AB7451C330;
	Sun, 25 Sep 2011 07:14:35 -0700 (PDT)
From: Juri Linkov <juri@HIDDEN>
Organization: JURTA
References: <87wrda6k5p.fsf@HIDDEN>
	<jwvsjnwtxwg.fsf-monnier+emacs@HIDDEN>
	<874o0cd1ea.fsf@HIDDEN> <87k48zeyeo.fsf@HIDDEN>
	<87fwjney3e.fsf@HIDDEN>
Date: Sun, 25 Sep 2011 17:03:21 +0300
In-Reply-To: <87fwjney3e.fsf@HIDDEN> (Chong Yidong's message of
	"Fri, 23 Sep 2011 17:40:53 -0400")
Message-ID: <874o00d8de.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.6 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.6 (--)

>> Please go ahead and commit your patch (with the regexp-quote).
>
> On second thought, there is a problem---image-file-name-extensions is a
> defcustom, so your patch would trigger a "changed outside customize"
> warning if the user tries customizing it after calling
> imagemagick-register-types.

Then we could change the function `image-file-name-regexp'
that dynamically constructs a composite regexp from
`image-file-name-extensions' and `image-file-name-regexps'.
What we could do is to add to its return value a regexp added
in `imagemagick-register-types' to `image-type-file-name-regexps'
with the assoc value `imagemagick':

=== modified file 'lisp/image-file.el'
--- lisp/image-file.el	2011-01-25 04:08:28 +0000
+++ lisp/image-file.el	2011-09-25 14:01:31 +0000
@@ -85,13 +85,12 @@ (defun image-file-name-regexp ()
 					 image-file-name-extensions)
 				  t)
 		      "\\'"))))
-    (if image-file-name-regexps
-	(mapconcat 'identity
-		   (if exts-regexp
-		       (cons exts-regexp image-file-name-regexps)
-		     image-file-name-regexps)
-		   "\\|")
-      exts-regexp)))
+    (mapconcat
+     'identity
+     (delq nil (list exts-regexp
+		     image-file-name-regexps
+		     (car (rassq 'imagemagick image-type-file-name-regexps))))
+     "\\|")))

This is a temporary solution for the next release of 24.1 that
will allow image-dired.el to display Imagemagick supported images.

I think in 24.2, defcustoms in image-file.el should be deprecated
and packages should use `image-type-file-name-regexps' instead.





Last modified: Fri, 31 Oct 2014 17:00:04 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.