From unknown Fri Jun 20 07:21:50 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#41821 <41821@debbugs.gnu.org> To: bug#41821 <41821@debbugs.gnu.org> Subject: Status: 28.0.50; read-directory-name in vc commands should provide defaults from projects Reply-To: bug#41821 <41821@debbugs.gnu.org> Date: Fri, 20 Jun 2025 14:21:50 +0000 retitle 41821 28.0.50; read-directory-name in vc commands should provide de= faults from projects reassign 41821 emacs submitter 41821 Juri Linkov severity 41821 wishlist tag 41821 fixed thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 11 19:38:54 2020 Received: (at submit) by debbugs.gnu.org; 11 Jun 2020 23:38:54 +0000 Received: from localhost ([127.0.0.1]:38383 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jjWmc-0005oL-3n for submit@debbugs.gnu.org; Thu, 11 Jun 2020 19:38:54 -0400 Received: from lists.gnu.org ([209.51.188.17]:49560) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jjWmY-0005oB-Vo for submit@debbugs.gnu.org; Thu, 11 Jun 2020 19:38:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43996) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jjWmY-0002yA-OV for bug-gnu-emacs@gnu.org; Thu, 11 Jun 2020 19:38:50 -0400 Received: from relay9-d.mail.gandi.net ([217.70.183.199]:54577) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jjWmW-0001A9-Ui for bug-gnu-emacs@gnu.org; Thu, 11 Jun 2020 19:38:50 -0400 X-Originating-IP: 91.129.108.6 Received: from mail.gandi.net (m91-129-108-6.cust.tele2.ee [91.129.108.6]) (Authenticated sender: juri@linkov.net) by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id EC35CFF802 for ; Thu, 11 Jun 2020 23:38:43 +0000 (UTC) From: Juri Linkov To: bug-gnu-emacs@gnu.org Subject: 28.0.50; read-directory-name in vc commands should provide defaults from projects Organization: LINKOV.NET Date: Fri, 12 Jun 2020 02:03:19 +0300 Message-ID: <87r1ulxk48.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=217.70.183.199; envelope-from=juri@linkov.net; helo=relay9-d.mail.gandi.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/11 19:38:44 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-Spam-Score: -1.6 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.6 (--) Severity: wishlist For example, typing 'C-x v L' (vc-print-root-log) outside of a project displays the minibuffer with the prompt "Directory for VC revision log: ". It should provide a list of the default values from the project list saved in ~/.emacs.d/projects From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 12 09:43:58 2020 Received: (at 41821) by debbugs.gnu.org; 12 Jun 2020 13:43:58 +0000 Received: from localhost ([127.0.0.1]:39009 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jjjyQ-0003Nf-E1 for submit@debbugs.gnu.org; Fri, 12 Jun 2020 09:43:58 -0400 Received: from mail-wr1-f44.google.com ([209.85.221.44]:43317) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jjjyP-0003NT-1o for 41821@debbugs.gnu.org; Fri, 12 Jun 2020 09:43:57 -0400 Received: by mail-wr1-f44.google.com with SMTP id l10so9778431wrr.10 for <41821@debbugs.gnu.org>; Fri, 12 Jun 2020 06:43:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=XFInnYfJyIt6Nafm2CWWzTK4E5gE8pQu0nctNXqSeXE=; b=Q4njhrUSllk+7KiJscfJzp+MsQHlSvHO0/4NPSm1Z+9esMm+kb8xyGwtgRKW4a7sIV H+ZTBFhxd+CJ647Ya9PwGmSJZk5sPxG0Jx2pU4TfmWyb1QJn7ZyoTyLRWubbGinNttg8 yvn+47KIR44u0tDBZFAXnEeudENeCgCJFRAcI6pdQaqYPPjucmOLzUcr4kn5FCU0I448 vxcwawYYO2Ct6y47nWqAzteQjFSOP3SqKqsa6xUnmYe60FW0mmFSUKIgNTE7D+eP/JV9 iqQbn4HYjGRHY9+iLvebbREcp3KsWs3gUfsFjfeujQem/gjqGWZ7juT7PGs+7PMWLVPI ZoWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=XFInnYfJyIt6Nafm2CWWzTK4E5gE8pQu0nctNXqSeXE=; b=nJkMJ7RC7RcJomJkzfOQ4TlTTV4rSCeYHFeYauAOkAjLk0D5vg+1NmN2K6CQ7PCkMN KGnt5tLBZ5xow+LR1BKldT3BS2Ul09WCiDM8WKNLbumE40zqmtoHI5cnY4olYDt1Rzzx HZEzS/hlITsYWZWynvgKF+nvFu52uaq7F6HjZm2T6KtS5EdzCd1WpJU0uJTJMSPAJtk3 JSDUl/NXAzR51jVr1S8hiN4oS7VM+SdMrqcvWfr8dm14SD2DhbEAelsmlDyFj5CsZWn8 U6IPk8uWLoK/wIEcRh3tDEIvGTToJjI/3Y286cb13RU5qZyBZQuTkOzkNvyoQmT0ZUxz BueA== X-Gm-Message-State: AOAM5333Ml7Ja2kqezjah/KTnLrgPs1KiGthJJ45m1YExjjpF6wtSv+L N925bfG2Rn9q8KLRRwV0Z4AIeNpX X-Google-Smtp-Source: ABdhPJx2neb0D7+tmI3ZQ4AP6x+m1LrgxP8eNrqE4JnrUM/0gmVoWWNdt9mqFRlnaJ3LddoexXmRfA== X-Received: by 2002:adf:c385:: with SMTP id p5mr15406310wrf.409.1591969430770; Fri, 12 Jun 2020 06:43:50 -0700 (PDT) Received: from [192.168.0.65] ([109.110.245.170]) by smtp.googlemail.com with ESMTPSA id u9sm9534734wme.16.2020.06.12.06.43.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 12 Jun 2020 06:43:50 -0700 (PDT) Subject: Re: bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects To: Juri Linkov , 41821@debbugs.gnu.org References: <87r1ulxk48.fsf@mail.linkov.net> From: Dmitry Gutov Message-ID: <7164426e-8c37-8839-64da-563cfa829b53@yandex.ru> Date: Fri, 12 Jun 2020 16:43:48 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <87r1ulxk48.fsf@mail.linkov.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 41821 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) On 12.06.2020 02:03, Juri Linkov wrote: > For example, typing 'C-x v L' (vc-print-root-log) outside of a project > displays the minibuffer with the prompt "Directory for VC revision log: ". > It should provide a list of the default values from the project list > saved in ~/.emacs.d/projects Note that one would have to verify that each directory in the list is a part of a VC repository. From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 18 19:57:40 2020 Received: (at 41821) by debbugs.gnu.org; 18 Jun 2020 23:57:40 +0000 Received: from localhost ([127.0.0.1]:54680 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jm4Pc-0007DI-AM for submit@debbugs.gnu.org; Thu, 18 Jun 2020 19:57:40 -0400 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:46361) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jm4PX-0007D1-BW for 41821@debbugs.gnu.org; Thu, 18 Jun 2020 19:57:38 -0400 X-Originating-IP: 91.129.108.6 Received: from mail.gandi.net (m91-129-108-6.cust.tele2.ee [91.129.108.6]) (Authenticated sender: juri@linkov.net) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 208A060005; Thu, 18 Jun 2020 23:57:27 +0000 (UTC) From: Juri Linkov To: Dmitry Gutov Subject: Re: bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects Organization: LINKOV.NET References: <87r1ulxk48.fsf@mail.linkov.net> <7164426e-8c37-8839-64da-563cfa829b53@yandex.ru> Date: Fri, 19 Jun 2020 02:28:17 +0300 In-Reply-To: <7164426e-8c37-8839-64da-563cfa829b53@yandex.ru> (Dmitry Gutov's message of "Fri, 12 Jun 2020 16:43:48 +0300") Message-ID: <87mu50j5cu.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 41821 Cc: 41821@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-=-= Content-Type: text/plain >> For example, typing 'C-x v L' (vc-print-root-log) outside of a project >> displays the minibuffer with the prompt "Directory for VC revision log: ". >> It should provide a list of the default values from the project list >> saved in ~/.emacs.d/projects > > Note that one would have to verify that each directory in the list is > a part of a VC repository. Maybe something like: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=project-vc-list.patch diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index 7a41df614b..fcba4136b0 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -897,6 +897,12 @@ project-prompt-project-dir (read-directory-name "Select directory: " default-directory nil t) pr-dir))) +;;;###autoload +(defun project-vc-list () + "Return a list of VC-based projects." + (project--ensure-read-project-list) + (seq-filter #'project-try-vc (mapcar #'car project--list))) + ;;; Project switching diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 08b1a85c9b..a640067de1 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -2559,7 +2559,8 @@ vc-print-root-log rootdir) (if backend (setq rootdir (vc-call-backend backend 'root default-directory)) - (setq rootdir (read-directory-name "Directory for VC revision log: ")) + (setq rootdir (read-directory-name "Directory for VC revision log: " nil + (project-vc-list))) (setq backend (vc-responsible-backend rootdir)) (unless backend (error "Directory is not version controlled"))) --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 19 21:35:53 2020 Received: (at 41821) by debbugs.gnu.org; 20 Jun 2020 01:35:53 +0000 Received: from localhost ([127.0.0.1]:57086 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jmSQC-0005Df-Oy for submit@debbugs.gnu.org; Fri, 19 Jun 2020 21:35:52 -0400 Received: from mail-wr1-f42.google.com ([209.85.221.42]:37547) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jmSQ9-0005DM-9y for 41821@debbugs.gnu.org; Fri, 19 Jun 2020 21:35:51 -0400 Received: by mail-wr1-f42.google.com with SMTP id a6so9406228wrm.4 for <41821@debbugs.gnu.org>; Fri, 19 Jun 2020 18:35:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=232sxVBX7ZMxjMVfpPpPmK+3mDh2fOqUNWUC0f72Jzg=; b=nWScD2V3QMVQHYt16IohZwEneufpbveLpD4ht1rD3kHydAeJPr0c7S9VqLkZkzO83m 3iHcDVxhAjvDx4+kDM4QNiFGdjJZ/PbvWVE634onX+TcwhGP1sLtFoJXQN9nvz6ysqtT 22eS2Nb17bF3VQg+AdE6JjtruaDGrb50egwC2+opM/zRe4BQvqQ5zQpLssesWNsMmxUa 9OVJDa7BGGQsaT8YbMfOBX+x8h0j5dr1ExbUSgc/2U5TYnHfHcRWuhXu3GOaGUSQ949j TEas0xNm9O6k88YikZa/bmTTP1t9gkMZnJ4Sw+cLvIo6A9XSH25MvWj4REGnQBn+EC+v zCaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=232sxVBX7ZMxjMVfpPpPmK+3mDh2fOqUNWUC0f72Jzg=; b=ZIwKb10LsdVBEbJbYbvND5usVAFvhk7kDmwDpIOEGWTR9+Jb8bW/qwVUnITwxfYdzP ZnwHVKL6CHuhYQv1JFCJzlu4+fXq/qBAHs2VMwfbGghsfifDEYeYdiwn9Fmv7eZsH/A5 visSq16nGERREUO6SITlbKacEZQ6OjGIeuE5BQGtS/H60A9lXqRn7fVA1brYFM7m0ut5 25o61D4XZ1ClbdbZ9xOcmzu/TMTQwgck6/d4OL1GYvddtIDYspGfGco5u+SHtalUOpeF MpNLD0UVp1/qV5Osd05BYzEO8muI1jO51D3DYBQh6KV+cL2p4RbfSPeUHHqzC6u8BJaf ojAg== X-Gm-Message-State: AOAM531vHGFU3fdnKbDXKqLhwo8MQ87skj8/ov8PypGbpX5dF09YhAlW ALus8FlInkwepQrG/394EGgLqJj8 X-Google-Smtp-Source: ABdhPJyVCY55juFoUoqxLwY1dpmDp6kx8wbAIuP6yKblen7s8Ku1Zl+KNQG7O+Nr2/iFI9oeKHYmAA== X-Received: by 2002:adf:ce8d:: with SMTP id r13mr3860408wrn.392.1592616943140; Fri, 19 Jun 2020 18:35:43 -0700 (PDT) Received: from [192.168.0.3] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id y25sm15030623wmi.2.2020.06.19.18.35.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 19 Jun 2020 18:35:42 -0700 (PDT) Subject: Re: bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects To: Juri Linkov References: <87r1ulxk48.fsf@mail.linkov.net> <7164426e-8c37-8839-64da-563cfa829b53@yandex.ru> <87mu50j5cu.fsf@mail.linkov.net> From: Dmitry Gutov Message-ID: Date: Sat, 20 Jun 2020 04:35:40 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <87mu50j5cu.fsf@mail.linkov.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 41821 Cc: 41821@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) On 19.06.2020 02:28, Juri Linkov wrote: > Maybe something like: Not too bad. Though I'd rather not extend the public contract of project.el with a function that special-cases VC projects. So maybe something like this instead: diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 9b12d44978..19a4c7f60d 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -2508,6 +2508,19 @@ vc-print-log ) (vc-print-log-internal backend files working-revision nil limit))) +;; Or use project-try-vc after all. But this should be faster in the +;; event when there actually are non-VC based projects in the list. +(defun vc--known-vc-roots () + (require 'project) + (defvar project--list) + (project--ensure-read-project-list) + (seq-filter (lambda (dir) + (let ((backend (vc-responsible-backend dir))) + (if backend + (condition-case nil + (vc-call-backend backend 'root dir) + (vc-not-supported + nil))))) + (mapcar #'car project--list))) + ;;;###autoload (defun vc-print-root-log (&optional limit revision) "List the revision history for the current VC controlled tree in a window. @@ -2547,7 +2560,9 @@ vc-print-root-log rootdir) (if backend (setq rootdir (vc-call-backend backend 'root default-directory)) - (setq rootdir (read-directory-name "Directory for VC revision log: ")) + (setq rootdir (read-directory-name "Directory for VC revision log: " + nil + (vc--known-vc-roots))) (setq backend (vc-responsible-backend rootdir)) (unless backend (error "Directory is not version controlled"))) Personally, though, when I want behavior like this, I would probably just type 'C-x p v'. The directory name reading with completion performed by project-prompt-project-dir is more quick and handy (though I'll confess to using Ivy as the completion UI for this and one other function; vertical completion fits these long string values best). It also puts the selected project on the top of the list, which vc--known-vc-roots (or your function) don't do. From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 20 19:59:02 2020 Received: (at 41821) by debbugs.gnu.org; 20 Jun 2020 23:59:02 +0000 Received: from localhost ([127.0.0.1]:58946 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jmnO2-0002HP-67 for submit@debbugs.gnu.org; Sat, 20 Jun 2020 19:59:02 -0400 Received: from relay11.mail.gandi.net ([217.70.178.231]:42605) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jmnO0-0002Ga-Gy for 41821@debbugs.gnu.org; Sat, 20 Jun 2020 19:59:00 -0400 Received: from mail.gandi.net (m91-129-108-6.cust.tele2.ee [91.129.108.6]) (Authenticated sender: juri@linkov.net) by relay11.mail.gandi.net (Postfix) with ESMTPSA id 5ACC0100004; Sat, 20 Jun 2020 23:58:54 +0000 (UTC) From: Juri Linkov To: Dmitry Gutov Subject: Re: bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects Organization: LINKOV.NET References: <87r1ulxk48.fsf@mail.linkov.net> <7164426e-8c37-8839-64da-563cfa829b53@yandex.ru> <87mu50j5cu.fsf@mail.linkov.net> Date: Sun, 21 Jun 2020 02:51:56 +0300 In-Reply-To: (Dmitry Gutov's message of "Sat, 20 Jun 2020 04:35:40 +0300") Message-ID: <87y2oh8fdv.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 41821 Cc: 41821@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >> Maybe something like: > > Not too bad. > > Though I'd rather not extend the public contract of project.el with > a function that special-cases VC projects. > > So maybe something like this instead: > > +;; Or use project-try-vc after all. But this should be faster in the > +;; event when there actually are non-VC based projects in the list. > +(defun vc--known-vc-roots () > + (require 'project) > + (defvar project--list) > + (project--ensure-read-project-list) Calling internal project.el functions from vc.el? Really? > Personally, though, when I want behavior like this, I would probably just > type 'C-x p v'. 'C-x p v' is not a replacement for 'C-x v L'. > The directory name reading with completion performed by > project-prompt-project-dir is more quick and handy (though I'll confess > to using Ivy as the completion UI for this and one other function; vertical > completion fits these long string values best). 'M-n' works fine without Ivy to select a recent project dir. > It also puts the selected project on the top of the list, which > vc--known-vc-roots (or your function) don't do. I don't understand what is the selected project. The current project? Then neither 'C-x p v', nor 'C-x v L' should ask for a project directory when called from default-directory of the current project. From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 20 20:12:36 2020 Received: (at 41821) by debbugs.gnu.org; 21 Jun 2020 00:12:36 +0000 Received: from localhost ([127.0.0.1]:58960 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jmnbA-0002cf-0t for submit@debbugs.gnu.org; Sat, 20 Jun 2020 20:12:36 -0400 Received: from mail-wm1-f46.google.com ([209.85.128.46]:54127) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jmnb4-0002cO-KB for 41821@debbugs.gnu.org; Sat, 20 Jun 2020 20:12:34 -0400 Received: by mail-wm1-f46.google.com with SMTP id l26so11731364wme.3 for <41821@debbugs.gnu.org>; Sat, 20 Jun 2020 17:12:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=xGr3JIhr4VOBqfKdCGyU+M5sInLYiAwz9FxlfqXzosU=; b=l5/WXCQwqa0n5EYoxr3YJcHI/HBN8mw1SuZ+pGk6EGBh/osMInfpDF55fs/BnPomnl pwc4Ot/9PB50uKhN/+sThiV+gW84ZUTKRLvTg4Z+wHi3jfpZ9zs9JRhQ2HXiEh9+uUye 0B61hChuVwoZeP2d2qE1dNP1D2gavYyRqb6u3b966+NcV7Ej9E9AKP7mGXN0KgMS5wTw RGmL+FAxWdB063FBdBaAQpft5zzOn4g9hUkrVeBjDj3GWdebmqdj7KUF8t+I1XQgVkAE 1qAoLQxNHzOqvmfPfeOk5sdGd8Kb7qCNyrXODr/3N93nH5EEqCBaoTkljA/Dij2HeQCc DmiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=xGr3JIhr4VOBqfKdCGyU+M5sInLYiAwz9FxlfqXzosU=; b=aRuJtYVpva361oD14XkUrIUzIoPTcxzYO1/70SwcBAWgfq0l3c6IsipGrzoRwra7hd hW/N1S3Pb5xFFxySJxBmKW73hxHdTCc6AquNASueMtjpRx3ESWRAsyX4FGl9Kq/F2Lou 5B3ryH8Zg9nBmx2iSb+QMKebrb+ybypC6z45cIwT+Xbbc/sklcs/ND6v7LmQ6COxIwVD 20AKBkuTZln64chwnQHBG7YoUQXw5XQ/XkV18tq0nRrMPljffW/GEe6vaGEky3McXEFe YklIyVcb+LSekWjYs9Ib2NmVKaLji0tH3YKZR0zLrwzaQtY/sa7xIZ8cXnH+ijqbNRDJ Kp5Q== X-Gm-Message-State: AOAM530ERbzT32BisMokwa/WQ2a5SDyUmBzPKJCYMynGuvidgiAOduI7 TkwB1SSFnyQVr6sYWzZfYlFZSlDf X-Google-Smtp-Source: ABdhPJwB8a+Cj+Hw+eRB49V+kiXMRfxf+DcEQLxZSyHiAE4LUdWiBNhEx3YkKuHHgj0hIzj5OaE8Ag== X-Received: by 2002:a1c:f616:: with SMTP id w22mr2787358wmc.155.1592698344671; Sat, 20 Jun 2020 17:12:24 -0700 (PDT) Received: from [192.168.0.3] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id a12sm1981424wrv.41.2020.06.20.17.12.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 20 Jun 2020 17:12:24 -0700 (PDT) Subject: Re: bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects To: Juri Linkov References: <87r1ulxk48.fsf@mail.linkov.net> <7164426e-8c37-8839-64da-563cfa829b53@yandex.ru> <87mu50j5cu.fsf@mail.linkov.net> <87y2oh8fdv.fsf@mail.linkov.net> From: Dmitry Gutov Message-ID: Date: Sun, 21 Jun 2020 03:12:22 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <87y2oh8fdv.fsf@mail.linkov.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 41821 Cc: 41821@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) On 21.06.2020 02:51, Juri Linkov wrote: >>> Maybe something like: >> >> Not too bad. >> >> Though I'd rather not extend the public contract of project.el with >> a function that special-cases VC projects. >> >> So maybe something like this instead: >> >> +;; Or use project-try-vc after all. But this should be faster in the >> +;; event when there actually are non-VC based projects in the list. >> +(defun vc--known-vc-roots () >> + (require 'project) >> + (defvar project--list) >> + (project--ensure-read-project-list) > > Calling internal project.el functions from vc.el? Really? The alternative would be to create a function like that in project.el. But I hesitate to make it public, sorry. >> Personally, though, when I want behavior like this, I would probably just >> type 'C-x p v'. > > 'C-x p v' is not a replacement for 'C-x v L'. 'C-x p v L', then? >> The directory name reading with completion performed by >> project-prompt-project-dir is more quick and handy (though I'll confess >> to using Ivy as the completion UI for this and one other function; vertical >> completion fits these long string values best). > > 'M-n' works fine without Ivy to select a recent project dir. Just saying what works better for me. >> It also puts the selected project on the top of the list, which >> vc--known-vc-roots (or your function) don't do. > > I don't understand what is the selected project. The current project? When you select a project to use, the prompting subroutine (project-prompt-project-dir) re-sorts the saved list of project. It is somewhat of an argument to only go through this UI when one needs to select a project to use. > Then neither 'C-x p v', nor 'C-x v L' should ask for a project directory > when called from default-directory of the current project. Not sure what you mean. I think they don't? When called inside a project. From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 21 19:19:20 2020 Received: (at 41821) by debbugs.gnu.org; 21 Jun 2020 23:19:20 +0000 Received: from localhost ([127.0.0.1]:32817 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jn9FA-0006QO-2K for submit@debbugs.gnu.org; Sun, 21 Jun 2020 19:19:20 -0400 Received: from relay10.mail.gandi.net ([217.70.178.230]:56817) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jn9F8-0006Q7-58 for 41821@debbugs.gnu.org; Sun, 21 Jun 2020 19:19:19 -0400 Received: from mail.gandi.net (m91-129-108-6.cust.tele2.ee [91.129.108.6]) (Authenticated sender: juri@linkov.net) by relay10.mail.gandi.net (Postfix) with ESMTPSA id 62742240004; Sun, 21 Jun 2020 23:19:11 +0000 (UTC) From: Juri Linkov To: Dmitry Gutov Subject: Re: bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects Organization: LINKOV.NET References: <87r1ulxk48.fsf@mail.linkov.net> <7164426e-8c37-8839-64da-563cfa829b53@yandex.ru> <87mu50j5cu.fsf@mail.linkov.net> <87y2oh8fdv.fsf@mail.linkov.net> Date: Mon, 22 Jun 2020 01:49:12 +0300 In-Reply-To: (Dmitry Gutov's message of "Sun, 21 Jun 2020 03:12:22 +0300") Message-ID: <87366ohw5z.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 41821 Cc: 41821@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >>> +;; Or use project-try-vc after all. But this should be faster in the >>> +;; event when there actually are non-VC based projects in the list. >>> +(defun vc--known-vc-roots () >>> + (require 'project) >>> + (defvar project--list) >>> + (project--ensure-read-project-list) >> >> Calling internal project.el functions from vc.el? Really? > > The alternative would be to create a function like that in project.el. > > But I hesitate to make it public, sorry. Why not? We have to decide which of them should be dependent. It would be fine either way: project.el to use vc.el public functions, or vice versa. >>> Personally, though, when I want behavior like this, I would probably just >>> type 'C-x p v'. >> 'C-x p v' is not a replacement for 'C-x v L'. > > 'C-x p v L', then? 'C-x v L' needs to provide a list of recently used repositories. Actually, this feature doesn't depend on project.el, so recently used repositories could be recorded independently without project.el. But it would be nice to share these directories between project.el and vc.el. From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 21 20:08:47 2020 Received: (at 41821) by debbugs.gnu.org; 22 Jun 2020 00:08:47 +0000 Received: from localhost ([127.0.0.1]:32869 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jnA10-0007ew-MM for submit@debbugs.gnu.org; Sun, 21 Jun 2020 20:08:46 -0400 Received: from mail-wr1-f52.google.com ([209.85.221.52]:36052) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jnA0z-0007ed-2i for 41821@debbugs.gnu.org; Sun, 21 Jun 2020 20:08:46 -0400 Received: by mail-wr1-f52.google.com with SMTP id k6so2421198wrn.3 for <41821@debbugs.gnu.org>; Sun, 21 Jun 2020 17:08:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=B+E4uhfrnpOmWxBH+1fxYBJ/nzMYMAcNF9XRXeTx9cs=; b=Uu3mdl0aW3jGoTnS+VE2jo6W2Kx8l9JKECKTRhw5pVbk/zryRsKN9plcXolqz4ddnR +Jpzwysd4BsjZYRB/tEJG/ExCDur1cyRSVPVvHpCQj0Uo53PQtMvqKuPanyp1Nr+r7BB iEU7NQZQKHHylMjrGS+Izq3ncLvwTcq1HZ8nPD2IGwWxQcUY5p9yL180/8al1z1Uk5r5 KNvKlEYRocKdBmMA3OkpqmcDDjWVSuj3SmBr31o5VUT0lAu8qiTxDMqENnsLMXgJFM45 dg/PYV2/feagO8WQWj9G/3TS6LF5jOO5sko6FNVbzh/CUTb3HbGeeyC+gAEK9KIHiMnm Xb8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=B+E4uhfrnpOmWxBH+1fxYBJ/nzMYMAcNF9XRXeTx9cs=; b=WOKWDOfBtFJDeetuznBklIHJ5ZO6jb4OhMr4QVd0lVNraO+vLh/STmuHL87ZvT7RTN IYXkBsx/zgGADn2cyoEMsAKfvmeHjbF4frSrUmcD4761jYcMZWICFAghSFPJOIyFiV6z 7l2kD3JkiIA/CGW53XA18wwUZLolRK2WW01wEmTFtslT/cD61MWUzOMbsrTKaaYEEJ5M +1Oe0KJk5EonKV61vnq0SF2ISwixHMvvQgU8BwrdebZT9ARVCTtHlisvbPTy+QFZjJ1S k/K0OrA7sx1GztaU2/HxJytit2nPyNRz9am7KN5wZ7OeFl0Rv9C/eCYKLQy9LwUuVOLE uZzw== X-Gm-Message-State: AOAM530+rFdF92lWXfIW8olXy4zd2Q3wmUmO1NMRdmpAtb1JQPwA8HgX Ayx5AWsSwNiPYTUTlQmtp1fKZIv+ X-Google-Smtp-Source: ABdhPJwm/hR1wL4F6tIX71SXkeI1CYTRscrqeT5C7ppS1iVHE4+Jn79I8cJqEQZ+8rWPAoK6IJ9IAw== X-Received: by 2002:a5d:4244:: with SMTP id s4mr13793846wrr.5.1592784518806; Sun, 21 Jun 2020 17:08:38 -0700 (PDT) Received: from [192.168.0.3] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id d28sm16557260wrc.50.2020.06.21.17.08.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 21 Jun 2020 17:08:38 -0700 (PDT) Subject: Re: bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects To: Juri Linkov References: <87r1ulxk48.fsf@mail.linkov.net> <7164426e-8c37-8839-64da-563cfa829b53@yandex.ru> <87mu50j5cu.fsf@mail.linkov.net> <87y2oh8fdv.fsf@mail.linkov.net> <87366ohw5z.fsf@mail.linkov.net> From: Dmitry Gutov Message-ID: Date: Mon, 22 Jun 2020 03:08:36 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <87366ohw5z.fsf@mail.linkov.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 41821 Cc: 41821@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 22.06.2020 01:49, Juri Linkov wrote: >>>> +;; Or use project-try-vc after all. But this should be faster in the >>>> +;; event when there actually are non-VC based projects in the list. >>>> +(defun vc--known-vc-roots () >>>> + (require 'project) >>>> + (defvar project--list) >>>> + (project--ensure-read-project-list) >>> >>> Calling internal project.el functions from vc.el? Really? >> >> The alternative would be to create a function like that in project.el. >> >> But I hesitate to make it public, sorry. > > Why not? Because I'd rather not have external code depend on what exact kind of project backend is in use. > We have to decide which of them should be dependent. It would be fine > either way: project.el to use vc.el public functions, or vice versa. There are other private functions shared between project.el and xref.el. So I this is fine, kind of. But you have noted an alternative option below: >>>> Personally, though, when I want behavior like this, I would probably just >>>> type 'C-x p v'. >>> 'C-x p v' is not a replacement for 'C-x v L'. >> >> 'C-x p v L', then? > > 'C-x v L' needs to provide a list of recently used repositories. If you like. > Actually, this feature doesn't depend on project.el, so recently > used repositories could be recorded independently without project.el. This is the alternative option. It would create a yet another file in the user's dir, though. > But it would be nice to share these directories between project.el and vc.el. Perhaps there could be a public function in project.el called project-known-roots. From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 22 20:15:31 2020 Received: (at 41821) by debbugs.gnu.org; 23 Jun 2020 00:15:31 +0000 Received: from localhost ([127.0.0.1]:34953 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jnWb5-00070K-6m for submit@debbugs.gnu.org; Mon, 22 Jun 2020 20:15:31 -0400 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:60429) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jnWb2-0006zs-J7 for 41821@debbugs.gnu.org; Mon, 22 Jun 2020 20:15:29 -0400 X-Originating-IP: 91.129.108.6 Received: from mail.gandi.net (m91-129-108-6.cust.tele2.ee [91.129.108.6]) (Authenticated sender: juri@linkov.net) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 75BB2C0004; Tue, 23 Jun 2020 00:15:20 +0000 (UTC) From: Juri Linkov To: Dmitry Gutov Subject: Re: bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects Organization: LINKOV.NET References: <87r1ulxk48.fsf@mail.linkov.net> <7164426e-8c37-8839-64da-563cfa829b53@yandex.ru> <87mu50j5cu.fsf@mail.linkov.net> <87y2oh8fdv.fsf@mail.linkov.net> <87366ohw5z.fsf@mail.linkov.net> Date: Tue, 23 Jun 2020 02:45:55 +0300 In-Reply-To: (Dmitry Gutov's message of "Mon, 22 Jun 2020 03:08:36 +0300") Message-ID: <878sge7jls.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 41821 Cc: 41821@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-=-= Content-Type: text/plain >> But it would be nice to share these directories between project.el and vc.el. > > Perhaps there could be a public function in project.el called > project-known-roots. Like this? --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=project-known-roots.patch diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index 2f213dab8b..f489145e92 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -935,6 +935,12 @@ project-prompt-project-dir (read-directory-name "Select directory: " default-directory nil t) pr-dir))) +;;;###autoload +(defun project-known-roots () + "Return a list of known roots." + (project--ensure-read-project-list) + (mapcar #'project-try-vc (mapcar #'car project--list))) + ;;; Project switching diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 9b12d44978..cc83d9a7a1 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -2547,7 +2555,10 @@ vc-print-root-log rootdir) (if backend (setq rootdir (vc-call-backend backend 'root default-directory)) - (setq rootdir (read-directory-name "Directory for VC revision log: ")) + (setq rootdir (read-directory-name "Directory for VC revision log: " nil + (mapcan (lambda (r) (when (eq (car r) 'vc) + (list (cdr r)))) + (project-known-roots)))) (setq backend (vc-responsible-backend rootdir)) (unless backend (error "Directory is not version controlled"))) --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 22 20:38:06 2020 Received: (at 41821) by debbugs.gnu.org; 23 Jun 2020 00:38:06 +0000 Received: from localhost ([127.0.0.1]:35028 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jnWwv-0007a6-MP for submit@debbugs.gnu.org; Mon, 22 Jun 2020 20:38:05 -0400 Received: from mail-wr1-f53.google.com ([209.85.221.53]:35305) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jnWwu-0007Zc-A1 for 41821@debbugs.gnu.org; Mon, 22 Jun 2020 20:38:04 -0400 Received: by mail-wr1-f53.google.com with SMTP id g18so9616903wrm.2 for <41821@debbugs.gnu.org>; Mon, 22 Jun 2020 17:38:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=CAr8PZJ52pTEfOJ5yHJAM7k1e2HGPuw1kIODV6Bn/OM=; b=DR4L68Rb9smqQGKaDm3Hl96eW6U1vLOaBz41xhkIJPTDe9TxGP+qpcSQfnsm5eS1Vs HYJiHBi+7LCxV77Au1wNpMAaAVNjzIHiMljm3hNf/KG/pZLf2u2eiRBa0c1n6jJC4Gl+ dNlHUi/fn7/qECFfB6bwE4iIFBenTtNgOU9u7uIQxT6ClSrqBqBVaAlt3Ru/zZXGBR4L U+3kN+m0sWxxqpc7xs4wN/qo9U9j8Epp6OQxP+VxHMIR2hD2LzUn+0bkVdIvKV1Irb28 1T8K2N84mtIjNlCtwtzI4frUxBM9CqttMrNYzO/tVTIkumcVtGPRKg2bj8/U8M5WWM+m RktQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=CAr8PZJ52pTEfOJ5yHJAM7k1e2HGPuw1kIODV6Bn/OM=; b=ODm8FvTMjx8QJQ17CuqtCNRJ4k7A4LJPINdNZTmzl9pEbhlQHtwGMw6Tr+IMs5ecMz FQb3DlrNggG0A1/R31EzHfDmMuar5iBtw0oiQehhiqhHPGov9rJ9khgFFNrN2wzE5kOe 4J5bkXEYO8GVNdEA4NULjhE/0MzFSxfahMPu9rO9rx4VE48g7gJYr5BW25xBAK/hhqK9 Edpjev3AfcXzAw3rAimYBPOVCvhtQeh0qSaYcoWL9pR3EuAdBPvh0V7rvgO20taBftu8 /ko5w7Wha+57ZrnDmUY8qnwoADtixz9XcWtjavB2OA1d/6dcqEmhsLrZ21FSgm4gS7JN whZg== X-Gm-Message-State: AOAM530a3FDR35H6ighooOi97iOMuVu2IXreBrbdu3qH+fe3bpX0zm86 xMOhSKVXJB640lTpzC6dFEtvsXnh X-Google-Smtp-Source: ABdhPJxoiSzmuOU0OKhu5qfIA/jWVSXkN9aodiJNol26i3awZlcTS5255WJT0uiPppRBV9xJ6wX11g== X-Received: by 2002:a5d:540d:: with SMTP id g13mr13907514wrv.380.1592872678136; Mon, 22 Jun 2020 17:37:58 -0700 (PDT) Received: from [192.168.0.3] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id d13sm6004159wrn.61.2020.06.22.17.37.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 22 Jun 2020 17:37:57 -0700 (PDT) Subject: Re: bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects To: Juri Linkov References: <87r1ulxk48.fsf@mail.linkov.net> <7164426e-8c37-8839-64da-563cfa829b53@yandex.ru> <87mu50j5cu.fsf@mail.linkov.net> <87y2oh8fdv.fsf@mail.linkov.net> <87366ohw5z.fsf@mail.linkov.net> <878sge7jls.fsf@mail.linkov.net> From: Dmitry Gutov Message-ID: <7e136435-7123-fa42-e4a8-66b82e6595da@yandex.ru> Date: Tue, 23 Jun 2020 03:37:55 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <878sge7jls.fsf@mail.linkov.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 41821 Cc: 41821@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 23.06.2020 02:45, Juri Linkov wrote: > Like this? Close. But without mapping through project-try-vc. The function will return _all_ known roots, in VC repositories or not. vc-print-root-log can call it with seq-filter (project-try-vc is a public function). No need to deconstruct the returned values either. From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 23 20:04:47 2020 Received: (at 41821) by debbugs.gnu.org; 24 Jun 2020 00:04:47 +0000 Received: from localhost ([127.0.0.1]:37428 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jnsuF-0002Ft-Et for submit@debbugs.gnu.org; Tue, 23 Jun 2020 20:04:47 -0400 Received: from relay9-d.mail.gandi.net ([217.70.183.199]:42907) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jnsu9-0002FB-2b; Tue, 23 Jun 2020 20:04:41 -0400 X-Originating-IP: 91.129.108.6 Received: from mail.gandi.net (m91-129-108-6.cust.tele2.ee [91.129.108.6]) (Authenticated sender: juri@linkov.net) by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id B0C7BFF803; Wed, 24 Jun 2020 00:04:33 +0000 (UTC) From: Juri Linkov To: Dmitry Gutov Subject: Re: bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects Organization: LINKOV.NET References: <87r1ulxk48.fsf@mail.linkov.net> <7164426e-8c37-8839-64da-563cfa829b53@yandex.ru> <87mu50j5cu.fsf@mail.linkov.net> <87y2oh8fdv.fsf@mail.linkov.net> <87366ohw5z.fsf@mail.linkov.net> <878sge7jls.fsf@mail.linkov.net> <7e136435-7123-fa42-e4a8-66b82e6595da@yandex.ru> Date: Wed, 24 Jun 2020 02:59:49 +0300 In-Reply-To: <7e136435-7123-fa42-e4a8-66b82e6595da@yandex.ru> (Dmitry Gutov's message of "Tue, 23 Jun 2020 03:37:55 +0300") Message-ID: <87pn9pxris.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 41821 Cc: 41821@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) tags 41821 fixed close 41821 28.0.50 quit > Close. I interpreted this as a verb in the imperative mood, so closed the report :) > But without mapping through project-try-vc. The function will return _all_ > known roots, in VC repositories or not. > > vc-print-root-log can call it with seq-filter (project-try-vc is a public > function). No need to deconstruct the returned values either. Now pushed to master with these fixes. Thanks for the help. From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 24 10:39:41 2020 Received: (at 41821) by debbugs.gnu.org; 24 Jun 2020 14:39:41 +0000 Received: from localhost ([127.0.0.1]:38642 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jo6Yu-0004gZ-OU for submit@debbugs.gnu.org; Wed, 24 Jun 2020 10:39:40 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54950) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jo6Ys-0004gL-0F for 41821@debbugs.gnu.org; Wed, 24 Jun 2020 10:39:40 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:50890) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jo6Ym-0008E3-B6; Wed, 24 Jun 2020 10:39:32 -0400 Received: from [176.228.60.248] (port=1864 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jo6Yl-0005cr-M1; Wed, 24 Jun 2020 10:39:32 -0400 Date: Wed, 24 Jun 2020 17:39:15 +0300 Message-Id: <83d05ottnw.fsf@gnu.org> From: Eli Zaretskii To: Juri Linkov In-Reply-To: <87pn9pxris.fsf@mail.linkov.net> (message from Juri Linkov on Wed, 24 Jun 2020 02:59:49 +0300) Subject: Re: bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects References: <87r1ulxk48.fsf@mail.linkov.net> <7164426e-8c37-8839-64da-563cfa829b53@yandex.ru> <87mu50j5cu.fsf@mail.linkov.net> <87y2oh8fdv.fsf@mail.linkov.net> <87366ohw5z.fsf@mail.linkov.net> <878sge7jls.fsf@mail.linkov.net> <7e136435-7123-fa42-e4a8-66b82e6595da@yandex.ru> <87pn9pxris.fsf@mail.linkov.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 41821 Cc: 41821@debbugs.gnu.org, dgutov@yandex.ru X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Juri Linkov > Date: Wed, 24 Jun 2020 02:59:49 +0300 > Cc: 41821@debbugs.gnu.org > > I interpreted this as a verb in the imperative mood, so closed the report :) > > > But without mapping through project-try-vc. The function will return _all_ > > known roots, in VC repositories or not. > > > > vc-print-root-log can call it with seq-filter (project-try-vc is a public > > function). No need to deconstruct the returned values either. > > Now pushed to master with these fixes. Thanks for the help. This changeset causes byte-compilation warnings: In end of data: vc/vc-hooks.el:1013:1: Warning: the function `project-known-roots' is not known to be defined. More importantly, this is not very clean, IMO: vc-hooks.el is preloaded, so any attempt to call a project.el function in it runs a very real risk to force loading project.el, something that we didn't yet decide to do. Why does this have to be in vc-hooks.el, and if it has to be there, can it please not call functions that re not preloaded? Thanks. From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 24 10:52:33 2020 Received: (at 41821) by debbugs.gnu.org; 24 Jun 2020 14:52:33 +0000 Received: from localhost ([127.0.0.1]:38650 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jo6lN-0004zQ-5V for submit@debbugs.gnu.org; Wed, 24 Jun 2020 10:52:33 -0400 Received: from mail-wm1-f52.google.com ([209.85.128.52]:35190) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jo6lI-0004z5-D8 for 41821@debbugs.gnu.org; Wed, 24 Jun 2020 10:52:32 -0400 Received: by mail-wm1-f52.google.com with SMTP id l2so1331489wmf.0 for <41821@debbugs.gnu.org>; Wed, 24 Jun 2020 07:52:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=Q9whrWBYSHdhqz9bXr/FP92ELFAmRdB0EIIFoZz0UCM=; b=U1TeO4zzYsEnmbgdSCG3kZ1qBdYrb9WzpvYUt+kVbNtBA/ADCA45Sug5nkYzdWY/9o VTHmt0k8qHdLbRj99dkq7OyAlUHp8H5Gx/8yO4wlZygLeZQGPjVVSdQjHiTgdTlgmcM3 5Lrafm49C1mgFzu/WRHqPuMJ9ZNxbQGDS3KuaW9AOyIebMESTBsAYfwfOs7J19cMRc54 EjoxDO6HgSpUq/YBBS26iPwuUAPRd25A0DHbGVdqfmW2795k6V0d/7oKakTKsD5W8bOK LlKHM92Mo74jj6jO0BIXV8OcCVZDAYCb69x/72DcH3Op/FOo8nKGv0CHVzFPICyJD2vK WbAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=Q9whrWBYSHdhqz9bXr/FP92ELFAmRdB0EIIFoZz0UCM=; b=gwIcAxh7rJNB+RYILlS1hF6hpauHd+XuetNYJ0bpQJH43FBUVYfaCzWFfsQCCpOq8H hpU3iekKbPd00bJ97/LsYlKHIdmB0t5blXeYhRMAzZ3Qu1g26FkXvsu9TwVNfuenyU9l M5gpYWy1paMqCWU/97vFcsnX44HRv66k/I8KH+cjMUQ5mxmklV20Q3qwJHTGuDw+HFX4 fML7oBr5Uc4y2GbDjsNkJJO0QGR2cCX26qbKFBkA6JgGR+wRioAHodfnExJAdUGV8I60 8ruRhKpL7MmP8xo1PwZ8NWZO4MYA/287GKaTVCMLsx5q1p7u2U313p+eVmvXHp6jMi3k Lwdg== X-Gm-Message-State: AOAM530RjkodebQohLXWUaPLFycwQp+j62AaeAmk9zWoGpOppks6IuH8 mQMUby1O8R117VGyduBFmlEmuQ== X-Google-Smtp-Source: ABdhPJwimlV2WbYBaj3qdcHUcsTkyf87/Tubrtg0rrq2ozZpXFNqL08pUVwRcMPIld89DgrmvQpoEg== X-Received: by 2002:a1c:2392:: with SMTP id j140mr8911885wmj.6.1593010342372; Wed, 24 Jun 2020 07:52:22 -0700 (PDT) Received: from localhost ([2a02:8084:20e2:c380:92bd:1bfd:38fc:fae2]) by smtp.gmail.com with ESMTPSA id t2sm8109229wma.43.2020.06.24.07.52.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jun 2020 07:52:21 -0700 (PDT) From: "Basil L. Contovounesios" To: Eli Zaretskii Subject: Re: bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects References: <87r1ulxk48.fsf@mail.linkov.net> <7164426e-8c37-8839-64da-563cfa829b53@yandex.ru> <87mu50j5cu.fsf@mail.linkov.net> <87y2oh8fdv.fsf@mail.linkov.net> <87366ohw5z.fsf@mail.linkov.net> <878sge7jls.fsf@mail.linkov.net> <7e136435-7123-fa42-e4a8-66b82e6595da@yandex.ru> <87pn9pxris.fsf@mail.linkov.net> <83d05ottnw.fsf@gnu.org> Date: Wed, 24 Jun 2020 15:52:20 +0100 In-Reply-To: <83d05ottnw.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 24 Jun 2020 17:39:15 +0300") Message-ID: <87lfkcbjob.fsf@tcd.ie> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 41821 Cc: 41821@debbugs.gnu.org, dgutov@yandex.ru, Juri Linkov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: >> From: Juri Linkov >> Date: Wed, 24 Jun 2020 02:59:49 +0300 >> Cc: 41821@debbugs.gnu.org >> >> Now pushed to master with these fixes. Thanks for the help. > > This changeset causes byte-compilation warnings: > > In end of data: > vc/vc-hooks.el:1013:1: Warning: the function `project-known-roots' is not > known to be defined. Since project-known-roots is autoloaded, will this go away when ldefs-boot.el is updated? -- Basil From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 24 11:11:05 2020 Received: (at 41821) by debbugs.gnu.org; 24 Jun 2020 15:11:05 +0000 Received: from localhost ([127.0.0.1]:38679 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jo73J-0005RI-C4 for submit@debbugs.gnu.org; Wed, 24 Jun 2020 11:11:05 -0400 Received: from mail-wm1-f52.google.com ([209.85.128.52]:34365) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jo73F-0005Qm-8e for 41821@debbugs.gnu.org; Wed, 24 Jun 2020 11:11:03 -0400 Received: by mail-wm1-f52.google.com with SMTP id u26so4723239wmn.1 for <41821@debbugs.gnu.org>; Wed, 24 Jun 2020 08:11:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=G+R492+9WjZ9PEWKxS9Z7tzSIzVhnEzEaptGaj+dsf8=; b=MbnAI42HF6RPSnqEhpsAnCVIDSnFV+trxiZIyvWiOYEsQhz3SqOwtjjOnzBYRdvEO8 bsMuDkWdbetpsvbXqF3QxgUKYxAmO1ZcoCXzZ3lrBcGUQRJsj9Ebibneiiv2aSyAOPiW 4VCXCxuTrGWxR8rPCoGMRYCZy3va8rwT9h08m7+4GcnZPhiHNFDt6mJeOaPZZskW19hg +rLYgz3pk6dIJpNGGfPdWZ2AxlJHuyFYD9hzaB9m23fvzhFBB7NHE0KoGWVtqPlJkmWq N6t4QJmVqSErNQXJJrMyuu8J0Rdmwyi9WVtqnv3Ofu38SKewHM50QmRphEe8CZG8h+Dh LPcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=G+R492+9WjZ9PEWKxS9Z7tzSIzVhnEzEaptGaj+dsf8=; b=sjOHUJaq9hvP7x7nrpIA+1yErjQFgXGn9swyDSTyVCaHlNnisbPyJS1Pl3M/pWt+n9 3N4YVejvxgEswXscTjdDGUbm/5hUWsGppPaeoD1idluOP1XVnzQtGTk5kG2NJ0c4y/+G TY4mn/nf7BXLycZT3v62hr2YFclB39O/pufGKaiMGxTa4oGH9tNU1ejOlNiZiyaRGWSW YohL+Pthvk30cqdwKnBUxNrS4Kw+ebVNwgng4yG6smr/PK+RIKKTrF3SbnsqYj2u7So9 QFKxEaLZKaE48LtzZzMUVIhEiWj3+4hDRgDvAHI1bizvwQUTsXHJbQ9lRwjqg6KSwQUy E2OQ== X-Gm-Message-State: AOAM531cWSku3Nqmvu9iWMvohntLJikfyfLv0JEP9NK2B9MYODrU+9j/ JFmp1WduL9wziHo3gydc1hweYgK3 X-Google-Smtp-Source: ABdhPJwX1r27FadB6Snu9MB/yUqFgSW8it6bmaNN7j/0ODbLnJsAvx7VuhsHQ0R4msxNGkeMmYI7Fg== X-Received: by 2002:a05:600c:2187:: with SMTP id e7mr1572799wme.171.1593011455138; Wed, 24 Jun 2020 08:10:55 -0700 (PDT) Received: from [192.168.0.113] ([109.110.245.170]) by smtp.googlemail.com with ESMTPSA id a16sm26705374wrx.8.2020.06.24.08.10.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 24 Jun 2020 08:10:54 -0700 (PDT) Subject: Re: bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects To: Eli Zaretskii , Juri Linkov References: <87r1ulxk48.fsf@mail.linkov.net> <7164426e-8c37-8839-64da-563cfa829b53@yandex.ru> <87mu50j5cu.fsf@mail.linkov.net> <87y2oh8fdv.fsf@mail.linkov.net> <87366ohw5z.fsf@mail.linkov.net> <878sge7jls.fsf@mail.linkov.net> <7e136435-7123-fa42-e4a8-66b82e6595da@yandex.ru> <87pn9pxris.fsf@mail.linkov.net> <83d05ottnw.fsf@gnu.org> From: Dmitry Gutov Message-ID: <0b42f540-f779-446b-4411-8dae3a50d09d@yandex.ru> Date: Wed, 24 Jun 2020 18:10:52 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <83d05ottnw.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 41821 Cc: 41821@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 24.06.2020 17:39, Eli Zaretskii wrote: > vc-hooks.el is > preloaded, so any attempt to call a project.el function in it runs a > very real risk to force loading project.el, something that we didn't > yet decide to do. I don't quite understand. Is it a problem to call a non-preloded function at runtime? From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 24 11:17:18 2020 Received: (at 41821) by debbugs.gnu.org; 24 Jun 2020 15:17:18 +0000 Received: from localhost ([127.0.0.1]:38684 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jo79J-0005bH-WD for submit@debbugs.gnu.org; Wed, 24 Jun 2020 11:17:18 -0400 Received: from eggs.gnu.org ([209.51.188.92]:38660) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jo79G-0005b2-Ck for 41821@debbugs.gnu.org; Wed, 24 Jun 2020 11:17:16 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:51460) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jo799-0003gN-BE; Wed, 24 Jun 2020 11:17:07 -0400 Received: from [176.228.60.248] (port=4188 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jo798-0003b6-Ot; Wed, 24 Jun 2020 11:17:07 -0400 Date: Wed, 24 Jun 2020 18:16:51 +0300 Message-Id: <838sgctrx8.fsf@gnu.org> From: Eli Zaretskii To: "Basil L. Contovounesios" In-Reply-To: <87lfkcbjob.fsf@tcd.ie> (contovob@tcd.ie) Subject: Re: bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects References: <87r1ulxk48.fsf@mail.linkov.net> <7164426e-8c37-8839-64da-563cfa829b53@yandex.ru> <87mu50j5cu.fsf@mail.linkov.net> <87y2oh8fdv.fsf@mail.linkov.net> <87366ohw5z.fsf@mail.linkov.net> <878sge7jls.fsf@mail.linkov.net> <7e136435-7123-fa42-e4a8-66b82e6595da@yandex.ru> <87pn9pxris.fsf@mail.linkov.net> <83d05ottnw.fsf@gnu.org> <87lfkcbjob.fsf@tcd.ie> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 41821 Cc: 41821@debbugs.gnu.org, dgutov@yandex.ru, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: "Basil L. Contovounesios" > Cc: Juri Linkov , 41821@debbugs.gnu.org, dgutov@yandex.ru > Date: Wed, 24 Jun 2020 15:52:20 +0100 > > > In end of data: > > vc/vc-hooks.el:1013:1: Warning: the function `project-known-roots' is not > > known to be defined. > > Since project-known-roots is autoloaded, will this go away when > ldefs-boot.el is updated? You mean loaddefs.el, I presume (ldefs-boot is rarely used during the build). Probably, but that's not my main problem with that change. From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 24 11:18:33 2020 Received: (at 41821) by debbugs.gnu.org; 24 Jun 2020 15:18:33 +0000 Received: from localhost ([127.0.0.1]:38688 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jo7AX-0005dA-FK for submit@debbugs.gnu.org; Wed, 24 Jun 2020 11:18:33 -0400 Received: from eggs.gnu.org ([209.51.188.92]:39078) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jo7AV-0005cx-JQ for 41821@debbugs.gnu.org; Wed, 24 Jun 2020 11:18:32 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:51488) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jo7AQ-000449-DA; Wed, 24 Jun 2020 11:18:26 -0400 Received: from [176.228.60.248] (port=4268 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jo7AP-0003hN-Qm; Wed, 24 Jun 2020 11:18:26 -0400 Date: Wed, 24 Jun 2020 18:18:10 +0300 Message-Id: <837dvwtrv1.fsf@gnu.org> From: Eli Zaretskii To: Dmitry Gutov In-Reply-To: <0b42f540-f779-446b-4411-8dae3a50d09d@yandex.ru> (message from Dmitry Gutov on Wed, 24 Jun 2020 18:10:52 +0300) Subject: Re: bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects References: <87r1ulxk48.fsf@mail.linkov.net> <7164426e-8c37-8839-64da-563cfa829b53@yandex.ru> <87mu50j5cu.fsf@mail.linkov.net> <87y2oh8fdv.fsf@mail.linkov.net> <87366ohw5z.fsf@mail.linkov.net> <878sge7jls.fsf@mail.linkov.net> <7e136435-7123-fa42-e4a8-66b82e6595da@yandex.ru> <87pn9pxris.fsf@mail.linkov.net> <83d05ottnw.fsf@gnu.org> <0b42f540-f779-446b-4411-8dae3a50d09d@yandex.ru> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 41821 Cc: 41821@debbugs.gnu.org, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: 41821@debbugs.gnu.org > From: Dmitry Gutov > Date: Wed, 24 Jun 2020 18:10:52 +0300 > > On 24.06.2020 17:39, Eli Zaretskii wrote: > > vc-hooks.el is > > preloaded, so any attempt to call a project.el function in it runs a > > very real risk to force loading project.el, something that we didn't > > yet decide to do. > > I don't quite understand. Is it a problem to call a non-preloded > function at runtime? As I tried to explain, I'd like to avoid calling such functions from preloaded code. Is that possible, please? From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 24 11:43:21 2020 Received: (at 41821) by debbugs.gnu.org; 24 Jun 2020 15:43:21 +0000 Received: from localhost ([127.0.0.1]:38726 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jo7YW-0006Fg-Sj for submit@debbugs.gnu.org; Wed, 24 Jun 2020 11:43:21 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47098) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jo7YU-0006FS-2o for 41821@debbugs.gnu.org; Wed, 24 Jun 2020 11:43:19 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:51708) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jo7YO-000698-Ar; Wed, 24 Jun 2020 11:43:12 -0400 Received: from [176.228.60.248] (port=1917 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jo7YN-0000Ma-OV; Wed, 24 Jun 2020 11:43:12 -0400 Date: Wed, 24 Jun 2020 18:42:55 +0300 Message-Id: <835zbgtqps.fsf@gnu.org> From: Eli Zaretskii To: dgutov@yandex.ru In-Reply-To: <837dvwtrv1.fsf@gnu.org> (message from Eli Zaretskii on Wed, 24 Jun 2020 18:18:10 +0300) Subject: Re: bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects References: <87r1ulxk48.fsf@mail.linkov.net> <7164426e-8c37-8839-64da-563cfa829b53@yandex.ru> <87mu50j5cu.fsf@mail.linkov.net> <87y2oh8fdv.fsf@mail.linkov.net> <87366ohw5z.fsf@mail.linkov.net> <878sge7jls.fsf@mail.linkov.net> <7e136435-7123-fa42-e4a8-66b82e6595da@yandex.ru> <87pn9pxris.fsf@mail.linkov.net> <83d05ottnw.fsf@gnu.org> <0b42f540-f779-446b-4411-8dae3a50d09d@yandex.ru> <837dvwtrv1.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 41821 Cc: 41821@debbugs.gnu.org, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Wed, 24 Jun 2020 18:18:10 +0300 > From: Eli Zaretskii > Cc: 41821@debbugs.gnu.org, juri@linkov.net > > As I tried to explain, I'd like to avoid calling such functions from > preloaded code. Maybe I should have said explicitly something I thought was quite obvious: a file FOO-hooks.el is usually a preloaded part of package FOO. It is therefore unusual, even IMO somewhat unclean, to have FOO-hooks.el to call non-preloaded functions from package other than FOO. So is it possible to have vc-known-roots defined in vc.el instead of in vc-hooks.el? TIA From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 24 14:13:18 2020 Received: (at 41821) by debbugs.gnu.org; 24 Jun 2020 18:13:18 +0000 Received: from localhost ([127.0.0.1]:38886 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jo9te-0001RS-8m for submit@debbugs.gnu.org; Wed, 24 Jun 2020 14:13:18 -0400 Received: from mail-wr1-f51.google.com ([209.85.221.51]:40230) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jo9tc-0001RD-Hg for 41821@debbugs.gnu.org; Wed, 24 Jun 2020 14:13:17 -0400 Received: by mail-wr1-f51.google.com with SMTP id h5so3209942wrc.7 for <41821@debbugs.gnu.org>; Wed, 24 Jun 2020 11:13:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=yStUtUrjRo0ReaB7oIrs4OKN45IWbl7ALjzfvUGob6I=; b=r6usOecuQGoCTeiRaSmIviCS5GnaS7rdt1Ce6FEZSWCDCwFcgqfe4XmbFcAGOydi2g 0iB8sfYKqETl6nVtwWFesFMJ8KWdxqK75FivL2QCkV7EspFSZYxHBro0D3O8v9JGKtto MpigvXZ/Zb2a62g1E+cgD3NK1ETmIW0POoAzaBai+VINcEu1PxgEf43SaJB0sdQyV2d6 RGD12ZI+/5A5Kc5us1FC5RtJNRC3EhzPjykVrvzaRB/goL7asFkmGERspLLs1rAs8BSN WMPlIBSdfY0epOCSzrRjFDJJf/K7scsQYw3Qt0GjNLkkeLC7TYRBeIPZql1pEwxxj6qo AOYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=yStUtUrjRo0ReaB7oIrs4OKN45IWbl7ALjzfvUGob6I=; b=Jq1cN/Q+YFPP46WcdGuKn5YDLLdKQYJoJEV2nrukK//FCYHtQAn7+naKqyNrgGUI8E XnVqeZKL852uy5ScrIh82VeTW94IPxd/v9lkee3DtIVl9WefsnBYwIsNxFNFyWJlrAGR hFck739ohzikRWH5f1Ua/rRAG/eqXxXIUn1PiQt9LZbzF/P12fFGqfuNlzst/8o5bMsU gDUH9AVyilCqj9zSbBceiGm5U9ShC9q0ux6tD+a+JEV7ZLom6pi3YGcXPyt5i5EMQq2I 2h7jchQKwqEsw0Nqlc5T1pQFFhjgvPEXkK5OFjFXkrte7usEPBTu342GB8fGNpuJW36/ RBbQ== X-Gm-Message-State: AOAM530WNAhMn045TB54BSX72pnyShtfdjoHZzG7YOIdI8at5Y4UxzjQ O121gua9+jei3Nx09PuhwKw= X-Google-Smtp-Source: ABdhPJwvTjg/s4BVjdyG1QaHz6SciwfqedAoSenVSHtEzCBRULHnmP4BbEa7lHL323xMsPnEso6cyw== X-Received: by 2002:a5d:5647:: with SMTP id j7mr23759228wrw.242.1593022390418; Wed, 24 Jun 2020 11:13:10 -0700 (PDT) Received: from [192.168.0.3] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id n8sm24853414wrj.44.2020.06.24.11.13.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 24 Jun 2020 11:13:09 -0700 (PDT) Subject: Re: bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects To: Eli Zaretskii References: <87r1ulxk48.fsf@mail.linkov.net> <7164426e-8c37-8839-64da-563cfa829b53@yandex.ru> <87mu50j5cu.fsf@mail.linkov.net> <87y2oh8fdv.fsf@mail.linkov.net> <87366ohw5z.fsf@mail.linkov.net> <878sge7jls.fsf@mail.linkov.net> <7e136435-7123-fa42-e4a8-66b82e6595da@yandex.ru> <87pn9pxris.fsf@mail.linkov.net> <83d05ottnw.fsf@gnu.org> <0b42f540-f779-446b-4411-8dae3a50d09d@yandex.ru> <837dvwtrv1.fsf@gnu.org> <835zbgtqps.fsf@gnu.org> From: Dmitry Gutov Message-ID: <625de669-0715-1467-0bd1-84328b4bee5f@yandex.ru> Date: Wed, 24 Jun 2020 21:13:07 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <835zbgtqps.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 41821 Cc: 41821@debbugs.gnu.org, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 24.06.2020 18:42, Eli Zaretskii wrote: > So is it possible to have vc-known-roots defined in vc.el instead of > in vc-hooks.el? Okay, but that new function delegates to code in project.el anyway, what would be the practical difference? OTOH, if you just said we shouldn't use project.el in vc/*, I could understand that. From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 24 14:29:38 2020 Received: (at 41821) by debbugs.gnu.org; 24 Jun 2020 18:29:38 +0000 Received: from localhost ([127.0.0.1]:38986 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1joA9S-0001sT-5Z for submit@debbugs.gnu.org; Wed, 24 Jun 2020 14:29:38 -0400 Received: from eggs.gnu.org ([209.51.188.92]:41166) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1joA9P-0001sE-HF for 41821@debbugs.gnu.org; Wed, 24 Jun 2020 14:29:36 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:53589) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1joA9J-0000f8-A5; Wed, 24 Jun 2020 14:29:29 -0400 Received: from [176.228.60.248] (port=4340 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1joA9H-0004Pp-6D; Wed, 24 Jun 2020 14:29:28 -0400 Date: Wed, 24 Jun 2020 21:29:11 +0300 Message-Id: <83wo3ws4g8.fsf@gnu.org> From: Eli Zaretskii To: Dmitry Gutov In-Reply-To: <625de669-0715-1467-0bd1-84328b4bee5f@yandex.ru> (message from Dmitry Gutov on Wed, 24 Jun 2020 21:13:07 +0300) Subject: Re: bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects References: <87r1ulxk48.fsf@mail.linkov.net> <7164426e-8c37-8839-64da-563cfa829b53@yandex.ru> <87mu50j5cu.fsf@mail.linkov.net> <87y2oh8fdv.fsf@mail.linkov.net> <87366ohw5z.fsf@mail.linkov.net> <878sge7jls.fsf@mail.linkov.net> <7e136435-7123-fa42-e4a8-66b82e6595da@yandex.ru> <87pn9pxris.fsf@mail.linkov.net> <83d05ottnw.fsf@gnu.org> <0b42f540-f779-446b-4411-8dae3a50d09d@yandex.ru> <837dvwtrv1.fsf@gnu.org> <835zbgtqps.fsf@gnu.org> <625de669-0715-1467-0bd1-84328b4bee5f@yandex.ru> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 41821 Cc: 41821@debbugs.gnu.org, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: 41821@debbugs.gnu.org, juri@linkov.net > From: Dmitry Gutov > Date: Wed, 24 Jun 2020 21:13:07 +0300 > > On 24.06.2020 18:42, Eli Zaretskii wrote: > > So is it possible to have vc-known-roots defined in vc.el instead of > > in vc-hooks.el? > > Okay, but that new function delegates to code in project.el anyway, what > would be the practical difference? It would be somewhat cleaner, I think. Doesn't vc.el already have some calls to project.el? > OTOH, if you just said we shouldn't use project.el in vc/*, I could > understand that. That'd be unreasonably harsh, I think. Actually, I have a question: isn't project.el conceptually a higher-level feature than VC? If so, how come VC wants to call project.el? From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 24 14:30:26 2020 Received: (at 41821) by debbugs.gnu.org; 24 Jun 2020 18:30:26 +0000 Received: from localhost ([127.0.0.1]:38993 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1joAAA-0001vS-G9 for submit@debbugs.gnu.org; Wed, 24 Jun 2020 14:30:26 -0400 Received: from mail-ej1-f53.google.com ([209.85.218.53]:37209) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1joA9u-0001tV-Uo for 41821@debbugs.gnu.org; Wed, 24 Jun 2020 14:30:22 -0400 Received: by mail-ej1-f53.google.com with SMTP id mb16so3443219ejb.4 for <41821@debbugs.gnu.org>; Wed, 24 Jun 2020 11:30:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=XzWjVdpBqdAxTFbHiPEkxPMblQagwzUkgnp0963q9NU=; b=afe2x0dfk0CL+j2jWZO6bc9HDk6LaClQ65viRF68/WxYgleZF8UPrP8QECoj1Jp35n zrhoaJDdBmYn65o7dP3Qzblklb/0iWVFiG44S8+nKybpZXS6JX7X7Vi9vQXqavA3Ca3/ Skvv87R3m2TEt6d4XjuYxPLOkSKWqEY5hnED88zuPJIzqts8E7slfMi2cmEifOegREiB 1u+Vlv0hTsmVsRsA7TklYkJi1Zo2tsweqKX+jJoM7GtgWuAgC0WfVIKbtRovDaciJM+9 QLKPpPf+NIniGkyXfGTLYRhthz24BncALXu017Ug/AoHICzDZMsHuheer6vX0X4HC1JI wTbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=XzWjVdpBqdAxTFbHiPEkxPMblQagwzUkgnp0963q9NU=; b=PiE25Wj94Yo3MkCgUxLojvG6fl3CXJtsQ85Rw0RVfe/P580dLaMha0HMjCim8DNtBi kf2Z25mqb/RVBrZJAtJif2EheF5+n/otXLBS4sGFNWbw74wS27dWMDSvuYFPL5P8T6Qg a/UPB5FoXX3KGUFhQWgSpyaDTVuxG98rP2B+2BMF9qbMOS/njEajvulaWsIii2RpKADc F9pdrZKeerLLZxSOYL5EKctfzLKGRqwGmXcQeYXzpTC1XhpC0PtIC+8De8iTRshrNJkE zWdYvRTK3p0fIf23C9/40GminmQ/6XwMFn2S/8Q1noTFfWBWs2hbshMg2SgR67ziqAOR Ps1g== X-Gm-Message-State: AOAM531ycZowB4Jgk4USbXhCpzmSj7qJzHahT9SVfEjAbjZwDcpI2NkQ Ne0XR3534Zw3dLgOFwKA6Ak+STcW X-Google-Smtp-Source: ABdhPJxX9oHZ/CKwTKG6Q1zwWACX6CQkJl+OHh2EK9zZ96QGOdFzTV312ApOLQhs2GHt8ZxnVVsdSQ== X-Received: by 2002:a17:906:685a:: with SMTP id a26mr17112505ejs.48.1593023401125; Wed, 24 Jun 2020 11:30:01 -0700 (PDT) Received: from [192.168.0.3] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id p18sm3329187ejm.55.2020.06.24.11.30.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 24 Jun 2020 11:30:00 -0700 (PDT) Subject: Re: bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects To: Juri Linkov References: <87r1ulxk48.fsf@mail.linkov.net> <7164426e-8c37-8839-64da-563cfa829b53@yandex.ru> <87mu50j5cu.fsf@mail.linkov.net> <87y2oh8fdv.fsf@mail.linkov.net> <87366ohw5z.fsf@mail.linkov.net> <878sge7jls.fsf@mail.linkov.net> <7e136435-7123-fa42-e4a8-66b82e6595da@yandex.ru> <87pn9pxris.fsf@mail.linkov.net> From: Dmitry Gutov Message-ID: <38defd22-755e-fb46-04a7-b5e70180e446@yandex.ru> Date: Wed, 24 Jun 2020 21:29:58 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <87pn9pxris.fsf@mail.linkov.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 41821 Cc: 41821@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 24.06.2020 02:59, Juri Linkov wrote: >> Close. > > I interpreted this as a verb in the imperative mood, so closed the report :) A bit premature: both the name and the docstring need to be changed. And the return value currently returns a private structure, instead of a list of strings, as promised by the name. But since we might revert this commit either way, let's shelve discussing these details for now. From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 24 14:44:13 2020 Received: (at 41821) by debbugs.gnu.org; 24 Jun 2020 18:44:13 +0000 Received: from localhost ([127.0.0.1]:39017 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1joANY-0002GF-7t for submit@debbugs.gnu.org; Wed, 24 Jun 2020 14:44:13 -0400 Received: from mail-ed1-f54.google.com ([209.85.208.54]:38932) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1joANV-0002G1-JG for 41821@debbugs.gnu.org; Wed, 24 Jun 2020 14:44:10 -0400 Received: by mail-ed1-f54.google.com with SMTP id g1so2256699edv.6 for <41821@debbugs.gnu.org>; Wed, 24 Jun 2020 11:44:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=AKdszR6psKAJMx4hfidO1Ybb9BwZmAqqG3P/uW3WDhE=; b=WweutcbdSgGSzS+YOvjrMO+ODv3eIFkQT584cclH1Rp/FQ5oGiKG9EdfEUpL3JRGe9 5V0lrp318cbEg5c5Sx8jjoXIKEFQ+qp31pmP+0xez9cGeDZ+kc6c57udhwSxjbDYb7D0 ONwQdK2TNETQoFG4tLJ4Prhrg2fGgR2fzvE79KsGIIEGpOcczQkUdcMazTBH/Y7LgKtH lQ+EWYbG2tHOu37OVGgZKqp6GTSvFdnR1HYH9Uft8wG3eKgwgmGZsZ9GcEOh68C0R8W/ +DrF3mgAjh+iRkaE3ZEMlRFpej+Nw+X5gpQBernO5h8CNFgF0qwCibaSnXP2XknJRYLC CYWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=AKdszR6psKAJMx4hfidO1Ybb9BwZmAqqG3P/uW3WDhE=; b=b4LSV2UMWeEzlHidN+lCl92brGr/CG6GwlVmTgjaXViR83ijMHl1kYiWtxoaDd5deT w4ohs2K1GDc28J+FhCqPA1kQi8WnLKltmbdrJOPRvcwJ5YXmsYJ1cgQ2EoVkDemgDE83 YnBRGKZ5nOFCF1RMe50pwcNirnYyi8wxUQKn841DCGW0h1r+ulcDvs8TffruuBAPNPEG tkYLm54BMxFVqqd+33TY+pd8LTy10QtOWcF+ER5DqwTGTaCzXsGTua11wKyd9O81GcdF QX1pvvasxmfahQ9WrbvAAd6Pf9xOk7seoKgpyUQr/b5cPopGK8LBVx+dsJwcSxzO/6Gl xKFg== X-Gm-Message-State: AOAM533ksYp5bf9BhrEgt20vTgZMhd6hARZsW4lZM1amJMyO8LHsv4OW w4juJ9Y5ioW1/gGWdX0mWJI= X-Google-Smtp-Source: ABdhPJxEsYmqzJGiHK5tq0iLfXT/bzdvR5Mw+yDBCwBEinbw+oc+geM/TiD6OIgCPKy4gHGIZMpyfg== X-Received: by 2002:a05:6402:17ce:: with SMTP id s14mr27891997edy.53.1593024243716; Wed, 24 Jun 2020 11:44:03 -0700 (PDT) Received: from [192.168.0.3] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id k8sm16710391edn.28.2020.06.24.11.44.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 24 Jun 2020 11:44:03 -0700 (PDT) Subject: Re: bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects To: Eli Zaretskii References: <87r1ulxk48.fsf@mail.linkov.net> <7164426e-8c37-8839-64da-563cfa829b53@yandex.ru> <87mu50j5cu.fsf@mail.linkov.net> <87y2oh8fdv.fsf@mail.linkov.net> <87366ohw5z.fsf@mail.linkov.net> <878sge7jls.fsf@mail.linkov.net> <7e136435-7123-fa42-e4a8-66b82e6595da@yandex.ru> <87pn9pxris.fsf@mail.linkov.net> <83d05ottnw.fsf@gnu.org> <0b42f540-f779-446b-4411-8dae3a50d09d@yandex.ru> <837dvwtrv1.fsf@gnu.org> <835zbgtqps.fsf@gnu.org> <625de669-0715-1467-0bd1-84328b4bee5f@yandex.ru> <83wo3ws4g8.fsf@gnu.org> From: Dmitry Gutov Message-ID: Date: Wed, 24 Jun 2020 21:44:01 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <83wo3ws4g8.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 41821 Cc: 41821@debbugs.gnu.org, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 24.06.2020 21:29, Eli Zaretskii wrote: >> Cc: 41821@debbugs.gnu.org, juri@linkov.net >> From: Dmitry Gutov >> Date: Wed, 24 Jun 2020 21:13:07 +0300 >> >> On 24.06.2020 18:42, Eli Zaretskii wrote: >>> So is it possible to have vc-known-roots defined in vc.el instead of >>> in vc-hooks.el? >> >> Okay, but that new function delegates to code in project.el anyway, what >> would be the practical difference? > > It would be somewhat cleaner, I think. That's the whole reason? I mean, I'm not going to protest against an extra wrapper, but that doesn't sound like it would solve any practical problems. "Cleaner" solutions often have those. > Doesn't vc.el already have some calls to project.el? Nope. >> OTOH, if you just said we shouldn't use project.el in vc/*, I could >> understand that. > > That'd be unreasonably harsh, I think. But that would be a limitation I could understand (don't use non-preloaded code from preloaded code, period). > Actually, I have a question: isn't project.el conceptually a > higher-level feature than VC? If so, how come VC wants to call > project.el? VC doesn't serve project.el only. project.el doesn't solely use VC. Apparently Juri wants to use certain data collected and saved by project.el UI, for convenience. The alternative would be to introduce some separate history-keeping feature for the cases when VC code needs to ask the user to point to a VC repository. From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 24 19:46:48 2020 Received: (at 41821) by debbugs.gnu.org; 24 Jun 2020 23:46:48 +0000 Received: from localhost ([127.0.0.1]:39321 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1joF6N-0005W2-Mq for submit@debbugs.gnu.org; Wed, 24 Jun 2020 19:46:47 -0400 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:46629) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1joF6K-0005Vj-P2 for 41821@debbugs.gnu.org; Wed, 24 Jun 2020 19:46:46 -0400 X-Originating-IP: 91.129.108.6 Received: from mail.gandi.net (m91-129-108-6.cust.tele2.ee [91.129.108.6]) (Authenticated sender: juri@linkov.net) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 31D041C0010; Wed, 24 Jun 2020 23:46:37 +0000 (UTC) From: Juri Linkov To: Eli Zaretskii Subject: Re: bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects Organization: LINKOV.NET References: <87r1ulxk48.fsf@mail.linkov.net> <7164426e-8c37-8839-64da-563cfa829b53@yandex.ru> <87mu50j5cu.fsf@mail.linkov.net> <87y2oh8fdv.fsf@mail.linkov.net> <87366ohw5z.fsf@mail.linkov.net> <878sge7jls.fsf@mail.linkov.net> <7e136435-7123-fa42-e4a8-66b82e6595da@yandex.ru> <87pn9pxris.fsf@mail.linkov.net> <83d05ottnw.fsf@gnu.org> <0b42f540-f779-446b-4411-8dae3a50d09d@yandex.ru> <837dvwtrv1.fsf@gnu.org> <835zbgtqps.fsf@gnu.org> Date: Thu, 25 Jun 2020 02:22:40 +0300 In-Reply-To: <835zbgtqps.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 24 Jun 2020 18:42:55 +0300") Message-ID: <87lfkccb2v.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 41821 Cc: 41821@debbugs.gnu.org, dgutov@yandex.ru X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > So is it possible to have vc-known-roots defined in vc.el instead of > in vc-hooks.el? Actually I see no problem with vc-known-roots defined in vc-hooks.el, but moving it to vc.el should be fine too: all vc subpackages require vc.el, so vc-known-roots will be available in these backends from vc.el. From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 24 19:46:53 2020 Received: (at 41821) by debbugs.gnu.org; 24 Jun 2020 23:46:53 +0000 Received: from localhost ([127.0.0.1]:39325 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1joF6T-0005WU-1A for submit@debbugs.gnu.org; Wed, 24 Jun 2020 19:46:53 -0400 Received: from relay8-d.mail.gandi.net ([217.70.183.201]:42697) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1joF6N-0005Vp-Ph for 41821@debbugs.gnu.org; Wed, 24 Jun 2020 19:46:49 -0400 X-Originating-IP: 91.129.108.6 Received: from mail.gandi.net (m91-129-108-6.cust.tele2.ee [91.129.108.6]) (Authenticated sender: juri@linkov.net) by relay8-d.mail.gandi.net (Postfix) with ESMTPSA id E3F711BF205; Wed, 24 Jun 2020 23:46:40 +0000 (UTC) From: Juri Linkov To: Dmitry Gutov Subject: Re: bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects Organization: LINKOV.NET References: <87r1ulxk48.fsf@mail.linkov.net> <7164426e-8c37-8839-64da-563cfa829b53@yandex.ru> <87mu50j5cu.fsf@mail.linkov.net> <87y2oh8fdv.fsf@mail.linkov.net> <87366ohw5z.fsf@mail.linkov.net> <878sge7jls.fsf@mail.linkov.net> <7e136435-7123-fa42-e4a8-66b82e6595da@yandex.ru> <87pn9pxris.fsf@mail.linkov.net> <83d05ottnw.fsf@gnu.org> <0b42f540-f779-446b-4411-8dae3a50d09d@yandex.ru> <837dvwtrv1.fsf@gnu.org> <835zbgtqps.fsf@gnu.org> <625de669-0715-1467-0bd1-84328b4bee5f@yandex.ru> <83wo3ws4g8.fsf@gnu.org> Date: Thu, 25 Jun 2020 02:25:04 +0300 In-Reply-To: (Dmitry Gutov's message of "Wed, 24 Jun 2020 21:44:01 +0300") Message-ID: <87d05ocayv.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 41821 Cc: Eli Zaretskii , 41821@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > Apparently Juri wants to use certain data collected and saved by project.el > UI, for convenience. This feature was implemented to address Stephen's concerns in https://debbugs.gnu.org/38044#233 > The alternative would be to introduce some separate history-keeping feature > for the cases when VC code needs to ask the user to point to > a VC repository. It wouldn't be rational to duplicate this feature. Rather I think the project-list should be updated even on using vc commands such as 'C-x v d', i.e. project and vc should be more tightly integrated. From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 25 07:19:31 2020 Received: (at 41821) by debbugs.gnu.org; 25 Jun 2020 11:19:31 +0000 Received: from localhost ([127.0.0.1]:39799 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1joPul-0005hc-Av for submit@debbugs.gnu.org; Thu, 25 Jun 2020 07:19:31 -0400 Received: from mail-ed1-f42.google.com ([209.85.208.42]:36451) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1joPug-0005hM-1K for 41821@debbugs.gnu.org; Thu, 25 Jun 2020 07:19:29 -0400 Received: by mail-ed1-f42.google.com with SMTP id dg28so3890323edb.3 for <41821@debbugs.gnu.org>; Thu, 25 Jun 2020 04:19:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=8+VoHxcmo1KE4HL/bz6xYysQsBsmOW1XeFWGQNvQhOI=; b=NZPz0KnwxsJszqGHCZJfHMxyfiWqJ9KnMNCNC7bEtdUry0PdBZJST2VVujfJP0dbAA fXTjHGaEqoc0J4hQ6ldtIQ8vh6GfdxcYvYpMYOwLePrBTrOpF8KopNV4FwnNJZL7E7Nc ZSyc6bWlV3V7V8gQvR3YQQEkogaHHp0NTpfAAzSn/8LM/d7QpGV+y32gaZA2Abxb5o6M ecZPKgURvdw4eiepdnSXvAEJIQTsLwui2WMsVYoiBrj8tGS0eYyZwM7nxwxePPQazgBS Lg0cuJkprEOfs9IVc+FXdRdZoGvYKfcR2f1HjPCW/RzO0ITJ+7MFs+y6WLhXgBTvb39Z NhzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=8+VoHxcmo1KE4HL/bz6xYysQsBsmOW1XeFWGQNvQhOI=; b=RWlfNCntUP1ngir4QndAGevAEyMFCpycvWEXCFiOI093Ch85Fe64RY0dpQ2K0lAvas UnSwtbjnf1XaWapNggSQylRGdlz2sLwqPcScJKpbMSS4ucoqWUO2k2/q/Ogyxv3ehaDK R1ZHHbjsYugqmqlG9Nv6f7fSffenCdfu/I+kCYNqcKY+U2eMYvBpIoj/ZNGhfduPUQQ1 tvHSTkiuOpWdS9BhrFjCpsAO3iOj/U1vbad7B0HkIgkmuYqhnLO4yljXALht+/BT/vac uwKApnZbPL9vyrCjxZBUcVZUaBza+8pEc2RxFRqji87dFIZeqzLXr9Jp+XQvoqgLSVnV aIdw== X-Gm-Message-State: AOAM5329mcf4MSdE85zatA4j9zq26mVBpplkL3JleyEcFnPAff4XJs/F ManTADAeayU+WxkhOamfhupCzvuo X-Google-Smtp-Source: ABdhPJyPkIAYbPotvLc/U199xXy5H51hzDTGVXNWzfG4n4qZZCOVSa0jpXzBRGIrTNYO7LmP1T/Slg== X-Received: by 2002:aa7:ccd5:: with SMTP id y21mr6477109edt.91.1593083959944; Thu, 25 Jun 2020 04:19:19 -0700 (PDT) Received: from [192.168.0.3] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id p9sm11718805ejd.50.2020.06.25.04.19.18 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 25 Jun 2020 04:19:19 -0700 (PDT) Subject: Re: bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects To: Juri Linkov References: <87r1ulxk48.fsf@mail.linkov.net> <7164426e-8c37-8839-64da-563cfa829b53@yandex.ru> <87mu50j5cu.fsf@mail.linkov.net> <87y2oh8fdv.fsf@mail.linkov.net> <87366ohw5z.fsf@mail.linkov.net> <878sge7jls.fsf@mail.linkov.net> <7e136435-7123-fa42-e4a8-66b82e6595da@yandex.ru> <87pn9pxris.fsf@mail.linkov.net> <83d05ottnw.fsf@gnu.org> <0b42f540-f779-446b-4411-8dae3a50d09d@yandex.ru> <837dvwtrv1.fsf@gnu.org> <835zbgtqps.fsf@gnu.org> <625de669-0715-1467-0bd1-84328b4bee5f@yandex.ru> <83wo3ws4g8.fsf@gnu.org> <87d05ocayv.fsf@mail.linkov.net> From: Dmitry Gutov Message-ID: <3b02d004-07cd-66e9-b95a-d432fbb3f943@yandex.ru> Date: Thu, 25 Jun 2020 14:19:16 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <87d05ocayv.fsf@mail.linkov.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 41821 Cc: 41821@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 25.06.2020 02:25, Juri Linkov wrote: >> The alternative would be to introduce some separate history-keeping feature >> for the cases when VC code needs to ask the user to point to >> a VC repository. > It wouldn't be rational to duplicate this feature. > Rather I think the project-list should be updated > even on using vc commands such as 'C-x v d', i.e. > project and vc should be more tightly integrated. That would mean opening the project history storage to outside packages. I don't know. To be honest, I almost never experience the problem this bug was fixing. Before requesting revision log, I'm almost always already in some project buffer. From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 25 09:20:42 2020 Received: (at 41821) by debbugs.gnu.org; 25 Jun 2020 13:20:42 +0000 Received: from localhost ([127.0.0.1]:39932 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1joRo2-0004TM-E2 for submit@debbugs.gnu.org; Thu, 25 Jun 2020 09:20:42 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44204) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1joRo0-0004T6-Bm for 41821@debbugs.gnu.org; Thu, 25 Jun 2020 09:20:41 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:39486) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1joRnu-00026n-J0; Thu, 25 Jun 2020 09:20:34 -0400 Received: from [176.228.60.248] (port=1652 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1joRnt-0006RN-Bu; Thu, 25 Jun 2020 09:20:34 -0400 Date: Thu, 25 Jun 2020 16:20:10 +0300 Message-Id: <83tuyzs2np.fsf@gnu.org> From: Eli Zaretskii To: Dmitry Gutov In-Reply-To: (message from Dmitry Gutov on Wed, 24 Jun 2020 21:44:01 +0300) Subject: Re: bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects References: <87r1ulxk48.fsf@mail.linkov.net> <7164426e-8c37-8839-64da-563cfa829b53@yandex.ru> <87mu50j5cu.fsf@mail.linkov.net> <87y2oh8fdv.fsf@mail.linkov.net> <87366ohw5z.fsf@mail.linkov.net> <878sge7jls.fsf@mail.linkov.net> <7e136435-7123-fa42-e4a8-66b82e6595da@yandex.ru> <87pn9pxris.fsf@mail.linkov.net> <83d05ottnw.fsf@gnu.org> <0b42f540-f779-446b-4411-8dae3a50d09d@yandex.ru> <837dvwtrv1.fsf@gnu.org> <835zbgtqps.fsf@gnu.org> <625de669-0715-1467-0bd1-84328b4bee5f@yandex.ru> <83wo3ws4g8.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 41821 Cc: 41821@debbugs.gnu.org, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: 41821@debbugs.gnu.org, juri@linkov.net > From: Dmitry Gutov > Date: Wed, 24 Jun 2020 21:44:01 +0300 > > >> Okay, but that new function delegates to code in project.el anyway, what > >> would be the practical difference? > > > > It would be somewhat cleaner, I think. > > That's the whole reason? Well, the whole issue at hand is a rather minor one. > I mean, I'm not going to protest against an > extra wrapper, but that doesn't sound like it would solve any practical > problems. "Cleaner" solutions often have those. In general, code that doesn't _have_ to be preloaded, shouldn't be. If nothing else, it keeps the memory footprint of a bare Emacs smaller, and thus prevents us from slipping down the slippery slope of memory bloat. > > Actually, I have a question: isn't project.el conceptually a > > higher-level feature than VC? If so, how come VC wants to call > > project.el? > > VC doesn't serve project.el only. project.el doesn't solely use VC. Yes, but that's not what I asked. I have the impression that project.el builds on VC as one project back-end, so it sounds strange to me that VC turns around and calls project.el for something. > Apparently Juri wants to use certain data collected and saved by > project.el UI, for convenience. After reading the original complaint that Juri says he wanted to resolve, I still don't understand why we use project.el for that. No one says that every relevant VC repository must have been visited as a project as part of the current Emacs session. Why not have some relevant history in VC itself? > The alternative would be to introduce some separate history-keeping > feature for the cases when VC code needs to ask the user to point to a > VC repository. Exactly. Why not? Juri answers: > It wouldn't be rational to duplicate this feature. > Rather I think the project-list should be updated > even on using vc commands such as 'C-x v d', i.e. > project and vc should be more tightly integrated. I don't think I agree. First, I don't see any duplication here: people could (and do) use VC directly, not through project.el, in which case project.el history wouldn't help. Moreover, using a command such as "C-x v d" doesn't mean I want project.el record that, again because I might be using project.el commands for projects that aren't based on VC. And if the history is collected by VC, it could be made available to project.el commands that call into VC, right? Anyway, if you-two feel strongly about keeping the current solution, i.e. having VC commands use project.el-collected history, I'd appreciate if that function could be moved to vc.el from vc-hooks.el, thanks in advance. From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 25 09:50:37 2020 Received: (at 41821) by debbugs.gnu.org; 25 Jun 2020 13:50:37 +0000 Received: from localhost ([127.0.0.1]:39952 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1joSGz-0005MH-CR for submit@debbugs.gnu.org; Thu, 25 Jun 2020 09:50:37 -0400 Received: from mail-ej1-f42.google.com ([209.85.218.42]:45595) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1joSGv-0005Lz-JD for 41821@debbugs.gnu.org; Thu, 25 Jun 2020 09:50:36 -0400 Received: by mail-ej1-f42.google.com with SMTP id a1so5977876ejg.12 for <41821@debbugs.gnu.org>; Thu, 25 Jun 2020 06:50:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=ml9GdNN+D7krosnnD5eKoccQYezbm2e0mujQxjLfjmM=; b=UmsJcM6DA7oUQ0UHwGrCcPIoX83ay95Z0DU7G/i3ztwWflq/BEvD/3JhGQCUm5cHVW rUwfs6PeV9fcZWTJbm2h3cF2r1Dy2iO8AE6aK0QLncs2TTdRAYUipp+qyaBZQ2yIP2yj oblX459+Q9r3eM90HTHiOf4WMo2eFwQyf3qEaa42+U1BYrb6UI775wo06mtN/ZJjpop5 m0uPVGZUgFoZCgIaUY2Ucg04TNbtH/33Dv05PT0E+F0f5cw88dmC3L3QPAl1FLrxySXZ 9wED88m6Fp3lsRN4D0ymhDFJrRTDf3Qf7VEwgfLI7GET0BZLQp79mcCOB68k+soI4Mgb mwhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=ml9GdNN+D7krosnnD5eKoccQYezbm2e0mujQxjLfjmM=; b=FiQL0NZV7FTwadeWXxDa9nAg7eYdtacjtmJzEzMhRqPGBa05+bCAGYMWA+yVw8TpI8 toqg+d9KBjtkZ+7/7WZSQsrxhiGyF1hXR/At3IaqJc6fehwZH7y/f2aaCcK4oWDd+07A ID0jBVLUJoHBvzopuSREjUKjNJfYma9F4lv0SEbeHu90uD6WFHCVvWQ9B5R0laYvQuQZ 2xa5NeN987x3JO5tuICBch9bHDxxHffEKuBhaw1iOnuSE64HcTx5uvfvG7gA2ZETYvZa tOfoNWCZUz8l4GXX0GFqjtHosvtowCftrheTOI/dFtGm4nLBK+5JuRqj8rWLDLjLnUC+ tBtA== X-Gm-Message-State: AOAM530eBzqQcrKOhs5DcRsNm3hvqFcwiV5oPa6fxuO5nAPHEGE8cPOM vhZ6aYgrFFJulpnJSFgIdGA= X-Google-Smtp-Source: ABdhPJwWYfawpz7MuwFVlMSnd1BDGcXliBa6twu45ZYbopT/DCwnBAo6GLI8oRTJ0cVY5wtXcbQzQA== X-Received: by 2002:a17:906:1357:: with SMTP id x23mr17987327ejb.148.1593093027644; Thu, 25 Jun 2020 06:50:27 -0700 (PDT) Received: from [192.168.0.3] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id t5sm18480474eds.81.2020.06.25.06.50.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 25 Jun 2020 06:50:26 -0700 (PDT) Subject: Re: bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects To: Eli Zaretskii References: <87r1ulxk48.fsf@mail.linkov.net> <7164426e-8c37-8839-64da-563cfa829b53@yandex.ru> <87mu50j5cu.fsf@mail.linkov.net> <87y2oh8fdv.fsf@mail.linkov.net> <87366ohw5z.fsf@mail.linkov.net> <878sge7jls.fsf@mail.linkov.net> <7e136435-7123-fa42-e4a8-66b82e6595da@yandex.ru> <87pn9pxris.fsf@mail.linkov.net> <83d05ottnw.fsf@gnu.org> <0b42f540-f779-446b-4411-8dae3a50d09d@yandex.ru> <837dvwtrv1.fsf@gnu.org> <835zbgtqps.fsf@gnu.org> <625de669-0715-1467-0bd1-84328b4bee5f@yandex.ru> <83wo3ws4g8.fsf@gnu.org> <83tuyzs2np.fsf@gnu.org> From: Dmitry Gutov Message-ID: <14381b78-ab1c-91e0-2297-426620b19684@yandex.ru> Date: Thu, 25 Jun 2020 16:50:24 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <83tuyzs2np.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 41821 Cc: 41821@debbugs.gnu.org, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 25.06.2020 16:20, Eli Zaretskii wrote: >> I mean, I'm not going to protest against an >> extra wrapper, but that doesn't sound like it would solve any practical >> problems. "Cleaner" solutions often have those. > > In general, code that doesn't _have_ to be preloaded, shouldn't be. > If nothing else, it keeps the memory footprint of a bare Emacs > smaller, and thus prevents us from slipping down the slippery slope of > memory bloat. And having vc-hooks call project.el functions at runtime would somehow force us to preload it? How? >>> Actually, I have a question: isn't project.el conceptually a >>> higher-level feature than VC? If so, how come VC wants to call >>> project.el? >> >> VC doesn't serve project.el only. project.el doesn't solely use VC. > > Yes, but that's not what I asked. I have the impression that > project.el builds on VC as one project back-end, so it sounds strange > to me that VC turns around and calls project.el for something. Considering one doesn't exclusively serve the other, I wouldn't say there is a strict hierarchy. To be more accurate, we're actually talking about different parts of VC and project.el (the UI and infrastructure parts), which have different relations. >> Apparently Juri wants to use certain data collected and saved by >> project.el UI, for convenience. > > After reading the original complaint that Juri says he wanted to > resolve, I still don't understand why we use project.el for that. No > one says that every relevant VC repository must have been visited as a > project as part of the current Emacs session. Why not have some > relevant history in VC itself? I would be totally fine with that solution as well. >> The alternative would be to introduce some separate history-keeping >> feature for the cases when VC code needs to ask the user to point to a >> VC repository. > > Exactly. Why not? The downside, of course, is having the user input the same thing multiple times sometimes. And some extra code. Overall, both seem minor (and the inconvenience is going to be infrequent). > And if the history is collected by VC, it could be made available to > project.el commands that call into VC, right? But we want to store history on all projects, not just VC based ones. > Anyway, if you-two feel strongly about keeping the current solution, > i.e. having VC commands use project.el-collected history, I'd > appreciate if that function could be moved to vc.el from vc-hooks.el, > thanks in advance. We can't just move it: it accesses information private to project.el. The best we could do is a wrapper function. From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 25 12:32:14 2020 Received: (at 41821) by debbugs.gnu.org; 25 Jun 2020 16:32:14 +0000 Received: from localhost ([127.0.0.1]:40986 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1joUnO-0003SG-6u for submit@debbugs.gnu.org; Thu, 25 Jun 2020 12:32:14 -0400 Received: from eggs.gnu.org ([209.51.188.92]:43702) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1joUnM-0003S1-2e for 41821@debbugs.gnu.org; Thu, 25 Jun 2020 12:32:13 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:41890) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1joUnG-0003SQ-4C; Thu, 25 Jun 2020 12:32:06 -0400 Received: from [176.228.60.248] (port=1729 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1joUnF-0005C1-6H; Thu, 25 Jun 2020 12:32:05 -0400 Date: Thu, 25 Jun 2020 19:31:46 +0300 Message-Id: <83r1u3rtsd.fsf@gnu.org> From: Eli Zaretskii To: Dmitry Gutov In-Reply-To: <14381b78-ab1c-91e0-2297-426620b19684@yandex.ru> (message from Dmitry Gutov on Thu, 25 Jun 2020 16:50:24 +0300) Subject: Re: bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects References: <87r1ulxk48.fsf@mail.linkov.net> <7164426e-8c37-8839-64da-563cfa829b53@yandex.ru> <87mu50j5cu.fsf@mail.linkov.net> <87y2oh8fdv.fsf@mail.linkov.net> <87366ohw5z.fsf@mail.linkov.net> <878sge7jls.fsf@mail.linkov.net> <7e136435-7123-fa42-e4a8-66b82e6595da@yandex.ru> <87pn9pxris.fsf@mail.linkov.net> <83d05ottnw.fsf@gnu.org> <0b42f540-f779-446b-4411-8dae3a50d09d@yandex.ru> <837dvwtrv1.fsf@gnu.org> <835zbgtqps.fsf@gnu.org> <625de669-0715-1467-0bd1-84328b4bee5f@yandex.ru> <83wo3ws4g8.fsf@gnu.org> <83tuyzs2np.fsf@gnu.org> <14381b78-ab1c-91e0-2297-426620b19684@yandex.ru> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 41821 Cc: 41821@debbugs.gnu.org, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: 41821@debbugs.gnu.org, juri@linkov.net > From: Dmitry Gutov > Date: Thu, 25 Jun 2020 16:50:24 +0300 > > > In general, code that doesn't _have_ to be preloaded, shouldn't be. > > If nothing else, it keeps the memory footprint of a bare Emacs > > smaller, and thus prevents us from slipping down the slippery slope of > > memory bloat. > > And having vc-hooks call project.el functions at runtime would somehow > force us to preload it? How? It's enough that someone makes the function a macro, or does something else similarly innocent. > > Anyway, if you-two feel strongly about keeping the current solution, > > i.e. having VC commands use project.el-collected history, I'd > > appreciate if that function could be moved to vc.el from vc-hooks.el, > > thanks in advance. > > We can't just move it: it accesses information private to project.el. > The best we could do is a wrapper function. Sorry, I don't understand: why can't we move it from vc-hooks.el to vc.el, and why doing that would need a wrapper? From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 25 12:45:58 2020 Received: (at 41821) by debbugs.gnu.org; 25 Jun 2020 16:45:58 +0000 Received: from localhost ([127.0.0.1]:41007 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1joV0f-0003oI-Rn for submit@debbugs.gnu.org; Thu, 25 Jun 2020 12:45:58 -0400 Received: from mail-ed1-f47.google.com ([209.85.208.47]:37899) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1joV0c-0003o0-QW for 41821@debbugs.gnu.org; Thu, 25 Jun 2020 12:45:56 -0400 Received: by mail-ed1-f47.google.com with SMTP id cy7so4733510edb.5 for <41821@debbugs.gnu.org>; Thu, 25 Jun 2020 09:45:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=XYWCZw8cVrgxTcgt6R2hxL9dcvUzv4cQNmPp7ZFHOwk=; b=s/An10o3fe2aRMLE1dpAP4BoLL1tap07W/2OiKCj1IxQsHfxbXKVlZZ85TmZafXthp KM/fjngD1taeR+QPip9A+ZX2rFAZI6Hem9h1OVZi9yPTTdMK0fGlAq1eLt4SDeI01aoM 7eF1Gm3kSvV/utSBmEQT9ftTO29Im9rwMUENBD7yT8SckB/SFWmEpVVQ3PvPxxeXVdIo qJuuU4SGWDd4nZzdAZp8tCufEoecD2lXYTUs4yn3O+w0P5k9iOyeHD3qfD5u7hSQri0V y74rZEleMYRPAZpYHjIGy9/1T93GKFcLqtvj3KHgu+WRRbta1tAKfW5zy2UIP2gRqmht 2oPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=XYWCZw8cVrgxTcgt6R2hxL9dcvUzv4cQNmPp7ZFHOwk=; b=nwRLMy3ghnev1RDYJCD0MpCkWHBwiuYQJ3gW4oug5tJ5SxNitpG6nBs6dwiDff7itS Mx3of51SSgjk6N1m8h7nWFazu3onG/wAaFCFeYZYA01mu3yuJ7cJ4hLgvvu9y0VQ1Jpb 9GnNBr3VBrjNHFytz9O4Ow/zwu+zDhfBcW/o1HPiY58t1hrdE/XMMHBapw2r0jkSagrZ V9/rAEMgM0thEP4CyTPMZN8kTaJn9u/4GGExDRyuRC5mvArI9ubvIGJHVb1mj55YngFI LDGoXHg0zNHkxFpZge76dukgg1c2LWa3Kr5ZuVvNZCkufDXC45Kj5U9Zkz1iHzMBS4Lq Ezug== X-Gm-Message-State: AOAM531mPPHP3beoAEhwcws5ItvRaTsdAygjlHG+qchTHnf+3hGIy0NI ZuFI8tq4xiqCzIcXQDh4jzQ= X-Google-Smtp-Source: ABdhPJwdk0v0nBfxEcdyiYlYZoum2mfwlAYAKJBbtUXwWdkwKzB5D9qYOWNML4lFmpDg8cwch2Kj7Q== X-Received: by 2002:a50:ab52:: with SMTP id t18mr18068994edc.195.1593103548973; Thu, 25 Jun 2020 09:45:48 -0700 (PDT) Received: from [192.168.0.3] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id p18sm4823605ejm.55.2020.06.25.09.45.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 25 Jun 2020 09:45:47 -0700 (PDT) Subject: Re: bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects To: Eli Zaretskii References: <87r1ulxk48.fsf@mail.linkov.net> <7164426e-8c37-8839-64da-563cfa829b53@yandex.ru> <87mu50j5cu.fsf@mail.linkov.net> <87y2oh8fdv.fsf@mail.linkov.net> <87366ohw5z.fsf@mail.linkov.net> <878sge7jls.fsf@mail.linkov.net> <7e136435-7123-fa42-e4a8-66b82e6595da@yandex.ru> <87pn9pxris.fsf@mail.linkov.net> <83d05ottnw.fsf@gnu.org> <0b42f540-f779-446b-4411-8dae3a50d09d@yandex.ru> <837dvwtrv1.fsf@gnu.org> <835zbgtqps.fsf@gnu.org> <625de669-0715-1467-0bd1-84328b4bee5f@yandex.ru> <83wo3ws4g8.fsf@gnu.org> <83tuyzs2np.fsf@gnu.org> <14381b78-ab1c-91e0-2297-426620b19684@yandex.ru> <83r1u3rtsd.fsf@gnu.org> From: Dmitry Gutov Message-ID: Date: Thu, 25 Jun 2020 19:45:45 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <83r1u3rtsd.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 41821 Cc: 41821@debbugs.gnu.org, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 25.06.2020 19:31, Eli Zaretskii wrote: >> And having vc-hooks call project.el functions at runtime would somehow >> force us to preload it? How? > > It's enough that someone makes the function a macro, or does something > else similarly innocent. Nobody will make it a macro, or a defsubst. And I wouldn't say making it a macro would be "innocent". >>> Anyway, if you-two feel strongly about keeping the current solution, >>> i.e. having VC commands use project.el-collected history, I'd >>> appreciate if that function could be moved to vc.el from vc-hooks.el, >>> thanks in advance. >> >> We can't just move it: it accesses information private to project.el. >> The best we could do is a wrapper function. > > Sorry, I don't understand: why can't we move it from vc-hooks.el to > vc.el, and why doing that would need a wrapper? It would be a wrapper for a project.el function. But if it works for you, okay. From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 25 13:10:21 2020 Received: (at 41821) by debbugs.gnu.org; 25 Jun 2020 17:10:21 +0000 Received: from localhost ([127.0.0.1]:41026 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1joVOH-0004QJ-3N for submit@debbugs.gnu.org; Thu, 25 Jun 2020 13:10:21 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54944) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1joVOD-0004Pz-Fe for 41821@debbugs.gnu.org; Thu, 25 Jun 2020 13:10:20 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:42622) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1joVO8-00040Q-37; Thu, 25 Jun 2020 13:10:12 -0400 Received: from [176.228.60.248] (port=4055 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1joVO6-0003Zn-Gm; Thu, 25 Jun 2020 13:10:11 -0400 Date: Thu, 25 Jun 2020 20:09:51 +0300 Message-Id: <83pn9nrs0w.fsf@gnu.org> From: Eli Zaretskii To: Dmitry Gutov In-Reply-To: (message from Dmitry Gutov on Thu, 25 Jun 2020 19:45:45 +0300) Subject: Re: bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects References: <87r1ulxk48.fsf@mail.linkov.net> <7164426e-8c37-8839-64da-563cfa829b53@yandex.ru> <87mu50j5cu.fsf@mail.linkov.net> <87y2oh8fdv.fsf@mail.linkov.net> <87366ohw5z.fsf@mail.linkov.net> <878sge7jls.fsf@mail.linkov.net> <7e136435-7123-fa42-e4a8-66b82e6595da@yandex.ru> <87pn9pxris.fsf@mail.linkov.net> <83d05ottnw.fsf@gnu.org> <0b42f540-f779-446b-4411-8dae3a50d09d@yandex.ru> <837dvwtrv1.fsf@gnu.org> <835zbgtqps.fsf@gnu.org> <625de669-0715-1467-0bd1-84328b4bee5f@yandex.ru> <83wo3ws4g8.fsf@gnu.org> <83tuyzs2np.fsf@gnu.org> <14381b78-ab1c-91e0-2297-426620b19684@yandex.ru> <83r1u3rtsd.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 41821 Cc: 41821@debbugs.gnu.org, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: 41821@debbugs.gnu.org, juri@linkov.net > From: Dmitry Gutov > Date: Thu, 25 Jun 2020 19:45:45 +0300 > > >>> Anyway, if you-two feel strongly about keeping the current solution, > >>> i.e. having VC commands use project.el-collected history, I'd > >>> appreciate if that function could be moved to vc.el from vc-hooks.el, > >>> thanks in advance. > >> > >> We can't just move it: it accesses information private to project.el. > >> The best we could do is a wrapper function. > > > > Sorry, I don't understand: why can't we move it from vc-hooks.el to > > vc.el, and why doing that would need a wrapper? > > It would be a wrapper for a project.el function. But if it works for > you, okay. We are going in circles again. Can you explain why vc-known-roots cannot be moved to vc.el in its entirety? From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 25 13:19:39 2020 Received: (at 41821) by debbugs.gnu.org; 25 Jun 2020 17:19:39 +0000 Received: from localhost ([127.0.0.1]:41038 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1joVXH-0004ec-Cf for submit@debbugs.gnu.org; Thu, 25 Jun 2020 13:19:39 -0400 Received: from mail-ej1-f41.google.com ([209.85.218.41]:45438) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1joVXE-0004eN-NW for 41821@debbugs.gnu.org; Thu, 25 Jun 2020 13:19:38 -0400 Received: by mail-ej1-f41.google.com with SMTP id a1so6676924ejg.12 for <41821@debbugs.gnu.org>; Thu, 25 Jun 2020 10:19:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=CWiS44wPJkHFwAwnhcLi4P+0u72vR3WfyrPq7ZsGLFw=; b=Xt4XU/jIzcoTtDUmVbwmt8yRoDJZUqZDxvWr+go5DbMk2RH6C52U+Oymr8UscZERZg fSOLp+O0l3m8fnDswNvI3e1XBfGu/2LkBv0yiUl5/xh1FwzpquBnoh6YWK5cN91kciQa 92EcVVpHa254sBeSzLJvhEgpSvfeHzQglJskvcWPMIkWfxc1HGOniGW6PqFHY1STnW7m Tl83e0smLNxUDcwDUcsxCS1HSiKcq+GZSkaho4IcqrTvIR0lBWx2AS/oIjilldW9PJiK /avrgjyJ5QO/h5QZ1sGPtIXCjjodP7ESgX1I+239TtnpJimYkqkIpuwZqfi5sBUW5yu/ hlow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=CWiS44wPJkHFwAwnhcLi4P+0u72vR3WfyrPq7ZsGLFw=; b=s555NRxOLk0OODAoNaZxNV5unJ0T/qfcpxeHOCOARXCSgDvwN6+a2RhrT1oVkEefNS AyaNr/WF8qBcnvSB5wFEh9glFCKzl8wzmqa0A/QL2ieM5wxQeFyNX2Zfeci/U/8PxEep bgneYpwSCawpWCObMc0ERF/u9Z1Yjj6xMMLKJOJ2DHDdjmYTbfHlN//1Qek+uvNMhC5K +AIYe3dtDYmUxz1XyUfh7QtXJ8CfwWHVetr2o8FGt31z/V8U4PdVOaFvQVNliG6w7PNU 5C2lGkFRCOXlyuJOJPipdQG6p4FcZe33ALvOpi6WxWQLRO04u0Rg5uR/jB9bcKL9KJMc EeQQ== X-Gm-Message-State: AOAM531QCc8IQ4vP+VfgCF4BwgkE7V/CfZOrvwUvflYk0w5UzkVZndDx XTZwpVNXXahGt+MlW1uF2Wg= X-Google-Smtp-Source: ABdhPJyh5Dn1AuCaIPIdglnKyeqgwUr2Y5mrW/8srF7FddqK9nF/uatv1Aaf3SBIlDnPOkg3M2zX4w== X-Received: by 2002:a17:906:1353:: with SMTP id x19mr31134905ejb.469.1593105570697; Thu, 25 Jun 2020 10:19:30 -0700 (PDT) Received: from [192.168.0.3] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id gu16sm9236501ejb.35.2020.06.25.10.19.29 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 25 Jun 2020 10:19:29 -0700 (PDT) Subject: Re: bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects To: Eli Zaretskii References: <87r1ulxk48.fsf@mail.linkov.net> <7164426e-8c37-8839-64da-563cfa829b53@yandex.ru> <87mu50j5cu.fsf@mail.linkov.net> <87y2oh8fdv.fsf@mail.linkov.net> <87366ohw5z.fsf@mail.linkov.net> <878sge7jls.fsf@mail.linkov.net> <7e136435-7123-fa42-e4a8-66b82e6595da@yandex.ru> <87pn9pxris.fsf@mail.linkov.net> <83d05ottnw.fsf@gnu.org> <0b42f540-f779-446b-4411-8dae3a50d09d@yandex.ru> <837dvwtrv1.fsf@gnu.org> <835zbgtqps.fsf@gnu.org> <625de669-0715-1467-0bd1-84328b4bee5f@yandex.ru> <83wo3ws4g8.fsf@gnu.org> <83tuyzs2np.fsf@gnu.org> <14381b78-ab1c-91e0-2297-426620b19684@yandex.ru> <83r1u3rtsd.fsf@gnu.org> <83pn9nrs0w.fsf@gnu.org> From: Dmitry Gutov Message-ID: <727cbff1-45ea-13b2-464b-13a8416a2d65@yandex.ru> Date: Thu, 25 Jun 2020 20:19:27 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <83pn9nrs0w.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 41821 Cc: 41821@debbugs.gnu.org, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 25.06.2020 20:09, Eli Zaretskii wrote: >> It would be a wrapper for a project.el function. But if it works for >> you, okay. > > We are going in circles again. Can you explain why vc-known-roots > cannot be moved to vc.el in its entirety? To re-iterate: - We can't just move it: it accesses information private to project.el. - We can't move said information (the variable and mechanism to save/restore it) because, for one thing, we want to store history on all projects, not just VC based ones. From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 25 13:45:44 2020 Received: (at 41821) by debbugs.gnu.org; 25 Jun 2020 17:45:44 +0000 Received: from localhost ([127.0.0.1]:41105 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1joVwV-0005JF-Ur for submit@debbugs.gnu.org; Thu, 25 Jun 2020 13:45:44 -0400 Received: from eggs.gnu.org ([209.51.188.92]:37664) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1joVwS-0005J1-V1 for 41821@debbugs.gnu.org; Thu, 25 Jun 2020 13:45:42 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:43090) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1joVwN-0000ri-1U; Thu, 25 Jun 2020 13:45:35 -0400 Received: from [176.228.60.248] (port=2285 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1joVwM-0005xC-Aw; Thu, 25 Jun 2020 13:45:34 -0400 Date: Thu, 25 Jun 2020 20:45:15 +0300 Message-Id: <83mu4rrqdw.fsf@gnu.org> From: Eli Zaretskii To: Dmitry Gutov In-Reply-To: <727cbff1-45ea-13b2-464b-13a8416a2d65@yandex.ru> (message from Dmitry Gutov on Thu, 25 Jun 2020 20:19:27 +0300) Subject: Re: bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects References: <87r1ulxk48.fsf@mail.linkov.net> <7164426e-8c37-8839-64da-563cfa829b53@yandex.ru> <87mu50j5cu.fsf@mail.linkov.net> <87y2oh8fdv.fsf@mail.linkov.net> <87366ohw5z.fsf@mail.linkov.net> <878sge7jls.fsf@mail.linkov.net> <7e136435-7123-fa42-e4a8-66b82e6595da@yandex.ru> <87pn9pxris.fsf@mail.linkov.net> <83d05ottnw.fsf@gnu.org> <0b42f540-f779-446b-4411-8dae3a50d09d@yandex.ru> <837dvwtrv1.fsf@gnu.org> <835zbgtqps.fsf@gnu.org> <625de669-0715-1467-0bd1-84328b4bee5f@yandex.ru> <83wo3ws4g8.fsf@gnu.org> <83tuyzs2np.fsf@gnu.org> <14381b78-ab1c-91e0-2297-426620b19684@yandex.ru> <83r1u3rtsd.fsf@gnu.org> <83pn9nrs0w.fsf@gnu.org> <727cbff1-45ea-13b2-464b-13a8416a2d65@yandex.ru> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 41821 Cc: 41821@debbugs.gnu.org, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: 41821@debbugs.gnu.org, juri@linkov.net > From: Dmitry Gutov > Date: Thu, 25 Jun 2020 20:19:27 +0300 > > > We are going in circles again. Can you explain why vc-known-roots > > cannot be moved to vc.el in its entirety? > > To re-iterate: > > - We can't just move it: it accesses information private to project.el. What does project.el has to do with this? I didn't ask to move the function to project.el. What am I missing? > - We can't move said information (the variable and mechanism to > save/restore it) Which information? what variable? Please be more specific. From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 25 13:50:57 2020 Received: (at 41821) by debbugs.gnu.org; 25 Jun 2020 17:50:57 +0000 Received: from localhost ([127.0.0.1]:41109 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1joW1Z-0005SL-HP for submit@debbugs.gnu.org; Thu, 25 Jun 2020 13:50:57 -0400 Received: from mail-ed1-f50.google.com ([209.85.208.50]:37368) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1joW1X-0005S9-Tz for 41821@debbugs.gnu.org; Thu, 25 Jun 2020 13:50:56 -0400 Received: by mail-ed1-f50.google.com with SMTP id g20so4664285edm.4 for <41821@debbugs.gnu.org>; Thu, 25 Jun 2020 10:50:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=F7XnVZFtrHgzYHHvpnMndx7pcu9xQB2i5Ht5x4IJ8wk=; b=WnFuJfeb4AwX9jxwDT1nZqL3alVuJdu2A/Kfl4p868Iff4yltvxRR2oRG4WHWF6TlJ bhpYd3PtH+lazBaxXOEXDeR72qrV9cPlvu9x5xg9rbwKWK1VVOQJtURwaO8yvfRdPcXs 1jnZtYb73J7euuuCHzRE2hMmM+w/DOnBVJJk/0JNJHwdxkTyLUs7MShqifJrErT+aPnl MrTPY7Tkg4MLI9e/A0JyDSi0zTJUeYbVwW6J7AE6U08w91W5Q43VR9gv9bCjCYraEcbL I8M5ztRnKbCep+YPUozBHSqdGbaaHLwJJ9loXfklTYRFJunlHmCM+XyZTufq2LnsDKtS IxYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=F7XnVZFtrHgzYHHvpnMndx7pcu9xQB2i5Ht5x4IJ8wk=; b=b9A/Ha0XDRv+J0JGcK2qTQfYOksC19tIQAU/VzhydOjHonYYfnSudWNCi64Qg0PNmm yPI8QJdFTinESNAQFLatEsftboxRtxu9IumznKaddA6bz2vEbfWUPBt+hdmdRg/psZtb IO/vw8ml07kOvvti6Vg6gonHrQWNKMPwreN10A4hJuuQGmm29b/8J4HNtWt+fS06mXyS utjjy0ye4TcNApsgf3+cTloFw7Uo8ftEGSGrk9nl7sRprjBVkqaGGqxBorfe+fDXDoCN xalmnUp6VI4heCAATJFFgU3L0cbawKIr/TGXPjvseF4bMYJFrN23K3r9yVGM6cB092QB FM1g== X-Gm-Message-State: AOAM531UfagVsmR5RQIGpJW+6Sf+CE7VR0thRtjdnBemHCxwUu63I1cX tTSJjLxjrm1IfYZAbc6o2tM= X-Google-Smtp-Source: ABdhPJw65e2fwU8obQen9BBBaRS7uWvtkXuMMIPpNSrh+2V8uwWcHPr9JYPQLbDyys22fY6EhfWYsg== X-Received: by 2002:aa7:c15a:: with SMTP id r26mr31987863edp.21.1593107450043; Thu, 25 Jun 2020 10:50:50 -0700 (PDT) Received: from [192.168.0.3] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id m14sm2970309ejx.80.2020.06.25.10.50.48 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 25 Jun 2020 10:50:49 -0700 (PDT) Subject: Re: bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects To: Eli Zaretskii References: <87r1ulxk48.fsf@mail.linkov.net> <7164426e-8c37-8839-64da-563cfa829b53@yandex.ru> <87mu50j5cu.fsf@mail.linkov.net> <87y2oh8fdv.fsf@mail.linkov.net> <87366ohw5z.fsf@mail.linkov.net> <878sge7jls.fsf@mail.linkov.net> <7e136435-7123-fa42-e4a8-66b82e6595da@yandex.ru> <87pn9pxris.fsf@mail.linkov.net> <83d05ottnw.fsf@gnu.org> <0b42f540-f779-446b-4411-8dae3a50d09d@yandex.ru> <837dvwtrv1.fsf@gnu.org> <835zbgtqps.fsf@gnu.org> <625de669-0715-1467-0bd1-84328b4bee5f@yandex.ru> <83wo3ws4g8.fsf@gnu.org> <83tuyzs2np.fsf@gnu.org> <14381b78-ab1c-91e0-2297-426620b19684@yandex.ru> <83r1u3rtsd.fsf@gnu.org> <83pn9nrs0w.fsf@gnu.org> <727cbff1-45ea-13b2-464b-13a8416a2d65@yandex.ru> <83mu4rrqdw.fsf@gnu.org> From: Dmitry Gutov Message-ID: Date: Thu, 25 Jun 2020 20:50:47 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <83mu4rrqdw.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 41821 Cc: 41821@debbugs.gnu.org, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 25.06.2020 20:45, Eli Zaretskii wrote: >> To re-iterate: >> >> - We can't just move it: it accesses information private to project.el. > What does project.el has to do with this? I didn't ask to move the > function to project.el. What am I missing? You asked to move it *from* project.el. If that sounds confusing, perhaps try to answer this question: which function do you want to see moved? >> - We can't move said information (the variable and mechanism to >> save/restore it) > Which information? what variable? Please be more specific. project--list. From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 25 14:04:01 2020 Received: (at 41821) by debbugs.gnu.org; 25 Jun 2020 18:04:02 +0000 Received: from localhost ([127.0.0.1]:41114 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1joWED-0005ll-L6 for submit@debbugs.gnu.org; Thu, 25 Jun 2020 14:04:01 -0400 Received: from eggs.gnu.org ([209.51.188.92]:42784) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1joWE9-0005lS-9a for 41821@debbugs.gnu.org; Thu, 25 Jun 2020 14:03:59 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:43283) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1joWE3-0001GY-4A; Thu, 25 Jun 2020 14:03:51 -0400 Received: from [176.228.60.248] (port=3398 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1joWE2-0002zJ-CM; Thu, 25 Jun 2020 14:03:50 -0400 Date: Thu, 25 Jun 2020 21:03:31 +0300 Message-Id: <83lfkbrpjg.fsf@gnu.org> From: Eli Zaretskii To: Dmitry Gutov In-Reply-To: (message from Dmitry Gutov on Thu, 25 Jun 2020 20:50:47 +0300) Subject: Re: bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects References: <87r1ulxk48.fsf@mail.linkov.net> <7164426e-8c37-8839-64da-563cfa829b53@yandex.ru> <87mu50j5cu.fsf@mail.linkov.net> <87y2oh8fdv.fsf@mail.linkov.net> <87366ohw5z.fsf@mail.linkov.net> <878sge7jls.fsf@mail.linkov.net> <7e136435-7123-fa42-e4a8-66b82e6595da@yandex.ru> <87pn9pxris.fsf@mail.linkov.net> <83d05ottnw.fsf@gnu.org> <0b42f540-f779-446b-4411-8dae3a50d09d@yandex.ru> <837dvwtrv1.fsf@gnu.org> <835zbgtqps.fsf@gnu.org> <625de669-0715-1467-0bd1-84328b4bee5f@yandex.ru> <83wo3ws4g8.fsf@gnu.org> <83tuyzs2np.fsf@gnu.org> <14381b78-ab1c-91e0-2297-426620b19684@yandex.ru> <83r1u3rtsd.fsf@gnu.org> <83pn9nrs0w.fsf@gnu.org> <727cbff1-45ea-13b2-464b-13a8416a2d65@yandex.ru> <83mu4rrqdw.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 41821 Cc: 41821@debbugs.gnu.org, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: 41821@debbugs.gnu.org, juri@linkov.net > From: Dmitry Gutov > Date: Thu, 25 Jun 2020 20:50:47 +0300 > > On 25.06.2020 20:45, Eli Zaretskii wrote: > >> To re-iterate: > >> > >> - We can't just move it: it accesses information private to project.el. > > What does project.el has to do with this? I didn't ask to move the > > function to project.el. What am I missing? > > You asked to move it *from* project.el. This is a huge misunderstanding. > If that sounds confusing, perhaps try to answer this question: which > function do you want to see moved? As I said before: I'm talking about moving vc-known-roots from vc-hooks.el to vc.el. Quoting myself: > > We are going in circles again. Can you explain why vc-known-roots > > cannot be moved to vc.el in its entirety? From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 25 14:13:26 2020 Received: (at 41821) by debbugs.gnu.org; 25 Jun 2020 18:13:26 +0000 Received: from localhost ([127.0.0.1]:41138 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1joWNK-00060A-HL for submit@debbugs.gnu.org; Thu, 25 Jun 2020 14:13:26 -0400 Received: from mail-ed1-f42.google.com ([209.85.208.42]:43829) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1joWNG-0005zr-3e for 41821@debbugs.gnu.org; Thu, 25 Jun 2020 14:13:25 -0400 Received: by mail-ed1-f42.google.com with SMTP id d15so4921353edm.10 for <41821@debbugs.gnu.org>; Thu, 25 Jun 2020 11:13:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=43KWxK8+DI0G1tO8uNDMQLbG+GYKUUP82+qm9xlQ4Dw=; b=FmNYM8149EnjXX7m/krCxUp81+b1Hc5o1YaO3eRIkq6gt8yeAvE5UWX/OG5sEyTzU7 ui93Yv+VrVzFW+3BUN6JjQI7Y3L/b3HOJzbo4hMRdGgRcpzusgZspXyvuhj/48HSODpL U3H7VHj5JE+w9387ar4x4JgdMTub1YKcQnn25IwjUoGTjDUjXXyGWolOgHZTtP3h4+cP XPhKh8kyyk7P0Kyl0vWnJX8g16+ZU4PwLCxizjp8NOzbiyHD3p6mWPwh9CLaTZOVn+uu pkkFEM4cVdlUaFBQNn7aIW5lJgmvuAn48zd2xh0Q8aSopCrRIhIsw8kQB3+RQ0QcHb+Y MGHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=43KWxK8+DI0G1tO8uNDMQLbG+GYKUUP82+qm9xlQ4Dw=; b=LNE9hW9a5GdhFe+2chO1GC66JOeG3d6orJCLAhbYudp97jviS/xNav05E8zHaccKW2 sEJuip36EG5iTXiSjEzDiVNG2lkWqFHc7zl5Cu+46EetMlD5OOkQbvtb3gWbvPdRVVMp ziTDGUJkgSNssnfBeiWdftfmod27iyIjY43OHYd2NOm0Kjb2QHdh6Xwx8zV4ZS/OORXS lpvNvgL6jzllzyTAXMVji4zRXC6r/DRTW7sy6UlAEEJmio0bK7zC0/W7y9hYG8Gpe1aQ 3mI63jd8oKuAlaE0V5GYaDyhEes8AiS3rwywmyogRrSQgj1YEq+W4HB4+99nZHep1IeN TvbA== X-Gm-Message-State: AOAM532mW7Lt69JGuX/MKmW1iDC49T9uIglHi9MWD0YmziRCTcmW4PqL NnF8Sd/P8J3FSf6E3GDYTr4= X-Google-Smtp-Source: ABdhPJyCC8K+5HHcG8OmbDiy78x/sVODoowhNgMjt2xDlNpF/Ot4bgyW80K6nf6SZAjLEDIH4w8z9g== X-Received: by 2002:a05:6402:1285:: with SMTP id w5mr33837479edv.73.1593108796216; Thu, 25 Jun 2020 11:13:16 -0700 (PDT) Received: from [192.168.0.3] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id cb7sm7952700ejb.12.2020.06.25.11.13.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 25 Jun 2020 11:13:15 -0700 (PDT) Subject: Re: bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects To: Eli Zaretskii References: <87r1ulxk48.fsf@mail.linkov.net> <87mu50j5cu.fsf@mail.linkov.net> <87y2oh8fdv.fsf@mail.linkov.net> <87366ohw5z.fsf@mail.linkov.net> <878sge7jls.fsf@mail.linkov.net> <7e136435-7123-fa42-e4a8-66b82e6595da@yandex.ru> <87pn9pxris.fsf@mail.linkov.net> <83d05ottnw.fsf@gnu.org> <0b42f540-f779-446b-4411-8dae3a50d09d@yandex.ru> <837dvwtrv1.fsf@gnu.org> <835zbgtqps.fsf@gnu.org> <625de669-0715-1467-0bd1-84328b4bee5f@yandex.ru> <83wo3ws4g8.fsf@gnu.org> <83tuyzs2np.fsf@gnu.org> <14381b78-ab1c-91e0-2297-426620b19684@yandex.ru> <83r1u3rtsd.fsf@gnu.org> <83pn9nrs0w.fsf@gnu.org> <727cbff1-45ea-13b2-464b-13a8416a2d65@yandex.ru> <83mu4rrqdw.fsf@gnu.org> <83lfkbrpjg.fsf@gnu.org> From: Dmitry Gutov Message-ID: <79d0a097-d3ff-ed08-72ea-274edf70f2df@yandex.ru> Date: Thu, 25 Jun 2020 21:13:13 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <83lfkbrpjg.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 41821 Cc: 41821@debbugs.gnu.org, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 25.06.2020 21:03, Eli Zaretskii wrote: >> If that sounds confusing, perhaps try to answer this question: which >> function do you want to see moved? > > As I said before: I'm talking about moving vc-known-roots from > vc-hooks.el to vc.el. Quoting myself: > >>> We are going in circles again. Can you explain why vc-known-roots >>> cannot be moved to vc.el in its entirety? Okay. As I said, it will be (remain) a wrapper for project.el functions. If that's okay with you, we can go ahead. From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 25 14:29:29 2020 Received: (at 41821) by debbugs.gnu.org; 25 Jun 2020 18:29:29 +0000 Received: from localhost ([127.0.0.1]:41147 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1joWcr-0006QI-4F for submit@debbugs.gnu.org; Thu, 25 Jun 2020 14:29:29 -0400 Received: from eggs.gnu.org ([209.51.188.92]:49240) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1joWcp-0006Q5-KA for 41821@debbugs.gnu.org; Thu, 25 Jun 2020 14:29:28 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:43625) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1joWcj-0002kg-KZ; Thu, 25 Jun 2020 14:29:21 -0400 Received: from [176.228.60.248] (port=4954 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1joWch-0001qx-R1; Thu, 25 Jun 2020 14:29:20 -0400 Date: Thu, 25 Jun 2020 21:29:01 +0300 Message-Id: <83imffrocy.fsf@gnu.org> From: Eli Zaretskii To: Dmitry Gutov In-Reply-To: <79d0a097-d3ff-ed08-72ea-274edf70f2df@yandex.ru> (message from Dmitry Gutov on Thu, 25 Jun 2020 21:13:13 +0300) Subject: Re: bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects References: <87r1ulxk48.fsf@mail.linkov.net> <87mu50j5cu.fsf@mail.linkov.net> <87y2oh8fdv.fsf@mail.linkov.net> <87366ohw5z.fsf@mail.linkov.net> <878sge7jls.fsf@mail.linkov.net> <7e136435-7123-fa42-e4a8-66b82e6595da@yandex.ru> <87pn9pxris.fsf@mail.linkov.net> <83d05ottnw.fsf@gnu.org> <0b42f540-f779-446b-4411-8dae3a50d09d@yandex.ru> <837dvwtrv1.fsf@gnu.org> <835zbgtqps.fsf@gnu.org> <625de669-0715-1467-0bd1-84328b4bee5f@yandex.ru> <83wo3ws4g8.fsf@gnu.org> <83tuyzs2np.fsf@gnu.org> <14381b78-ab1c-91e0-2297-426620b19684@yandex.ru> <83r1u3rtsd.fsf@gnu.org> <83pn9nrs0w.fsf@gnu.org> <727cbff1-45ea-13b2-464b-13a8416a2d65@yandex.ru> <83mu4rrqdw.fsf@gnu.org> <83lfkbrpjg.fsf@gnu.org> <79d0a097-d3ff-ed08-72ea-274edf70f2df@yandex.ru> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 41821 Cc: 41821@debbugs.gnu.org, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: 41821@debbugs.gnu.org, juri@linkov.net > From: Dmitry Gutov > Date: Thu, 25 Jun 2020 21:13:13 +0300 > > >>> We are going in circles again. Can you explain why vc-known-roots > >>> cannot be moved to vc.el in its entirety? > > Okay. > > As I said, it will be (remain) a wrapper for project.el functions. If > that's okay with you, we can go ahead. You mean, vc-known-roots is a wrapper for project-known-roots? It was okay with you to have that, so it's okay with me. From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 27 20:18:41 2020 Received: (at 41821) by debbugs.gnu.org; 28 Jun 2020 00:18:41 +0000 Received: from localhost ([127.0.0.1]:44791 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jpL1s-0004BV-PK for submit@debbugs.gnu.org; Sat, 27 Jun 2020 20:18:40 -0400 Received: from relay11.mail.gandi.net ([217.70.178.231]:41545) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jpL1o-0004Aw-Ry for 41821@debbugs.gnu.org; Sat, 27 Jun 2020 20:18:39 -0400 Received: from mail.gandi.net (m91-129-96-187.cust.tele2.ee [91.129.96.187]) (Authenticated sender: juri@linkov.net) by relay11.mail.gandi.net (Postfix) with ESMTPSA id CF95F100002; Sun, 28 Jun 2020 00:18:29 +0000 (UTC) From: Juri Linkov To: Dmitry Gutov Subject: Re: bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects References: <87r1ulxk48.fsf@mail.linkov.net> <7164426e-8c37-8839-64da-563cfa829b53@yandex.ru> <87mu50j5cu.fsf@mail.linkov.net> <87y2oh8fdv.fsf@mail.linkov.net> <87366ohw5z.fsf@mail.linkov.net> <878sge7jls.fsf@mail.linkov.net> <7e136435-7123-fa42-e4a8-66b82e6595da@yandex.ru> <87pn9pxris.fsf@mail.linkov.net> <38defd22-755e-fb46-04a7-b5e70180e446@yandex.ru> Date: Sun, 28 Jun 2020 02:44:05 +0300 In-Reply-To: <38defd22-755e-fb46-04a7-b5e70180e446@yandex.ru> (Dmitry Gutov's message of "Wed, 24 Jun 2020 21:29:58 +0300") Message-ID: <87ftagdq02.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 41821 Cc: 41821@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > both the name and the docstring need to be changed I can't believe that you renamed project-known-roots to project-known-project-roots. Why duplicate prefixes 'project-'? From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 27 20:18:41 2020 Received: (at 41821) by debbugs.gnu.org; 28 Jun 2020 00:18:41 +0000 Received: from localhost ([127.0.0.1]:44793 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jpL1t-0004BX-09 for submit@debbugs.gnu.org; Sat, 27 Jun 2020 20:18:41 -0400 Received: from relay10.mail.gandi.net ([217.70.178.230]:58757) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jpL1r-0004B1-6X for 41821@debbugs.gnu.org; Sat, 27 Jun 2020 20:18:39 -0400 Received: from mail.gandi.net (m91-129-96-187.cust.tele2.ee [91.129.96.187]) (Authenticated sender: juri@linkov.net) by relay10.mail.gandi.net (Postfix) with ESMTPSA id 74D7F240003; Sun, 28 Jun 2020 00:18:32 +0000 (UTC) From: Juri Linkov To: Eli Zaretskii Subject: Re: bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects Organization: LINKOV.NET References: <87r1ulxk48.fsf@mail.linkov.net> <7164426e-8c37-8839-64da-563cfa829b53@yandex.ru> <87mu50j5cu.fsf@mail.linkov.net> <87y2oh8fdv.fsf@mail.linkov.net> <87366ohw5z.fsf@mail.linkov.net> <878sge7jls.fsf@mail.linkov.net> <7e136435-7123-fa42-e4a8-66b82e6595da@yandex.ru> <87pn9pxris.fsf@mail.linkov.net> <83d05ottnw.fsf@gnu.org> <0b42f540-f779-446b-4411-8dae3a50d09d@yandex.ru> <837dvwtrv1.fsf@gnu.org> <835zbgtqps.fsf@gnu.org> <625de669-0715-1467-0bd1-84328b4bee5f@yandex.ru> <83wo3ws4g8.fsf@gnu.org> <83tuyzs2np.fsf@gnu.org> Date: Sun, 28 Jun 2020 02:51:06 +0300 In-Reply-To: <83tuyzs2np.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 25 Jun 2020 16:20:10 +0300") Message-ID: <87pn9kcb3x.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 41821 Cc: 41821@debbugs.gnu.org, Dmitry Gutov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > Why not have some relevant history in VC itself? Then like the project history currently is saved in ~/.emacs.d/projects saving of a separate vc-directory history will be duplicated the same way in e.g. ~/.emacs.d/vc-projects? > Moreover, using a command such as "C-x v d" doesn't mean I want > project.el record that, again because I might be using project.el > commands for projects that aren't based on VC. Then project.el could have a customizable variable that will prevent recording vc project history. > And if the history is collected by VC, it could be made available to > project.el commands that call into VC, right? You mean to record an internal vc-history separately from project.el, but still to save it in the same project file ~/.emacs.d/projects? From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 27 20:19:31 2020 Received: (at 41821) by debbugs.gnu.org; 28 Jun 2020 00:19:31 +0000 Received: from localhost ([127.0.0.1]:44804 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jpL2g-0004Dk-Sv for submit@debbugs.gnu.org; Sat, 27 Jun 2020 20:19:31 -0400 Received: from mail-ej1-f45.google.com ([209.85.218.45]:41801) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jpL2f-0004DZ-Il for 41821@debbugs.gnu.org; Sat, 27 Jun 2020 20:19:29 -0400 Received: by mail-ej1-f45.google.com with SMTP id dp18so12773856ejc.8 for <41821@debbugs.gnu.org>; Sat, 27 Jun 2020 17:19:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=QOmNHJ1Lce7HVYLmZWQ7qJuEFXenkdFI0+GGh4pGoyI=; b=WQdryRxZUBE8w3GeFToyghRgnocHmEjY6obBax4VoW4fk+4nREKAC23qzH0dp8IPhz bJIUQOGHydV3PZs0zZce6X0tWSYkbRHoiKTCrr6fOqliGCq6BOfGGtwAxxiTYXimNpd7 FhgrNqjHQOSo/ef1ka98LVOcLRbTeOC9tHowNfIulnVchYt630bELV4Axnkh2G7fpQKt 3+psuFkYnSKKktfv7gYDtOeIT0NhKhyZwzGBQBbSFfy+82g8z7z7qIxrXLjqZd1POBU9 J25Nl8zZorHGBj7cbDL/L/0lkOXXA9GmkvejMxO9rC6mpDL/rnkRr5wGpbJUfwnYXxtn sW+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=QOmNHJ1Lce7HVYLmZWQ7qJuEFXenkdFI0+GGh4pGoyI=; b=o9giT4gCG2cu5Q/PcyYejcKWRaJO8MUi7ppBaoaTxXKzO0SA/bVHzscWmnBC4tm3vY bCsglPA+dvgaAMUgiQpDShZpZ+SSlKHW4TK8SPO7pQYFFgLafdJ7RWZ2nseIsc/qHmyZ Mkin2Bhjz1ctb9wTRrt2OHlvjjHa/4XKiSivrWTCrZUYdD+UwHjQQFr4Dm1KdRBHf1FF sUdWfUdH1kJR4ctoG1TT53nQJHUCY4u8SBpfLA9ttstZjslNDQJ3qN7Onr25Fh67DpUt J5yK/IufnqisuNA07oHPcAqXT8PiB5H/W0zbSOr1rowNgx36C4sg/zHCs+fgTxxustBU E1mQ== X-Gm-Message-State: AOAM531IN3qgJ0wN47/TlxmZLz+WHkype7kdhPNTrKi2ibbtu6JU0Ijk PbEtr5LI0UQIaVuidY+ClIH/Ua1W X-Google-Smtp-Source: ABdhPJxLZSBBDbpEO/EH/sxIGpDgsqzVoDtJDmXCwVhXcwhfl9llxzcNAzkKJ5y3M2PtAj+i0D7L1A== X-Received: by 2002:a17:906:2681:: with SMTP id t1mr7244395ejc.350.1593303563885; Sat, 27 Jun 2020 17:19:23 -0700 (PDT) Received: from [192.168.0.3] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id lv17sm11466456ejb.56.2020.06.27.17.19.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 27 Jun 2020 17:19:23 -0700 (PDT) Subject: Re: bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects To: Juri Linkov References: <87r1ulxk48.fsf@mail.linkov.net> <7164426e-8c37-8839-64da-563cfa829b53@yandex.ru> <87mu50j5cu.fsf@mail.linkov.net> <87y2oh8fdv.fsf@mail.linkov.net> <87366ohw5z.fsf@mail.linkov.net> <878sge7jls.fsf@mail.linkov.net> <7e136435-7123-fa42-e4a8-66b82e6595da@yandex.ru> <87pn9pxris.fsf@mail.linkov.net> <38defd22-755e-fb46-04a7-b5e70180e446@yandex.ru> <87ftagdq02.fsf@mail.linkov.net> From: Dmitry Gutov Message-ID: Date: Sun, 28 Jun 2020 03:19:21 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <87ftagdq02.fsf@mail.linkov.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 41821 Cc: 41821@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 28.06.2020 02:44, Juri Linkov wrote: >> both the name and the docstring need to be changed > I can't believe that you renamed project-known-roots to > project-known-project-roots. Why duplicate prefixes 'project-'? To emphasize that the roots belong to different projects, and not the current one. From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 28 10:34:15 2020 Received: (at 41821) by debbugs.gnu.org; 28 Jun 2020 14:34:15 +0000 Received: from localhost ([127.0.0.1]:46771 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jpYNp-0002al-Jm for submit@debbugs.gnu.org; Sun, 28 Jun 2020 10:34:15 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54252) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jpYNZ-0002a1-2G for 41821@debbugs.gnu.org; Sun, 28 Jun 2020 10:34:12 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:43385) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jpYNS-0006C8-Fc; Sun, 28 Jun 2020 10:33:50 -0400 Received: from [176.228.60.248] (port=2184 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jpYNQ-0006ju-Ev; Sun, 28 Jun 2020 10:33:48 -0400 Date: Sun, 28 Jun 2020 17:33:36 +0300 Message-Id: <83eepz2rb3.fsf@gnu.org> From: Eli Zaretskii To: Juri Linkov In-Reply-To: <87pn9kcb3x.fsf@mail.linkov.net> (message from Juri Linkov on Sun, 28 Jun 2020 02:51:06 +0300) Subject: Re: bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects References: <87r1ulxk48.fsf@mail.linkov.net> <7164426e-8c37-8839-64da-563cfa829b53@yandex.ru> <87mu50j5cu.fsf@mail.linkov.net> <87y2oh8fdv.fsf@mail.linkov.net> <87366ohw5z.fsf@mail.linkov.net> <878sge7jls.fsf@mail.linkov.net> <7e136435-7123-fa42-e4a8-66b82e6595da@yandex.ru> <87pn9pxris.fsf@mail.linkov.net> <83d05ottnw.fsf@gnu.org> <0b42f540-f779-446b-4411-8dae3a50d09d@yandex.ru> <837dvwtrv1.fsf@gnu.org> <835zbgtqps.fsf@gnu.org> <625de669-0715-1467-0bd1-84328b4bee5f@yandex.ru> <83wo3ws4g8.fsf@gnu.org> <83tuyzs2np.fsf@gnu.org> <87pn9kcb3x.fsf@mail.linkov.net> X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 41821 Cc: 41821@debbugs.gnu.org, dgutov@yandex.ru X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Juri Linkov > Cc: Dmitry Gutov , 41821@debbugs.gnu.org > Date: Sun, 28 Jun 2020 02:51:06 +0300 > > > Why not have some relevant history in VC itself? > > Then like the project history currently is saved in ~/.emacs.d/projects > saving of a separate vc-directory history will be duplicated the same way > in e.g. ~/.emacs.d/vc-projects? Not necessarily duplicated, because no one said the projects I use will necessarily visit all (indeed, even one of) the VC roots that I will visit via VC commands. And vice versa. IOW, please don't assume that, because project.el can use the VC backend, it will always use VC in the same directories. If the roots are different, offering the same completion candidates will be confusing and even annoying. > > Moreover, using a command such as "C-x v d" doesn't mean I want > > project.el record that, again because I might be using project.el > > commands for projects that aren't based on VC. > > Then project.el could have a customizable variable that will prevent > recording vc project history. What for? let every layer record its own history, and then use the relevant history in each layer. > > And if the history is collected by VC, it could be made available to > > project.el commands that call into VC, right? > > You mean to record an internal vc-history separately from project.el, > but still to save it in the same project file ~/.emacs.d/projects? No, I mean provide a possibility for project.el to access the history saved in ~/.emacs.d/vc-history, in addition to project.el's own history. If the user wants that. From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 28 18:21:58 2020 Received: (at 41821) by debbugs.gnu.org; 28 Jun 2020 22:21:58 +0000 Received: from localhost ([127.0.0.1]:47142 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jpfgU-0004DV-1c for submit@debbugs.gnu.org; Sun, 28 Jun 2020 18:21:58 -0400 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:48043) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jpfgS-0004DB-Dr for 41821@debbugs.gnu.org; Sun, 28 Jun 2020 18:21:57 -0400 X-Originating-IP: 91.129.96.187 Received: from mail.gandi.net (m91-129-96-187.cust.tele2.ee [91.129.96.187]) (Authenticated sender: juri@linkov.net) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 5003360005; Sun, 28 Jun 2020 22:21:48 +0000 (UTC) From: Juri Linkov To: Dmitry Gutov Subject: Re: bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects Organization: LINKOV.NET References: <87r1ulxk48.fsf@mail.linkov.net> <7164426e-8c37-8839-64da-563cfa829b53@yandex.ru> <87mu50j5cu.fsf@mail.linkov.net> <87y2oh8fdv.fsf@mail.linkov.net> <87366ohw5z.fsf@mail.linkov.net> <878sge7jls.fsf@mail.linkov.net> <7e136435-7123-fa42-e4a8-66b82e6595da@yandex.ru> <87pn9pxris.fsf@mail.linkov.net> <38defd22-755e-fb46-04a7-b5e70180e446@yandex.ru> <87ftagdq02.fsf@mail.linkov.net> Date: Mon, 29 Jun 2020 00:49:03 +0300 In-Reply-To: (Dmitry Gutov's message of "Sun, 28 Jun 2020 03:19:21 +0300") Message-ID: <87a70mkhgg.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 41821 Cc: 41821@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >>> both the name and the docstring need to be changed >> I can't believe that you renamed project-known-roots to >> project-known-project-roots. Why duplicate prefixes 'project-'? > > To emphasize that the roots belong to different projects, and not the > current one. Oh, I see that project can have several roots with project-roots and project-external-roots. But still would it be possible to deuglify the name project-known-project-roots? Maybe project-all-known-roots? From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 28 18:22:04 2020 Received: (at 41821) by debbugs.gnu.org; 28 Jun 2020 22:22:04 +0000 Received: from localhost ([127.0.0.1]:47148 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jpfga-0004EL-6f for submit@debbugs.gnu.org; Sun, 28 Jun 2020 18:22:04 -0400 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:56037) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jpfgU-0004DI-Ng for 41821@debbugs.gnu.org; Sun, 28 Jun 2020 18:21:59 -0400 X-Originating-IP: 91.129.96.187 Received: from mail.gandi.net (m91-129-96-187.cust.tele2.ee [91.129.96.187]) (Authenticated sender: juri@linkov.net) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id AFD08C0005; Sun, 28 Jun 2020 22:21:51 +0000 (UTC) From: Juri Linkov To: Eli Zaretskii Subject: Re: bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects Organization: LINKOV.NET References: <87r1ulxk48.fsf@mail.linkov.net> <7164426e-8c37-8839-64da-563cfa829b53@yandex.ru> <87mu50j5cu.fsf@mail.linkov.net> <87y2oh8fdv.fsf@mail.linkov.net> <87366ohw5z.fsf@mail.linkov.net> <878sge7jls.fsf@mail.linkov.net> <7e136435-7123-fa42-e4a8-66b82e6595da@yandex.ru> <87pn9pxris.fsf@mail.linkov.net> <83d05ottnw.fsf@gnu.org> <0b42f540-f779-446b-4411-8dae3a50d09d@yandex.ru> <837dvwtrv1.fsf@gnu.org> <835zbgtqps.fsf@gnu.org> <625de669-0715-1467-0bd1-84328b4bee5f@yandex.ru> <83wo3ws4g8.fsf@gnu.org> <83tuyzs2np.fsf@gnu.org> Date: Mon, 29 Jun 2020 00:51:12 +0300 In-Reply-To: <83tuyzs2np.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 25 Jun 2020 16:20:10 +0300") Message-ID: <87h7uuj1v3.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 41821 Cc: 41821@debbugs.gnu.org, Dmitry Gutov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >> > Actually, I have a question: isn't project.el conceptually a >> > higher-level feature than VC? If so, how come VC wants to call >> > project.el? >> >> VC doesn't serve project.el only. project.el doesn't solely use VC. > > Yes, but that's not what I asked. I have the impression that > project.el builds on VC as one project back-end, so it sounds strange > to me that VC turns around and calls project.el for something. By analogy, vc-git.el is one of back-ends of vc.el, so in vc-git.el there is such line for using vc functions: (require 'vc) So analogously, vc.el is one of back-ends of project.el, so in vc.el there should be such line for using project functions: (require 'project) From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 28 18:22:04 2020 Received: (at 41821) by debbugs.gnu.org; 28 Jun 2020 22:22:04 +0000 Received: from localhost ([127.0.0.1]:47150 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jpfga-0004EO-F4 for submit@debbugs.gnu.org; Sun, 28 Jun 2020 18:22:04 -0400 Received: from relay9-d.mail.gandi.net ([217.70.183.199]:48851) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jpfgX-0004DM-35 for 41821@debbugs.gnu.org; Sun, 28 Jun 2020 18:22:02 -0400 X-Originating-IP: 91.129.96.187 Received: from mail.gandi.net (m91-129-96-187.cust.tele2.ee [91.129.96.187]) (Authenticated sender: juri@linkov.net) by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id 6E582FF806; Sun, 28 Jun 2020 22:21:53 +0000 (UTC) From: Juri Linkov To: Eli Zaretskii Subject: Re: bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects Organization: LINKOV.NET References: <87r1ulxk48.fsf@mail.linkov.net> <7164426e-8c37-8839-64da-563cfa829b53@yandex.ru> <87mu50j5cu.fsf@mail.linkov.net> <87y2oh8fdv.fsf@mail.linkov.net> <87366ohw5z.fsf@mail.linkov.net> <878sge7jls.fsf@mail.linkov.net> <7e136435-7123-fa42-e4a8-66b82e6595da@yandex.ru> <87pn9pxris.fsf@mail.linkov.net> <83d05ottnw.fsf@gnu.org> <0b42f540-f779-446b-4411-8dae3a50d09d@yandex.ru> <837dvwtrv1.fsf@gnu.org> <835zbgtqps.fsf@gnu.org> <625de669-0715-1467-0bd1-84328b4bee5f@yandex.ru> <83wo3ws4g8.fsf@gnu.org> <83tuyzs2np.fsf@gnu.org> <87pn9kcb3x.fsf@mail.linkov.net> <83eepz2rb3.fsf@gnu.org> Date: Mon, 29 Jun 2020 00:55:27 +0300 In-Reply-To: <83eepz2rb3.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 28 Jun 2020 17:33:36 +0300") Message-ID: <87tuyuhn3k.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 41821 Cc: 41821@debbugs.gnu.org, dgutov@yandex.ru X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >> > Why not have some relevant history in VC itself? >> >> Then like the project history currently is saved in ~/.emacs.d/projects >> saving of a separate vc-directory history will be duplicated the same way >> in e.g. ~/.emacs.d/vc-projects? > > Not necessarily duplicated, because no one said the projects I use > will necessarily visit all (indeed, even one of) the VC roots that I > will visit via VC commands. And vice versa. > > IOW, please don't assume that, because project.el can use the VC > backend, it will always use VC in the same directories. If the roots > are different, offering the same completion candidates will be > confusing and even annoying. OTOH, it would be confusing and annoying to have duplicate histories for users who prefer project.el solely for handling vc repositories. >> > Moreover, using a command such as "C-x v d" doesn't mean I want >> > project.el record that, again because I might be using project.el >> > commands for projects that aren't based on VC. >> >> Then project.el could have a customizable variable that will prevent >> recording vc project history. > > What for? let every layer record its own history, and then use the > relevant history in each layer. > >> > And if the history is collected by VC, it could be made available to >> > project.el commands that call into VC, right? >> >> You mean to record an internal vc-history separately from project.el, >> but still to save it in the same project file ~/.emacs.d/projects? > > No, I mean provide a possibility for project.el to access the history > saved in ~/.emacs.d/vc-history, in addition to project.el's own > history. If the user wants that. This is what I meant by a customizable variable mentioned above to toggle recording of a separate vc history. From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 28 18:37:49 2020 Received: (at 41821) by debbugs.gnu.org; 28 Jun 2020 22:37:49 +0000 Received: from localhost ([127.0.0.1]:47172 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jpfvo-0004fK-W9 for submit@debbugs.gnu.org; Sun, 28 Jun 2020 18:37:49 -0400 Received: from mail-ed1-f51.google.com ([209.85.208.51]:40605) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jpfvn-0004f6-Kd for 41821@debbugs.gnu.org; Sun, 28 Jun 2020 18:37:48 -0400 Received: by mail-ed1-f51.google.com with SMTP id b15so11288939edy.7 for <41821@debbugs.gnu.org>; Sun, 28 Jun 2020 15:37:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=XJdEM5BGbeLUar4zzMBQRrk/RNPizRlrg0YGdnizTg4=; b=Bhdq+8YWsiaqeWK9ypeprYm17Z8G2wVj/00t/O688Qa4slW0Nu6EcqvMksnqI8rlfq JZkHU4sshtx6tZSi3DwOK3Q+t2lbg7sQo78lsHcHMeJe/xWZ1KnIqEXtH02oRsB6sYon 5LVgC2DGpAUNGEvnoEHJHhgDn8bhgQ4p6B1BBgpgHnpYBCtBsZ8vHmf0hGThRcb0BvOg 18bkeSDQOvq9yRoKPhDbdss0qVUdqeXFSX1zA/by4SqJSK0pu7U/nHfoEP1I8VjFuMOe tP1cYtmPlD7c4UZbUd/3y58Qym4PvjFd2bT8pHZXIWWjyWD48ObFQEErdHSea/6MOurg HaKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=XJdEM5BGbeLUar4zzMBQRrk/RNPizRlrg0YGdnizTg4=; b=ktNXOusUqmZCBQ5HR3eeY1HxZbLw7+VEOWb5j1pEHZE7s4/wBFBUFPblV37snkIMSl rDAqfEa1pcmdSg/bt7JM3TQFSG/qa2dRzM41GfOUTwvVwUruqAQJcI3esraHN71p241S V5SXrPFYWjaGd1S2mP7W3C4nKZXXDd7LX3qvalMGZZwy4otX6xlGeXJKhuRh0dj2HWxu QoTcLEP4e91s1KyqsPMmv9j3bIc6Wxr2/R3yLJt+l/yCKeVTpeQVAY1x1xN4l364llzo QwRxZN19yJB4U8LmPdC24bYXdAcu7tBd02t1H4f0djSlbU536+LLO59M1txxfP63nCDX i/NA== X-Gm-Message-State: AOAM533eu7v7H1HwhHSZljHyYscmInBOcQX4gHCkIt6Nvdd7SVJdSFdO gzJ0x1xVWozRVqAq4XtrMP/sAyLo X-Google-Smtp-Source: ABdhPJxFy2Lvj8s/9L7pmNHHUO88sO2cbLc5pMcO7UO9kTaVRq4hZlDBT16yqkpw2+1Z6rmskpaeqw== X-Received: by 2002:aa7:d297:: with SMTP id w23mr14070655edq.49.1593383861623; Sun, 28 Jun 2020 15:37:41 -0700 (PDT) Received: from [192.168.0.3] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id q21sm1546629ejc.112.2020.06.28.15.37.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 28 Jun 2020 15:37:41 -0700 (PDT) Subject: Re: bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects To: Juri Linkov , Eli Zaretskii References: <87r1ulxk48.fsf@mail.linkov.net> <7164426e-8c37-8839-64da-563cfa829b53@yandex.ru> <87mu50j5cu.fsf@mail.linkov.net> <87y2oh8fdv.fsf@mail.linkov.net> <87366ohw5z.fsf@mail.linkov.net> <878sge7jls.fsf@mail.linkov.net> <7e136435-7123-fa42-e4a8-66b82e6595da@yandex.ru> <87pn9pxris.fsf@mail.linkov.net> <83d05ottnw.fsf@gnu.org> <0b42f540-f779-446b-4411-8dae3a50d09d@yandex.ru> <837dvwtrv1.fsf@gnu.org> <835zbgtqps.fsf@gnu.org> <625de669-0715-1467-0bd1-84328b4bee5f@yandex.ru> <83wo3ws4g8.fsf@gnu.org> <83tuyzs2np.fsf@gnu.org> <87h7uuj1v3.fsf@mail.linkov.net> From: Dmitry Gutov Message-ID: Date: Mon, 29 Jun 2020 01:37:39 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <87h7uuj1v3.fsf@mail.linkov.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 41821 Cc: 41821@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) On 29.06.2020 00:51, Juri Linkov wrote: > So analogously, vc.el is one of back-ends of project.el, so in vc.el > there should be such line for using project functions: > > (require 'project) Not really. project-vc (which is the project backend) resides in project.el. It calls to some VC functions, but VC itself needs no awareness of project.el. From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 28 18:42:56 2020 Received: (at 41821) by debbugs.gnu.org; 28 Jun 2020 22:42:56 +0000 Received: from localhost ([127.0.0.1]:47187 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jpg0m-0004on-1r for submit@debbugs.gnu.org; Sun, 28 Jun 2020 18:42:56 -0400 Received: from mail-ed1-f51.google.com ([209.85.208.51]:34832) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jpg0k-0004oa-0u for 41821@debbugs.gnu.org; Sun, 28 Jun 2020 18:42:54 -0400 Received: by mail-ed1-f51.google.com with SMTP id e15so11313910edr.2 for <41821@debbugs.gnu.org>; Sun, 28 Jun 2020 15:42:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=ANF3EkmOi/DTnuUGVqAla7KmK2F6QvHwbo/rAiBEEMg=; b=p1oJj0qlPN+gOw3WhuAjFZEJ4NbQq/aQH9Zuo++MES+GjBu5lExUrrUb0+a0pwmgYJ ee6x+Lk/+UmNj+MHa1TznvdzWujSYkJUHHlHclwefuKY2DkwHyc1i4R39Vcf6gYh5Wxt n8gLhRL/NDnOVZi+6rRqOQ8LX492hhB6OFaTcq8Y2Eo5OWIdcUd8NHw1VOaltnoPAWUn wshrnPlMLcTpGQlYrGqi21GKMdwSlEKvi/M5oTob14VulWNzIlLp/PvHUwaqt4Fu4qO3 JwG3e+PllW8zl8iP2zOXCsy4IpSb8MZBBzPd7DuOxed71dH2uVvNXlsKuhv3LjKjg8My Wm1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=ANF3EkmOi/DTnuUGVqAla7KmK2F6QvHwbo/rAiBEEMg=; b=AdRiLGxh2OWMzlhx6zuR37uhs3qIUykBliHno+SAaC0UnKtkXgGsaP1HqAZOKSa93V 2Vu8l55sUlwfQp7cddiMOoF6WmfHyRuAZF5N7WQenqGOHzPxVnCsLDBx1KZfC4V0oFaZ JDftiUBy9bZQsQi3zy8zZ9tdXK0tkpgkb5BFJWw7eT8qZjhmRNuAgkbkpNcdoymjF3eR 0oW9CgohUKXzHU2MOrp6pmHCd6DZ8180mUIMgj2ptrB44deEMGKP1gcXeWCVt2E+uO6f eF6OUBfjHgiZZFtBHi/92lRAxcdAiKWIY9jYVmLbjPzmqqf9XLBjyHbXmq5rPdZM3rLq GzYw== X-Gm-Message-State: AOAM530YSpKqq2Yk7ROh1T7vMJ/UwSlZ5fVIbdvg46rflNpj1y5n+Rj8 3DqpEV5COYIebxEof1LvKdBO2U9k X-Google-Smtp-Source: ABdhPJwZ50yyw4xJ7J1ypXRoToqzZ6THkLjHkbfXS7LwqQIKJNHTtxv7Vigr7NTQeg6GqIDyMvuGDQ== X-Received: by 2002:a50:cd1e:: with SMTP id z30mr14304111edi.364.1593384168027; Sun, 28 Jun 2020 15:42:48 -0700 (PDT) Received: from [192.168.0.3] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id fi29sm11531033ejb.83.2020.06.28.15.42.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 28 Jun 2020 15:42:47 -0700 (PDT) Subject: Re: bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects To: Juri Linkov References: <87r1ulxk48.fsf@mail.linkov.net> <7164426e-8c37-8839-64da-563cfa829b53@yandex.ru> <87mu50j5cu.fsf@mail.linkov.net> <87y2oh8fdv.fsf@mail.linkov.net> <87366ohw5z.fsf@mail.linkov.net> <878sge7jls.fsf@mail.linkov.net> <7e136435-7123-fa42-e4a8-66b82e6595da@yandex.ru> <87pn9pxris.fsf@mail.linkov.net> <38defd22-755e-fb46-04a7-b5e70180e446@yandex.ru> <87ftagdq02.fsf@mail.linkov.net> <87a70mkhgg.fsf@mail.linkov.net> From: Dmitry Gutov Message-ID: <3d51b105-0735-0217-a68c-719c15ad0e76@yandex.ru> Date: Mon, 29 Jun 2020 01:42:45 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <87a70mkhgg.fsf@mail.linkov.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 41821 Cc: 41821@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) On 29.06.2020 00:49, Juri Linkov wrote: >>>> both the name and the docstring need to be changed >>> I can't believe that you renamed project-known-roots to >>> project-known-project-roots. Why duplicate prefixes 'project-'? >> >> To emphasize that the roots belong to different projects, and not the >> current one. > > Oh, I see that project can have several roots with project-roots and > project-external-roots. project-roots is now obsolete, but the external roots are still here. > But still would it be possible to deuglify the > name project-known-project-roots? Maybe project-all-known-roots? Is it so really so ugly? Note that we already have project-prompt-project-dir and project-switch-project (an interactive command). project-all-known-roots is better, but still quite reminiscent of an all-known-roots slots on a "project struct". You wouldn't mistake project-known-project-roots for such. From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 29 19:04:49 2020 Received: (at 41821) by debbugs.gnu.org; 29 Jun 2020 23:04:49 +0000 Received: from localhost ([127.0.0.1]:49737 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jq2pV-0003Jp-6T for submit@debbugs.gnu.org; Mon, 29 Jun 2020 19:04:49 -0400 Received: from relay2-d.mail.gandi.net ([217.70.183.194]:49049) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jq2pO-0003JM-Sy for 41821@debbugs.gnu.org; Mon, 29 Jun 2020 19:04:43 -0400 X-Originating-IP: 91.129.96.187 Received: from mail.gandi.net (m91-129-96-187.cust.tele2.ee [91.129.96.187]) (Authenticated sender: juri@linkov.net) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id C5D4E40004; Mon, 29 Jun 2020 23:04:35 +0000 (UTC) From: Juri Linkov To: Dmitry Gutov Subject: Re: bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects Organization: LINKOV.NET References: <87r1ulxk48.fsf@mail.linkov.net> <7164426e-8c37-8839-64da-563cfa829b53@yandex.ru> <87mu50j5cu.fsf@mail.linkov.net> <87y2oh8fdv.fsf@mail.linkov.net> <87366ohw5z.fsf@mail.linkov.net> <878sge7jls.fsf@mail.linkov.net> <7e136435-7123-fa42-e4a8-66b82e6595da@yandex.ru> <87pn9pxris.fsf@mail.linkov.net> <83d05ottnw.fsf@gnu.org> <0b42f540-f779-446b-4411-8dae3a50d09d@yandex.ru> <837dvwtrv1.fsf@gnu.org> <835zbgtqps.fsf@gnu.org> <625de669-0715-1467-0bd1-84328b4bee5f@yandex.ru> <83wo3ws4g8.fsf@gnu.org> <83tuyzs2np.fsf@gnu.org> <87h7uuj1v3.fsf@mail.linkov.net> Date: Tue, 30 Jun 2020 01:58:54 +0300 In-Reply-To: (Dmitry Gutov's message of "Mon, 29 Jun 2020 01:37:39 +0300") Message-ID: <87h7utjx75.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 41821 Cc: Eli Zaretskii , 41821@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >> So analogously, vc.el is one of back-ends of project.el, so in vc.el >> there should be such line for using project functions: >> (require 'project) > > Not really. > > project-vc (which is the project backend) resides in project.el. > > It calls to some VC functions, but VC itself needs no awareness of > project.el. I see that project.el calls some functions from preloaded vc-hooks.el and some autoloaded functions from vc.el. According to this design, this feature should be implemented the same way. In 'vc-root-diff' command: (read-directory-name "Directory for VC root-diff: " nil (when (featurep 'project) (project-vc-known-roots))) Note the same prefix 'project-vc' for vc backend of project.el. Then 'project-vc-known-roots' in project.el be like this: (defun project-vc-known-roots () "Return a list of known vc roots." (seq-filter #'project-try-vc (project-known-project-roots))) Also every command that visits a directory in vc could register their dir in the project list when project.el is loaded, for example: (defun vc-dir (dir &optional backend) ... (when (featurep 'project) ;; Add current vc project dir to project list (let ((default-directory dir)) (project-current t))) From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 30 08:36:39 2020 Received: (at 41821) by debbugs.gnu.org; 30 Jun 2020 12:36:39 +0000 Received: from localhost ([127.0.0.1]:50401 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqFV9-0008TM-H9 for submit@debbugs.gnu.org; Tue, 30 Jun 2020 08:36:39 -0400 Received: from mail-wr1-f52.google.com ([209.85.221.52]:45634) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqFV6-0008T3-Sr for 41821@debbugs.gnu.org; Tue, 30 Jun 2020 08:36:38 -0400 Received: by mail-wr1-f52.google.com with SMTP id s10so19913599wrw.12 for <41821@debbugs.gnu.org>; Tue, 30 Jun 2020 05:36:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=nLEui2QYr9j+vdzFI4b34ADn7fR9fCJuPt5UjFNJIhk=; b=mk33fZ+VYdf9bjhJzXPJj3wNBcQeVjyJnkqtEp5FmS2N3LGc5z2l3n98+IndUab3hg SQVVplBMkl0qjUE8VG9J6OXFZ003ug1ODVm4o5awDoCkWPxXNYWCm13ONB70lTTSa4Fz Ljs4/otGsRzs4I30iUSypde9ojV8aVtu5tB+OVBDWnQtLFsaqbjyE98eCqXBHZHsDuAK 0z5SmH7iuVAofMHgbLQg0ZUxeh0NTIcHqmJgUtUnow8s54Bs62nWJnWysLD21r37BHS7 bqe3pSnbGuXxIvLXOTk0juO18/7q1tI5k/0nNApcQZdLIzOfMXGXiK02V6g5ZO1QRFky mGcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=nLEui2QYr9j+vdzFI4b34ADn7fR9fCJuPt5UjFNJIhk=; b=dcvLLq15lwXk2f44PyEf+52rBii77kjEiSdG7SS5YuUG5Nv1QkA+jvBJ+S8cGfmfmi RE7w4skm5wONnFcrrNg/qXs0Jd+MHUnKlSbjig5Jc7hKRa7z7T0x5xDJkVjeBwjJe6ci JFyGylt6lD3gmSdA+z9KFVXps4wiuIUT1PgaN8IQJIuo+QEnnP1ly4k+xApPT7LH1Eso rjXKIDSumozEXpRMjs0mq6V/7AWD0DVa8yD7ygSwFLgOpVcCk0ZIE10b3Hck7cq9whyW ziNa55fwf8pkNNbFJynXn4pH7R9yNOLpURTSVjEzmXhhO/wGD9OsCb84zeeO4zM59N88 8aCQ== X-Gm-Message-State: AOAM5337svqWjHgo6PsZ45m+qszoJVuDI6V3yEt3B1fYnxAuDseQbFHk LB4qES55oxruY7M4FGctpv+asuUt X-Google-Smtp-Source: ABdhPJxzKxohx9y/Wt260bZsppqWjAcvm/pK9lE1XttXf7bZODGMbP90PGy6/YCvEvDZEVxuNaaJWg== X-Received: by 2002:adf:e7c2:: with SMTP id e2mr23112842wrn.179.1593520590571; Tue, 30 Jun 2020 05:36:30 -0700 (PDT) Received: from [192.168.0.134] ([109.110.245.170]) by smtp.googlemail.com with ESMTPSA id 1sm3344331wmf.21.2020.06.30.05.36.29 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 30 Jun 2020 05:36:29 -0700 (PDT) Subject: Re: bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects To: Juri Linkov References: <87r1ulxk48.fsf@mail.linkov.net> <7164426e-8c37-8839-64da-563cfa829b53@yandex.ru> <87mu50j5cu.fsf@mail.linkov.net> <87y2oh8fdv.fsf@mail.linkov.net> <87366ohw5z.fsf@mail.linkov.net> <878sge7jls.fsf@mail.linkov.net> <7e136435-7123-fa42-e4a8-66b82e6595da@yandex.ru> <87pn9pxris.fsf@mail.linkov.net> <83d05ottnw.fsf@gnu.org> <0b42f540-f779-446b-4411-8dae3a50d09d@yandex.ru> <837dvwtrv1.fsf@gnu.org> <835zbgtqps.fsf@gnu.org> <625de669-0715-1467-0bd1-84328b4bee5f@yandex.ru> <83wo3ws4g8.fsf@gnu.org> <83tuyzs2np.fsf@gnu.org> <87h7uuj1v3.fsf@mail.linkov.net> <87h7utjx75.fsf@mail.linkov.net> From: Dmitry Gutov Message-ID: <3f9e85ba-66a9-abd0-61bf-800ea8bb4ee3@yandex.ru> Date: Tue, 30 Jun 2020 15:36:26 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <87h7utjx75.fsf@mail.linkov.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 41821 Cc: 41821@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 30.06.2020 01:58, Juri Linkov wrote: > Note the same prefix 'project-vc' for vc backend of project.el. > Then 'project-vc-known-roots' in project.el be like this: > > (defun project-vc-known-roots () > "Return a list of known vc roots." > (seq-filter #'project-try-vc (project-known-project-roots))) You suggested this before. Special-casing a particular backend in a general purpose public function is not a good idea. > Also every command that visits a directory in vc could register their dir > in the project list when project.el is loaded, for example: > > (defun vc-dir (dir &optional backend) > ... > (when (featurep 'project) > ;; Add current vc project dir to project list > (let ((default-directory dir)) > (project-current t))) Having considered it more, I now have more doubt on whether this approach is a good idea in general. See, even when the project backend is VC, there is no guarantee that its root will be the repository's root. First, there are submodules (and whether a submodule root is a project root is customizable). Second, there is an existing feature request to use also some other project root markers, even inside VC repos (the "monorepo" case). These might end up in the 'vc' backend as well. So things as they are, I'd rather VC has a separate roots history, or we at least put this feature request on hold (and, for now, revert the installed patches). From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 30 17:33:48 2020 Received: (at 41821) by debbugs.gnu.org; 30 Jun 2020 21:33:48 +0000 Received: from localhost ([127.0.0.1]:51826 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqNsx-0007Du-Rc for submit@debbugs.gnu.org; Tue, 30 Jun 2020 17:33:48 -0400 Received: from relay1-d.mail.gandi.net ([217.70.183.193]:16687) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqNst-0007DS-2v for 41821@debbugs.gnu.org; Tue, 30 Jun 2020 17:33:46 -0400 X-Originating-IP: 91.129.96.187 Received: from mail.gandi.net (m91-129-96-187.cust.tele2.ee [91.129.96.187]) (Authenticated sender: juri@linkov.net) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id F27A1240003; Tue, 30 Jun 2020 21:33:35 +0000 (UTC) From: Juri Linkov To: Dmitry Gutov Subject: Re: bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects Organization: LINKOV.NET References: <87r1ulxk48.fsf@mail.linkov.net> <87y2oh8fdv.fsf@mail.linkov.net> <87366ohw5z.fsf@mail.linkov.net> <878sge7jls.fsf@mail.linkov.net> <7e136435-7123-fa42-e4a8-66b82e6595da@yandex.ru> <87pn9pxris.fsf@mail.linkov.net> <83d05ottnw.fsf@gnu.org> <0b42f540-f779-446b-4411-8dae3a50d09d@yandex.ru> <837dvwtrv1.fsf@gnu.org> <835zbgtqps.fsf@gnu.org> <625de669-0715-1467-0bd1-84328b4bee5f@yandex.ru> <83wo3ws4g8.fsf@gnu.org> <83tuyzs2np.fsf@gnu.org> <87h7uuj1v3.fsf@mail.linkov.net> <87h7utjx75.fsf@mail.linkov.net> <3f9e85ba-66a9-abd0-61bf-800ea8bb4ee3@yandex.ru> Date: Tue, 30 Jun 2020 23:50:06 +0300 In-Reply-To: <3f9e85ba-66a9-abd0-61bf-800ea8bb4ee3@yandex.ru> (Dmitry Gutov's message of "Tue, 30 Jun 2020 15:36:26 +0300") Message-ID: <87eepw5nlt.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 41821 Cc: 41821@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-=-= Content-Type: text/plain >> Note the same prefix 'project-vc' for vc backend of project.el. >> Then 'project-vc-known-roots' in project.el be like this: >> (defun project-vc-known-roots () >> "Return a list of known vc roots." >> (seq-filter #'project-try-vc (project-known-project-roots))) > > You suggested this before. Special-casing a particular backend in a general > purpose public function is not a good idea. It's not a general purpose function. Its prefix 'project-vc-' indicates that this public function is specific to project-vc backend. >> Also every command that visits a directory in vc could register their dir >> in the project list when project.el is loaded, for example: >> (defun vc-dir (dir &optional backend) >> ... >> (when (featurep 'project) >> ;; Add current vc project dir to project list >> (let ((default-directory dir)) >> (project-current t))) > > Having considered it more, I now have more doubt on whether this approach > is a good idea in general. > > See, even when the project backend is VC, there is no guarantee that its > root will be the repository's root. Isn't the project's root the same as the repository's root in 99% cases? > First, there are submodules (and whether a submodule root is a project > root is customizable). This is a general problem currently discussed in other threads. > Second, there is an existing feature request to use also some other > project root markers, even inside VC repos (the "monorepo" > case). These might end up in the 'vc' backend as well. I don't see how is this related to the subject of this bug report. It's not a big problem when some directories provided by M-n are not repository root directories in 1% of cases. > So things as they are, I'd rather VC has a separate roots history, > or we at least put this feature request on hold (and, for now, revert > the installed patches). Look, what I'm trying to say is that there are users who want to use project directories from ~/.emacs.d/projects in vc commands. Of course, there are users with no free memory available that can't afford loading project.el to the memory. Addressing the needs of users who don't use project.el is a separate issue. But in this report I'm addressing the needs of users who want to use project.el in vc commands. Also I'm sure that most users will want to use project directories from ~/.emacs.d/projects not only in vc commands, but in more places for non-vc commands. Here's a similar patch for grep commands: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=read-directory-name-project-known-project-roots.patch diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index 7731be5965..331abf0f38 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el @@ -1078,8 +1078,12 @@ lgrep (error "grep.el: No `grep-template' available")) (t (let* ((regexp (grep-read-regexp)) (files (grep-read-files regexp)) - (dir (read-directory-name "In directory: " - nil default-directory t)) + (dir (read-directory-name + "In directory: " nil + (if (featurep 'project) + (project-known-project-roots) + default-directory) + t)) (confirm (equal current-prefix-arg '(4)))) (list regexp files dir confirm)))))) (when (and (stringp regexp) (> (length regexp) 0)) @@ -1166,8 +1170,12 @@ rgrep (error "grep.el: No `grep-find-template' available")) (t (let* ((regexp (grep-read-regexp)) (files (grep-read-files regexp)) - (dir (read-directory-name "Base directory: " - nil default-directory t)) + (dir (read-directory-name + "Base directory: " nil + (if (featurep 'project) + (project-known-project-roots) + default-directory) + t)) (confirm (equal current-prefix-arg '(4)))) (list regexp files dir confirm)))))) (when (and (stringp regexp) (> (length regexp) 0)) @@ -1297,8 +1305,12 @@ zrgrep (error "grep.el: No `grep-find-template' available")) (t (let* ((regexp (grep-read-regexp)) (files (grep-read-files regexp)) - (dir (read-directory-name "Base directory: " - nil default-directory t)) + (dir (read-directory-name + "Base directory: " nil + (if (featurep 'project) + (project-known-project-roots) + default-directory) + t)) (confirm (equal current-prefix-arg '(4)))) (list regexp files dir confirm grep-find-template))))))) (let ((grep-find-template template) --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 30 18:00:13 2020 Received: (at 41821) by debbugs.gnu.org; 30 Jun 2020 22:00:13 +0000 Received: from localhost ([127.0.0.1]:51837 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqOIX-0007tP-Fj for submit@debbugs.gnu.org; Tue, 30 Jun 2020 18:00:13 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:46868) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqOIS-0007s9-It for 41821@debbugs.gnu.org; Tue, 30 Jun 2020 18:00:12 -0400 Received: by mail-wr1-f67.google.com with SMTP id r12so21588491wrj.13 for <41821@debbugs.gnu.org>; Tue, 30 Jun 2020 15:00:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=+ZB6Ba9xsuZLwKlFDly8o4Z4+LPWkwGgYRtQnonxRxc=; b=bT/SP0fNwZPraALvEO+7HjwbekCdnDcJmCSDhNs3AGvqM9E9wizdwAJsN4kdPZjK08 XkKYM46ZZ7OKuOBIX1VuwQMxVVvJ9QoHWWxjbs4814HNr1U4mQ3FV5wnfdH4Nwhw3T3B 0htSl7iPix3qHUI1SO6uUaimBuBzBcWx7NAuWAITiiY4wf6QguRViwVHwbFrlNKkbCmv iBkffyHm6ACgkDAfo7Iyc5Clapz+TVt3S64NSwQKfVl2+ekgR5kVghGmEMVTjP/+0uWb eHfqRNmB2UwhRUaJkOGfBS1XoBCEEzbeR+TyOiD20FmAXPCe+IYqC2swMIdQZk4ddxcX 6hAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=+ZB6Ba9xsuZLwKlFDly8o4Z4+LPWkwGgYRtQnonxRxc=; b=DMUp1JajKvBuwe0FEjI9UP9HrcQo75thSqI4cmP4k3uOATEIHbpalGw2DnUeIIdSea uzB4PqUIWmJVfRvru8t1UihBbFh8lYsR4IF++fkW9a95valub+L0uwl4iMoHhZTM63mK 7XnlOlU/Rmvg7l9gonGMmm9Wj4mOvptMJAPhg11h5MpFDtmWNjOPK39/O7QdBilE5Weg UCWqA0yHow+lyyWdFpYMbw4KNt4Z4mA8FcD+gKaKpgFFUk4O+tR/4+DCTSr4/rxlUs0R 6auQM92qOtt7bAtTtjv59POTOMd0KAlqtAN95mIWeYWBrbrcXLLhYyaeXDb3tcCdmmux 3tBA== X-Gm-Message-State: AOAM530H+uh7tmH2H9AEtASK1Db/dSEFMQWKcGKhAR7mebhj+1sNQc1g yvLRAFfR0zvf1HTK0ng6hUBiy551 X-Google-Smtp-Source: ABdhPJzXO8R4uulw7J+ixVVq6FjBTZ5KJkZz1q+gTuJiOx1E6rPR7n2ap2ziZ7fW9hWESyzjcs2JPQ== X-Received: by 2002:adf:fa8b:: with SMTP id h11mr23549894wrr.391.1593554402162; Tue, 30 Jun 2020 15:00:02 -0700 (PDT) Received: from [192.168.0.3] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id c65sm4755254wme.8.2020.06.30.15.00.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 30 Jun 2020 15:00:01 -0700 (PDT) Subject: Re: bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects To: Juri Linkov References: <87r1ulxk48.fsf@mail.linkov.net> <87y2oh8fdv.fsf@mail.linkov.net> <87366ohw5z.fsf@mail.linkov.net> <878sge7jls.fsf@mail.linkov.net> <7e136435-7123-fa42-e4a8-66b82e6595da@yandex.ru> <87pn9pxris.fsf@mail.linkov.net> <83d05ottnw.fsf@gnu.org> <0b42f540-f779-446b-4411-8dae3a50d09d@yandex.ru> <837dvwtrv1.fsf@gnu.org> <835zbgtqps.fsf@gnu.org> <625de669-0715-1467-0bd1-84328b4bee5f@yandex.ru> <83wo3ws4g8.fsf@gnu.org> <83tuyzs2np.fsf@gnu.org> <87h7uuj1v3.fsf@mail.linkov.net> <87h7utjx75.fsf@mail.linkov.net> <3f9e85ba-66a9-abd0-61bf-800ea8bb4ee3@yandex.ru> <87eepw5nlt.fsf@mail.linkov.net> From: Dmitry Gutov Message-ID: Date: Wed, 1 Jul 2020 00:59:59 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <87eepw5nlt.fsf@mail.linkov.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 41821 Cc: 41821@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 30.06.2020 23:50, Juri Linkov wrote: >>> Note the same prefix 'project-vc' for vc backend of project.el. >>> Then 'project-vc-known-roots' in project.el be like this: >>> (defun project-vc-known-roots () >>> "Return a list of known vc roots." >>> (seq-filter #'project-try-vc (project-known-project-roots))) >> >> You suggested this before. Special-casing a particular backend in a general >> purpose public function is not a good idea. > > It's not a general purpose function. Its prefix 'project-vc-' indicates that > this public function is specific to project-vc backend. An yet, its purpose is general. If it were to be used ubiquitously, it should remain useful even if the user employs other backends, not project-vc. >> See, even when the project backend is VC, there is no guarantee that its >> root will be the repository's root. > > Isn't the project's root the same as the repository's root in 99% cases? This number is going to get lower in the future. Because of the examples I cited, and maybe others. >> First, there are submodules (and whether a submodule root is a project >> root is customizable). > > This is a general problem currently discussed in other threads. I don't understand this response. >> Second, there is an existing feature request to use also some other >> project root markers, even inside VC repos (the "monorepo" >> case). These might end up in the 'vc' backend as well. > > I don't see how is this related to the subject of this bug report. > It's not a big problem when some directories provided by M-n > are not repository root directories in 1% of cases. It is related to the sentence I wrote above it in the previous email. And it's related to your estimation of "99%". >> So things as they are, I'd rather VC has a separate roots history, >> or we at least put this feature request on hold (and, for now, revert >> the installed patches). > > Look, what I'm trying to say is that there are users who want > to use project directories from ~/.emacs.d/projects in vc commands. > Of course, there are users with no free memory available that can't > afford loading project.el to the memory. Addressing the needs of users > who don't use project.el is a separate issue. But in this report > I'm addressing the needs of users who want to use project.el in vc commands. The question is whether it would be better done in a different way. And consider: okay, saving a separate (partially duplicating) list in ~/.emacs.d/vc-roots sounds somewhat of a hassle, but from the user's POV, they will enter a repository root directory one more time. And from then on Emacs will suggest it from the saved list, and all will be well. It could even be memorized automatically most of the time, similarly to what you suggested in the previous email. And in the cases when a project root doesn't match the repository root, this alternative solution will result in better behavior. > Also I'm sure that most users will want to use project directories from > ~/.emacs.d/projects not only in vc commands, but in more places for > non-vc commands. Here's a similar patch for grep commands: This looks like a substitute for a 'project-grep' command, right? But if Eli thinks it's good, I have no objection. Note that the tradeoffs are different in this case: obviously, there's even no need to filter by #'project-try-vc. From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 01 10:42:22 2020 Received: (at 41821) by debbugs.gnu.org; 1 Jul 2020 14:42:22 +0000 Received: from localhost ([127.0.0.1]:53559 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqdwM-0003h1-2e for submit@debbugs.gnu.org; Wed, 01 Jul 2020 10:42:22 -0400 Received: from eggs.gnu.org ([209.51.188.92]:58056) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqdwI-0003gn-DK for 41821@debbugs.gnu.org; Wed, 01 Jul 2020 10:42:20 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:40223) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jqdwB-0005Nm-DZ; Wed, 01 Jul 2020 10:42:11 -0400 Received: from [176.228.60.248] (port=2540 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jqdw9-00022L-Pn; Wed, 01 Jul 2020 10:42:10 -0400 Date: Wed, 01 Jul 2020 17:42:04 +0300 Message-Id: <83v9j7xpoj.fsf@gnu.org> From: Eli Zaretskii To: Dmitry Gutov In-Reply-To: (message from Dmitry Gutov on Wed, 1 Jul 2020 00:59:59 +0300) Subject: Re: bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects References: <87r1ulxk48.fsf@mail.linkov.net> <87y2oh8fdv.fsf@mail.linkov.net> <87366ohw5z.fsf@mail.linkov.net> <878sge7jls.fsf@mail.linkov.net> <7e136435-7123-fa42-e4a8-66b82e6595da@yandex.ru> <87pn9pxris.fsf@mail.linkov.net> <83d05ottnw.fsf@gnu.org> <0b42f540-f779-446b-4411-8dae3a50d09d@yandex.ru> <837dvwtrv1.fsf@gnu.org> <835zbgtqps.fsf@gnu.org> <625de669-0715-1467-0bd1-84328b4bee5f@yandex.ru> <83wo3ws4g8.fsf@gnu.org> <83tuyzs2np.fsf@gnu.org> <87h7uuj1v3.fsf@mail.linkov.net> <87h7utjx75.fsf@mail.linkov.net> <3f9e85ba-66a9-abd0-61bf-800ea8bb4ee3@yandex.ru> <87eepw5nlt.fsf@mail.linkov.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 41821 Cc: 41821@debbugs.gnu.org, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Dmitry Gutov > Date: Wed, 1 Jul 2020 00:59:59 +0300 > Cc: 41821@debbugs.gnu.org > > > Look, what I'm trying to say is that there are users who want > > to use project directories from ~/.emacs.d/projects in vc commands. > > Of course, there are users with no free memory available that can't > > afford loading project.el to the memory. Addressing the needs of users > > who don't use project.el is a separate issue. But in this report > > I'm addressing the needs of users who want to use project.el in vc commands. > > The question is whether it would be better done in a different way. > > And consider: okay, saving a separate (partially duplicating) list in > ~/.emacs.d/vc-roots sounds somewhat of a hassle, but from the user's > POV, they will enter a repository root directory one more time. And from > then on Emacs will suggest it from the saved list, and all will be well. > It could even be memorized automatically most of the time, similarly > to what you suggested in the previous email. > > And in the cases when a project root doesn't match the repository root, > this alternative solution will result in better behavior. > > > Also I'm sure that most users will want to use project directories from > > ~/.emacs.d/projects not only in vc commands, but in more places for > > non-vc commands. Here's a similar patch for grep commands: > > This looks like a substitute for a 'project-grep' command, right? > > But if Eli thinks it's good, I have no objection. Like you, Dmitry, I'm a bit uneasy with mixing the two sets of features. We should decide on some concept and try to stick to it; right now, it seems to me that we prefer to have specialized commands in project.el rather than inject project.el-specific nits into commands outside project.el, which I think could be a slippery slope. Why isn't that a better approach? I don't think it's wise to blur the difference between using project.el features and the VC back-end features that support them. If someone wants to use project.el in VC commands, let them use project.el commands, not VC commands. That way, Emacs will know that some kind of project is being worked on, and could offer more targeted support for such users. From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 01 16:24:30 2020 Received: (at 41821) by debbugs.gnu.org; 1 Jul 2020 20:24:30 +0000 Received: from localhost ([127.0.0.1]:53769 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqjHR-0003HY-S5 for submit@debbugs.gnu.org; Wed, 01 Jul 2020 16:24:30 -0400 Received: from mail-wm1-f51.google.com ([209.85.128.51]:50231) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqjHP-0003HL-UX for 41821@debbugs.gnu.org; Wed, 01 Jul 2020 16:24:28 -0400 Received: by mail-wm1-f51.google.com with SMTP id l17so23956074wmj.0 for <41821@debbugs.gnu.org>; Wed, 01 Jul 2020 13:24:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=jxT+5xD3KphLkudnTh2AqwEXY73bXPYWN9cGS3YuOKE=; b=Bmdp/I8cEdA/rA1oujnOYeqMPdCub2t9eJHRedd2EClKFNMOZrYZJ1G8C3U48lyijL zt9Vx1WmoodMWLK0stkoLCN54e0Uac2GVau1NBRaxzpsEGHMlFE1M1ErmfozTuIphn3X YR5IXu/96WJWUdLOcUIUBWwga7RsMUt1nL6tHBWRckbnjmBJI0glz//U4/EBbUurMGBe wIiy7jhth9CWtXI9ITMVr5RR5gC9FakK6cxE6K+yKWknIQH1E8uIFl7++lqkwpp+mDa5 TF/RybC8xDtoqQxVMpT3xtug18v4eRvYt6iUTvDd1cFJnNa5ymM6HUfv0pfJnuweKABO SZFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=jxT+5xD3KphLkudnTh2AqwEXY73bXPYWN9cGS3YuOKE=; b=gt4loXLnD5eGgQTY1PE4bellmJQh7bjrn+4U+hOIHIFgc4r6ZPsnSQvKOiZN2vIrCJ 6yh5gJLwfsApDp5scKCovZWq3mKPwhe+hKetGTLDU6zcncjnQOPem7/0BBoGOYxjfeAW TD20FpBSClBYMc+mv6Jd/jVF3pzBIYqnVxUCu1pzJXfm82ZN6mu5fCUgZ3/MzF55M76E EtLZVBhrE+UaF/maJdYz45yWnE9S4b5qdLrrN2aBE8Y5K3IQSXMYsPKho05MizqnBeqg RNEvPBT3OXe6KKnpbYnY8OOZLeOwBAi013xh1b4ejkv3eiPJC4v+5DmCSCgXoHV9uNfs JYrA== X-Gm-Message-State: AOAM533MjWOq61zjJ3XNKLqKDfDVAk5q3vfCoFZMsh81DKmW6x+9JRTs vU0LDtoLpT0+Zs31db27FXs= X-Google-Smtp-Source: ABdhPJwJ9BoMW4b/nOflq1apyHXm9u1GZ94YdMVN+hQZNgHQU1fMcOtXDze77bISbjPHnW22lompfA== X-Received: by 2002:a1c:1d93:: with SMTP id d141mr27344453wmd.14.1593635061844; Wed, 01 Jul 2020 13:24:21 -0700 (PDT) Received: from [192.168.0.3] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id d13sm8260843wrn.61.2020.07.01.13.24.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 01 Jul 2020 13:24:21 -0700 (PDT) Subject: Re: bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects To: Eli Zaretskii References: <87r1ulxk48.fsf@mail.linkov.net> <87y2oh8fdv.fsf@mail.linkov.net> <87366ohw5z.fsf@mail.linkov.net> <878sge7jls.fsf@mail.linkov.net> <7e136435-7123-fa42-e4a8-66b82e6595da@yandex.ru> <87pn9pxris.fsf@mail.linkov.net> <83d05ottnw.fsf@gnu.org> <0b42f540-f779-446b-4411-8dae3a50d09d@yandex.ru> <837dvwtrv1.fsf@gnu.org> <835zbgtqps.fsf@gnu.org> <625de669-0715-1467-0bd1-84328b4bee5f@yandex.ru> <83wo3ws4g8.fsf@gnu.org> <83tuyzs2np.fsf@gnu.org> <87h7uuj1v3.fsf@mail.linkov.net> <87h7utjx75.fsf@mail.linkov.net> <3f9e85ba-66a9-abd0-61bf-800ea8bb4ee3@yandex.ru> <87eepw5nlt.fsf@mail.linkov.net> <83v9j7xpoj.fsf@gnu.org> From: Dmitry Gutov Message-ID: <990a9046-c4e6-efb2-01dd-60198994127b@yandex.ru> Date: Wed, 1 Jul 2020 23:24:19 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <83v9j7xpoj.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 41821 Cc: 41821@debbugs.gnu.org, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) Hi Eli, On 01.07.2020 17:42, Eli Zaretskii wrote: > Like you, Dmitry, I'm a bit uneasy with mixing the two sets of > features. We should decide on some concept and try to stick to it; > right now, it seems to me that we prefer to have specialized commands > in project.el rather than inject project.el-specific nits into > commands outside project.el, which I think could be a slippery slope. In my previous message I drew a line, of sorts, where I think it's okay to suggest directories to search in in rgrep from known project roots. I do think it's okay. I'm not sure if I understand your position, because you say you agree, but then make a one-directional statement. > Why isn't that a better approach? I don't think it's wise to blur the > difference between using project.el features and the VC back-end > features that support them. If someone wants to use project.el in VC > commands, let them use project.el commands, not VC commands. That > way, Emacs will know that some kind of project is being worked on, and > could offer more targeted support for such users. Not sure that's going to result in optimal user experience. After all, simply having a copy of every command, but acting on a project, would make it 2x the number of commands. And project-rgrep, on the other hand, would probably search the current project root without prompting. Unlike the proposed change to rgrep, which only makes it a suggestion. Another long-term violation of your idea is the default definition of xref-backend-references. It uses the current project. You could say that mixes up abstractions as well, but it's just too handy to implement this way. From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 01 18:10:36 2020 Received: (at 41821) by debbugs.gnu.org; 1 Jul 2020 22:10:36 +0000 Received: from localhost ([127.0.0.1]:53866 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqkw8-0005lG-HA for submit@debbugs.gnu.org; Wed, 01 Jul 2020 18:10:36 -0400 Received: from relay12.mail.gandi.net ([217.70.178.232]:59823) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqkw7-0005kf-2g for 41821@debbugs.gnu.org; Wed, 01 Jul 2020 18:10:35 -0400 Received: from mail.gandi.net (m91-129-96-187.cust.tele2.ee [91.129.96.187]) (Authenticated sender: juri@linkov.net) by relay12.mail.gandi.net (Postfix) with ESMTPSA id 00CF8200005; Wed, 1 Jul 2020 22:10:27 +0000 (UTC) From: Juri Linkov To: Dmitry Gutov Subject: Re: bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects Organization: LINKOV.NET References: <87r1ulxk48.fsf@mail.linkov.net> <87y2oh8fdv.fsf@mail.linkov.net> <87366ohw5z.fsf@mail.linkov.net> <878sge7jls.fsf@mail.linkov.net> <7e136435-7123-fa42-e4a8-66b82e6595da@yandex.ru> <87pn9pxris.fsf@mail.linkov.net> <83d05ottnw.fsf@gnu.org> <0b42f540-f779-446b-4411-8dae3a50d09d@yandex.ru> <837dvwtrv1.fsf@gnu.org> <835zbgtqps.fsf@gnu.org> <625de669-0715-1467-0bd1-84328b4bee5f@yandex.ru> <83wo3ws4g8.fsf@gnu.org> <83tuyzs2np.fsf@gnu.org> <87h7uuj1v3.fsf@mail.linkov.net> <87h7utjx75.fsf@mail.linkov.net> <3f9e85ba-66a9-abd0-61bf-800ea8bb4ee3@yandex.ru> Date: Thu, 02 Jul 2020 01:10:00 +0300 In-Reply-To: <3f9e85ba-66a9-abd0-61bf-800ea8bb4ee3@yandex.ru> (Dmitry Gutov's message of "Tue, 30 Jun 2020 15:36:26 +0300") Message-ID: <87y2o2c2l6.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 41821 Cc: 41821@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > we at least put this feature request on hold (and, for now, > revert the installed patches). Ok, reverted the installed patches. It's easy to achieve the same in the init file with these simple advises. Now this works perfectly from POV of users who prefer to use project directories everywhere in all prompts that ask for a directory: #+begin_src emacs-lisp ;; When a prompt of some commands such as 'rgrep' or 'vc-print-log' asks for ;; a directory name, allow 'M-n' to access the most recently used project ;; directories saved in ~/.emacs.d/projects: (advice-add 'read-directory-name :around (lambda (orig-fun prompt &optional dir default-dirname mustmatch initial) (when (featurep 'project) (setq default-dirname (append (cond ((null default-dirname) (list (or dir default-directory))) ((consp default-dirname) default-dirname) (t (list default-dirname))) (project-known-project-roots)))) (let ((ret (funcall orig-fun prompt dir default-dirname mustmatch initial))) (when (featurep 'project) ;; Update project list with selected project dir (let ((default-directory ret)) (project-current t))) ret)) '((name . read-directory-name-project-defaults))) (advice-add 'vc-dir :after (lambda (dir &optional _backend) (when (featurep 'project) ;; Add current vc project dir to project list (let ((default-directory dir)) (project-current t)))) '((name . vc-dir-add-project))) #+end_src From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 02 09:37:08 2020 Received: (at 41821) by debbugs.gnu.org; 2 Jul 2020 13:37:08 +0000 Received: from localhost ([127.0.0.1]:54595 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqzOm-0007Pu-8i for submit@debbugs.gnu.org; Thu, 02 Jul 2020 09:37:08 -0400 Received: from eggs.gnu.org ([209.51.188.92]:52208) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqzOi-0007PO-H3 for 41821@debbugs.gnu.org; Thu, 02 Jul 2020 09:37:07 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:60876) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jqzOc-0004H3-9n; Thu, 02 Jul 2020 09:36:58 -0400 Received: from [176.228.60.248] (port=4959 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jqzOb-0007uS-MS; Thu, 02 Jul 2020 09:36:58 -0400 Date: Thu, 02 Jul 2020 16:36:54 +0300 Message-Id: <831rluxcll.fsf@gnu.org> From: Eli Zaretskii To: Dmitry Gutov In-Reply-To: <990a9046-c4e6-efb2-01dd-60198994127b@yandex.ru> (message from Dmitry Gutov on Wed, 1 Jul 2020 23:24:19 +0300) Subject: Re: bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects References: <87r1ulxk48.fsf@mail.linkov.net> <87y2oh8fdv.fsf@mail.linkov.net> <87366ohw5z.fsf@mail.linkov.net> <878sge7jls.fsf@mail.linkov.net> <7e136435-7123-fa42-e4a8-66b82e6595da@yandex.ru> <87pn9pxris.fsf@mail.linkov.net> <83d05ottnw.fsf@gnu.org> <0b42f540-f779-446b-4411-8dae3a50d09d@yandex.ru> <837dvwtrv1.fsf@gnu.org> <835zbgtqps.fsf@gnu.org> <625de669-0715-1467-0bd1-84328b4bee5f@yandex.ru> <83wo3ws4g8.fsf@gnu.org> <83tuyzs2np.fsf@gnu.org> <87h7uuj1v3.fsf@mail.linkov.net> <87h7utjx75.fsf@mail.linkov.net> <3f9e85ba-66a9-abd0-61bf-800ea8bb4ee3@yandex.ru> <87eepw5nlt.fsf@mail.linkov.net> <83v9j7xpoj.fsf@gnu.org> <990a9046-c4e6-efb2-01dd-60198994127b@yandex.ru> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 41821 Cc: 41821@debbugs.gnu.org, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: 41821@debbugs.gnu.org, juri@linkov.net > From: Dmitry Gutov > Date: Wed, 1 Jul 2020 23:24:19 +0300 > > On 01.07.2020 17:42, Eli Zaretskii wrote: > > Like you, Dmitry, I'm a bit uneasy with mixing the two sets of > > features. We should decide on some concept and try to stick to it; > > right now, it seems to me that we prefer to have specialized commands > > in project.el rather than inject project.el-specific nits into > > commands outside project.el, which I think could be a slippery slope. > > In my previous message I drew a line, of sorts, where I think it's okay > to suggest directories to search in in rgrep from known project roots. I > do think it's okay. > > I'm not sure if I understand your position, because you say you agree, > but then make a one-directional statement. I agreed with your general doubt whether the proposal is TRT. My motivation is somewhat different. > > Why isn't that a better approach? I don't think it's wise to blur the > > difference between using project.el features and the VC back-end > > features that support them. If someone wants to use project.el in VC > > commands, let them use project.el commands, not VC commands. That > > way, Emacs will know that some kind of project is being worked on, and > > could offer more targeted support for such users. > > Not sure that's going to result in optimal user experience. After all, > simply having a copy of every command, but acting on a project, would > make it 2x the number of commands. > > And project-rgrep, on the other hand, would probably search the current > project root without prompting. Unlike the proposed change to rgrep, > which only makes it a suggestion. I just fear that this is a slippery slope: we will eventually need to inject this into many GP commands, "for consistency". > Another long-term violation of your idea is the default definition of > xref-backend-references. It uses the current project. You could say that > mixes up abstractions as well, but it's just too handy to implement this > way. I don't think I understand the issue and the use case, sorry. From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 02 10:39:36 2020 Received: (at 41821) by debbugs.gnu.org; 2 Jul 2020 14:39:36 +0000 Received: from localhost ([127.0.0.1]:55493 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jr0NE-0000gd-Bq for submit@debbugs.gnu.org; Thu, 02 Jul 2020 10:39:36 -0400 Received: from mail-wm1-f49.google.com ([209.85.128.49]:40916) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jr0NC-0000gQ-8V for 41821@debbugs.gnu.org; Thu, 02 Jul 2020 10:39:35 -0400 Received: by mail-wm1-f49.google.com with SMTP id f139so28261440wmf.5 for <41821@debbugs.gnu.org>; Thu, 02 Jul 2020 07:39:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=VZFXJy/Ac9FO3i9NrvOtjSpjJ9kggR7ofJR74DK7b2Q=; b=la1yLF8EHwOmuyckTCfga08GgY0Ji2aDsbYajxwMFWusSf3fcTxJoUTVtfV4Tiu0Gl BaDzGF6x+RE6e8JcFthimrgLjFnUXUXlAYTerqh/92jHnuKI+q/Ee9QLD8/SoJ7qiH8G iPRAl8OVeRi+9RKkYxUGtWJCrUaLsJjzMdg/V9RyquNn9fnZd7b1mKXTNt6zj14wF6KW GimApUvQDLP67k3TrwcZOQqCGXidB4Lvau1ivqlMJLQMkSLIzGfHV3gsXl14dLnEvmLF stcLdAjGmOn3uxngeHNuje1XnVRalPuYWBN55lyXJWh4Uxge3McplanvXb16f5YcVU6I tJ2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=VZFXJy/Ac9FO3i9NrvOtjSpjJ9kggR7ofJR74DK7b2Q=; b=W46QNp/fMRLYxY4D6Onaq9RvEQ1UaoKFYubuMlPgZODSkyEJCTwnjV8Zl70vjc65Jw 3J6XNp8bIhj3b6fdiMPQ9al4sMvm1C/48b+gEuRKXR5pn8uL4Jme8/VQbT2DasmHEisR l3BIbkciOZkbIwTO0JpQCKxyvrr26VzoZ8j0Q9H2DzKYctTpBiolgQEL3MvnBoHho/LH tb4rnfTvxV8nIbgXqbQol9aVK2nX1hqNS7jRzlwfMb/c0oerqC4yewmn0kKEe+IdWcZJ rIR66INEdmnR++0dYkBDhEEcU7FIuPVg7zKYO2o4c7BSfFJK60Vp5XJbJkGzCkpcry6g eeag== X-Gm-Message-State: AOAM533bBG10+sEjA0a9eB1kt0ZpKdEbBJ8K2EWSaXlT4WteV2k8vu8s YcZ/40Ip2GJGTSlf3ZaX6T5Qk7lm X-Google-Smtp-Source: ABdhPJzDk7mMeyvxjtVyTLapT78hyy+0dq8U4lnFkTf1kAIGraz8pWsSdD0ExUTka+PihBZ/sWZzDQ== X-Received: by 2002:a05:600c:21ca:: with SMTP id x10mr31793756wmj.63.1593700767668; Thu, 02 Jul 2020 07:39:27 -0700 (PDT) Received: from [192.168.0.3] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id f14sm11967605wro.90.2020.07.02.07.39.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 02 Jul 2020 07:39:26 -0700 (PDT) Subject: Re: bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects To: Juri Linkov References: <87r1ulxk48.fsf@mail.linkov.net> <87y2oh8fdv.fsf@mail.linkov.net> <87366ohw5z.fsf@mail.linkov.net> <878sge7jls.fsf@mail.linkov.net> <7e136435-7123-fa42-e4a8-66b82e6595da@yandex.ru> <87pn9pxris.fsf@mail.linkov.net> <83d05ottnw.fsf@gnu.org> <0b42f540-f779-446b-4411-8dae3a50d09d@yandex.ru> <837dvwtrv1.fsf@gnu.org> <835zbgtqps.fsf@gnu.org> <625de669-0715-1467-0bd1-84328b4bee5f@yandex.ru> <83wo3ws4g8.fsf@gnu.org> <83tuyzs2np.fsf@gnu.org> <87h7uuj1v3.fsf@mail.linkov.net> <87h7utjx75.fsf@mail.linkov.net> <3f9e85ba-66a9-abd0-61bf-800ea8bb4ee3@yandex.ru> <87y2o2c2l6.fsf@mail.linkov.net> From: Dmitry Gutov Message-ID: <37dfad05-187b-8b14-a32f-b31df95da232@yandex.ru> Date: Thu, 2 Jul 2020 17:39:25 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <87y2o2c2l6.fsf@mail.linkov.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 41821 Cc: 41821@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 02.07.2020 01:10, Juri Linkov wrote: >> we at least put this feature request on hold (and, for now, >> revert the installed patches). > > Ok, reverted the installed patches. > > It's easy to achieve the same in the init file with these > simple advises. Now this works perfectly from POV of users > who prefer to use project directories everywhere in all prompts > that ask for a directory: > > #+begin_src emacs-lisp > ;; When a prompt of some commands such as 'rgrep' or 'vc-print-log' asks for > ;; a directory name, allow 'M-n' to access the most recently used project > ;; directories saved in ~/.emacs.d/projects: > > (advice-add 'read-directory-name :around I figured you might want to define a vc-specific wrapper function for read-directory-name, for ease of advising. But now I'm not so sure. > (when (featurep 'project) > ;; Update project list with selected project dir > (let ((default-directory ret)) > (project-current t))) The 't' argument is counter-productive here. You don't want it to prompt, which will happen when the target directory is in the end outside of any detected projects. And really if you just do this in an ad-hoc advice (and recommend it to other users), it's probably better to just remove this call for simplicity. After all, you probably interact with "proper" project commands anyway. And they will put the current project at the top of the history. From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 02 10:43:43 2020 Received: (at 41821) by debbugs.gnu.org; 2 Jul 2020 14:43:43 +0000 Received: from localhost ([127.0.0.1]:55497 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jr0RC-0000mc-Sj for submit@debbugs.gnu.org; Thu, 02 Jul 2020 10:43:43 -0400 Received: from mail-wr1-f50.google.com ([209.85.221.50]:39369) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jr0R9-0000mL-LA for 41821@debbugs.gnu.org; Thu, 02 Jul 2020 10:43:40 -0400 Received: by mail-wr1-f50.google.com with SMTP id q5so28753861wru.6 for <41821@debbugs.gnu.org>; Thu, 02 Jul 2020 07:43:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=Me01RXAW6ptuMsftaJPELGfgrUYhNb3eLxz61hje4hk=; b=O2SofCj+fm5mmhFJpWZmgfRxuBjfjF4awOm+f7F0ybhnYWSZTE21krc+EzzXyzNLBu vRPEZ5FRey2F7/Y0nlFZYv2jbqQvrhvBJ/364lHEc5yVJYvgJc3LH4QEmEGX1RLZk0k+ IlOhm5dHW+/7ZwPMSI6sN2mFsA0/djy8ZvHLuD75GCb0nSMd3LTQpuJDRW2cEkjLPOHt 7gYXdPvPaAo5d25lbJCX3NV2eeuLks2gW7WxyIMjUY5NAyZXezkPor3GpsQe4/S/ISvk IBTHOCNWNjnHdrAQMXVnbhoLeIbPcU2BO4mtUhSXbGjjBUII5BVP62b0Dix3tsQpL8cl YhQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Me01RXAW6ptuMsftaJPELGfgrUYhNb3eLxz61hje4hk=; b=GmLvnWdazFuEUJOQS6By2N9Qooj/VukGjirfjEGP3xKOzdSaRBi8dXyJmxm565EinR 5bdo4iLu7ha149riQGat9Fklenfvmk8D5duFVkRehvF2xw+h/LurVvhrar+ZJBTYXJ8E XCNPEaz8kLeyLcDJZz5Z+GMyT/AuiwEWrsuTBESgltgBMu1RuQLajkr4HHET9GamEaAV bKL8W+NNTtZgYlVpOT2vJ7tXUnZPg8nHAcXH4NvTo5OMvzggdyrWfMzZ3phN/EYD7tBL YINHIjAUQZgVeCQgbtL+NOJ9FG+UzmWYjoCClOa/XFYaB/dxmbUHxMMEUOHqLdgU1Pfv QeQA== X-Gm-Message-State: AOAM530nOHN1pHqH+uINXmQ78RSP9eovcE8KlWZRI6AG+u20JHPmj3Zc BPiKrIzk0nfEpgWBngTajk8= X-Google-Smtp-Source: ABdhPJzT0Ef7PjMW1MhMkZcXCo8erkyzEFde6VXou7AmihmAqlcP5DAx7cj160jPm5Ck6yI78XyihQ== X-Received: by 2002:adf:ff8d:: with SMTP id j13mr31044518wrr.11.1593701013821; Thu, 02 Jul 2020 07:43:33 -0700 (PDT) Received: from [192.168.0.3] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id c2sm11243241wrv.47.2020.07.02.07.43.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 02 Jul 2020 07:43:33 -0700 (PDT) Subject: Re: bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects To: Eli Zaretskii References: <87r1ulxk48.fsf@mail.linkov.net> <87y2oh8fdv.fsf@mail.linkov.net> <87366ohw5z.fsf@mail.linkov.net> <878sge7jls.fsf@mail.linkov.net> <7e136435-7123-fa42-e4a8-66b82e6595da@yandex.ru> <87pn9pxris.fsf@mail.linkov.net> <83d05ottnw.fsf@gnu.org> <0b42f540-f779-446b-4411-8dae3a50d09d@yandex.ru> <837dvwtrv1.fsf@gnu.org> <835zbgtqps.fsf@gnu.org> <625de669-0715-1467-0bd1-84328b4bee5f@yandex.ru> <83wo3ws4g8.fsf@gnu.org> <83tuyzs2np.fsf@gnu.org> <87h7uuj1v3.fsf@mail.linkov.net> <87h7utjx75.fsf@mail.linkov.net> <3f9e85ba-66a9-abd0-61bf-800ea8bb4ee3@yandex.ru> <87eepw5nlt.fsf@mail.linkov.net> <83v9j7xpoj.fsf@gnu.org> <990a9046-c4e6-efb2-01dd-60198994127b@yandex.ru> <831rluxcll.fsf@gnu.org> From: Dmitry Gutov Message-ID: Date: Thu, 2 Jul 2020 17:43:29 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <831rluxcll.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 41821 Cc: 41821@debbugs.gnu.org, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 02.07.2020 16:36, Eli Zaretskii wrote: >>> Why isn't that a better approach? I don't think it's wise to blur the >>> difference between using project.el features and the VC back-end >>> features that support them. If someone wants to use project.el in VC >>> commands, let them use project.el commands, not VC commands. That >>> way, Emacs will know that some kind of project is being worked on, and >>> could offer more targeted support for such users. >> >> Not sure that's going to result in optimal user experience. After all, >> simply having a copy of every command, but acting on a project, would >> make it 2x the number of commands. >> >> And project-rgrep, on the other hand, would probably search the current >> project root without prompting. Unlike the proposed change to rgrep, >> which only makes it a suggestion. > > I just fear that this is a slippery slope: we will eventually need to > inject this into many GP commands, "for consistency". The notion of current project is very common in most editors, so I imagine this will be TRT, sooner or later. Not that I'm in a hurry for that. >> Another long-term violation of your idea is the default definition of >> xref-backend-references. It uses the current project. You could say that >> mixes up abstractions as well, but it's just too handy to implement this >> way. > > I don't think I understand the issue and the use case, sorry. The use case is 'M-x xref-find-refereces' and xref backends which don't override xref-backend-references. In which case this command searches the current project using general purpose tools (one of semantic symref tools, or Grep). But xref backend != current project. They're technically and theoretically independent. From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 02 13:42:10 2020 Received: (at 41821) by debbugs.gnu.org; 2 Jul 2020 17:42:10 +0000 Received: from localhost ([127.0.0.1]:55592 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jr3Dt-00059B-PR for submit@debbugs.gnu.org; Thu, 02 Jul 2020 13:42:10 -0400 Received: from eggs.gnu.org ([209.51.188.92]:36050) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jr3Dq-00058j-BM for 41821@debbugs.gnu.org; Thu, 02 Jul 2020 13:42:08 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:37394) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jr3Dk-0000HM-3V; Thu, 02 Jul 2020 13:42:00 -0400 Received: from [176.228.60.248] (port=4181 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jr3Dj-0007Hb-G5; Thu, 02 Jul 2020 13:41:59 -0400 Date: Thu, 02 Jul 2020 20:41:57 +0300 Message-Id: <83r1ttx196.fsf@gnu.org> From: Eli Zaretskii To: Dmitry Gutov In-Reply-To: (message from Dmitry Gutov on Thu, 2 Jul 2020 17:43:29 +0300) Subject: Re: bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects References: <87r1ulxk48.fsf@mail.linkov.net> <87y2oh8fdv.fsf@mail.linkov.net> <87366ohw5z.fsf@mail.linkov.net> <878sge7jls.fsf@mail.linkov.net> <7e136435-7123-fa42-e4a8-66b82e6595da@yandex.ru> <87pn9pxris.fsf@mail.linkov.net> <83d05ottnw.fsf@gnu.org> <0b42f540-f779-446b-4411-8dae3a50d09d@yandex.ru> <837dvwtrv1.fsf@gnu.org> <835zbgtqps.fsf@gnu.org> <625de669-0715-1467-0bd1-84328b4bee5f@yandex.ru> <83wo3ws4g8.fsf@gnu.org> <83tuyzs2np.fsf@gnu.org> <87h7uuj1v3.fsf@mail.linkov.net> <87h7utjx75.fsf@mail.linkov.net> <3f9e85ba-66a9-abd0-61bf-800ea8bb4ee3@yandex.ru> <87eepw5nlt.fsf@mail.linkov.net> <83v9j7xpoj.fsf@gnu.org> <990a9046-c4e6-efb2-01dd-60198994127b@yandex.ru> <831rluxcll.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 41821 Cc: 41821@debbugs.gnu.org, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: 41821@debbugs.gnu.org, juri@linkov.net > From: Dmitry Gutov > Date: Thu, 2 Jul 2020 17:43:29 +0300 > > > I just fear that this is a slippery slope: we will eventually need to > > inject this into many GP commands, "for consistency". > > The notion of current project is very common in most editors But Emacs is more than just an IDE, it can be and is used for many other jobs. For example, I customary take a break from my development work to read email, and when doing so I might issue some Grep command that I need for some email message I'm writing. I don't think it's right for Emacs to assume that every Grep I do is necessarily related to the last project I was working on (which could be days in the past, btw). This way, we would need a command to "get out of" (or "close") the project, which I think would be both a nuisance and absurd. > >> Another long-term violation of your idea is the default definition of > >> xref-backend-references. It uses the current project. You could say that > >> mixes up abstractions as well, but it's just too handy to implement this > >> way. > > > > I don't think I understand the issue and the use case, sorry. > > The use case is 'M-x xref-find-refereces' and xref backends which don't > override xref-backend-references. In which case this command searches > the current project using general purpose tools (one of semantic symref > tools, or Grep). > > But xref backend != current project. They're technically and > theoretically independent. So you are saying that it might bring me the wrong references once in a while? That's not good, is it? From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 02 15:37:47 2020 Received: (at 41821) by debbugs.gnu.org; 2 Jul 2020 19:37:47 +0000 Received: from localhost ([127.0.0.1]:55697 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jr51n-000807-8E for submit@debbugs.gnu.org; Thu, 02 Jul 2020 15:37:47 -0400 Received: from mail-wr1-f49.google.com ([209.85.221.49]:40720) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jr51l-0007zj-LT for 41821@debbugs.gnu.org; Thu, 02 Jul 2020 15:37:46 -0400 Received: by mail-wr1-f49.google.com with SMTP id f2so1864662wrp.7 for <41821@debbugs.gnu.org>; Thu, 02 Jul 2020 12:37:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=pxN4QotiOJBeGItaqlUv6HpiPEkjuPhSu/R1mJebjgM=; b=VHS2udb4iHugpJ4CqiluPMmXRa9z22lERkFc26qFWLrHPPdD+Pqg0sofT6k75pXAGF tfYrvcP0TpNuzuZWyZ7CV8xVJjZQYfHaHz6I5sZ1a6tqZxWDVeR6qaClE5CAtw9c/Tye rf9kxgypDAE/6fB1YtNpXlXx/b6Nubcykl8sX16GGQxLfFYQHU0vdehYP85Tp1XtJMli EGnag9Adso6x0IK7BVtgBHlfWgdhKQiah8akPuUwLnJ18YK5caAGFiVX5/fLUg2I3/pz a8H6JxBaYw+x4ZhzGsDJN7f2Ykc5FvwE20kCMfjjr4LIt908LS7T7ucWgtJZHUqKlK+W V6rQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=pxN4QotiOJBeGItaqlUv6HpiPEkjuPhSu/R1mJebjgM=; b=q5kStUJCStocq1L8KVMAYsvjfKUd/7ZkGNoy+DfBAYwHJ2EE04YQxZ3fpMSmi879ZM 0AdrLp+DnPpqGMJmMapgfdqNWa12qpAlghQv31B7j1dBCCAxbdANq0TVwfGD5hk2yR6o QXxWybrTMiFjCepn5PqiSFw15gbt036VQF/vhc/1zImNkEvZH3on77PVAY82EzT8PMVz 74gQe/xGbKKfuXOezkdDoDQfe8IMblaqJTyOR2NdBIo7cixRm0ulFNwib04Ocdbu8aXm LzLYg/YWMqUfbs5lHB4sz+x5uz3FD4eCgGNnGFXcgY6wV4lQXqXwWmyp4KUsQbz3RCEX 9FBQ== X-Gm-Message-State: AOAM531LlvOPvRjBBT8/l/hB2WBAmjYzH8fJGU3FZfnC9cF5gtqr66QY If2qtEUWUso8xHqATKr15Lk= X-Google-Smtp-Source: ABdhPJzaVOd0vI1Mxl4pq5nrFiLjWzSRzSVnzg0GQXWtTbRQahV0NCTI2Q8ygqSB7JJ7CmLglpLjmQ== X-Received: by 2002:a5d:40c9:: with SMTP id b9mr31832142wrq.425.1593718659689; Thu, 02 Jul 2020 12:37:39 -0700 (PDT) Received: from [192.168.0.3] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id l190sm11300181wml.12.2020.07.02.12.37.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 02 Jul 2020 12:37:38 -0700 (PDT) Subject: Re: bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects To: Eli Zaretskii References: <87r1ulxk48.fsf@mail.linkov.net> <87366ohw5z.fsf@mail.linkov.net> <878sge7jls.fsf@mail.linkov.net> <7e136435-7123-fa42-e4a8-66b82e6595da@yandex.ru> <87pn9pxris.fsf@mail.linkov.net> <83d05ottnw.fsf@gnu.org> <0b42f540-f779-446b-4411-8dae3a50d09d@yandex.ru> <837dvwtrv1.fsf@gnu.org> <835zbgtqps.fsf@gnu.org> <625de669-0715-1467-0bd1-84328b4bee5f@yandex.ru> <83wo3ws4g8.fsf@gnu.org> <83tuyzs2np.fsf@gnu.org> <87h7uuj1v3.fsf@mail.linkov.net> <87h7utjx75.fsf@mail.linkov.net> <3f9e85ba-66a9-abd0-61bf-800ea8bb4ee3@yandex.ru> <87eepw5nlt.fsf@mail.linkov.net> <83v9j7xpoj.fsf@gnu.org> <990a9046-c4e6-efb2-01dd-60198994127b@yandex.ru> <831rluxcll.fsf@gnu.org> <83r1ttx196.fsf@gnu.org> From: Dmitry Gutov Message-ID: <9c09977f-18c2-facd-c1e2-e7fe488ee92c@yandex.ru> Date: Thu, 2 Jul 2020 22:37:36 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <83r1ttx196.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 41821 Cc: 41821@debbugs.gnu.org, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 02.07.2020 20:41, Eli Zaretskii wrote: >> The notion of current project is very common in most editors > > But Emacs is more than just an IDE, it can be and is used for many > other jobs. For example, I customary take a break from my development > work to read email, and when doing so I might issue some Grep command > that I need for some email message I'm writing. I don't think it's > right for Emacs to assume that every Grep I do is necessarily related > to the last project I was working on (which could be days in the past, > btw). This way, we would need a command to "get out of" (or "close") > the project, which I think would be both a nuisance and absurd. But it's for a default value (one you can insert using M-n, or not). Most users won't even notice this. >> The use case is 'M-x xref-find-refereces' and xref backends which don't >> override xref-backend-references. In which case this command searches >> the current project using general purpose tools (one of semantic symref >> tools, or Grep). >> >> But xref backend != current project. They're technically and >> theoretically independent. > > So you are saying that it might bring me the wrong references once in > a while? That's not good, is it? If an xref backend doesn't define the xref-backend-references method, the alternative is no references at all. Anything else we do, will be imprecise. But it's useful to have a default with "good enough" behavior, as you have probably noticed. Whether the current implementation will give wrong results, and how often, is difficult for me to predict. It also depends on what we consider a "wrong reference". etags and elisp backends don't always give perfect results for "find definition" either. From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 03 01:55:52 2020 Received: (at 41821) by debbugs.gnu.org; 3 Jul 2020 05:55:52 +0000 Received: from localhost ([127.0.0.1]:56178 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrEfw-0000Xd-3k for submit@debbugs.gnu.org; Fri, 03 Jul 2020 01:55:52 -0400 Received: from eggs.gnu.org ([209.51.188.92]:60318) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrEfu-0000XR-03 for 41821@debbugs.gnu.org; Fri, 03 Jul 2020 01:55:50 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:48570) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jrEfn-0002YN-L1; Fri, 03 Jul 2020 01:55:43 -0400 Received: from [176.228.60.248] (port=1569 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jrEfm-0004YJ-US; Fri, 03 Jul 2020 01:55:43 -0400 Date: Fri, 03 Jul 2020 08:55:42 +0300 Message-Id: <83eeptw3a9.fsf@gnu.org> From: Eli Zaretskii To: Dmitry Gutov In-Reply-To: <9c09977f-18c2-facd-c1e2-e7fe488ee92c@yandex.ru> (message from Dmitry Gutov on Thu, 2 Jul 2020 22:37:36 +0300) Subject: Re: bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects References: <87r1ulxk48.fsf@mail.linkov.net> <87366ohw5z.fsf@mail.linkov.net> <878sge7jls.fsf@mail.linkov.net> <7e136435-7123-fa42-e4a8-66b82e6595da@yandex.ru> <87pn9pxris.fsf@mail.linkov.net> <83d05ottnw.fsf@gnu.org> <0b42f540-f779-446b-4411-8dae3a50d09d@yandex.ru> <837dvwtrv1.fsf@gnu.org> <835zbgtqps.fsf@gnu.org> <625de669-0715-1467-0bd1-84328b4bee5f@yandex.ru> <83wo3ws4g8.fsf@gnu.org> <83tuyzs2np.fsf@gnu.org> <87h7uuj1v3.fsf@mail.linkov.net> <87h7utjx75.fsf@mail.linkov.net> <3f9e85ba-66a9-abd0-61bf-800ea8bb4ee3@yandex.ru> <87eepw5nlt.fsf@mail.linkov.net> <83v9j7xpoj.fsf@gnu.org> <990a9046-c4e6-efb2-01dd-60198994127b@yandex.ru> <831rluxcll.fsf@gnu.org> <83r1ttx196.fsf@gnu.org> <9c09977f-18c2-facd-c1e2-e7fe488ee92c@yandex.ru> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 41821 Cc: 41821@debbugs.gnu.org, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: 41821@debbugs.gnu.org, juri@linkov.net > From: Dmitry Gutov > Date: Thu, 2 Jul 2020 22:37:36 +0300 > > > But Emacs is more than just an IDE, it can be and is used for many > > other jobs. For example, I customary take a break from my development > > work to read email, and when doing so I might issue some Grep command > > that I need for some email message I'm writing. I don't think it's > > right for Emacs to assume that every Grep I do is necessarily related > > to the last project I was working on (which could be days in the past, > > btw). This way, we would need a command to "get out of" (or "close") > > the project, which I think would be both a nuisance and absurd. > > But it's for a default value (one you can insert using M-n, or not). > Most users won't even notice this. You assume that most users don't know about or use M-n? I do it all the time, and would like to think others do as well. > >> The use case is 'M-x xref-find-refereces' and xref backends which don't > >> override xref-backend-references. In which case this command searches > >> the current project using general purpose tools (one of semantic symref > >> tools, or Grep). > >> > >> But xref backend != current project. They're technically and > >> theoretically independent. > > > > So you are saying that it might bring me the wrong references once in > > a while? That's not good, is it? > > If an xref backend doesn't define the xref-backend-references method, > the alternative is no references at all. The alternative could be to start with the current directory, or ask the user. But do we have xref backends that don't define the xref-backend-references method? If so, which ones don't? > Whether the current implementation will give wrong results, and how > often, is difficult for me to predict. It also depends on what we > consider a "wrong reference". etags and elisp backends don't always give > perfect results for "find definition" either. "Imperfect" and "completely wrong" is not the same at all. Searching the wrong directory hierarchy will get you the latter. From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 03 06:23:16 2020 Received: (at 41821) by debbugs.gnu.org; 3 Jul 2020 10:23:16 +0000 Received: from localhost ([127.0.0.1]:56502 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrIqi-0007f3-5l for submit@debbugs.gnu.org; Fri, 03 Jul 2020 06:23:16 -0400 Received: from mail-wr1-f45.google.com ([209.85.221.45]:35212) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrIqg-0007eq-Pv for 41821@debbugs.gnu.org; Fri, 03 Jul 2020 06:23:15 -0400 Received: by mail-wr1-f45.google.com with SMTP id z2so9826347wrp.2 for <41821@debbugs.gnu.org>; Fri, 03 Jul 2020 03:23:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=i7dnXVRYYc7xQnW2deQY1kArWA5yjX/ac0l8aKNX0ww=; b=uWJh2XXSmt4yAnhu+Uw9eY5FnUmm4mi7S9BIfQMmLf7HwaqXdPCsx37T5CGUSDzakE oRHBNuCHBzlRFMD0kjeb6DHcjJ5EEKkfJaQIxYzuSWTvloGhkWUitPpyVjaB3rYRkh29 9WgoVqz0uUDEeqqWVwLpVOevc+b3YF+rODO11NsEF//05HAavb/bMOsO0tBgmU2qrQKB wH+q0SpRP8KHb4QWG10cuBB101LKk/bxXK5usIBDxwZPf02qc2NzBuJw6esnIFYL4+qA NU2ApbrB3pPm0ek1I42wru6ZMh35+3LugaJ/p1J+QAj7PugkWnPVQXyTtNTVQaQNIuEx UOQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=i7dnXVRYYc7xQnW2deQY1kArWA5yjX/ac0l8aKNX0ww=; b=AWO39WXcXYlgAtGdUOVNNTB03Lfrvm/eIDYx3Ub2KCT+Nb47IPjlZiF1JvzTFDz8bL 40D+xToWZwLNA8JYPzBSV/VUgcJWItS5jObdp/5BA1EYE12Up3rQ51ZNBawNYzANnVsZ 3Dx/MOGw12iiWeuUr9xPBz9ZEJcdoEgoOkMhcg4Hrcjkt6Os4VnxfiNIFPNKUAgGPqCK rrlHfLzSEFyD9S48Roe/2TSArPWP5tJnVef8B2gzfnIHrs5WtYoZWiES/axREYyUQCt/ 1LuXNCVVsZYMJQ7hRPJv9OrB4mPrXMyfh+NZDEjy3m0JIE20DTnPX+UK7hmctveCKjfT vA2Q== X-Gm-Message-State: AOAM532IzLSKwZ+XDZ0Tl3XlaXpeU8rTSg0CFiy8KEai7FrTJqGTHnYO 3r4wuBjXttVjb4qAteekvcg= X-Google-Smtp-Source: ABdhPJzny8Ub0Qqw2Orti5qq8srE381QF/UKixgG8lwDsTYCF6CJNFQZ2oQe/lG5otBOfU88uBWX8Q== X-Received: by 2002:adf:f7cb:: with SMTP id a11mr33759630wrq.291.1593771788741; Fri, 03 Jul 2020 03:23:08 -0700 (PDT) Received: from [192.168.0.3] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id l8sm13572654wrq.15.2020.07.03.03.23.07 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 03 Jul 2020 03:23:08 -0700 (PDT) Subject: Re: bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects To: Eli Zaretskii References: <87r1ulxk48.fsf@mail.linkov.net> <878sge7jls.fsf@mail.linkov.net> <7e136435-7123-fa42-e4a8-66b82e6595da@yandex.ru> <87pn9pxris.fsf@mail.linkov.net> <83d05ottnw.fsf@gnu.org> <0b42f540-f779-446b-4411-8dae3a50d09d@yandex.ru> <837dvwtrv1.fsf@gnu.org> <835zbgtqps.fsf@gnu.org> <625de669-0715-1467-0bd1-84328b4bee5f@yandex.ru> <83wo3ws4g8.fsf@gnu.org> <83tuyzs2np.fsf@gnu.org> <87h7uuj1v3.fsf@mail.linkov.net> <87h7utjx75.fsf@mail.linkov.net> <3f9e85ba-66a9-abd0-61bf-800ea8bb4ee3@yandex.ru> <87eepw5nlt.fsf@mail.linkov.net> <83v9j7xpoj.fsf@gnu.org> <990a9046-c4e6-efb2-01dd-60198994127b@yandex.ru> <831rluxcll.fsf@gnu.org> <83r1ttx196.fsf@gnu.org> <9c09977f-18c2-facd-c1e2-e7fe488ee92c@yandex.ru> <83eeptw3a9.fsf@gnu.org> From: Dmitry Gutov Message-ID: <5eef9982-091d-5db6-d96f-35da1f2cf42d@yandex.ru> Date: Fri, 3 Jul 2020 13:23:05 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <83eeptw3a9.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 41821 Cc: 41821@debbugs.gnu.org, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 03.07.2020 08:55, Eli Zaretskii wrote: >> But it's for a default value (one you can insert using M-n, or not). >> Most users won't even notice this. > > You assume that most users don't know about or use M-n? I do it all > the time, and would like to think others do as well. I assume, yes. But even if they do, I'm not sure how this extra capability could harm them. >>>> The use case is 'M-x xref-find-refereces' and xref backends which don't >>>> override xref-backend-references. In which case this command searches >>>> the current project using general purpose tools (one of semantic symref >>>> tools, or Grep). >>>> >>>> But xref backend != current project. They're technically and >>>> theoretically independent. >>> >>> So you are saying that it might bring me the wrong references once in >>> a while? That's not good, is it? >> >> If an xref backend doesn't define the xref-backend-references method, >> the alternative is no references at all. > > The alternative could be to start with the current directory, or ask > the user. Using the current directory will result in worse results almost always, IME. Prompting the user every time is not a great experience either. > But do we have xref backends that don't define the > xref-backend-references method? If so, which ones don't? Neither of the built-in ones does. :-) >> Whether the current implementation will give wrong results, and how >> often, is difficult for me to predict. It also depends on what we >> consider a "wrong reference". etags and elisp backends don't always give >> perfect results for "find definition" either. > > "Imperfect" and "completely wrong" is not the same at all. Searching > the wrong directory hierarchy will get you the latter. Perhaps. To get better results, the user will have to set up the project configuration better. From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 03 07:48:18 2020 Received: (at 41821) by debbugs.gnu.org; 3 Jul 2020 11:48:18 +0000 Received: from localhost ([127.0.0.1]:56579 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrKB0-0003Tj-Ho for submit@debbugs.gnu.org; Fri, 03 Jul 2020 07:48:18 -0400 Received: from eggs.gnu.org ([209.51.188.92]:37500) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrKAw-0003TS-T7 for 41821@debbugs.gnu.org; Fri, 03 Jul 2020 07:48:17 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:34427) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jrKAq-0004mj-8N; Fri, 03 Jul 2020 07:48:08 -0400 Received: from [176.228.60.248] (port=3578 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jrKAp-00065U-7Q; Fri, 03 Jul 2020 07:48:08 -0400 Date: Fri, 03 Jul 2020 14:48:07 +0300 Message-Id: <833668x1jc.fsf@gnu.org> From: Eli Zaretskii To: Dmitry Gutov In-Reply-To: <5eef9982-091d-5db6-d96f-35da1f2cf42d@yandex.ru> (message from Dmitry Gutov on Fri, 3 Jul 2020 13:23:05 +0300) Subject: Re: bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects References: <87r1ulxk48.fsf@mail.linkov.net> <878sge7jls.fsf@mail.linkov.net> <7e136435-7123-fa42-e4a8-66b82e6595da@yandex.ru> <87pn9pxris.fsf@mail.linkov.net> <83d05ottnw.fsf@gnu.org> <0b42f540-f779-446b-4411-8dae3a50d09d@yandex.ru> <837dvwtrv1.fsf@gnu.org> <835zbgtqps.fsf@gnu.org> <625de669-0715-1467-0bd1-84328b4bee5f@yandex.ru> <83wo3ws4g8.fsf@gnu.org> <83tuyzs2np.fsf@gnu.org> <87h7uuj1v3.fsf@mail.linkov.net> <87h7utjx75.fsf@mail.linkov.net> <3f9e85ba-66a9-abd0-61bf-800ea8bb4ee3@yandex.ru> <87eepw5nlt.fsf@mail.linkov.net> <83v9j7xpoj.fsf@gnu.org> <990a9046-c4e6-efb2-01dd-60198994127b@yandex.ru> <831rluxcll.fsf@gnu.org> <83r1ttx196.fsf@gnu.org> <9c09977f-18c2-facd-c1e2-e7fe488ee92c@yandex.ru> <83eeptw3a9.fsf@gnu.org> <5eef9982-091d-5db6-d96f-35da1f2cf42d@yandex.ru> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 41821 Cc: 41821@debbugs.gnu.org, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: 41821@debbugs.gnu.org, juri@linkov.net > From: Dmitry Gutov > Date: Fri, 3 Jul 2020 13:23:05 +0300 > > > You assume that most users don't know about or use M-n? I do it all > > the time, and would like to think others do as well. > > I assume, yes. > > But even if they do, I'm not sure how this extra capability could harm them. ??? Offering incorrect default doesn't cause harm? > >> If an xref backend doesn't define the xref-backend-references method, > >> the alternative is no references at all. > > > > The alternative could be to start with the current directory, or ask > > the user. > > Using the current directory will result in worse results almost always, Worse than searching unrelated directories? Perhaps you are thinking about the use case where the project-related directories are indeed relevant to the search. I was thinking about the opposite use case. > IME. Prompting the user every time is not a great experience either. Not every time, only the first time. Afterwards, the user has the history. > > But do we have xref backends that don't define the > > xref-backend-references method? If so, which ones don't? > > Neither of the built-in ones does. :-) But currently, they don't offer project-related defaults, do they? At least not in released versions of Emacs. > >> Whether the current implementation will give wrong results, and how > >> often, is difficult for me to predict. It also depends on what we > >> consider a "wrong reference". etags and elisp backends don't always give > >> perfect results for "find definition" either. > > > > "Imperfect" and "completely wrong" is not the same at all. Searching > > the wrong directory hierarchy will get you the latter. > > Perhaps. To get better results, the user will have to set up the project > configuration better. Like what? I don't think I understand how project configuration could help in non project-related searches. From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 03 09:14:02 2020 Received: (at 41821) by debbugs.gnu.org; 3 Jul 2020 13:14:02 +0000 Received: from localhost ([127.0.0.1]:56637 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrLVx-0005UE-TY for submit@debbugs.gnu.org; Fri, 03 Jul 2020 09:14:02 -0400 Received: from mail-wm1-f44.google.com ([209.85.128.44]:55666) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrLVt-0005TX-Ld for 41821@debbugs.gnu.org; Fri, 03 Jul 2020 09:14:00 -0400 Received: by mail-wm1-f44.google.com with SMTP id g75so31974107wme.5 for <41821@debbugs.gnu.org>; Fri, 03 Jul 2020 06:13:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=c+c5eDtJvYxJQXu9fKRTEQozoyh9nX3nNM+iF6L1LtI=; b=TUaSpROoQlhAploFNBGhf91V+E/huz6eDiOfQun4VeIBlXT0c98oOAbGZ6WllyZ646 cMkXucPS3I9pRCSlsrQhbL+RTDezN/tZOc89oF6XKiD3V6JVgqWNAkQqlkdql+40RVa7 9NTDb8plTgHe0YTbpZKx03GcIbjjSKvqDra+E4vLexFLQBnLGBtSA/rkcnoaAxEpF4Kt xTY4AwPeI8mKdCX+97WqgqrBAalhwuPlRszr65fGgiM9rL0alnINl4+Csuu9ClWoqf3u hoMKSQgDCb7bwthJVViwN2As4ot1aYVRkzdRzXorJ7KatanXf4V0OYLopxGGXMpIVoia iOZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=c+c5eDtJvYxJQXu9fKRTEQozoyh9nX3nNM+iF6L1LtI=; b=TCpR4bCJmf66n4a3Q6u3TU41zSv233Vjp73ZK+veYJkrIa8tHvyY8+KXnO+hei2nJb 8Aov9fFqzkFdj+ouN9rKmfeg3YAd/jGU1dHEaehe3KAoZvcXLW8D45R2pEAw+XhcyG92 1xdpvq0SQsznPSnwpKaIvATCDfZWiRpkS6nsguvCxJH7Z5neSVhWT4Q5tHoBJqnJGuZQ mSYqskfyp88AatlIVhGDH5RdammiAPZG9aEtXk46ila65cmGrjkj4UhwSlLZt3f6dv9P ZbPZiu4P8qBrIXCGT2f2hBVUMwW6TQ336Hs5rnC682vCOC3Xb7Y7gZ70K7buM3/CRgQ+ Z2ug== X-Gm-Message-State: AOAM530NI3tF/ub7/S8QYGLyvTVv3Ah4vkJCbmWTjOSbwvdK7HiJXSCp +iyRNUs1+qZL9zuRPQC8mh4= X-Google-Smtp-Source: ABdhPJywGcAjSmks+W8NZpNp2oQarwC0H5TxmXo7SAKVd+s4D18b09VYC2o5XoykErs0c/bHnq7w2Q== X-Received: by 2002:a05:600c:2116:: with SMTP id u22mr35960218wml.82.1593782031739; Fri, 03 Jul 2020 06:13:51 -0700 (PDT) Received: from [192.168.0.35] ([109.110.245.170]) by smtp.googlemail.com with ESMTPSA id 190sm1664180wmb.15.2020.07.03.06.13.50 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 03 Jul 2020 06:13:50 -0700 (PDT) Subject: Re: bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects To: Eli Zaretskii References: <87r1ulxk48.fsf@mail.linkov.net> <878sge7jls.fsf@mail.linkov.net> <7e136435-7123-fa42-e4a8-66b82e6595da@yandex.ru> <87pn9pxris.fsf@mail.linkov.net> <83d05ottnw.fsf@gnu.org> <0b42f540-f779-446b-4411-8dae3a50d09d@yandex.ru> <837dvwtrv1.fsf@gnu.org> <835zbgtqps.fsf@gnu.org> <625de669-0715-1467-0bd1-84328b4bee5f@yandex.ru> <83wo3ws4g8.fsf@gnu.org> <83tuyzs2np.fsf@gnu.org> <87h7uuj1v3.fsf@mail.linkov.net> <87h7utjx75.fsf@mail.linkov.net> <3f9e85ba-66a9-abd0-61bf-800ea8bb4ee3@yandex.ru> <87eepw5nlt.fsf@mail.linkov.net> <83v9j7xpoj.fsf@gnu.org> <990a9046-c4e6-efb2-01dd-60198994127b@yandex.ru> <831rluxcll.fsf@gnu.org> <83r1ttx196.fsf@gnu.org> <9c09977f-18c2-facd-c1e2-e7fe488ee92c@yandex.ru> <83eeptw3a9.fsf@gnu.org> <5eef9982-091d-5db6-d96f-35da1f2cf42d@yandex.ru> <833668x1jc.fsf@gnu.org> From: Dmitry Gutov Message-ID: Date: Fri, 3 Jul 2020 16:13:49 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <833668x1jc.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 41821 Cc: 41821@debbugs.gnu.org, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) On 03.07.2020 14:48, Eli Zaretskii wrote: >> Cc: 41821@debbugs.gnu.org, juri@linkov.net >> From: Dmitry Gutov >> Date: Fri, 3 Jul 2020 13:23:05 +0300 >> >>> You assume that most users don't know about or use M-n? I do it all >>> the time, and would like to think others do as well. >> >> I assume, yes. >> >> But even if they do, I'm not sure how this extra capability could harm them. > > ??? Offering incorrect default doesn't cause harm? Offering known project roots directories would be incorrect? >>>> If an xref backend doesn't define the xref-backend-references method, >>>> the alternative is no references at all. >>> >>> The alternative could be to start with the current directory, or ask >>> the user. >> >> Using the current directory will result in worse results almost always, > > Worse than searching unrelated directories? Worse than the current behavior. And either way, using just the current directory will almost always result in *missing* valid references from the results. That's much worse than including some irrelevant results, potentially. > Perhaps you are thinking > about the use case where the project-related directories are indeed > relevant to the search. I was thinking about the opposite use case. I'm not sure about the totality of the use cases that would be helped or harmed by the current approach. But I have yet to see a single user complain about the current behavior. >> IME. Prompting the user every time is not a great experience either. > > Not every time, only the first time. Afterwards, the user has the > history. They can only input one directory this way. A project can include "external roots". >>> But do we have xref backends that don't define the >>> xref-backend-references method? If so, which ones don't? >> >> Neither of the built-in ones does. :-) > > But currently, they don't offer project-related defaults, do they? At > least not in released versions of Emacs. What do you mean? Doesn't 'M-x xref-find-references' work for you? This situation has been in place for ~5 years now. >>> "Imperfect" and "completely wrong" is not the same at all. Searching >>> the wrong directory hierarchy will get you the latter. >> >> Perhaps. To get better results, the user will have to set up the project >> configuration better. > > Like what? Like using a project backend that would describe the locations of their source files better. > I don't think I understand how project configuration could > help in non project-related searches. And you lost me here. xref backend doesn't equal a project backend, but you can't claim they are entirely unrelated either (from the user's point of view), or that their configurations don't correlate heavily. From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 03 12:06:15 2020 Received: (at 41821) by debbugs.gnu.org; 3 Jul 2020 16:06:15 +0000 Received: from localhost ([127.0.0.1]:57402 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrOCc-0001GL-4M for submit@debbugs.gnu.org; Fri, 03 Jul 2020 12:06:15 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:49222) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrOCX-0001Fy-Dv for 41821@debbugs.gnu.org; Fri, 03 Jul 2020 12:06:13 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 063G2POq144208; Fri, 3 Jul 2020 16:06:03 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=dvw9Ptjkpz8aLfjJ8zgnNj1135D2s7nRMX0qBkQrjxA=; b=LfOFuX5cBi8bjbNDlDgfyy4LNXMvx3ZJgOGYK/1EERsmih5i+zssQVYihPTBtvEH5pvL UC0t7XR+Cl58cuqIYI0iuvX3V5pOj3eqWfDC/kQIeGGpMTzZNq1F2KTiziwiMgD13aat DccsnIBzXNRHILEPlz0ws4WaKAIOx7miI15wdE1QSacbYCr+wYRtIrnByVynbQGBJpdT bjRLNk1MSWaEwEaAwQMTUf3Co7gPCX+vwXb4H93nM3V/0MMsgbviwl8F31GyvoJGu5c+ ORReKnoNXz0irQ069mAJNqk2ifYkl6Z8nKrRP5AIZJooqPQG/yaaRuhj5VOvfBE4w0E3 cg== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by aserp2120.oracle.com with ESMTP id 31xx1eb6uh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 03 Jul 2020 16:06:03 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 063G3w3G074004; Fri, 3 Jul 2020 16:06:03 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userp3030.oracle.com with ESMTP id 31xg22vys1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 03 Jul 2020 16:06:02 +0000 Received: from abhmp0007.oracle.com (abhmp0007.oracle.com [141.146.116.13]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 063G5vkE004417; Fri, 3 Jul 2020 16:05:57 GMT MIME-Version: 1.0 Message-ID: Date: Fri, 3 Jul 2020 16:05:56 +0000 (UTC) From: Drew Adams To: Eli Zaretskii , Dmitry Gutov Subject: RE: bug#41821: 28.0.50; read-directory-name in vc commands should provide defaults from projects References: <<87r1ulxk48.fsf@mail.linkov.net>> <> <<87366ohw5z.fsf@mail.linkov.net>> <> <<878sge7jls.fsf@mail.linkov.net>> <<7e136435-7123-fa42-e4a8-66b82e6595da@yandex.ru>> <<87pn9pxris.fsf@mail.linkov.net>> <<83d05ottnw.fsf@gnu.org>> <<0b42f540-f779-446b-4411-8dae3a50d09d@yandex.ru>> <<837dvwtrv1.fsf@gnu.org>> <<835zbgtqps.fsf@gnu.org>> <<625de669-0715-1467-0bd1-84328b4bee5f@yandex.ru>> <<83wo3ws4g8.fsf@gnu.org>> <> <<83tuyzs2np.fsf@gnu.org>> <<87h7uuj1v3.fsf@mail.linkov.net>> <> <<87h7utjx75.fsf@mail.linkov.net>> <<3f9e85ba-66a9-abd0-61bf-800ea8bb4ee3@yandex.ru>> <<87eepw5nlt.fsf@mail.linkov.net>> <> <<83v9j7xpoj.fsf@gnu.org>> <<990a9046-c4e6-efb2-01dd-60198994127b@yandex.ru>> <<831rluxcll.fsf@gnu.org>> <> <<83r1ttx196.fsf@gnu.org>> <<9c09977f-18c2-facd-c1e2-e7fe488ee92c@yandex.ru>> <<83eeptw3a9.fsf@gnu.org>> In-Reply-To: <<83eeptw3a9.fsf@gnu.org>> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.5017.0 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9671 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 spamscore=0 phishscore=0 malwarescore=0 mlxlogscore=999 adultscore=0 mlxscore=0 suspectscore=1 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2007030109 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9671 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 clxscore=1011 adultscore=0 suspectscore=1 mlxlogscore=999 cotscore=-2147483648 lowpriorityscore=0 malwarescore=0 phishscore=0 impostorscore=0 mlxscore=0 spamscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2007030109 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 41821 Cc: 41821@debbugs.gnu.org, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > > But it's for a default value (one you can insert using M-n, or not). > > Most users won't even notice this. >=20 > You assume that most users don't know about or use M-n? I do it all > the time, and would like to think others do as well. OT - Dunno about "most", but I suspect "many", yes. `M-n' is super-useful, and I'm guessing that many users, ignorant of it, fairly often go to the trouble of typing what's in fact the default value. Dunno what might be a good solution to this lack of discovery. I've taken one approach that I hope helps a bit, but it too suffers from discoverability. Pretty much anything that doesn't, by default, put the default value in the minibuffer suffers from some difficulty of discovery. What I do in Icicles is this, FWIW (again, not a panacea): When option `icicle-default-value' is non-nil (it's nil by default, hence a discovery problem still), and the INITIAL-INPUT arg of minibuffer-reading functions is nil or "", the DEFAULT-VALUE arg can be inserted in the minibuffer as input. (You can clear the minibuffer anytime with `M-k'.) Particular non-nil values determine placement of point wrt the inserted value, and whether the value is automatically selected (useful with `delete-selection-mode'). https://www.emacswiki.org/emacs/Icicles_-_Customization_and_General_Tips#ic= icle-default-value I mention this because I think that `M-n' is likely underused because of ignorance. Other ways to make it known could help. Inserting it automatically is not necessarily the best way. We could, say, until you do something to remove the nag, append something to minibuffer prompts, to point out `M-n'. Or we could provide a help key that shows *Help* with info about `M-n', `M-p', etc. Dunno what might help new users the most without bothering others. From unknown Fri Jun 20 07:21:50 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 01 Aug 2020 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator