From: "Andreas Röhler" <andreas.roehler@easy-emacs.de>
To: help-gnu-emacs@gnu.org
Subject: Re: How does M-x completion works
Date: Fri, 26 Feb 2010 14:12:22 +0100 [thread overview]
Message-ID: <4B87C8B6.9020308@easy-emacs.de> (raw)
In-Reply-To: <hm27bl$785$1@dough.gmane.org>
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/
next prev parent reply other threads:[~2010-02-26 13:12 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-22 12:35 How does M-x completion works Hibou57 (Yannick Duchêne)
2010-02-22 16:34 ` Lennart Borgman
[not found] ` <4B82A7A4.6050005@easy-emacs.de>
[not found] ` <op.u8jfv6nuesn74s@garhos>
2010-02-22 17:42 ` Andreas Röhler
2010-02-22 22:06 ` Colin S. Miller
2010-02-23 7:06 ` Hibou57 (Yannick Duchêne)
2010-02-23 8:36 ` Barry Margolin
2010-02-23 9:25 ` Hibou57 (Yannick Duchêne)
2010-02-23 10:03 ` Andreas Röhler
[not found] ` <mailman.1694.1266919287.14305.help-gnu-emacs@gnu.org>
2010-02-23 13:47 ` Hibou57 (Yannick Duchêne)
2010-02-23 15:18 ` Andreas Röhler
2010-02-24 3:44 ` Kevin Rodgers
2010-02-26 13:12 ` Andreas Röhler [this message]
[not found] ` <mailman.1758.1266983111.14305.help-gnu-emacs@gnu.org>
2010-02-26 11:58 ` Hibou57 (Yannick Duchêne)
[not found] ` <mailman.1706.1266938167.14305.help-gnu-emacs@gnu.org>
2010-02-23 17:17 ` Hibou57 (Yannick Duchêne)
2010-02-23 19:32 ` Andreas Röhler
[not found] ` <mailman.1728.1266953431.14305.help-gnu-emacs@gnu.org>
2010-02-23 21:24 ` Tim X
2010-02-24 4:08 ` Kevin Rodgers
2010-02-24 20:10 ` Stefan Monnier
2010-02-24 4:10 ` Kevin Rodgers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B87C8B6.9020308@easy-emacs.de \
--to=andreas.roehler@easy-emacs.de \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.