From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#37538: [PATCH] Add docstring for `tags-complete-tags-table-file'. Date: Sat, 12 Oct 2019 12:04:14 +0300 Message-ID: <837e5anxm9.fsf@gnu.org> References: <36bef08c-45b5-9cce-5374-d4de4260d39a@topbug.net> <838sq8j0vl.fsf@gnu.org> <7e0290a2-e80b-f566-9c3b-894aaf4e5d9d@topbug.net> <87o8yt9oql.fsf@gnus.org> <83y2xwzfz0.fsf@gnu.org> <860671c8-787c-512c-8df6-ea1d9dfc2f5b@topbug.net> <874l0j1a3j.fsf@gnus.org> <663aaf32-97c4-0723-1a30-a644938bd21f@topbug.net> <83a7aawdar.fsf@gnu.org> <831rvlt4yk.fsf@gnu.org> <6ade514f-53ee-fbbf-bf27-e8bbfb2e6281@topbug.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="217861"; mail-complaints-to="usenet@blaine.gmane.org" Cc: larsi@gnus.org, 37538@debbugs.gnu.org To: Hong Xu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Oct 12 11:05:10 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iJDKn-000uYo-Lc for geb-bug-gnu-emacs@m.gmane.org; Sat, 12 Oct 2019 11:05:09 +0200 Original-Received: from localhost ([::1]:59668 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iJDKm-0003Tj-FV for geb-bug-gnu-emacs@m.gmane.org; Sat, 12 Oct 2019 05:05:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57765) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iJDKh-0003Tb-E2 for bug-gnu-emacs@gnu.org; Sat, 12 Oct 2019 05:05:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iJDKg-0004ZF-Ej for bug-gnu-emacs@gnu.org; Sat, 12 Oct 2019 05:05:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51913) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iJDKg-0004ZA-Bc for bug-gnu-emacs@gnu.org; Sat, 12 Oct 2019 05:05:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iJDKg-0003XP-2w for bug-gnu-emacs@gnu.org; Sat, 12 Oct 2019 05:05:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 12 Oct 2019 09:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37538 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed patch Original-Received: via spool by 37538-submit@debbugs.gnu.org id=B37538.157087108413571 (code B ref 37538); Sat, 12 Oct 2019 09:05:02 +0000 Original-Received: (at 37538) by debbugs.gnu.org; 12 Oct 2019 09:04:44 +0000 Original-Received: from localhost ([127.0.0.1]:60734 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iJDKN-0003Wp-V4 for submit@debbugs.gnu.org; Sat, 12 Oct 2019 05:04:44 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:48654) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iJDKM-0003Wc-IP for 37538@debbugs.gnu.org; Sat, 12 Oct 2019 05:04:42 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:35080) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iJDKH-0004Sk-4n; Sat, 12 Oct 2019 05:04:37 -0400 Original-Received: from [176.228.60.248] (port=4154 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iJDK5-0007St-AZ; Sat, 12 Oct 2019 05:04:30 -0400 In-reply-to: <6ade514f-53ee-fbbf-bf27-e8bbfb2e6281@topbug.net> (message from Hong Xu on Fri, 11 Oct 2019 17:48:16 -0700) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:169038 Archived-At: > Cc: larsi@gnus.org, 37538@debbugs.gnu.org > From: Hong Xu > Date: Fri, 11 Oct 2019 17:48:16 -0700 > > >> The description was quite long and I don't think it is justifiable to copy so much text over here to the docstring, plus there are additional reference in the referred manual section. > > > > If you show me what long description you had in mind, I could try > > saying that more concisely as appropriate for a doc string. > > > > This snippet in Programmed Completion section: > > • A flag specifying the type of completion operation to perform; see > *note Basic Completion::, for the details of those operations. > This flag may be one of the following values. > > ‘nil’ > This specifies a ‘try-completion’ operation. The function > should return ‘nil’ if there are no matches; it should return > ‘t’ if the specified string is a unique and exact match; and > it should return the longest common prefix substring of all > matches otherwise. > > ‘t’ > This specifies an ‘all-completions’ operation. The function > should return a list of all possible completions of the > specified string. How about the below: (defun tags-complete-tags-table-file (string predicate what) "Complete STRING from file names in the current tags table. PREDICATE, if non-nil is a function to filter possible matches: if it returns nil, the match is ignored. If PREDICATE is nil, every possible match is acceptable. WHAT is a flag specifying the type of completion: t means `all-completions' operation, any other value means `try-completions' operation. This function serves as COLLECTION argument to `completing-read', see the Info node `(elisp) Programmed Completion' for more detailed description of the arguments."