From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Joseph Turner via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#66224: [PATCH] Add optional PREDICATE argument to read-directory-name Date: Sun, 12 Nov 2023 12:42:42 -0800 Message-ID: <87il66og65.fsf@breatheoutbreathe.in> References: <877coch0q7.fsf@breatheoutbreathe.in> <874jje1xds.fsf@posteo.net> <87bkdly7t4.fsf@breatheoutbreathe.in> <871qehr5vs.fsf@web.de> <877co9y5jt.fsf@breatheoutbreathe.in> <877co4tmav.fsf@web.de> <87bkdf47g5.fsf@breatheoutbreathe.in> <87pm1t3lqx.fsf@web.de> <87v8blzw89.fsf@breatheoutbreathe.in> Reply-To: Joseph Turner Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12318"; mail-complaints-to="usenet@ciao.gmane.io" To: michael_heerdegen@web.de, 66224@debbugs.gnu.org, philipk@posteo.net Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Nov 12 21:46:03 2023 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 1r2HLG-00030F-9v for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 12 Nov 2023 21:46:02 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r2HL4-0005K4-GX; Sun, 12 Nov 2023 15:45:50 -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 1r2HKw-0005Dl-1b for bug-gnu-emacs@gnu.org; Sun, 12 Nov 2023 15:45:44 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r2HKb-0005L3-6c for bug-gnu-emacs@gnu.org; Sun, 12 Nov 2023 15:45:38 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r2HLG-0000zv-9A for bug-gnu-emacs@gnu.org; Sun, 12 Nov 2023 15:46:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Joseph Turner Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 12 Nov 2023 20:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66224 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: Michael Heerdegen , "Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors" , 66224@debbugs.gnu.org, philipk@posteo.net Original-Received: via spool by submit@debbugs.gnu.org id=B.16998219183777 (code B ref -1); Sun, 12 Nov 2023 20:46:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 12 Nov 2023 20:45:18 +0000 Original-Received: from localhost ([127.0.0.1]:57114 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r2HKX-0000yq-Qh for submit@debbugs.gnu.org; Sun, 12 Nov 2023 15:45:18 -0500 Original-Received: from lists.gnu.org ([2001:470:142::17]:52502) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r2HKV-0000yT-6p for submit@debbugs.gnu.org; Sun, 12 Nov 2023 15:45:16 -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 1r2HJi-0004rP-Ew for bug-gnu-emacs@gnu.org; Sun, 12 Nov 2023 15:44:26 -0500 Original-Received: from out-179.mta1.migadu.com ([95.215.58.179]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r2HJg-00055A-7s for bug-gnu-emacs@gnu.org; Sun, 12 Nov 2023 15:44:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=breatheoutbreathe.in; s=key1; t=1699821862; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=wjfaOKqLoIojGmabAfO68eRzqwXmkvjCPVZgoiS2zyo=; b=GXOGM6BRXYSDqqx9pB8AjVJCbKgXYYkCOKs3ZwaYcPr0h7qelEjqwYQkT+RFp70pA2G+m2 cFA5qoQOmoNrm+l7r6WhsADaO1+D/ITC0ikJ9jiqFtY7Jb2F0X80RKUSno9eqm9YznIvu+ cuXUpjTC7bevt6vsRQSSm3kduX4OlBo= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. In-reply-to: <87v8blzw89.fsf@breatheoutbreathe.in> X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=95.215.58.179; envelope-from=joseph@breatheoutbreathe.in; helo=out-179.mta1.migadu.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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:274229 Archived-At: Joseph Turner writes: > Michael Heerdegen writes: > >> Joseph Turner via "Bug reports for GNU Emacs, the Swiss army knife of >> text editors" writes: >> >>> I'm not sure what you mean. In both of the following examples, PREDICATE >>> is used to narrow the completion candidates to only empty directories: >>> >>> (read-directory-name "Prompt: " "~/" nil t nil #'directory-empty-p) >>> (read-directory-name "Prompt: " "~/" nil nil nil #'directory-empty-p) >> >> In the second version also non-empty directories will be accepted. > > Yes, PREDICATE narrows the completion candidates but doesn't determine a > valid return value. Ping! I'm happy to keep discussing this patch if others are interested.