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#61639: 30.0.50; [PATCH] Do not error out on non image file in image-dired Date: Mon, 20 Feb 2023 15:46:48 +0200 Message-ID: <83edqkv48n.fsf@gnu.org> References: <87sff1quwk.fsf@ledu-giraud.fr> <83sff0v6wz.fsf@gnu.org> <87ttzgtq6p.fsf@ledu-giraud.fr> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27452"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 61639@debbugs.gnu.org To: Manuel Giraud Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Feb 20 14:47:17 2023 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 1pU6Vf-0006rE-Uu for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 20 Feb 2023 14:47:16 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pU6VV-0003j1-Q5; Mon, 20 Feb 2023 08:47:05 -0500 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 1pU6VS-0003gl-UV for bug-gnu-emacs@gnu.org; Mon, 20 Feb 2023 08:47:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pU6VS-00050S-C8 for bug-gnu-emacs@gnu.org; Mon, 20 Feb 2023 08:47:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pU6VS-0003Dv-0i for bug-gnu-emacs@gnu.org; Mon, 20 Feb 2023 08:47:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 20 Feb 2023 13:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61639 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 61639-submit@debbugs.gnu.org id=B61639.167690081112372 (code B ref 61639); Mon, 20 Feb 2023 13:47:01 +0000 Original-Received: (at 61639) by debbugs.gnu.org; 20 Feb 2023 13:46:51 +0000 Original-Received: from localhost ([127.0.0.1]:51026 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pU6VG-0003DU-UA for submit@debbugs.gnu.org; Mon, 20 Feb 2023 08:46:51 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:34780) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pU6VD-0003DF-80 for 61639@debbugs.gnu.org; Mon, 20 Feb 2023 08:46:49 -0500 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 1pU6V7-0004tA-6a; Mon, 20 Feb 2023 08:46:41 -0500 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=AIWblfdOMme21V9ShYeMfTrGhbAyTN3IDjdfTnQ0/5A=; b=GhYFLDF65S1K QprbtlABawHaU6Jt4NjPAEylcNbxLyNn1VhESjvvSsi1QmQS1M2fKtXctGsOAG2Fk2dSIB9+rACV8 gLzzGtY5bzesnsWGbILYcO5l1kX482xU12KuUUKoKstLuPUU9R/O8mUpVakpM73AQMBMnW6M53AKQ utf65kI0bbqZqdQG+shWaXknjjhA5IBIjAT3VwcJOp+NCUZ0B8Gq8Ahk6Lus/UN81OpbCPRbg3i0P 1rD9WAYqFeCt99aomG8L6/ggrgK8IoU6eXD9Zfq/Fdp14fFKmG0HnbyavGkr8p58RdHK9l/jsvcv8 ZiUPAq927qhbT6O1QG6Xfg==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pU6V6-0004Vf-EI; Mon, 20 Feb 2023 08:46:40 -0500 In-Reply-To: <87ttzgtq6p.fsf@ledu-giraud.fr> (message from Manuel Giraud on Mon, 20 Feb 2023 14:35:42 +0100) 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:256171 Archived-At: > From: Manuel Giraud > Cc: 61639@debbugs.gnu.org > Date: Mon, 20 Feb 2023 14:35:42 +0100 > > Eli Zaretskii writes: > > >> Date: Sun, 19 Feb 2023 21:09:47 +0100 > >> From: Manuel Giraud via "Bug reports for GNU Emacs, > >> the Swiss army knife of text editors" > >> > >> This patch prevent errors when using image-dired on non image files. > > > > Why is it better to show a message than to signal an error? The > > former could go unnoticed, especially if some other message is shown > > in the echo-area soon enough. > > I don't think it is better. But for some image-dired usage, I do not > find it convenient. Example: you carefully select some images from a > dired buffer and hit `C-t d' to see them in image-dired. But your > selection was not correct and one of those file is not an image: you > receive an error (and have to correct your selection) and don't get to > see any of the correctly selected images. So maybe "C-t d" should filter the selected "images" before it calls the function which errors out? IOW, if the application doesn't want an API to fail for reasons specific to the application, the onus of avoiding the error is on the application, no?