From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Glenn Morris Newsgroups: gmane.emacs.bugs Subject: bug#10746: ImageMagick and priority of image loaders Date: Mon, 06 Feb 2012 23:16:21 -0500 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1328588239 24516 80.91.229.3 (7 Feb 2012 04:17:19 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 7 Feb 2012 04:17:19 +0000 (UTC) Cc: Joakim Verona To: 10746@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Feb 07 05:17:18 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RucUY-0006ZX-4S for geb-bug-gnu-emacs@m.gmane.org; Tue, 07 Feb 2012 05:17:18 +0100 Original-Received: from localhost ([::1]:39390 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RucUX-0005hb-Fr for geb-bug-gnu-emacs@m.gmane.org; Mon, 06 Feb 2012 23:17:17 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:49024) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RucUQ-0005gz-Vx for bug-gnu-emacs@gnu.org; Mon, 06 Feb 2012 23:17:15 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RucUP-0004gu-KI for bug-gnu-emacs@gnu.org; Mon, 06 Feb 2012 23:17:10 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:54337) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RucUP-0004gj-Ij for bug-gnu-emacs@gnu.org; Mon, 06 Feb 2012 23:17:09 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1RucVG-0005cF-DO; Mon, 06 Feb 2012 23:18:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Glenn Morris Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: joakim@verona.se, bug-gnu-emacs@gnu.org Resent-Date: Tue, 07 Feb 2012 04:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 10746 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: submit@debbugs.gnu.org X-Debbugs-Original-Xcc: Joakim Verona Original-Received: via spool by submit@debbugs.gnu.org id=B.132858823921524 (code B ref -1); Tue, 07 Feb 2012 04:18:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 7 Feb 2012 04:17:19 +0000 Original-Received: from localhost ([127.0.0.1]:57960 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RucUY-0005b6-Sh for submit@debbugs.gnu.org; Mon, 06 Feb 2012 23:17:19 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]:58736 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RucUW-0005az-9P for submit@debbugs.gnu.org; Mon, 06 Feb 2012 23:17:17 -0500 Original-Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1RucTd-0001qg-VX; Mon, 06 Feb 2012 23:16:21 -0500 X-Spook: Merlin FSF terrorist Elvis pre-emptive Centro clandestine X-Ran: 8gi6Z'T@p{YT1=5t21/NW"rKvf'*}/M`aZ8Y]{|6oE7.uI@#zpe$&tGv(.kTW')xe85o<> X-Hue: cyan X-Attribution: GM User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 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.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:56619 Archived-At: Package: emacs Version: 24.0.93 The Emacs Lisp manual used to say (I'm going to comment it out, for the reasons given in this report): There may be overlap between image loaders in your Emacs installation, and you may prefer to use a different one for a given image type (which loader will be used in practice depends on the priority of the loaders). For example, if you never want to use the ImageMagick loader to use JPEG files, add @code{JPG} to this list. Firstly, I don't understand what this means. What does it means for there to be multiple "image loaders" in Emacs, and how is their priority determined? (Also, do I have to add JPEG as well, since imagemagick-types returns both JPG and JPEG?) I think it might mean, eg jpeg images can be loaded via libjpeg or ImageMagick. If that is what it means, it could be clearer. If so, when I view a jpg with Emacs, how can I tell which loader was used? Maybe from looking at the mode-line in image-mode, which either says [jpeg] or [imagemagick]? It seems there's no practical way to control which loader is used: i) If you compile without jpeg but with ImageMagick, then you simply cannot view jpegs: http://debbugs.gnu.org/9045 ii) If you compile with both, then libjpeg is always used (AFAICS). This is despite imagemagick-register-types adding to the front of image-type-file-name-regexps. When you visit a jpeg file, image-type first uses image-type-from-file-header to determine the image type, and this decides it is a jpeg. So imagemagick never gets a change to open the jpeg. You can make it work by setting image-type-header-regexps to nil, but that is supposed to be a constant.