The case where image-mode isn't equivalent is where you use
`insert-file' to insert an image -- auto-image-file will cause the
inserted text to be covered with the image, but image-mode won't do
anything (unless the user invokes it afterwards, and then it will only
work if the i
On MS-Windows, auto-image-mode helps me view image files for which no
standard viewer comes with the OS. PPM images are a case in point.
Is the new image-mode feature a satisfactory replacement?
I think it ought to be.
If not, why not?
___
Em
What was the outcome? Can we turn `auto-compression-mode' on by default?
I don't know yet. I am trying it nowadays.
___
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel
> Date: Tue, 29 Mar 2005 05:44:04 +0900
> From: Miles Bader <[EMAIL PROTECTED]>
> Cc: [EMAIL PROTECTED], emacs-devel@gnu.org, [EMAIL PROTECTED],
> [EMAIL PROTECTED]
>
> On Mon, 28 Mar 2005 11:25:29 -0500, Richard Stallman <[EMAIL PROTECTED]>
> wrote:
> > BTW, shouldn't "image-file.el" (
On Mon, 28 Mar 2005 11:25:29 -0500, Richard Stallman <[EMAIL PROTECTED]> wrote:
> BTW, shouldn't "image-file.el" (the source file for `auto-image-mode')
> be moved to lisp/obsolete, now that image-mode is preferred?
>
> I don't know if it is totally obsolete. Does anyone think it isn't?
BTW, shouldn't "image-file.el" (the source file for `auto-image-mode')
be moved to lisp/obsolete, now that image-mode is preferred?
I don't know if it is totally obsolete. Does anyone think it isn't?
___
Emacs-devel mailing list
Emacs-devel@gn
> Can't this program just set the find-file-literally variable to t?
> That will prevent auto-compression-mode from trying to compress the
> contents
> when you save.
>
> I will see if that works.
What was the outcome? Can we turn `auto-compression-mode' on by default?
--
Juri Link
BTW, shouldn't "image-file.el" (the source file for `auto-image-mode')
be moved to lisp/obsolete, now that image-mode is preferred?
[I can move it if you like; doing that would help me test some changes
in the file addition/deletion code in my arch-CVS sync scripts... :-]
Thanks,
-Miles
--
Do n
I don't like this solution because it is too ad-hoc.
It is also local, so it won't break anything else. Please do it that
way.
But why can't `auto-mode-alist' allow to do the same?
Thanks, but this is not the time to consider changing the definition
of auto-mode-alist.
___
> So I think you should leave the function `image-mode' unchanged
> and define a new function `image-mode-maybe' which does the new job.
> Then the entries in auto-mode-alist can call `image-mode-maybe'
> and `image-mode-maybe' can conditionally call `image-mode'.
>
> Want to try it that way?
I do
Your code looks good to me, except for one point: every major mode's
symbol name should be a function that *unconditionally* switches to
that mode. You've set it up so that `image-mode' is a function that
usually switches to Image mode, but not always. That's not right.
So I think you should lea
Richard Stallman <[EMAIL PROTECTED]> writes:
> 2. Perhaps image-mode should be minor mode for extensions like
>.xbm and .xpm which already have associated major mode c-mode
>in auto-mode-alist.
>
> Someone else can do that.
I can't find a solution better than below.
With this
> That is true. However, copying the image to another buffer would only
> get you text.
Which is what would be appropriate when copying an XPM icon into a C
source file.
I see no problem here. If you prefer to copy it as text, type C-c C-c
so that you see the text, then copy it
> 3. By default this mode should be enabled for non-ascii based
>image format files like .png, .jpg. This could be achieved
>by enabling auto-image-file-mode by default and turning
>image-mode off by default for ascii based formats.
Sorry, I disagree.
Richard Stallman <[EMAIL PROTECTED]> writes:
> 3. By default this mode should be enabled for non-ascii based
>image format files like .png, .jpg. This could be achieved
>by enabling auto-compression-mode by default and turning
>image-mode off by default for ascii based
Richard Stallman <[EMAIL PROTECTED]> writes:
> If you used an overlay instead of text properties, there would be no
> necessity to modify the buffer.
>
> That is true. However, copying the image to another buffer would only
> get you text.
Which is what would be appropriate when copying
If you used an overlay instead of text properties, there would be no
necessity to modify the buffer.
That is true. However, copying the image to another buffer would only
get you text. That's why I decided to make it a text property.
___
Emac
Richard Stallman <[EMAIL PROTECTED]> writes:
> 3. By default this mode should be enabled for non-ascii based
>image format files like .png, .jpg. This could be achieved
>by enabling auto-compression-mode by default and turning
>image-mode off by default for ascii based
3. By default this mode should be enabled for non-ascii based
image format files like .png, .jpg. This could be achieved
by enabling auto-compression-mode by default and turning
image-mode off by default for ascii based formats.
I am completely lost here. What does auto-
Can't this program just set the find-file-literally variable to t?
That will prevent auto-compression-mode from trying to compress the contents
when you save.
I will see if that works.
___
Emacs-devel mailing list
Emacs-devel@gnu.org
http:
> What do people think? Here's the code to do it.
> (But I wonder, was there some reason why Miles implemented
> this feature using a file name handler instead of with a major mode?)
There was an explicit reason, but I don't remember what it is anymore;
perhaps some google searching would reveal
> What is buffer-file-coding-system set to in that buffer?
> nil. It is a unibyte buffer.
> How
> do you insert the compressed data into it?
> With a Lisp program that copies text from another buffer and then does
> base64-decod
What is buffer-file-coding-system set to in that buffer?
nil. It is a unibyte buffer.
How
do you insert the compressed data into it?
With a Lisp program that copies text from another buffer and then does
base64-decode-region.
Richard Stallman <[EMAIL PROTECTED]> writes:
> What do people think? Here's the code to do it.
I looked at the code and have a few comments:
1. .xpm file extension is missing from the list of autoload cookies.
2. Perhaps image-mode should be minor mode for extensions like
.xbm and .xpm which
Richard Stallman wrote:
I would like to ask the same question for auto-compression-mode too.
What is the reason not to turn it on by default? How often people
visit compressed files for editing without uncompressing?
I often save a buffer of compressed data into a file name FOO.gz.
If
If you are working through a slow X connection, accidentally visiting
an image file could be a very expensive mistake.
We could solve that, perhaps, by introducing preemption into
the display of a large image. I think that is too big a change
to make just now, but it could be made some da
I would like to ask the same question for auto-compression-mode too.
What is the reason not to turn it on by default? How often people
visit compressed files for editing without uncompressing?
I often save a buffer of compressed data into a file name FOO.gz.
If Auto Compression mode i
Stefan <[EMAIL PROTECTED]> writes:
> As I said, it's probably true for "binary" image formats (like PNG).
> But auto-image-file-mode, as it currently stands, applies to more formats
> than just those.
I guess there should be a special mode `image-file-mode' to switch
between textual and graphical
>> I admit that I've never opened a png file in Emacs, so for png it might be
>> OK, but in general there are several "image formats" which are quite
>> viewable/editable in Emacs.
>>
>> OTOH I find auto-image-file-mode of very dubious utility: you can barely
>> look at the image (it's a bit bette
David Kastrup <[EMAIL PROTECTED]> writes:
> If you are working through a slow X connection, accidentally visiting
> an image file could be a very expensive mistake. In the past,
> displaying an image that was overtall could really confuse Emacs.
> This has become much better recently, but I don't
Stefan Monnier <[EMAIL PROTECTED]> writes:
> I admit that I've never opened a png file in Emacs, so for png it might be
> OK, but in general there are several "image formats" which are quite
> viewable/editable in Emacs.
>
> OTOH I find auto-image-file-mode of very dubious utility: you can barely
>
> Indeed, auto-image-file-mode is useful only for viewing images.
> OTOH, editing image files as plain text in Emacs is a rare
> operation too.
Not that rare, especially for text-based image format, or to view/edit the
text in the header of a non-text image format.
> And even with auto-image-file
Juri Linkov <[EMAIL PROTECTED]> writes:
> Stefan Monnier <[EMAIL PROTECTED]> writes:
>>> There is already "Automatic File De/compression" menu item
>>> for auto-compression-mode in the Options menu, but no menu item
>>> for auto-image-file-mode. This looks like an unintentional omission.
>>
>> I
Stefan Monnier <[EMAIL PROTECTED]> writes:
>> There is already "Automatic File De/compression" menu item
>> for auto-compression-mode in the Options menu, but no menu item
>> for auto-image-file-mode. This looks like an unintentional omission.
>
> I think it's omitted because it's a very rarely us
There is already "Automatic File De/compression" menu item
for auto-compression-mode in the Options menu, but no menu item
for auto-image-file-mode. This looks like an unintentional omission.
There is no such thing as an "unintentional omission" from the menu
bar. Putting anything in
> There is already "Automatic File De/compression" menu item
> for auto-compression-mode in the Options menu, but no menu item
> for auto-image-file-mode. This looks like an unintentional omission.
I think it's omitted because it's a very rarely used feature.
Stefan
__
There is already "Automatic File De/compression" menu item
for auto-compression-mode in the Options menu, but no menu item
for auto-image-file-mode. This looks like an unintentional omission.
Index: lisp/menu-bar.el
===
RCS file: /cv
37 matches
Mail list logo