From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#70821: 29.3; image-dired: tagging in thumbnail buffer Date: Tue, 07 May 2024 21:29:31 +0300 Message-ID: <86o79ha31w.fsf@gnu.org> References: <87ikzpimqd.fsf@librehacker.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15213"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 70821@debbugs.gnu.org To: Christopher Howard Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue May 07 20:31:01 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1s4Pae-0003hn-Q6 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 07 May 2024 20:31:01 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s4PaK-0001LY-R1; Tue, 07 May 2024 14:30:40 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s4PaH-0001L7-MS for bug-gnu-emacs@gnu.org; Tue, 07 May 2024 14:30:37 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s4PaH-0001bE-Bm for bug-gnu-emacs@gnu.org; Tue, 07 May 2024 14:30:37 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s4Paf-0007br-PQ for bug-gnu-emacs@gnu.org; Tue, 07 May 2024 14:31:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 07 May 2024 18:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70821 X-GNU-PR-Package: emacs Original-Received: via spool by 70821-submit@debbugs.gnu.org id=B70821.171510662029194 (code B ref 70821); Tue, 07 May 2024 18:31:01 +0000 Original-Received: (at 70821) by debbugs.gnu.org; 7 May 2024 18:30:20 +0000 Original-Received: from localhost ([127.0.0.1]:44023 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s4PZy-0007aj-VM for submit@debbugs.gnu.org; Tue, 07 May 2024 14:30:19 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56246) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s4PZo-0007ZI-Qh for 70821@debbugs.gnu.org; Tue, 07 May 2024 14:30:18 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s4PZH-0001GH-RK; Tue, 07 May 2024 14:29:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=JOKa8pHL0wycZ6ohXm60yGUJ579SiALuOn1ahzcTkXw=; b=GoVHQ53Bc7vR sFVe/G7govU8qaf+TRfPFw2OB3ffj93xU2d63UyvxtD5NBWh3nIYd6SVC6ynyhJUyUL2a4xEsufvX U2/lt3kEmgL9xs8ozoF1mCMCaZJ30riV2Eeq6z1L3jrECfr8YoI0MvKAYX6uN1BYQ4ZZl39biogzg GALRhwRmuTcb2ZgVAdj4HQJDFfLSw+wMdsdx8HJVv9sqeuETPxbV9FNf3NrHdO2YH2jXZiOesju4m mVn3U5YJ72V3vi2Jbs7qa/ACivz1MQgReKE2KMsh8ZZ9pqAOCu1Yo29U9D7P7rmsuSAaX3EydCBJQ p/5G+lyp/0hwoX6nkj+IUA==; In-Reply-To: <87ikzpimqd.fsf@librehacker.com> (message from Christopher Howard on Tue, 07 May 2024 08:57:14 -0800) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:284652 Archived-At: > From: Christopher Howard > Date: Tue, 07 May 2024 08:57:14 -0800 > > > I'm trying to follow instructions in the Emacs reference manual for tagging image thumbnails, but am getting errors. Here is an error I get if I try to tag them from within the thumbnail buffer. > > emacs -Q > M-! (setq debug-on-error t) > M-x image-dired ~/Pictures/tanana_20230713 > t t myphoto > > ``` > Debugger entered--Lisp error: (invalid-function image-dired--with-marked) > image-dired--with-marked(nil nil) > image-dired-tag-thumbnail() > funcall-interactively(image-dired-tag-thumbnail) > command-execute(image-dired-tag-thumbnail) > ``` Thanks. Does the patch below help to resolve the issue? diff --git a/lisp/image/image-dired-tags.el b/lisp/image/image-dired-tags.el index 2b5248c..54595ad 100644 --- a/lisp/image/image-dired-tags.el +++ b/lisp/image/image-dired-tags.el @@ -32,8 +32,6 @@ (require 'image-dired-util) -(declare-function image-dired--with-marked "image-dired") - (defvar image-dired-dir) (defvar image-dired-thumbnail-storage) (defvar image-dired-tags-db-file) @@ -156,18 +154,6 @@ image-dired-tag-files (cons x tag)) files)))) -(defun image-dired-tag-thumbnail () - "Tag current or marked thumbnails." - (interactive nil image-dired-thumbnail-mode) - (let ((tag (completing-read - "Tags to add (separate tags with a semicolon): " - image-dired-tag-history nil nil nil 'image-dired-tag-history))) - (image-dired--with-marked - (image-dired-write-tags - (list (cons (image-dired-original-file-name) tag))) - (image-dired-update-property - 'tags (image-dired-list-tags (image-dired-original-file-name)))))) - ;;;###autoload (defun image-dired-delete-tag (arg) "Remove tag for selected file(s). @@ -181,16 +167,6 @@ image-dired-delete-tag (setq files (dired-get-marked-files))) (image-dired-remove-tag files tag))) -(defun image-dired-tag-thumbnail-remove () - "Remove tag from current or marked thumbnails." - (interactive nil image-dired-thumbnail-mode) - (let ((tag (completing-read "Tag to remove: " image-dired-tag-history - nil nil nil 'image-dired-tag-history))) - (image-dired--with-marked - (image-dired-remove-tag (image-dired-original-file-name) tag) - (image-dired-update-property - 'tags (image-dired-list-tags (image-dired-original-file-name)))))) - (defun image-dired-write-comments (file-comments) "Write file comments specified by FILE-COMMENTS comments to database. FILE-COMMENTS is an alist on the following form: diff --git a/lisp/image/image-dired.el b/lisp/image/image-dired.el index 26d5811..00dc8e3 100644 --- a/lisp/image/image-dired.el +++ b/lisp/image/image-dired.el @@ -1714,6 +1714,28 @@ image-dired-add-to-tag-file-list (cons (list tag file) (cdr image-dired-tag-file-list)))) (setq image-dired-tag-file-list (list (list tag file)))))) +(defun image-dired-tag-thumbnail-remove () + "Remove tag from current or marked thumbnails." + (interactive nil image-dired-thumbnail-mode) + (let ((tag (completing-read "Tag to remove: " image-dired-tag-history + nil nil nil 'image-dired-tag-history))) + (image-dired--with-marked + (image-dired-remove-tag (image-dired-original-file-name) tag) + (image-dired-update-property + 'tags (image-dired-list-tags (image-dired-original-file-name)))))) + +(defun image-dired-tag-thumbnail () + "Tag current or marked thumbnails." + (interactive nil image-dired-thumbnail-mode) + (let ((tag (completing-read + "Tags to add (separate tags with a semicolon): " + image-dired-tag-history nil nil nil 'image-dired-tag-history))) + (image-dired--with-marked + (image-dired-write-tags + (list (cons (image-dired-original-file-name) tag))) + (image-dired-update-property + 'tags (image-dired-list-tags (image-dired-original-file-name)))))) + (defvar image-dired-slideshow-count 0 "Keeping track on number of images in slideshow.") (make-obsolete-variable 'image-dired-slideshow-count "no longer used." "29.1")