From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: "Basil L. Contovounesios" Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] master e0ee41d: Allow customizing the display of project file names when reading Date: Thu, 16 May 2019 10:51:27 +0100 Message-ID: <87lfz6ralc.fsf@tcd.ie> References: <20190514021209.16750.6451@vcs0.savannah.gnu.org> <20190514021212.977E5206A2@vcs0.savannah.gnu.org> <87imubliet.fsf@tcd.ie> <424646bc-288c-d12a-d890-94c0b75f7915@yandex.ru> <87mujn9utm.fsf@tcd.ie> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="114792"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu May 16 11:56:19 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hRD7b-000TiY-GI for ged-emacs-devel@m.gmane.org; Thu, 16 May 2019 11:56:19 +0200 Original-Received: from localhost ([127.0.0.1]:51364 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hRD7a-0005WD-FL for ged-emacs-devel@m.gmane.org; Thu, 16 May 2019 05:56:18 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:46437) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hRD6h-0005Sk-Nf for emacs-devel@gnu.org; Thu, 16 May 2019 05:55:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hRD32-0001A4-UX for emacs-devel@gnu.org; Thu, 16 May 2019 05:51:38 -0400 Original-Received: from mail-ed1-x543.google.com ([2a00:1450:4864:20::543]:39956) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hRD2z-0000zf-If for emacs-devel@gnu.org; Thu, 16 May 2019 05:51:35 -0400 Original-Received: by mail-ed1-x543.google.com with SMTP id j12so4335498eds.7 for ; Thu, 16 May 2019 02:51:31 -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=O8bSpWU5KQBNFV0haKaLj/VkmRuXPZRdBdXOmRXi0Qk=; b=T/UrCEt/PDX86Y1epop1PGbR2b6zPP0Qw7D9XyE+njsX3EyoSwctLnPUrAXm52/ATr 68btWOZwNCnpJGrdDKkWm28ngpFMc247EIjzlu92Q5p7RXOty6Nc6cB2PIKO1ZhyeQXO ffqL/EJtd4KCyWepFM/li54rxfGgsNVxEkBeJ2VY2hQZIvqkiEA7EqnIoy1LUdBSfGOu Q7DTgj4JEC5FEQNx3+T3FK+HalM+vumazJgP2zPqXlGTJIMHY5wiN9LjuMldisIMgzew 6trU70M59DrWvI31Pb9jcgXcBbj+HGTkLLVEscg9DwdUBd3zwJww9iPiDVM5njrb4BGe uZjQ== 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=O8bSpWU5KQBNFV0haKaLj/VkmRuXPZRdBdXOmRXi0Qk=; b=DT+N6/CqwAV+6/WzRHgSi53/NdtmgsbPaYZkc2khABkvvryL7wj1jgNwpM4buCLSrF gzLq1A7AWzWWrznXLPA02RhAEa/oCZuUma08UgQM5r2XC7pSZmr/4nnKa+FNh+TfvfDg Qr/IAzUpG9WkWvgsTj3HmAS8Hud3I6aXZh7YfBhCynQIPISCHudf6DKxydJkuFjS3ieR hFz7gIqR1CzuiwDVDmtQTfyRYkygTcRsGxpj8SomAcL1geObPZarbaO1ns0orEXSZpBa 7Dink/2pbwEVw4G8dY3FGMCfw1QaHuq3vgZcyf5tIR6/QzEJKiz2D36p2D18wT5L/Rft VPwA== X-Gm-Message-State: APjAAAW2qqTON3CR0MHezkNKeRrLTAkQHq38CIvTf9GUuYIm4a0ujyG9 8l0CzIUxiUtVZVQIq+ET9sZ3qaJewiw= X-Google-Smtp-Source: APXvYqzCrXsHjYrMRxkqauGqxxdxcyIK3hM8ACLgoaGJAV2rLvHaJ4TAmCmx+y59Gi9RupIRT0p+8w== X-Received: by 2002:a17:906:1514:: with SMTP id b20mr7853650ejd.174.1558000290206; Thu, 16 May 2019 02:51:30 -0700 (PDT) Original-Received: from localhost ([2a02:8084:20e2:c380:8cad:ae29:555d:852d]) by smtp.gmail.com with ESMTPSA id w5sm1817491edd.19.2019.05.16.02.51.28 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 16 May 2019 02:51:29 -0700 (PDT) In-Reply-To: <87mujn9utm.fsf@tcd.ie> (Basil L. Contovounesios's message of "Thu, 16 May 2019 00:11:49 +0100") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::543 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:236568 Archived-At: --=-=-= Content-Type: text/plain "Basil L. Contovounesios" writes: > Dmitry Gutov writes: > >> On 15.05.2019 20:46, Basil L. Contovounesios wrote: >>> Sorry if this has been discussed before, and maybe it's just me, but I >>> don't think it makes sense to offer internal double hyphen functions as >>> alternatives for a user option, let alone to point the user to such an >>> internal function which lacks a docstring, "for the argument list". >> >> No, we never discussed this in particular. So I pushed the cleanest version that >> made sense to me. > > I'm grateful for the addition, but I think user options ought to also > make sense to the user. > >> Do we not do that (put internal functions as possible values of a user option)? > > Sorry, the emphasis in my last message was meant to be on the lack of > any description of the user option's arglist. If the defcustom is to > refer the user elsewhere, that place might at least have a docstring. I think even something as simple as the following would help: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=project.diff diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index eab508af3a..cc45a71f57 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -477,6 +477,10 @@ project-read-file-name-function (defun project--read-file-cpd-relative (prompt all-files &optional predicate hist default) + "Read a file name, prompting with PROMPT. +ALL-FILES is a list of possible file name completions. +PREDICATE, HIST, and DEFAULT have the same meaning as in +`completing-read'." (let* ((common-parent-directory (let ((common-prefix (try-completion "" all-files))) (if (> (length common-prefix) 0) --=-=-= Content-Type: text/plain Thanks, -- Basil --=-=-=--