GNU bug report logs - #57793
29.0.50; image-crop/image-elide + save-buffer creates invalid image file

Previous Next

Package: emacs;

Reported by: Stefan Kangas <stefankangas <at> gmail.com>

Date: Wed, 14 Sep 2022 06:14:01 UTC

Severity: normal

Found in version 29.0.50

Full log


Message #8 received at 57793 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: 57793 <at> debbugs.gnu.org
Subject: Re: bug#57793: 29.0.50; image-crop/image-elide + save-buffer
 creates invalid image file
Date: Wed, 14 Sep 2022 16:09:10 +0200
Stefan Kangas <stefankangas <at> gmail.com> writes:

> I can save an invalid image with image-crop.el using this recipe:
>
> 0. emacs -Q some-image.jpg
> 1. c
> 2. Drag region
> 3. RET
> 4. C-x C-s (`save-buffer')
>
> Now I have two image files:
>
>     some-image.jpg      [invalid, doesn't open]
>     some-image.jpg~     [the original file]

This should now be fixed.

> Should we just disable `C-x C-s' if it's not a "plain text" image
> (e.g. an SVG)?

Or perhaps the opposite?  It (now) saves the cropped image just fine,
but if you save it as SVG, it's not going to be an actual SVG image.

> Also, how about moving `image-save' from "o" to "C-x C-s", while making
> sure it does TRT?

I was wondering whether all the image keys should be moved to under one
prefix -- there's starting to be so many of them that it's easier to hit
a command by mistake.

So, like, put them all under...  er...  `i'?  So `i r' for image-rotate
(but make it repeating so that you can rotate a lot with `i r r r'.)




This bug report was last modified 2 years and 275 days ago.

Previous Next


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