From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: Name of buffers created by project-shell Date: Mon, 10 May 2021 03:08:48 +0300 Message-ID: References: <87czwh9rv9.fsf@gmail.com> <87zgz526gx.fsf@gmail.com> <80c15296-ebf7-3030-993f-ffb01051d570@yandex.ru> <87sg2xrw3y.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5100"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 Cc: emacs-devel To: Matthias Meulien Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon May 10 02:09:48 2021 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 1lftUa-0001Dr-9e for ged-emacs-devel@m.gmane-mx.org; Mon, 10 May 2021 02:09:48 +0200 Original-Received: from localhost ([::1]:46080 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lftUZ-0004PZ-Av for ged-emacs-devel@m.gmane-mx.org; Sun, 09 May 2021 20:09:47 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35480) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lftTj-0003UV-Pc for emacs-devel@gnu.org; Sun, 09 May 2021 20:08:55 -0400 Original-Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]:33557) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lftTh-00035T-In for emacs-devel@gnu.org; Sun, 09 May 2021 20:08:55 -0400 Original-Received: by mail-wr1-x42f.google.com with SMTP id n2so14788386wrm.0 for ; Sun, 09 May 2021 17:08:52 -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=TbK9g5nsRXhYFNk60NgWxQqlF5WSTMfRwyrT7SyqQgU=; b=VufCZsIEM7HbDgaDs6SbGc3X4hBS6q+MW7X3LwIPOObwoHRBQ6bc6WjNy78ciDxxD7 gMfcWiY8Y9/qaRFMRVcQIx++0oasNUmsEN022xlJNxZmMSzKciWLmGQmKN8ABgIUsYxI AIgQoJpV9Fl3wfcCneVFv64W35YTQaWjZH7FTXEVlXUwrBqd57Ly4hr86rpDgJ4MQsHW FKPV83NR2usbeOyswAL96jOkK0uyOn/jFP9ONFN4QDNoyut65gflAKIvbWlzaQO3Mdtb 5A5Vf7DZZSq6X91h9nFNjsrM7guupN8ickWDrZRp2JtYjx+4ED6DZeFz1syeg7u1gNJh Hvig== 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=TbK9g5nsRXhYFNk60NgWxQqlF5WSTMfRwyrT7SyqQgU=; b=CK36zxNDI+iAgyhN1A67go0UV3dhYa1bcFJbsq9rRUcYW5bypWy1fSoJfP7zHggySj Hj4MlAAXXsIqtWI03PJTLJVAvZwxl7LBKtL5HbIK6Ms/8JlaLdktAr2/PBNj8Snjy4Zg Ro+hyofqTbh1QZl7PXzivVWP7E8JQYwkQIQi2X308fCu2m4/BPSxGO92lybpWOTmaJ43 Lytkz1xNWyXBx5Q2CqVuMg/ky3rQSWMdbVKmwCPzcMvAurnfsfygPOwQ7apUw4hQ1DgL hySd1r32RbMEfE1eTlcBVL18WY3hW8ii1prRxXuBwSHYCaaQtB83izkVpo2A4Ww7yjAv p2dA== X-Gm-Message-State: AOAM5305v/HCP6itOcTZnM6PW5k2xmS3CK0/a8SZ0D9yX4oF9lXlWjF4 D5ZbH0dxTdPOSonYe3TqIG3RuqQTTls= X-Google-Smtp-Source: ABdhPJxP9jBtNGnGi/HByRgF9BXxb6AcFweqTQV36UAoiQjL44HjYnLx+PcY+AKwNe1bKXgNt/aBaQ== X-Received: by 2002:a05:6000:237:: with SMTP id l23mr22449995wrz.138.1620605330584; Sun, 09 May 2021 17:08:50 -0700 (PDT) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id m6sm20959012wrp.29.2021.05.09.17.08.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 09 May 2021 17:08:49 -0700 (PDT) In-Reply-To: <87sg2xrw3y.fsf@gmail.com> Content-Language: en-US Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=raaahh@gmail.com; helo=mail-wr1-x42f.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no 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:269099 Archived-At: Hi Matthias, On 08.05.2021 20:09, Matthias Meulien wrote: > When shell minor mode dirtrack-mode is enabled (the default), the value > of list-buffers-directory is updated when cd, pushd, popd, etc. are > issued; It will thus interfere if uniquify has to rerationalize the > buffer name... > > I saw in commit 1c3a86e7fc2 that project-prefixed-buffer-name has been > introduced which I understand as "forgot of uniquify since it doesn't > handle buffer not visiting files properly". Not really. Also see my comment here: https://debbugs.gnu.org/47975#8 > I have some time to work on > improving the uniquify situation but can you confirm there's still > interest for this? Yes, of course. Even if we in the end decide that uniquify is not suitable for project.el's needs, some cleanup and better handling of edge cases would still be welcome. But your plan below sounds reasonable, even if I don't have the time ATM to re-familiarize myself with the implementation details. > My rough plan is to change uniquify-list-buffers-directory-modes to be a > mapping from major modes to functions that, given a buffer, returns the > buffer proposed name and a directory. This would remove the use of > list-buffers-directory in uniquify and gives the opportunity for each > major mode to provide its convenience function based on > current-directory or project-root. > > The default won't be to add shell-mode and eshell-mode to this new > uniquify-list-buffers-directory-modes mapping (to avoid breaking current > behavior) but do it locally when shell or eshell are called from > project.el. Is this dependency acceptable? :thumbsup: