Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

changing tags-file-name

3 views
Skip to first unread message

James K. Lowden

unread,
Dec 5, 2017, 11:32:00 AM12/5/17
to
I decided to broaden a tags search by scanning from a higher point in
the source tree. So I want to tell xref to use a different file. But
set-variable says there's no such variable:


The name of the file AIUI is tags-file-name, which C-h v describes as:

tags-file-name is a variable defined in ?etags.el?.
Its value is
"/home/jklowden/projects/3rd/libdwarf/code/dwarfgen/TAGS"

This variable is safe as a file local variable if its value
satisfies the predicate ?stringp?.

Documentation:
File name of tags table.
To switch to a new tags table, setting this variable is sufficient.
[...]

When I use M-x set-variable, it rejects tags-file-name. For
"tags-" completion it says,

Possible completions are:
tags-add-tables tags-apropos-additional-actions
tags-apropos-verbose tags-case-fold-search
tags-compression-info-list tags-loop-revert-buffers
tags-revert-without-query tags-table-list
tags-tag-face

Why would emacs display a variable name, document that setting is
fine, and not be able to set it?

Is there an easier way to change the tags file name (or add one and
drop one) that I'm overlooking?

Thanks.

--jkl


--jkl

Eli Zaretskii

unread,
Dec 8, 2017, 5:35:36 AM12/8/17
to help-gn...@gnu.org
> From: "James K. Lowden" <jklo...@speakeasy.net>
> Date: Tue, 5 Dec 2017 11:31:56 -0500
>
> The name of the file AIUI is tags-file-name, which C-h v describes as:
>
> tags-file-name is a variable defined in ?etags.el?.
> Its value is
> "/home/jklowden/projects/3rd/libdwarf/code/dwarfgen/TAGS"
>
> This variable is safe as a file local variable if its value
> satisfies the predicate ?stringp?.
>
> Documentation:
> File name of tags table.
> To switch to a new tags table, setting this variable is sufficient.
> [...]
>
> When I use M-x set-variable, it rejects tags-file-name. For
> "tags-" completion it says,
>
> Possible completions are:
> tags-add-tables tags-apropos-additional-actions
> tags-apropos-verbose tags-case-fold-search
> tags-compression-info-list tags-loop-revert-buffers
> tags-revert-without-query tags-table-list
> tags-tag-face
>
> Why would emacs display a variable name, document that setting is
> fine, and not be able to set it?

set-variable only supports user options (a.k.a. "defcustoms"). For
other variables, use

M-: (setq VAR VALUE) RET

> Is there an easier way to change the tags file name (or add one and
> drop one) that I'm overlooking?

You are overlooking "M-x visit-tags-table RET", I think.

James K. Lowden

unread,
Dec 14, 2017, 11:39:53 AM12/14/17
to
On Fri, 08 Dec 2017 12:35:05 +0200
Eli Zaretskii <el...@gnu.org> wrote:

> > Why would emacs display a variable name, document that setting is
> > fine, and not be able to set it?
>
> set-variable only supports user options (a.k.a. "defcustoms"). For
> other variables, use
>
> M-: (setq VAR VALUE) RET

Thanks. Your explanation helped me understand the documentation for
set-variable.

> > Is there an easier way to change the tags file name (or add one and
> > drop one) that I'm overlooking?
>
> You are overlooking "M-x visit-tags-table RET", I think.

Yes, indeed. "apropos tags" does mention that, but I missed it.

Many thanks, Eli!

--jkl
0 new messages