[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [vile] vile does not understand certain entries in "tags" files gene
From: |
Thomas Dickey |
Subject: |
Re: [vile] vile does not understand certain entries in "tags" files generated by `ctags'. |
Date: |
Fri, 9 Mar 2018 16:24:16 -0500 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Fri, Mar 09, 2018 at 05:37:24PM +0100, j. van den hoff wrote:
> I have a "tags" file of function definitions in the `R' language
> (https://www.r-project.org). function names can contain periods, so I have
> lines such as
>
> disp.array fzrutils/R/disp.array.R /^disp.array <- function ($/;" f
>
> in the "tags" file. my `.vilerc' contains
>
> set tags {path_to_the_tags_file}
> set tagrelative
>
> `vi -t disp.array' does not work as expected but reacts the same way it does
> when a non-existent tag is specified (just reporting the read-in config
> files: "Reading ~/vile.rc" etc.). tags not containing a `.' in the function
> name work just fine. `vim -t disp.array' does the expected even if the `.'
> is present in the name.
>
> Am I missing something or is this a bug?
When doing ^]], vile's using a function checks only the character class,
and stops when a character isn't an "identifier":
int
screen_to_ident(char *buf, size_t bufn)
{
int rc = FALSE;
CHARTYPE mask = vl_ident;
int whole_line = adjust_chartype(&mask);
TRACE((T_CALLED "screen_to_ident\n"));
rc = read_by_regex(buf, bufn, b_val_rexp(curbp, VAL_IDENTIFIER_EXPR),
whole_line);
if (rc == FALSE)
rc = read_by_ctype(buf, bufn, mask, whole_line);
returnCode(rc);
}
:show-printable shows that it's not (by default) an "id" character:
45 - - - - - - prn pun - - path - arg - nsp - tmp
sh
46 . - - - - - prn pun - - path - arg - nsp - tmp
sh
47 / - - - - - prn pun - - path - - - nsp - tmp
sh
48 0 - - num - - prn - - id path - arg - nsp qid tmp
sh
49 1 - - num - - prn - - id path - arg - nsp qid tmp
sh
You could change that with
set-char-class id=[.]
45 - - - - - - prn pun - - path - arg - nsp - tmp
sh
46 . - - - - - prn pun - id path - arg - nsp - tmp
sh
47 / - - - - - prn pun - - path - - - nsp - tmp
sh
48 0 - - num - - prn - - id path - arg - nsp qid tmp
sh
49 1 - - num - - prn - - id path - arg - nsp qid tmp
sh
> seen with vile version 9.8o for darwin14.3.0.
>
> thank you
>
> joerg
>
> PS: I also presume, there is a small `ctags' bug here. the search pattern
> probably should backslash-protect the period in order to actually only match
> `disp.array' verbatim rather than
> disp{any-single-character}array, no? otherwise one might jump to the wrong
> tag/file/position.
hmm - I think it's correct, since "magic" is normally set.
--
Thomas E. Dickey <address@hidden>
https://invisible-island.net
ftp://ftp.invisible-island.net
signature.asc
Description: Digital signature
- [vile] vile does not understand certain entries in "tags" files generated by `ctags'., j. van den hoff, 2018/03/09
- Re: [vile] vile does not understand certain entries in "tags" files generated by `ctags'.,
Thomas Dickey <=
- Re: [vile] vile does not understand certain entries in "tags" files generated by `ctags'., j. van den hoff, 2018/03/10
- Re: [vile] vile does not understand certain entries in "tags" files generated by `ctags'., Thomas Dickey, 2018/03/10
- Re: [vile] vile does not understand certain entries in "tags" files generated by `ctags'., j. van den hoff, 2018/03/11
- Re: [vile] vile does not understand certain entries in "tags" files generated by `ctags'., Thomas Dickey, 2018/03/11
- Message not available
- Message not available
- Re: [vile] vile does not understand certain entries in "tags" files generated by `ctags'., j. van den hoff, 2018/03/11
- Re: [vile] vile does not understand certain entries in "tags" files generated by `ctags'., Thomas Dickey, 2018/03/11
- Re: [vile] vile does not understand certain entries in "tags" files generated by `ctags'., j. van den hoff, 2018/03/11