From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Sacha Chua Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] image-dired-show-all-from-dir: reuse dired's default directory Date: Thu, 02 Jan 2025 17:17:13 -0500 Message-ID: <87v7uw97yu.fsf@sachachua.com> References: <87cyh5ugte.fsf@sachachua.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2756"; mail-complaints-to="usenet@ciao.gmane.io" To: Stefan Kangas , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Jan 02 23:18:35 2025 Return-path: Envelope-to: ged-emacs-devel@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 1tTTWT-0000WV-Ta for ged-emacs-devel@m.gmane-mx.org; Thu, 02 Jan 2025 23:18:33 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tTTVM-0001kK-Sv; Thu, 02 Jan 2025 17:17:24 -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 1tTTVL-0001k5-8W for emacs-devel@gnu.org; Thu, 02 Jan 2025 17:17:23 -0500 Original-Received: from mail-il1-x12a.google.com ([2607:f8b0:4864:20::12a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tTTVI-0000Lj-OX for emacs-devel@gnu.org; Thu, 02 Jan 2025 17:17:22 -0500 Original-Received: by mail-il1-x12a.google.com with SMTP id e9e14a558f8ab-3a8ed4c8647so89682235ab.1 for ; Thu, 02 Jan 2025 14:17:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sachachua-com.20230601.gappssmtp.com; s=20230601; t=1735856238; x=1736461038; darn=gnu.org; h=mime-version:message-id:date:references:in-reply-to:subject:to:from :from:to:cc:subject:date:message-id:reply-to; bh=0MJmkUr6kze6CKqXr6wYCrbyo/p49UCVLg62w241saI=; b=jbdNnEgD4hGenGjLk4qu8846cln6vRu73+yvzEKB1rYftG/Q0ovoydCW1jr/HUrxET gCBTqJaCEhXswZE7V50Im7TvhgLHgJuBDbgRAt1vWDTQE9KXAhZKIzOIE9CxfQg6FudV 28YY6PAbC51i1YnrKr9TVU2iPvBtbLxA+rGRdDugDAgx4Ffry1EZqTkbYqgTt8/mC+jL Zcfjhn5DHZEm+TogzbeYUbZKKqTHCnkJwDzhIfKnl/tdhqzGofaa7wKuGoVHAotYe8Jz AwPXyfBEVKWweELFb8imMEc3geW4dSEsELwKCxVGGpiQufASKHn60a1wb9NzYjltzWeN 0CvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735856238; x=1736461038; h=mime-version:message-id:date:references:in-reply-to:subject:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=0MJmkUr6kze6CKqXr6wYCrbyo/p49UCVLg62w241saI=; b=sS+NwzT7RsuUVHBl0RgzH2keNx7w8W0Qxewqz1y5kDnZ2xwcNsU1ypSnv/I3PCT6vd KBRMSIW91DUIruRwXTfj+5MIOrUHPRCR5aYOKskFktZ+REAvQ7Saw3dBaNX1RcfUfrrX drRqWTx/s/9UqVHk1lQs1+XWh/S6i+2gXJ1kKLZgJBTAJiDBvnhCMrmwxoCx4HO1qTfw zDtqs2ygHk4INjqGdXgHofBiOZFZhbGEQqm23KJ98AxR212VxAnr8I5jBfBVZCTZWzhR Vz0Hm46KXQ26bP7wt9wX4wqJWgNJZUkk0qVW/M7auyET9SoKAxm+9TsALcfbN8TfYJhx hmPw== X-Forwarded-Encrypted: i=1; AJvYcCVSoV4Wl0o40ldklJOx8OZOS37QUsaw8dQTVCXA5WXiM/rZzQ7PO3Fk1t1IRN/jXh55IUKvZ67Cql6A1A==@gnu.org X-Gm-Message-State: AOJu0YytuJ3Ciud/Zh2DeOgPGP6RGGpmb7TggH0TRNsw9o/N+fjS20QA w6aow1IILfIo2EFZOScVyVndIFZJ+OWupLQPYCEBcSlrwyCe0DNIEann3OpdWuskVpTcs7K+nFx 3zqg= X-Gm-Gg: ASbGncvXz7oKPQiJ/buNHLq6UMimuqqbSrp8FpFDvt5YD/1yJ2f9bYTVzKGwd7U2RAd LWQ40nYWjMJ90qPSBZLGTIzKIOD3TF4/tOcBQ1PTFkAle9mt4O9SmzUkewi4KvX8YfD97ncjP9M 3fd8J7Tk4B7GRkeL1SVga2SSXK7V2IU3OETQuYZhhgbWlwnhzo6pHV+wx7d8mXkaDFS4W5YBIWX CcByOhR+22jZDZydk7HuNNO3bAoFWhsMZooplV6BU1D3t+LaEmkazSKa9Qd7r0FO/DZC7Gespyr 9CQZTeXRWeA+tsCGKbR032kgiPRmYCoNaC66hQ== X-Google-Smtp-Source: AGHT+IFCE0BamRxaeRvHreigzExIsTnI0X4A4dE89C1HlWTfkVf3Q6WqR4MSCmwzdc0QcyKXVm5hqA== X-Received: by 2002:a05:6e02:148d:b0:3a7:d7dd:e70f with SMTP id e9e14a558f8ab-3c2d2d5112bmr370416975ab.12.1735856237073; Thu, 02 Jan 2025 14:17:17 -0800 (PST) Original-Received: from sacha-p52 (bras-base-toroon0822w-grc-35-76-71-82-209.dsl.bell.ca. [76.71.82.209]) by smtp.googlemail.com with ESMTPSA id 8926c6da1cb9f-4e68c199b80sm7257336173.84.2025.01.02.14.17.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Jan 2025 14:17:16 -0800 (PST) In-Reply-To: Received-SPF: none client-ip=2607:f8b0:4864:20::12a; envelope-from=sacha@sachachua.com; helo=mail-il1-x12a.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:327602 Archived-At: Stefan Kangas writes: Hello, Stefan! > Thanks for the patch, and interesting use case. > I can't find the variable `dired-default-directory`, but I do see that a > function of that name was removed in Emacs 27. Where did you find that > variable, and which version of Emacs are you running? Could it be that > this variable is from a third-party package? Oh! That's a coincidence, I hadn't known that was used before. We can call it temp-default-directory or something else if you prefer. I called it dired-default-directory because I just needed to temporarily store the default-directory from the dired buffer so that we could copy it to the image-dired-thumbnail-buffer, which is why it's a let-bound variable. >> - (let ((files (dired-get-marked-files nil nil nil t))) >> + (let ((files (dired-get-marked-files nil nil nil t)) >> + (dired-default-directory default-directory)) I'm on GNU Emacs 31.0.50 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.41, cairo version 1.18.0) of 2025-01-02. Sacha