unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#11557: cannot view nonempty *.x file using emacs (Image[imagemagick])
@ 2012-05-25 15:56 Jim Meyering
  2012-05-25 16:23 ` Glenn Morris
  0 siblings, 1 reply; 11+ messages in thread
From: Jim Meyering @ 2012-05-25 15:56 UTC (permalink / raw)
  To: 11557

I was surprised to find that emacs now tries to display
all of coreutils' man/*.x files as images.  It seems to
treat any nonempty *.x file that way.

Instead of seeing what I normally treat as a simple text file with
man file [section]/text snippets, all I see is a small square (maybe
20x20 pixels) in the upper left corner of the window.

Reproduce via e.g.,

    echo foo > a.x && emacs -q a.x

The mode line reports that it is in (Image[imagemagick]) mode.

What version?

  $ emacs --version
  GNU Emacs 24.1.50.1

I build snapshots from bzr nearly daily, and could quickly bisect down to
this 3-day interval:

  GOOD emacs-2012-04-13.06h37/bin/emacs
  BAD emacs-2012-04-16.08h09/bin/emacs

When it works as I expected (i.e., I can see actual text in the primary
buffer, and no outlined square), I see "LD-script" in the mode line.





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#11557: cannot view nonempty *.x file using emacs (Image[imagemagick])
  2012-05-25 15:56 bug#11557: cannot view nonempty *.x file using emacs (Image[imagemagick]) Jim Meyering
@ 2012-05-25 16:23 ` Glenn Morris
  2012-05-25 17:09   ` Glenn Morris
  0 siblings, 1 reply; 11+ messages in thread
From: Glenn Morris @ 2012-05-25 16:23 UTC (permalink / raw)
  To: Jim Meyering; +Cc: 11557

Jim Meyering wrote:

> I was surprised to find that emacs now tries to display
> all of coreutils' man/*.x files as images.  It seems to
> treat any nonempty *.x file that way.

Same issue as http://debbugs.gnu.org/11521

(memq 'X (imagemagick-types))  ->  (X X3F ...)





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#11557: cannot view nonempty *.x file using emacs (Image[imagemagick])
  2012-05-25 16:23 ` Glenn Morris
@ 2012-05-25 17:09   ` Glenn Morris
  2012-05-25 17:18     ` Jim Meyering
  0 siblings, 1 reply; 11+ messages in thread
From: Glenn Morris @ 2012-05-25 17:09 UTC (permalink / raw)
  To: 11557; +Cc: Jim Meyering


How about turning this ImageMagick thing around:

Instead of enabling image support for the 100s of extensions that
ImageMagick thinks are images, minus a few exceptions
(imagemagick-types-inhibit), have an explicit customizable list of the
types to accept, defaulting to things "everyone" agrees are really
images (bmp etc).





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#11557: cannot view nonempty *.x file using emacs (Image[imagemagick])
  2012-05-25 17:09   ` Glenn Morris
@ 2012-05-25 17:18     ` Jim Meyering
  2012-05-26 13:21       ` Stefan Monnier
  0 siblings, 1 reply; 11+ messages in thread
From: Jim Meyering @ 2012-05-25 17:18 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 11557

Glenn Morris wrote:
> How about turning this ImageMagick thing around:
>
> Instead of enabling image support for the 100s of extensions that
> ImageMagick thinks are images, minus a few exceptions
> (imagemagick-types-inhibit), have an explicit customizable list of the
> types to accept, defaulting to things "everyone" agrees are really
> images (bmp etc).

That sounds right to me.





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#11557: cannot view nonempty *.x file using emacs (Image[imagemagick])
  2012-05-25 17:18     ` Jim Meyering
@ 2012-05-26 13:21       ` Stefan Monnier
  2012-05-31  7:25         ` Glenn Morris
  0 siblings, 1 reply; 11+ messages in thread
From: Stefan Monnier @ 2012-05-26 13:21 UTC (permalink / raw)
  To: Jim Meyering; +Cc: 11557

>> How about turning this ImageMagick thing around:
>> Instead of enabling image support for the 100s of extensions that
>> ImageMagick thinks are images, minus a few exceptions
>> (imagemagick-types-inhibit), have an explicit customizable list of the
>> types to accept, defaulting to things "everyone" agrees are really
>> images (bmp etc).
> That sounds right to me.

Sounds obvious enough, yes, please go ahead,


        Stefan





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#11557: cannot view nonempty *.x file using emacs (Image[imagemagick])
  2012-05-26 13:21       ` Stefan Monnier
@ 2012-05-31  7:25         ` Glenn Morris
  2012-05-31  8:14           ` Jim Meyering
  2012-05-31 21:29           ` Stefan Monnier
  0 siblings, 2 replies; 11+ messages in thread
From: Glenn Morris @ 2012-05-31  7:25 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 11557, Jim Meyering


I've added an option imagemagick-type-enable with a conservative default.
I didn't put much thought into the default value.
I also wondered if for symmetry imagemagick-types-inhibit should maybe
be renamed to imagemagick-type-disable (or use -include and -exclude).

If anyone wants to change either of those it's fine by me.






