Received: (at 66114) by debbugs.gnu.org; 20 Sep 2023 07:25:23 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 20 03:25:23 2023 Received: from localhost ([127.0.0.1]:58212 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qiraM-0002uo-OC for submit <at> debbugs.gnu.org; Wed, 20 Sep 2023 03:25:23 -0400 Received: from out-227.mta0.migadu.com ([91.218.175.227]:10429) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <joseph@HIDDEN>) id 1qiraJ-0002ub-DM for 66114 <at> debbugs.gnu.org; Wed, 20 Sep 2023 03:25:21 -0400 References: <87h6npfhoa.fsf@HIDDEN> <handler.66114.B.16951935749180.ack <at> debbugs.gnu.org> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=breatheoutbreathe.in; s=key1; t=1695194708; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=5rx6nZilqlJlQAjzNqxmJHqYnZFHSBvVTrJ6VZFPxCk=; b=g+CdTjTSbzVyQ/dMuHqwjlAj0lBQ3VVGmOy+MaIj5WyN0qDVdNAEyjwHaQaujDvCmKIZA3 dO0P8sD7DJopbg5puh/JPHyrj/wfCRRzTIFovqb/GeRC4EHnqc8oumSaj0H18PYo5E1fBK 8LvhziHpdZmEw2VzlDM6GIjQef0cpn4= X-Report-Abuse: Please report any abuse attempt to abuse@HIDDEN and include these headers. From: Joseph Turner <joseph@HIDDEN> To: 66114 <at> debbugs.gnu.org Subject: Re: bug#66114: Acknowledgement ([PATCH] Fix interactive prompt for selecting checkout directory) Date: Wed, 20 Sep 2023 00:24:04 -0700 In-reply-to: <handler.66114.B.16951935749180.ack <at> debbugs.gnu.org> Message-ID: <875y45fgrz.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Migadu-Flow: FLOW_OUT X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 66114 X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain In this updated patch, I didn't not remove a double negative. --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Fix-interactive-prompt-for-selecting-checkout-direct.patch From cc5d53e59928747b324eef312a4c83266a3bb8c3 Mon Sep 17 00:00:00 2001 From: Joseph Turner <joseph@HIDDEN> Date: Tue, 19 Sep 2023 23:58:43 -0700 Subject: [PATCH] Fix interactive prompt for selecting checkout directory * lisp/emacs-lisp/package-vc.el (package-vc-checkout): Use read-directory-name instead of read-file-name with predicate. Previously, it was impossible to interactively navigate to a nested subdirectory. --- lisp/emacs-lisp/package-vc.el | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/lisp/emacs-lisp/package-vc.el b/lisp/emacs-lisp/package-vc.el index c7a30736e32..9caa1931af8 100644 --- a/lisp/emacs-lisp/package-vc.el +++ b/lisp/emacs-lisp/package-vc.el @@ -823,12 +823,17 @@ repository. If REV has the special value `:last-release' (interactively, the prefix argument), that stands for the last released version of the package." (interactive - (let* ((name (package-vc--read-package-name "Fetch package source: "))) - (list (cadr (assoc name package-archive-contents #'string=)) - (read-file-name "Clone into new or empty directory: " nil nil t nil - (lambda (dir) (or (not (file-exists-p dir)) - (directory-empty-p dir)))) - (and current-prefix-arg :last-release)))) + (let* ((name (package-vc--read-package-name "Fetch package source: ")) + (desc (cadr (assoc name package-archive-contents #'string=))) + (dir (read-directory-name "Clone into new or empty directory: "))) + (when (or (file-exists-p dir) + (not (directory-empty-p dir))) + (let ((subdir (expand-file-name (package-desc-full-name desc) dir))) + (if (and (not (file-exists-p subdir)) + (y-or-n-p (format "Create new directory %s ?" subdir))) + (setf dir subdir) + (user-error "Directory not empty: %S" (expand-file-name dir))))) + (list desc dir (and current-prefix-arg :last-release)))) (package-vc--archives-initialize) (let ((pkg-spec (or (package-vc--desc->spec pkg-desc) (and-let* ((extras (package-desc-extras pkg-desc)) -- 2.41.0 --=-=-=--
bug-gnu-emacs@HIDDEN
:bug#66114
; Package emacs
.
Full text available.Received: (at submit) by debbugs.gnu.org; 20 Sep 2023 07:06:14 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 20 03:06:14 2023 Received: from localhost ([127.0.0.1]:58159 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qirHp-0002Ny-NF for submit <at> debbugs.gnu.org; Wed, 20 Sep 2023 03:06:14 -0400 Received: from lists.gnu.org ([2001:470:142::17]:56958) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <joseph@HIDDEN>) id 1qirHm-0002Nf-Bg for submit <at> debbugs.gnu.org; Wed, 20 Sep 2023 03:06:12 -0400 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 <joseph@HIDDEN>) id 1qirHW-0002KB-7o for bug-gnu-emacs@HIDDEN; Wed, 20 Sep 2023 03:05:54 -0400 Received: from out-226.mta1.migadu.com ([95.215.58.226]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <joseph@HIDDEN>) id 1qirHS-0007C6-6p for bug-gnu-emacs@HIDDEN; Wed, 20 Sep 2023 03:05:53 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@HIDDEN and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=breatheoutbreathe.in; s=key1; t=1695193547; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=fuggQz6FwHsVQY2dCqI6L/P9u7BMurlFmD1zQRDEya8=; b=YzIScB77S5JN3rqVd4dReAxhKziBvLznviUw7C36S8JFLktvT0WrxydnRxlw4Y8WtWOCMb 01cfXXbVD/+mfCjxlGTBm8DGvLmgPMsUGDK6D+Jz7QwtyxaQQmRMq+3Hq3QuA58Ogpu/sM 0zDSbJ7puQk74cUnMOgsT74sOmikcxk= From: Joseph Turner <joseph@HIDDEN> To: bug-gnu-emacs@HIDDEN Subject: [PATCH] Fix interactive prompt for selecting checkout directory Date: Wed, 20 Sep 2023 00:02:43 -0700 X-Debbugs-CC: Philip Kaludercic <philipk@HIDDEN> Message-ID: <87h6npfhoa.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=95.215.58.226; envelope-from=joseph@HIDDEN; helo=out-226.mta1.migadu.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.9 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.1 (/) --=-=-= Content-Type: text/plain Tags: patch This patch fixes the interactive prompt in package-vc-checkout. See commit message for details. --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-Fix-interactive-prompt-for-selecting-checkout-direct.patch From 70061d76542968575555f247d4715d18ed3c4e75 Mon Sep 17 00:00:00 2001 From: Joseph Turner <joseph@HIDDEN> Date: Tue, 19 Sep 2023 23:58:43 -0700 Subject: [PATCH] Fix interactive prompt for selecting checkout directory * lisp/emacs-lisp/package-vc.el (package-vc-checkout): Use read-directory-name instead of read-file-name with predicate. Previously, it was impossible to interactively navigate to a nested subdirectory. --- lisp/emacs-lisp/package-vc.el | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/lisp/emacs-lisp/package-vc.el b/lisp/emacs-lisp/package-vc.el index c7a30736e32..29b540d86b8 100644 --- a/lisp/emacs-lisp/package-vc.el +++ b/lisp/emacs-lisp/package-vc.el @@ -823,12 +823,17 @@ repository. If REV has the special value `:last-release' (interactively, the prefix argument), that stands for the last released version of the package." (interactive - (let* ((name (package-vc--read-package-name "Fetch package source: "))) - (list (cadr (assoc name package-archive-contents #'string=)) - (read-file-name "Clone into new or empty directory: " nil nil t nil - (lambda (dir) (or (not (file-exists-p dir)) - (directory-empty-p dir)))) - (and current-prefix-arg :last-release)))) + (let* ((name (package-vc--read-package-name "Fetch package source: ")) + (desc (cadr (assoc name package-archive-contents #'string=))) + (dir (read-directory-name "Clone into new or empty directory: "))) + (unless (or (not (file-exists-p dir)) + (directory-empty-p dir)) + (let ((subdir (expand-file-name (package-desc-full-name desc) dir))) + (if (and (not (file-exists-p subdir)) + (y-or-n-p (format "Create new directory %s ?" subdir))) + (setf dir subdir) + (user-error "Directory not empty: %S" (expand-file-name dir))))) + (list desc dir (and current-prefix-arg :last-release)))) (package-vc--archives-initialize) (let ((pkg-spec (or (package-vc--desc->spec pkg-desc) (and-let* ((extras (package-desc-extras pkg-desc)) -- 2.41.0 --=-=-=--
Joseph Turner <joseph@HIDDEN>
:philipk@HIDDEN, bug-gnu-emacs@HIDDEN
.
Full text available.philipk@HIDDEN, bug-gnu-emacs@HIDDEN
:bug#66114
; Package emacs
.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.