From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#59756: [PATCH] Use file-name-nondirectory to determine project-name Date: Fri, 2 Dec 2022 04:47:35 -0800 Message-ID: References: <831qpigrcl.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30993"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 59756@debbugs.gnu.org, dgutov@yandex.ru To: Eli Zaretskii , Randy Taylor Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Dec 02 13:48:37 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1p15T2-0007nM-Lp for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 02 Dec 2022 13:48:36 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p15Sq-0004Dk-VL; Fri, 02 Dec 2022 07:48:25 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p15SW-0004DS-5T for bug-gnu-emacs@gnu.org; Fri, 02 Dec 2022 07:48:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p15SU-0002Qc-45 for bug-gnu-emacs@gnu.org; Fri, 02 Dec 2022 07:48:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p15SU-000503-0T for bug-gnu-emacs@gnu.org; Fri, 02 Dec 2022 07:48:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 02 Dec 2022 12:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59756 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 59756-submit@debbugs.gnu.org id=B59756.166998526419212 (code B ref 59756); Fri, 02 Dec 2022 12:48:01 +0000 Original-Received: (at 59756) by debbugs.gnu.org; 2 Dec 2022 12:47:44 +0000 Original-Received: from localhost ([127.0.0.1]:46510 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p15SC-0004zo-6N for submit@debbugs.gnu.org; Fri, 02 Dec 2022 07:47:44 -0500 Original-Received: from mail-ot1-f52.google.com ([209.85.210.52]:38543) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p15SA-0004zi-EI for 59756@debbugs.gnu.org; Fri, 02 Dec 2022 07:47:43 -0500 Original-Received: by mail-ot1-f52.google.com with SMTP id v19-20020a9d5a13000000b0066e82a3872dso807839oth.5 for <59756@debbugs.gnu.org>; Fri, 02 Dec 2022 04:47:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=7LhYn8sv41bxPc2ZJdLEUG9v1ExPNc7LutNJ9EbYQY0=; b=c256HVrpIThc5bwPo0JpNxWhjOfv8Sq3XMaED4jCZmirC7U70DP39ULtFkl+5e2Iul N+Ye/KEZqoORrw3pR3vKqhNKfg5HGuz1Bb/IDnZS8NrhNuRQVeRwGTXgMBpUqB5aZEEB PhlaZ8EihtanbQsnsqi1Fjn8ggtRWyIoXzmab4jPKhm0r+Du5lPSOy+SVsKZZ4S07er2 wGARXyU+/8ELgH8mONwc/Ei1QQ+kIayVB20Gn8iSvVpjjBXIChSD5AkX5YPAl2CDgAEK CWsUaHdw75DQONDI8XhVNcHoc8+6Q+InKpCNmbtwGfQCrQgN/NFf7mQT3pjo9UtMvFnw rwiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=7LhYn8sv41bxPc2ZJdLEUG9v1ExPNc7LutNJ9EbYQY0=; b=rilwF/qg3U8VhqEaG907dH0vp5xW0Gwzr7SCAg70NtGIHFsY4oiq8qix0uvsrHVv4l l28yQ/muBBkVD8EnJsTH2bk5I9MnwdwODekqL1xqcFRkVNHZRM3r7U0y/nsIDbA7jUSZ bRXpahCnkJznpGrnkfgGLY8axILycri3gWcBl+7gdV6hDwlaNbZVjMeZWuKRYHrDgEWC M6dRMsp3Nz0q2mEL2GxDbtfwY/SDy9dwnqqdo4vuaIr2t4+1o4q2wPDpV8grmpNtRzPk DFiOIZAt1EPdtRuqQIfqv5gID7Tp9HPP95fiTBc4MgnxvH7khCLA2GG6c/GkZrWZSTO/ 1tTg== X-Gm-Message-State: ANoB5pkTaNyBVDh0EeI6XFqOUhMSeeKAIEFnJpWlz274+/OQyuImkZ9c DwlbatYBuAM6wFMRiBscV6bZosqQ4JPIJemu7Ms= X-Google-Smtp-Source: AA0mqf6iD+ApdyTREzYVhk+G3qhvZmh2ZUKRtOtQQvamx06p8wwh8dGklZNNGsI97OmwYBEp6gmDPtWXafwml6qnzTk= X-Received: by 2002:a9d:5c81:0:b0:661:c48b:12db with SMTP id a1-20020a9d5c81000000b00661c48b12dbmr26145579oti.105.1669985256580; Fri, 02 Dec 2022 04:47:36 -0800 (PST) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Fri, 2 Dec 2022 04:47:35 -0800 In-Reply-To: <831qpigrcl.fsf@gnu.org> X-Hashcash: 1:20:221202:dgutov@yandex.ru::QnmwvpI39EX9P7y2:9ZKU X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:249737 Archived-At: Eli Zaretskii writes: >> If a project is named something like ".emacs.d", file-name-base will >> return ".emacs" instead of ".emacs.d" as expected (or at least as I >> expect it). >> >> Therefore, we use file-name-nondirectory instead. > > Why do we want to support such project names? Because people put their configuration files under version control, and they want to use project commands there. For example "~/.emacs.d", which is what I use. > I could also name my project /foo/bar/baz, and defeat file-name-nondirectory > as well. Where does it end? > > My suggestion is to require that project names don't include slashes, > backslashes, periods and maybe also colon characters. It's fine to disallow slashes, backslashes, and colons, but banning periods would break some of my most important use-cases. So I hope we won't do that.