unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Francesco Potorti` <pot@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: tags mode completion table doesn't work with multiple tables
Date: Tue, 29 Apr 2003 12:15:02 +0200	[thread overview]
Message-ID: <E19AS8c-0007z4-00@pot.cnuce.cnr.it> (raw)
In-Reply-To: <E19ANp0-0003M4-00@fencepost.gnu.org> (rms@gnu.org)

>Is the problem that, if you have put multiple tags tables in the
>current list, completion fails to search them all?

By reading the source, apparently yes.

In fact, this function:


;; Completion function for tags.  Does normal try-completion,
;; but builds tags-completion-table on demand.
(defun tags-complete-tag (string predicate what)
  (save-excursion
    ;; If we need to ask for the tag table, allow that.
    (let ((enable-recursive-minibuffers t))
      (visit-tags-table-buffer))
    (if (eq what t)
	(all-completions string (tags-completion-table) predicate)
      (try-completion string (tags-completion-table) predicate))))

which is the one that builds the completion table when necessary,
completely ignores tags-table-list.  

If tags-table-list is set, in fact, the above function ignores it
because it calls visit-tags-table-buffer, which sets the current buffer
to the first buffer in tags-table-list, ignoring the others.

Maybe the following substitution function will do the trick.  Frederik,
would you please try it?  To try it, put point (the cursor) after the
last close parenthesis, then hit C-x C-e.

(defun tags-complete-tag (string predicate what)
  (save-excursion
    ;; If we need to ask for the tag table, allow that.
    (let ((enable-recursive-minibuffers t))
      (visit-tags-table-buffer))
    (let ((table (tags-completion-table)))
      ;; Consider all possible tag tables in tags-table-list.
      (while (visit-tags-table-buffer t)
	(setq table (tags-completion-table)))
      (if (eq what t)
	  (all-completions string table predicate)
	(try-completion string table predicate)))))

      reply	other threads:[~2003-04-29 10:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200304252218.h3PMIca01992@julius.internal.avlsi.com>
2003-04-26 13:45 ` tags mode completion table doesn't work with multiple tables Richard Stallman
2003-04-28  7:32   ` Francesco Potorti`
2003-04-29  5:38     ` Richard Stallman
2003-04-29 10:15       ` Francesco Potorti` [this message]

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E19AS8c-0007z4-00@pot.cnuce.cnr.it \
    --to=pot@gnu.org \
    --cc=emacs-devel@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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).