From: Manuel Giraud via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 61734@debbugs.gnu.org
Subject: bug#61734: 30.0.50; [PATCH] Defaults to zero for image-dired--number-of-thumbnails
Date: Mon, 27 Feb 2023 17:20:10 +0100 [thread overview]
Message-ID: <87y1oj9j2d.fsf@ledu-giraud.fr> (raw)
In-Reply-To: <83zg8zgqfi.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 27 Feb 2023 15:59:13 +0200")
[-- Attachment #1: Type: text/plain, Size: 164 bytes --]
Eli Zaretskii <eliz@gnu.org> writes:
[...]
> I only ever keep the last version, and it's certainly not for
> emacs-29.
Ok, sorry. So here is the first version.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Defaults-to-zero-for-image-dired-number-of-thumbnail.patch --]
[-- Type: text/x-patch, Size: 920 bytes --]
>From c88f74aaa381580c183a8692bc467bfef7cd192b Mon Sep 17 00:00:00 2001
From: Manuel Giraud <manuel@ledu-giraud.fr>
Date: Thu, 23 Feb 2023 16:42:48 +0100
Subject: [PATCH] Defaults to zero for image-dired--number-of-thumbnails
* lisp/image/image-dired.el (image-dired--number-of-thumbnails):
Defaults to zero to avoid wrong type error down the line.
---
lisp/image/image-dired.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lisp/image/image-dired.el b/lisp/image/image-dired.el
index 8e2a75a418f..6ecb307ce12 100644
--- a/lisp/image/image-dired.el
+++ b/lisp/image/image-dired.el
@@ -546,7 +546,7 @@ image-dired--line-up-with-method
(t
(image-dired-line-up-dynamic))))
-(defvar-local image-dired--number-of-thumbnails nil)
+(defvar-local image-dired--number-of-thumbnails 0)
;;;###autoload
(defun image-dired-display-thumbs (&optional arg append do-not-pop)
--
2.39.1
[-- Attachment #3: Type: text/plain, Size: 451 bytes --]
> What do you want to install on emacs-29, and what problem(s) is that
> supposed to fix?
This fixes a "wrong type error" when comparing
image-dired--number-of-thumbnails to zero. Here is a recipe to make it
happen:
- Do not have an existing *image-dired* buffer
- Hit 'C-t a' (image-dired-display-thumbs-append) on an image file
from Dired
And you're right that the rest of the patch should not go into emacs-29.
--
Manuel Giraud
next prev parent reply other threads:[~2023-02-27 16:20 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-23 16:02 bug#61734: 30.0.50; [PATCH] Defaults to zero for image-dired--number-of-thumbnails Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-23 20:17 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-24 9:35 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-27 13:20 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-27 13:59 ` Eli Zaretskii
2023-02-27 16:20 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2023-02-28 13:26 ` Eli Zaretskii
2023-02-28 13:31 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-28 14:23 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y1oj9j2d.fsf@ledu-giraud.fr \
--to=bug-gnu-emacs@gnu.org \
--cc=61734@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=manuel@ledu-giraud.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).