From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: New feature in project.el: Remembering the previously used projects Date: Thu, 4 Jun 2020 02:17:28 +0300 Message-ID: <2e54d4da-54ab-50dc-09df-580572d2b5f0@yandex.ru> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="39108"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 Cc: "Basil L. Contovounesios" , "Philip K." , emacs-devel To: Juri Linkov , =?UTF-8?Q?Simen_Heggest=c3=b8yl?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Jun 04 01:18:23 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 1jgceM-000A4O-Ib for ged-emacs-devel@m.gmane-mx.org; Thu, 04 Jun 2020 01:18:22 +0200 Original-Received: from localhost ([::1]:37142 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jgceL-0007ZZ-LI for ged-emacs-devel@m.gmane-mx.org; Wed, 03 Jun 2020 19:18:21 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58784) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jgcda-00076k-Ru for emacs-devel@gnu.org; Wed, 03 Jun 2020 19:17:34 -0400 Original-Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]:34857) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jgcdZ-0000sy-Uj for emacs-devel@gnu.org; Wed, 03 Jun 2020 19:17:34 -0400 Original-Received: by mail-wm1-x32d.google.com with SMTP id q25so3773366wmj.0 for ; Wed, 03 Jun 2020 16:17: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=ShX8e2WrRv2qe0rlvtuvVva9qWrSbmzZhf1ftUJzSEo=; b=iLCrX99SJxSewQctr3+YwPs1bnSBYzoOtwaWbGsnWOrj/iJDC0V/4kUBCsg7e5/toe Kvc5zV/HzPY9nfCsR6WC38ACl2AugcyaC9vsqIc+taEGZRkZPH4sDp+xjA2gm/kv7BjO aprozh4bFaNoJmEnlvoG4sPS91UQoQDQ1xfFL+iQWI9oCIsPBlTrnhQ6EFJaR9UT9iiK dO/iM3i/ppgZBlpo6BsFsMhGoZjytrTNEX6KnDQrCclFNXaSiWZUGaxz6/LPXph1QUTb FNocgBcSoR0JdfVmPZZ3cSHk3dNVgkQ74Hm2EToiz1hwW4FFD8ctRr+NZ2QbooezRGkm PHwQ== 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=ShX8e2WrRv2qe0rlvtuvVva9qWrSbmzZhf1ftUJzSEo=; b=nFtiRINZT22J5xmRQdTdI8IN1mbjdaEmMHIZdvpnW1OFIjxidCRdL2pycCGdLK685f IPz/XKsNYrNS4U4/KORRtMg3t/EpFGbFOSnWyeZIdzCUDa5q4H9lQwZy6hyLqgiTRbYR +aXQpgIBmK+klFGJNfxAc5CwcFflC34kDEk37y3auiQmLuQgNYoJij8PMKhaSzo4Q5QI /2Un/F7JEYLZbrjmOQ+T/M0lRCvv21EbzDWxKGVAv72ckg/FYQh4jp1otpBo232c3KVq D9BjfSQI3Gih2lkPPQ8vho9e4cND5pWbAh3fW7IZFMjD2d4ZeWLsBwcKf3eJ784Qiuru gu0A== X-Gm-Message-State: AOAM531ynYBivgTMPxpWuJPc0sni3/SuQ5Z33wrdnsrPOAtrcTVofZh3 zk2i0OSficvuLUIEVIBZ7ITJz9VK X-Google-Smtp-Source: ABdhPJzyZ9JVaWHsFKAsSqrMBNWJQrJE/qsY8c1gs2qaflnjieC9FY3pHGH9F9u23e+GOKLFIA5crw== X-Received: by 2002:a1c:9cd5:: with SMTP id f204mr1217283wme.105.1591226250627; Wed, 03 Jun 2020 16:17:30 -0700 (PDT) Original-Received: from [192.168.0.3] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id e5sm5357766wrw.19.2020.06.03.16.17.29 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 03 Jun 2020 16:17:29 -0700 (PDT) In-Reply-To: <87pnafye1n.fsf@mail.linkov.net> Content-Language: en-US Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=raaahh@gmail.com; helo=mail-wm1-x32d.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-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:251834 Archived-At: 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. > 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. The exact strategy could be a user option, though.