GNU bug report logs - #56375
28.1.50; Calling "convert" from thumbs.el is broken

Previous Next

Package: emacs;

Reported by: Benjamin Riefenstahl <b.riefenstahl <at> turtle-trading.net>

Date: Sun, 3 Jul 2022 23:50:02 UTC

Severity: normal

Found in version 28.1.50

Fixed in version 29.1

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 56375 in the body.
You can then email your comments to 56375 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#56375; Package emacs. (Sun, 03 Jul 2022 23:50:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Benjamin Riefenstahl <b.riefenstahl <at> turtle-trading.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 03 Jul 2022 23:50:02 GMT) Full text and rfc822 format available.

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

From: Benjamin Riefenstahl <b.riefenstahl <at> turtle-trading.net>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.1.50; Calling "convert" from thumbs.el is broken
Date: Mon, 04 Jul 2022 01:48:56 +0200
* dired to a directory with images that are larger than 100x100 pixels

* M-x thumbs-dired-show

* I get a buffer with the first few images in the directory in their
  original size

* I expect the images to be scaled to thumbs smaller than 100x100,
  see thumbs-geometry

Tracing the code I stumble onto thumbs-call-convert.  Some time in the
past this was converted from using the shell to passing the parameters
directly, but the fallout was not handled correctly.

I will post a patch as a follow-up.

----

In GNU Emacs 28.1.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.24, cairo version 1.16.0)
 of 2022-05-12 built on zenobia
Repository revision: f03c5d81bd4a7af1364558b406e2b87a78b3af73
Repository branch: emacs-28
System Description: Debian GNU/Linux 11 (bullseye)

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY
INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS
X11 XDBE XIM XPM GTK3 ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Group

Minor modes in effect:
  gnus-topic-mode: t
  gnus-undo-mode: t
  desktop-save-mode: t
  display-time-mode: t
  xclip-mode: t
  xterm-mouse-mode: t
  delete-selection-mode: t
  cua-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
~/Projects/ttf-mode/arc-mode-compat hides ~/emacs/arc-mode-compat
/home/benny/.emacs.d/elpa/transient-20210920.1038/transient hides /usr/local/share/emacs/28.1.50/lisp/transient
/home/benny/site-lisp/dictionary-1.10/dictionary hides /usr/local/share/emacs/28.1.50/lisp/net/dictionary

Features:
(shadow bbdb-message emacsbug dired-aux gnus-html help-fns bookmark
gnus-kill nnselect gnus-search eieio-opt speedbar ezimage dframe
find-func nndoc flow-fill misearch multi-isearch smerge-mode diff
compile descr-text cus-start termshape shr-color color format-spec
benny-nitter eww xdg url-queue thingatpt benny-url sort gnus-cite
mail-extr gnus-bcklg gnus-async gnus-dup gnus-ml pp gnus-topic jka-compr
url-http url-gw mm-archive url-file url-dired url-cache url-auth qp
gnutls nndraft nnmh nnfolder bbdb-gnus bbdb-mua network-stream nsm
gnus-agent gnus-srvr gnus-score score-mode nnvirtual gnus-msg nntp
gnus-cache pop3 nnrss gnus-art mm-uu mml2015 mm-view mml-smime smime dig
gnus-sum shr kinsoku svg dom gnus-group gnus-undo mm-url bbdb-com crm
message-x bbdb bbdb-site timezone gnus-start gnus-dbus dbus xml
gnus-cloud nnimap nnmail mail-source utf7 netrc nnoo parse-time iso8601
gnus-spec gnus-int gnus-range message rmc puny rfc822 mml mml-sec epa
epg rfc6068 epg-config mm-decode mm-bodies mm-encode mailabbrev
gmm-utils mailheader gnus-win gnus nnheader gnus-util rmail
rmail-loaddefs text-property-search wid-edit mule-util imenu time-date
desktop frameset highline benny-calendar-cfg ange-ftp comint ansi-color
ring generic-x autoinsert cc-mode cc-fonts cc-guess cc-menus cc-styles
cc-align cc-cmds cc-engine cc-vars cc-defs ps-print ps-print-loaddefs
ps-def lpr advice cl-extra help-mode dired dired-loaddefs
benny-x-clipboard disp-table time server protbuf xclip term/xterm xterm
xt-mouse cal-china lunar solar cal-dst cal-bahai cal-islam cal-hebrew
holidays hol-loaddefs vc-git diff-mode easy-mmode vc-dispatcher
vc-fossil diary-lib diary-loaddefs cal-menu calendar cal-loaddefs delsel
cua-base cus-load benny-file-cache filecache derived sendmail mail-utils
benny-tools autoload radix-tree lisp-mnt mail-parse rfc2231 rfc2047
rfc2045 mm-util ietf-drums mail-prsvr finder-inf edmacro kmacro info
package browse-url url url-proxy url-privacy url-expand url-methods
url-history url-cookie url-domsuf url-util mailcap url-handlers
url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs
password-cache json subr-x map url-vars seq byte-opt gv bytecomp
byte-compile cconv cl-loaddefs cl-lib iso-transl tooltip eldoc paren
electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel
term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu
timer select scroll-bar mouse jit-lock font-lock syntax font-core
term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese composite emoji-zwj charscript charprop case-table
epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice
button loaddefs faces cus-face macroexp files window text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote threads dbusbind inotify lcms2
dynamic-setting system-font-setting font-render-setting cairo
move-toolbar gtk x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 361711 129281)
 (symbols 48 39764 19)
 (strings 32 212367 23946)
 (string-bytes 1 6513504)
 (vectors 16 52664)
 (vector-slots 8 1676247 215016)
 (floats 8 1030 1251)
 (intervals 56 1742 1237)
 (buffers 992 29))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#56375; Package emacs. (Mon, 04 Jul 2022 00:05:02 GMT) Full text and rfc822 format available.

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