^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#11557: cannot view nonempty *.x file using emacs (Image[imagemagick])
  2012-05-31  7:25         ` Glenn Morris
@ 2012-05-31  8:14           ` Jim Meyering
  2012-05-31 21:29           ` Stefan Monnier
  1 sibling, 0 replies; 11+ messages in thread
From: Jim Meyering @ 2012-05-31  8:14 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 11557

Glenn Morris wrote:
> I've added an option imagemagick-type-enable with a conservative default.
> I didn't put much thought into the default value.
> I also wondered if for symmetry imagemagick-types-inhibit should maybe
> be renamed to imagemagick-type-disable (or use -include and -exclude).
>
> If anyone wants to change either of those it's fine by me.

Thanks!  This fixes it.

FYI, I've just noticed that bison/yacc grammar files were also affected.
I.e., editing any *.y file, the default mode would display only that
small useless square in the upper left corner.





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#11557: cannot view nonempty *.x file using emacs (Image[imagemagick])
  2012-05-31  7:25         ` Glenn Morris
  2012-05-31  8:14           ` Jim Meyering
@ 2012-05-31 21:29           ` Stefan Monnier
  2012-06-02  7:31             ` Chong Yidong
  1 sibling, 1 reply; 11+ messages in thread
From: Stefan Monnier @ 2012-05-31 21:29 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 11557, Jim Meyering

> I've added an option imagemagick-type-enable with a conservative default.
> I didn't put much thought into the default value.
> I also wondered if for symmetry imagemagick-types-inhibit should maybe
> be renamed to imagemagick-type-disable (or use -include and -exclude).

I don't think imagemagick-types-inhibit is important enough now to worry
about its name.  We could even mark is obsolete, couldn't we?


        Stefan





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#11557: cannot view nonempty *.x file using emacs (Image[imagemagick])
  2012-05-31 21:29           ` Stefan Monnier
@ 2012-06-02  7:31             ` Chong Yidong
  2012-06-02 19:42               ` Glenn Morris
  0 siblings, 1 reply; 11+ messages in thread
From: Chong Yidong @ 2012-06-02  7:31 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 11557, Jim Meyering

Stefan Monnier <monnier@IRO.UMontreal.CA> writes:

> I don't think imagemagick-types-inhibit is important enough now to worry
> about its name.  We could even mark is obsolete, couldn't we?

I don't think we should mark it as obsolete, since some users might want
to use a blacklist rather than a whitelist.  I changed its default to
nil, though, and added many more (hopefully uncontroversial) types to
the whitelist.





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#11557: cannot view nonempty *.x file using emacs (Image[imagemagick])
  2012-06-02  7:31             ` Chong Yidong
@ 2012-06-02 19:42               ` Glenn Morris
  2012-06-04 13:02                 ` Chong Yidong
  0 siblings, 1 reply; 11+ messages in thread
From: Glenn Morris @ 2012-06-02 19:42 UTC (permalink / raw)
  To: Chong Yidong; +Cc: 11557, Jim Meyering

Chong Yidong wrote:

> I don't think we should mark it as obsolete, since some users might want
> to use a blacklist rather than a whitelist.  I changed its default to
> nil,

I don't see what the point of changing the inhibit default to nil was.
It makes it harder for someone to set imagemagick-enabled-types = t.

> , and added many more (hopefully uncontroversial) types to the
> whitelist.

CIN is controversial: http://debbugs.gnu.org/11521

Why are EPS/EPDF files treated differently to PS/PDF files?





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#11557: cannot view nonempty *.x file using emacs (Image[imagemagick])
  2012-06-02 19:42               ` Glenn Morris
@ 2012-06-04 13:02                 ` Chong Yidong
  0 siblings, 0 replies; 11+ messages in thread
From: Chong Yidong @ 2012-06-04 13:02 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 11557, Jim Meyering

Glenn Morris <rgm@gnu.org> writes:

> I don't see what the point of changing the inhibit default to nil was.
> It makes it harder for someone to set imagemagick-enabled-types = t.

I guess you're right.  Switched back.

> CIN is controversial: http://debbugs.gnu.org/11521

OK, removed.

> Why are EPS/EPDF files treated differently to PS/PDF files?

My original thought was that the "encapsulated" versions tend to be
figures rather than documents.  But on second thought, since EPS
etc. are displayed just fine by DocView, there is no need to have those
there.  Removed.





^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2012-06-04 13:02 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-25 15:56 bug#11557: cannot view nonempty *.x file using emacs (Image[imagemagick]) Jim Meyering
2012-05-25 16:23 ` Glenn Morris
2012-05-25 17:09   ` Glenn Morris
2012-05-25 17:18     ` Jim Meyering
2012-05-26 13:21       ` Stefan Monnier
2012-05-31  7:25         ` Glenn Morris
2012-05-31  8:14           ` Jim Meyering
2012-05-31 21:29           ` Stefan Monnier
2012-06-02  7:31             ` Chong Yidong
2012-06-02 19:42               ` Glenn Morris
2012-06-04 13:02                 ` Chong Yidong

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).