unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* 25.1.50; image-increase-size: Non-interactive call fails if N is an integer
@ 2016-09-02  4:41 Tino Calancha
  2016-09-02  4:46 ` Tino Calancha
  2016-09-02 12:57 ` Lars Ingebrigtsen
  0 siblings, 2 replies; 5+ messages in thread
From: Tino Calancha @ 2016-09-02  4:41 UTC (permalink / raw)
  To: Emacs developers


emacs -Q:
;; Visit an image file, FILE, and
;; increase its size 80%.
(progn
   (find-file FILE)
   (image-increase-size 8))
;; The picture doesn't change.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
From d749004f7825a8571a6a46fdff1b908d1d3f3a1f Mon Sep 17 00:00:00 2001
From: Tino Calancha <tino.calancha@gmail.com>
Date: Fri, 2 Sep 2016 13:32:51 +0900
Subject: [PATCH] image-increase-size: Fix non-interactive calls

* lisp/image.el (image-increase-size, image-decrease-size):
Compute a float point number division (Bug#24352).
---
  lisp/image.el | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/image.el b/lisp/image.el
index 272cee5..791a902 100644
--- a/lisp/image.el
+++ b/lisp/image.el
@@ -957,7 +957,7 @@ image-increase-size
  default is 20%."
    (interactive "P")
    (image--change-size (if n
-                          (1+ (/ n 10))
+                          (1+ (/ n 10.0))
                          1.2)))

  (defun image-decrease-size (n)
@@ -966,7 +966,7 @@ image-decrease-size
  default is 20%."
    (interactive "P")
    (image--change-size (if n
-                          (- 1 (/ n 10))
+                          (- 1 (/ n 10.0))
                          0.8)))

  (defun image--get-image ()
-- 
2.9.3


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
In GNU Emacs 25.1.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.20.9)
  of 2016-09-02
Repository revision: dda2d6a311fd2a7096176e240e4e81b423eaa8e2




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

* Re: 25.1.50; image-increase-size: Non-interactive call fails if N is an integer
  2016-09-02  4:41 25.1.50; image-increase-size: Non-interactive call fails if N is an integer Tino Calancha
@ 2016-09-02  4:46 ` Tino Calancha
  2016-09-02 12:57 ` Lars Ingebrigtsen
  1 sibling, 0 replies; 5+ messages in thread
From: Tino Calancha @ 2016-09-02  4:46 UTC (permalink / raw)
  To: Emacs developers; +Cc: tino.calancha



On Fri, 2 Sep 2016, Tino Calancha wrote:

> Compute a float point number division (Bug#24352).
I sent the previous e-mail to this list instead of the bug tracker:
please ignore the fake bug number 24352.



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

* Re: 25.1.50; image-increase-size: Non-interactive call fails if N is an integer
  2016-09-02  4:41 25.1.50; image-increase-size: Non-interactive call fails if N is an integer Tino Calancha
  2016-09-02  4:46 ` Tino Calancha
@ 2016-09-02 12:57 ` Lars Ingebrigtsen
  2016-09-02 13:58   ` Tino Calancha
  2016-09-04  2:03   ` Tino Calancha
  1 sibling, 2 replies; 5+ messages in thread
From: Lars Ingebrigtsen @ 2016-09-02 12:57 UTC (permalink / raw)
  To: Tino Calancha; +Cc: Emacs developers

> emacs -Q:
> ;; Visit an image file, FILE, and
> -                          (1+ (/ n 10))
> +                          (1+ (/ n 10.0))

Looks good to me.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



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

* Re: 25.1.50; image-increase-size: Non-interactive call fails if N is an integer
  2016-09-02 12:57 ` Lars Ingebrigtsen
@ 2016-09-02 13:58   ` Tino Calancha
  2016-09-04  2:03   ` Tino Calancha
  1 sibling, 0 replies; 5+ messages in thread
From: Tino Calancha @ 2016-09-02 13:58 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: Emacs developers, Tino Calancha



On Fri, 2 Sep 2016, Lars Ingebrigtsen wrote:

>> emacs -Q:
>> ;; Visit an image file, FILE, and
>> -                          (1+ (/ n 10))
>> +                          (1+ (/ n 10.0))
>
> Looks good to me.
Thank you very much.  I will apply the patch at some point during this 
weekend.



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

* Re: 25.1.50; image-increase-size: Non-interactive call fails if N is an integer
  2016-09-02 12:57 ` Lars Ingebrigtsen
  2016-09-02 13:58   ` Tino Calancha
@ 2016-09-04  2:03   ` Tino Calancha
  1 sibling, 0 replies; 5+ messages in thread
From: Tino Calancha @ 2016-09-04  2:03 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: Emacs developers, Tino Calancha



On Fri, 2 Sep 2016, Lars Ingebrigtsen wrote:

>> emacs -Q:
>> ;; Visit an image file, FILE, and
>> -                          (1+ (/ n 10))
>> +                          (1+ (/ n 10.0))
>
> Looks good to me.
Pushed to master as 7c16c89c "image-increase-size: Fix non-interactive calls"



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

end of thread, other threads:[~2016-09-04  2:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-02  4:41 25.1.50; image-increase-size: Non-interactive call fails if N is an integer Tino Calancha
2016-09-02  4:46 ` Tino Calancha
2016-09-02 12:57 ` Lars Ingebrigtsen
2016-09-02 13:58   ` Tino Calancha
2016-09-04  2:03   ` Tino Calancha

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).