From: Benjamin Riefenstahl <b.riefenstahl <at> turtle-trading.net>
To: 56375 <at> debbugs.gnu.org
Subject: Re: bug#56375: 28.1.50; Calling "convert" from thumbs.el is broken
Date: Mon, 04 Jul 2022 02:04:44 +0200
[0001-lisp-thumbs.el-Fix-calling-the-convert-command.patch (text/x-diff, inline)]
From 7418e68266b9d593219c6a84be5d519844855f3a Mon Sep 17 00:00:00 2001
From: Benjamin Riefenstahl <b.riefenstahl <at> turtle-trading.net>
Date: Sun, 3 Jul 2022 15:52:13 -0700
Subject: [PATCH] lisp/thumbs.el: Fix calling the "convert" command

* lisp/thumbs.el (thumbs-call-convert): Pass 'action-prefix' and
'action' as a combined parameter.  Do not pass 'arg' if it is nil.
(thumbs-modify-image): Do not pass "" as 'arg' to
'thumbs-call-convert'.

(Bug#56375)
---
 lisp/thumbs.el | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/lisp/thumbs.el b/lisp/thumbs.el
index 3bf08dd6a5..e622bcedc4 100644
--- a/lisp/thumbs.el
+++ b/lisp/thumbs.el
@@ -215,16 +215,17 @@ thumbs-call-convert
 FILEOUT is the output file,
 ACTION is the command to send to convert.
 Optional arguments are:
-ARG any arguments to the ACTION command,
+ARG if non-nil, the argument of the ACTION command,
 OUTPUT-FORMAT is the file format to output (default is jpeg),
 ACTION-PREFIX is the symbol to place before the ACTION command
               (defaults to `-' but can sometimes be `+')."
-  (call-process thumbs-conversion-program nil nil nil
-		(or action-prefix "-")
-		action
-		(or arg "")
-		filein
-		(format "%s:%s"	(or output-format "jpeg") fileout)))
+  (let ((action-param (concat (or action-prefix "-") action))
+	(fileout-param (format "%s:%s" (or output-format "jpeg") fileout)))
+    (if arg
+	(call-process thumbs-conversion-program nil nil nil
+		      action-param arg filein fileout-param)
+      (call-process thumbs-conversion-program nil nil nil
+		    action-param filein fileout-param))))
 
 (defun thumbs-new-image-size (s increment)
   "New image (a cons of width x height)."
@@ -610,7 +611,7 @@ thumbs-modify-image
     (thumbs-call-convert (or old thumbs-current-image-filename)
 			 tmp
 			 action
-			 (or arg ""))
+			 arg)
     (save-excursion
       (thumbs-insert-image tmp 'jpeg 0))
     (setq thumbs-current-tmp-filename tmp)))
-- 
2.30.2





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#56375; Package emacs. (Mon, 04 Jul 2022 10:58:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Benjamin Riefenstahl <b.riefenstahl <at> turtle-trading.net>
Cc: 56375 <at> debbugs.gnu.org
Subject: Re: bug#56375: 28.1.50; Calling "convert" from thumbs.el is broken
Date: Mon, 04 Jul 2022 12:57:47 +0200
Benjamin Riefenstahl <b.riefenstahl <at> turtle-trading.net> writes:

> * lisp/thumbs.el (thumbs-call-convert): Pass 'action-prefix' and
> 'action' as a combined parameter.  Do not pass 'arg' if it is nil.
> (thumbs-modify-image): Do not pass "" as 'arg' to
> 'thumbs-call-convert'.

Thanks; pushed to Emacs 29.

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




bug marked as fixed in version 29.1, send any further explanations to 56375 <at> debbugs.gnu.org and Benjamin Riefenstahl <b.riefenstahl <at> turtle-trading.net> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 04 Jul 2022 10:59:01 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. (Mon, 01 Aug 2022 11:24:08 GMT) Full text and rfc822 format available.

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

Previous Next


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