GNU bug report logs - #18683
Patch for wish-list item: 560

Previous Next

Package: emacs;

Reported by: Matthew Leach <matthew <at> mattleach.net>

Date: Fri, 10 Oct 2014 23:01:01 UTC

Severity: wishlist

Merged with 560

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 18683 in the body.
You can then email your comments to 18683 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#18683; Package emacs. (Fri, 10 Oct 2014 23:01:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Matthew Leach <matthew <at> mattleach.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 10 Oct 2014 23:01:02 GMT) Full text and rfc822 format available.

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

From: Matthew Leach <matthew <at> mattleach.net>
To: bug-gnu-emacs <at> gnu.org
Subject: Patch for wish-list item: 560
Date: Fri, 10 Oct 2014 23:58:44 +0100
[Message part 1 (text/plain, inline)]
Hello,

Attached is a simple patch that adds {+-}90 degree rotation to image
mode as requested in [1].

Any comments welcome.

[1]: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=560

2014-10-10  Matthew Leach  <matthew <at> mattleach.net>

	* image-mode.el (image-mode-map): map 'r' and 'l' to rotation
	functions.
	(image-rotate-90-right): New method.
	(image-rotate-90-left):

[img-90-rotation.patch (text/x-diff, inline)]
diff --git a/lisp/image-mode.el b/lisp/image-mode.el
index b94162d..de75f4a 100644
--- a/lisp/image-mode.el
+++ b/lisp/image-mode.el
@@ -375,6 +375,8 @@ call."
     (define-key map "f" 'image-next-frame)
     (define-key map "b" 'image-previous-frame)
     (define-key map "n" 'image-next-file)
+    (define-key map "r" 'image-rotate-90-right)
+    (define-key map "l" 'image-rotate-90-left)
     (define-key map "p" 'image-previous-file)
     (define-key map "a+" 'image-increase-speed)
     (define-key map "a-" 'image-decrease-speed)
@@ -1106,6 +1108,16 @@ Emacs is compiled with ImageMagick support."
   (setq image-transform-rotation (float (mod rotation 360)))
   (image-toggle-display-image))
 
+(defun image-rotate-90-right ()
+  "Increase the rotation of the current image by 90 degrees."
+  (interactive)
+  (image-transform-set-rotation (+ image-transform-rotation 90)))
+
+(defun image-rotate-90-left ()
+  "Decrease the rotation of the current image by 90 degrees."
+  (interactive)
+  (image-transform-set-rotation (- image-transform-rotation 90)))
+
 (defun image-transform-reset ()
   "Display the current image with the default size and rotation.
 This command has no effect unless Emacs is compiled with
[Message part 3 (text/plain, inline)]
-- 
Matt

Forcibly Merged 560 18683. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Fri, 10 Oct 2014 23:04:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18683; Package emacs. (Fri, 10 Oct 2014 23:48:02 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: Matthew Leach <matthew <at> mattleach.net>
Cc: 18683 <at> debbugs.gnu.org, Vitalie Spinu <spinuvit <at> gmail.com>
Subject: Re: bug#18683: Patch for wish-list item: 560
Date: Fri, 10 Oct 2014 19:47:43 -0400
Matthew Leach wrote:

> Attached is a simple patch that adds {+-}90 degree rotation to image
> mode as requested in [1].

Thanks. It would have better to send this to the existing report, rather
than creating a new one, but no worries.

Anyway, see also unfinished (as far as I know?) patch to do this and
more at:

http://lists.gnu.org/archive/html/emacs-devel/2013-07/msg00610.html
http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00264.html




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18683; Package emacs. (Sat, 11 Oct 2014 09:53:01 GMT) Full text and rfc822 format available.

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

From: Matthew Leach <matthew <at> mattleach.net>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 18683 <at> debbugs.gnu.org, Vitalie Spinu <spinuvit <at> gmail.com>
Subject: Re: bug#18683: Patch for wish-list item: 560
Date: Sat, 11 Oct 2014 10:52:08 +0100
Glenn Morris <rgm <at> gnu.org> writes:

> Matthew Leach wrote:
>
>> Attached is a simple patch that adds {+-}90 degree rotation to image
>> mode as requested in [1].
>
> Thanks. It would have better to send this to the existing report, rather
> than creating a new one, but no worries.

Oops, sorry.

>
>
> Anyway, see also unfinished (as far as I know?) patch to do this and
> more at:
>
> http://lists.gnu.org/archive/html/emacs-devel/2013-07/msg00610.html
> http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00264.html

Ah, I didn't know there were already candidate patches written,
apologies for that.

-- 
Matt




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18683; Package emacs. (Sat, 11 Oct 2014 11:55:01 GMT) Full text and rfc822 format available.

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

From: Vitalie Spinu <spinuvit <at> gmail.com>
To: Matthew Leach <matthew <at> mattleach.net>
Cc: Glenn Morris <rgm <at> gnu.org>, 18683 <at> debbugs.gnu.org
Subject: Re: bug#18683: Patch for wish-list item: 560
Date: Sat, 11 Oct 2014 04:54:30 -0700
The work is here https://github.com/vitoshka/image-transform/

It's an uniform and extensible interface to internal imagemagic and
convert backends. Virtually any type of transformation could be done
from inside of emacs and multiple transformation can be stacked.

The reason I got stuck back then is that I wanted to implement
interactive cropping with the mouse. I have looked into that but
couldn't figure a good way to do so. In hindsight, I should have
finished that I had and pushed to emacs and only then think about the
rest.

Within a week or two I will have loads of free time again so I will be
finishing it for sure this time.


  Vitalie


 >>> Matthew Leach on Sat, 11 Oct 2014 10:52:08 +0100 wrote:

 > Glenn Morris <rgm <at> gnu.org> writes:
 >> Matthew Leach wrote:
 >> 
 >>> Attached is a simple patch that adds {+-}90 degree rotation to image
 >>> mode as requested in [1].
 >> 
 >> Thanks. It would have better to send this to the existing report, rather
 >> than creating a new one, but no worries.

 > Oops, sorry.

 >> 
 >> 
 >> Anyway, see also unfinished (as far as I know?) patch to do this and
 >> more at:
 >> 
 >> http://lists.gnu.org/archive/html/emacs-devel/2013-07/msg00610.html> http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00264.html

 > Ah, I didn't know there were already candidate patches written,
 > apologies for that.




bug closed, send any further explanations to 560 <at> debbugs.gnu.org and jidanni <at> jidanni.org Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 13 Apr 2018 22:37:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 12 May 2018 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 7 years and 34 days ago.

Previous Next


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