From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: =?utf-8?Q?Simen_Heggest=C3=B8yl?= Newsgroups: gmane.emacs.devel Subject: Re: New feature in project.el: Remembering the previously used projects Date: Thu, 04 Jun 2020 20:33:58 +0200 Message-ID: <34549.1046247602$1591295692@news.gmane.org> References: <6f0f6cc9-52f4-8383-9827-ead54e898472@yandex.ru> <87pnan8xuf.fsf@tcd.ie> <8834c5e9-90c7-a8ad-3dcd-b8fb95f99df5@yandex.ru> <87eer3nqnd.fsf@warpmail.net> <871rn2ivne.fsf@simenheg@gmail.com> <87367hozkq.fsf@mail.linkov.net> <87a71l2wjf.fsf@simenheg@gmail.com> <87pnafye1n.fsf@mail.linkov.net> <2e54d4da-54ab-50dc-09df-580572d2b5f0@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="124964"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.91 (gnu/linux) Cc: "Basil L. Contovounesios" , "Philip K." , emacs-devel , Juri Linkov To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Jun 04 20:34:48 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jguhU-000WQ9-ER for ged-emacs-devel@m.gmane-mx.org; Thu, 04 Jun 2020 20:34:48 +0200 Original-Received: from localhost ([::1]:33758 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jguhT-0001hS-GI for ged-emacs-devel@m.gmane-mx.org; Thu, 04 Jun 2020 14:34:47 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38454) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jgugr-0000gE-Gf for emacs-devel@gnu.org; Thu, 04 Jun 2020 14:34:10 -0400 Original-Received: from aibo.runbox.com ([91.220.196.211]:49704) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jgugp-0008Th-1s for emacs-devel@gnu.org; Thu, 04 Jun 2020 14:34:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=runbox.com; s=selector1; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From; bh=MCUUhAXB3QMhRh0vaoiALTjuXg1hXgD0W2cpw62IFS0=; b=cOZXDesnQoLWMXgmCg9oKdimYW 0krdWgJR890t04t/DG3FMrhhjrnnWzkhztEEsR19lZ1xqPCiy0hDTzkdHLzCxP0bS36TMRKf8HEIm Gqyq160UQyhPEvvql/B/LoQ+GLsGAdoI8oFUfMdykgFi8jC8xBnypPt8MFbADOF67FO9bruD4kEYH ggJaVlcw+mDxG+4vpBRRQmHwZ1MNi+pIYPRYyo+dr3siaSSghAf8BH/qwIPhf0xVAFNdaoqtNb4sU Q/+wJmvgxiN2U4fIYtoUNpAPoOTomDdRYc4iwDybVYJUI7vfAvuLVZ/7qOWOeStvhIVv77AFvAfZ+ HI9TR9vQ==; Original-Received: from [10.9.9.73] (helo=submission02.runbox) by mailtransmit02.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1jgugj-0003u5-TN; Thu, 04 Jun 2020 20:34:02 +0200 Original-Received: by submission02.runbox with esmtpsa [Authenticated alias (963757)] (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) id 1jgugh-0001Ip-6d; Thu, 04 Jun 2020 20:33:59 +0200 In-Reply-To: <2e54d4da-54ab-50dc-09df-580572d2b5f0@yandex.ru> (Dmitry Gutov's message of "Thu, 4 Jun 2020 02:17:28 +0300") Received-SPF: pass client-ip=91.220.196.211; envelope-from=simenheg@runbox.com; helo=aibo.runbox.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/04 14:19:48 X-ACL-Warn: Detected OS = ??? X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, MSGID_MULTIPLE_AT=1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:251858 Archived-At: Dmitry Gutov writes: > On 04.06.2020 01:34, Juri Linkov wrote: > >> While using this new feature, I discovered that switching projects >> by directory is not quite handy, directory strings are too long >> and begin with the same prefix. > > Interesting. It's not really the case here, but I imagine how it is > possible to be true for many people. Same. I'm using Ivy for completion though, maybe that plays a role. >> I think there is a need for an additional command to switch projects by name. >> A clear advantage of Lisp data is that in this case project names >> could be saved in the same file ~/.emacs.d/projects, e.g.: >> (("/project/path/" >> (name . "Project name")) >> or after implementing the proposal from bug#41572 to use >> .dir-locals.el, >> then maybe to save the project name in .dir-locals.el like >> ((nil . ((project-name . "Project name") > > That's an option, but I wonder if we could do without it: > >> A separate question is how to assign a name to a project. > > One way to avoid that, is to generate project names on the fly, in a > uniquify fashion. If base directory names are unique, use those. > Otherwise, prepend their parent names, and so on. > > And we won't need a separate command. Generating the names on the fly in a uniquify fashion sounds like good idea to me (in the beginning this feature feature actually did just that, but I later changed it to what we have now for simplicity). > The exact strategy could be a user option, though. Yep. I imagine different ways the name could be derived from the path automatically (also supporting name = path like we have now), and maybe even an option to let users specify the name manually whenever a new project is encountered. Juri Linkov writes: >> Maybe it should be renamed from "project-list" to simply "projects" too >> while we're at it, to match similar files, like "places", "bookmarks", >> and so on? > > Indeed, "projects" is much better. "project-list" looks like that ugly > directory name "\Program Files" that caused much trouble to people on > MS-Windows whereas it should have been named just "\Programs". Done. -- Simen