From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: RE: how to determine the current table (really) being used for minibuffer completion? Date: Sat, 26 Sep 2009 07:58:17 -0700 Message-ID: References: <137402B99D584CEE9AF2E4B23116527A@us.oracle.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1253977120 14526 80.91.229.12 (26 Sep 2009 14:58:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 26 Sep 2009 14:58:40 +0000 (UTC) Cc: emacs-devel@gnu.org To: "'Stefan Monnier'" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Sep 26 16:58:33 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MrYjI-0008Bl-5H for ged-emacs-devel@m.gmane.org; Sat, 26 Sep 2009 16:58:32 +0200 Original-Received: from localhost ([127.0.0.1]:55599 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MrYjH-0003sB-Gt for ged-emacs-devel@m.gmane.org; Sat, 26 Sep 2009 10:58:31 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MrYjC-0003rw-LV for emacs-devel@gnu.org; Sat, 26 Sep 2009 10:58:26 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MrYj7-0003rb-F5 for emacs-devel@gnu.org; Sat, 26 Sep 2009 10:58:25 -0400 Original-Received: from [199.232.76.173] (port=57203 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MrYj7-0003rX-6Z for emacs-devel@gnu.org; Sat, 26 Sep 2009 10:58:21 -0400 Original-Received: from acsinet11.oracle.com ([141.146.126.233]:54978) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MrYj6-0002J7-Kk for emacs-devel@gnu.org; Sat, 26 Sep 2009 10:58:20 -0400 Original-Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by acsinet11.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n8QEwIte009540 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 26 Sep 2009 14:58:19 GMT Original-Received: from abhmt013.oracle.com (abhmt013.oracle.com [141.146.116.22]) by acsinet15.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n8QEwopP025151; Sat, 26 Sep 2009 14:58:51 GMT Original-Received: from dradamslap1 (/24.5.190.74) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 26 Sep 2009 07:58:14 -0700 X-Mailer: Microsoft Office Outlook 11 Thread-Index: Aco+TD1HiNPgnMtsRpqxLYXcsBftDQAakUoQ In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-Source-IP: abhmt013.oracle.com [141.146.116.22] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A0B0202.4ABE2C07.01E3:SCFSTAT5015188,ss=1,fgs=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 1) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:115661 Archived-At: Hypothetical example that might make the request clearer: (completion-all-completions STRING 'read-file-name-internal nil (length STRING)) The result returned might be a list of relative file names, or it might be a list of env vars. A result such as ("CATACOMBS" "CATAPHILE" "CATASTROPHE" . 4) could be either. I would like (via Lisp) to know which kind of completion was in fact used successfully: file-name completion per se or env var completion. I don't want to analyze STRING (e.g. check for `$') to figure out what might be the case. (completion-boundaries STRING 'read-file-name-internal nil "") just gives something like (0 . 0), indicating the whole STRING. Emacs should be able to tell me directly what the last completion table/function used was. It should be easy to make this info available somehow, e.g. in a global variable. Similarly, for multiple, successive completion types using `completion-styles', I would like to know which type (style) was in fact successful. This is the kind of thing I'm talking about.