From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Ryde Newsgroups: gmane.emacs.bugs Subject: bug#3717: M-x man completion Date: Thu, 17 Dec 2009 08:44:02 +1100 Message-ID: <87iqc6bnml.fsf@blah.blah> References: <87bpo6p3de.fsf@turtle.gmx.de> <87ab3pfqj0.fsf@jidanni.org> <87ocmsqa7z.fsf@mail.jurta.org> <877htetd2g.fsf@blah.blah> Reply-To: Kevin Ryde , 3717@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1261001290 15196 80.91.229.12 (16 Dec 2009 22:08:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 16 Dec 2009 22:08:10 +0000 (UTC) Cc: 3717@emacsbugs.donarmstrong.com, jidanni@jidanni.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Dec 16 23:08:02 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NL22I-0001gV-2k for geb-bug-gnu-emacs@m.gmane.org; Wed, 16 Dec 2009 23:07:58 +0100 Original-Received: from localhost ([127.0.0.1]:54599 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NL22I-0001KM-1O for geb-bug-gnu-emacs@m.gmane.org; Wed, 16 Dec 2009 17:07:58 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NL21z-00019b-Og for bug-gnu-emacs@gnu.org; Wed, 16 Dec 2009 17:07:39 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NL21u-000178-7K for bug-gnu-emacs@gnu.org; Wed, 16 Dec 2009 17:07:38 -0500 Original-Received: from [199.232.76.173] (port=58864 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NL21t-00016x-RW for bug-gnu-emacs@gnu.org; Wed, 16 Dec 2009 17:07:33 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:51908) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NL21t-0006sh-8X for bug-gnu-emacs@gnu.org; Wed, 16 Dec 2009 17:07:33 -0500 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nBGM7Ujj026787; Wed, 16 Dec 2009 14:07:30 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id nBGLo7ev024230; Wed, 16 Dec 2009 13:50:07 -0800 Resent-Date: Wed, 16 Dec 2009 13:50:07 -0800 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Kevin Ryde Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Wed, 16 Dec 2009 21:50:07 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 3717 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 3717-submit@emacsbugs.donarmstrong.com id=B3717.126099986923576 (code B ref 3717); Wed, 16 Dec 2009 21:50:07 +0000 Original-Received: (at 3717) by emacsbugs.donarmstrong.com; 16 Dec 2009 21:44:29 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from mailout1.pacific.net.au (mailout1-5.pacific.net.au [61.8.2.212]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nBGLiRBn023573 for <3717@emacsbugs.donarmstrong.com>; Wed, 16 Dec 2009 13:44:28 -0800 Original-Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.2.162]) by mailout1.pacific.net.au (Postfix) with ESMTP id A1C5A512705; Thu, 17 Dec 2009 08:44:26 +1100 (EST) Original-Received: from blah.blah (ppp2FAB.dyn.pacific.net.au [61.8.47.171]) by mailproxy1.pacific.net.au (Postfix) with ESMTP id BE93C8C1C; Thu, 17 Dec 2009 08:44:25 +1100 (EST) Original-Received: from gg by blah.blah with local (Exim 4.69) (envelope-from ) id 1NL1f8-0001zr-CJ; Thu, 17 Dec 2009 08:44:02 +1100 In-Reply-To: <877htetd2g.fsf@blah.blah> (Kevin Ryde's message of "Thu, 26 Nov 2009 10:11:19 +1100") User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Wed, 16 Dec 2009 17:07:38 -0500 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:33646 Archived-At: I wrote: > > insinuate "-k " and "-l " so it's possible to type those things > without needing C-q Space. I've since thought to help any "-" option, not just -k and -l, with a constructed table in the completion handler along these lines. Not sure it's fantastic for "?" or "tab", but gets the right effect on space. ((string-match "\\`-\\(.\\)?" str) ;; "-" or "-X" -- alone and with a space so you don't have to type ;; C-q space after an option. "-l" or "-k" are shown as standard ;; options, but then add anything else so other options can be ;; typed. ;; ;; For formatting options like "-Tascii" could think about applying ;; the pagename or filename completion to the next arg, but ;; normally such options will go in `Man-switches'. ;; (let ((table '(("-l " . "run man on a file") ("-k " . "search apropos database")))) (unless (member str '("-k" "-l" "-k " "-l ")) (push (cons str "option") table) (push (cons (concat str " ") "option") table)) (man-completion--complete-with-action action table str pred)))