From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?ISO-8859-15?Q?Andreas_R=F6hler?= Newsgroups: gmane.emacs.help Subject: Re: How does M-x completion works Date: Fri, 26 Feb 2010 14:12:22 +0100 Message-ID: <4B87C8B6.9020308@easy-emacs.de> References: <4b82ff9b$0$279$14726298@news.sunsite.dk> <4B83F1AD.3000604@easy-emacs.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1267189877 23106 80.91.229.12 (26 Feb 2010 13:11:17 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 26 Feb 2010 13:11:17 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Feb 26 14:11:13 2010 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Nkzxy-000722-7o for geh-help-gnu-emacs@m.gmane.org; Fri, 26 Feb 2010 14:10:50 +0100 Original-Received: from localhost ([127.0.0.1]:58725 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nkzxu-0007hL-Kr for geh-help-gnu-emacs@m.gmane.org; Fri, 26 Feb 2010 08:10:46 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NkzxS-0007fo-3G for help-gnu-emacs@gnu.org; Fri, 26 Feb 2010 08:10:18 -0500 Original-Received: from [140.186.70.92] (port=33154 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NkzxP-0007eZ-69 for help-gnu-emacs@gnu.org; Fri, 26 Feb 2010 08:10:16 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NkzxN-0008Am-Ri for help-gnu-emacs@gnu.org; Fri, 26 Feb 2010 08:10:14 -0500 Original-Received: from moutng.kundenserver.de ([212.227.17.9]:59450) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NkzxN-0008AK-GE for help-gnu-emacs@gnu.org; Fri, 26 Feb 2010 08:10:13 -0500 Original-Received: from [192.168.178.27] (p54BE83F4.dip0.t-ipconnect.de [84.190.131.244]) by mrelayeu.kundenserver.de (node=mreu0) with ESMTP (Nemesis) id 0LjwWD-1NDa5C2aKn-00boEQ; Fri, 26 Feb 2010 14:10:12 +0100 User-Agent: Thunderbird 2.0.0.19 (X11/20081227) In-Reply-To: X-Provags-ID: V01U2FsdGVkX18oPE0HLZHSM2bnzH33pc6FSw1nHmWm4FDA1D4 px7CRuy39VZ0Zx1+TfCWKOGRd4b7DHumV7AaTtuSnSx9m+JkHF ih36K8SFUHfgd2nhct4uKSue4By+EO6XlEJSeU7ZaY= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:72164 Archived-At: Kevin Rodgers wrote: > Andreas Röhler wrote: >> Hibou57 (Yannick Duchêne) wrote: >> > May be I did not choose the good words. I was not talking about > CTags, I was > > talking about what you get when you do "M-x [TAB]". I > call it "completion", > > but may be this is not the good word. > > Completion is the correct term. > >> Than it's pretty probable it consults the tags-table. You have delete >> it from there. > > No. Compare the Completion node of the Emacs manual with the Tags node: > > | Some arguments allow "completion" to enter their value. This means > | that after you type part of the argument, Emacs can fill in the rest, > | or some of it, based on what you have typed so far. > | ... > | For example, `M-x' uses the minibuffer to read the name of a > | command, so it provides a list of all Emacs command names for > | completion candidates. > > > | A "tags table" is a description of how a multi-file program is broken > | up into files. It lists the names of the component files and the names > | and positions of the functions (or other named subunits) in each file. > Hi Kevin, think completion may visit tags-table for possible completions. Here is for example how complete-symbol is defined: (defun complete-symbol (arg) "Perform tags completion on the text around point. If a tags table is loaded, call `complete-tag'. Otherwise, if Semantic is active, call `semantic-ia-complete-symbol'. With a prefix argument, this command does completion within the collection of symbols listed in the index of the manual for the language you are using." (interactive "P") (cond (arg (info-complete-symbol)) ((or tags-table-list tags-file-name) (complete-tag)) ((and (fboundp 'semantic-ia-complete-symbol) (fboundp 'semantic-active-p) (semantic-active-p)) (semantic-ia-complete-symbol)) (t (error "%s" (substitute-command-keys "No completions available; use \\[visit-tags-table] \ or \\[semantic-mode]"))))) ;;;;; AFAIU several hooks/variables may be in use, depending from the context, so completion may be performed in several ways. Seems a complex matter. Andreas -- https://code.launchpad.net/~a-roehler/python-mode https://code.launchpad.net/s-x-emacs-werkstatt/