unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dgutov@yandex.ru>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: [Emacs-diffs] emacs-25 504696d: Etags: yet another improvement in Ruby tags
Date: Fri, 5 Feb 2016 15:15:06 +0300	[thread overview]
Message-ID: <56B4924A.2020207@yandex.ru> (raw)
In-Reply-To: <83d1sbv25a.fsf@gnu.org>

On 02/05/2016 02:15 PM, Eli Zaretskii wrote:

>>       alias_method :qux, :tee, attr_accessor(:bogus)
>>
>> or
>>
>>       alias_method :qux, :tee, alias_method(:bogus, :bogus2)
>>
>> are the main options, I suppose.
>
> These should work for my purposes.

Great!

>> But they might also look misleading, and indicate that we don't
>> support the paren-using syntax intentionally.
>>
>> (It's another omission, but AFAICS nobody uses attr_XXX without parens
>> in the context we're interested in.)
>
> If it's important to support that, it should be hard to add.

I don't know how important it is, and I didn't want to bother you, but 
it would be nice to have, for completeness. (See debbugs.gnu.org/22563)

We, the Emacs community, have our share of eccentrics who won't hesitate 
to write code in an unusual way, and then be surprised anyway if some 
things don't work.

>> I believe the file-name rules should be tested in a language-agnostic
>> way, or just with one language.
>
> I don't see how: the file names that trigger recognition as a specific
> language are part of the language-specific rules.

I'd think we could mostly rely on the fact that the general facility 
works, and you haven't made a typo in Ruby_filenames or Ruby_suffixes.

Creating a bunch of files, and complicating etags's output just for 
that, seems like an overkill.

 > IOW, when etags
 > sees a file whose basename is "Rakefile", it should process it as a
 > Ruby file, and how can you test it does that without actually looking
 > at the tags it produces for that file?

If you could write unit tests for etags code, you could have some for 
the "detect language" function. Full-on integration tests, again, seem 
like an overkill to me.

 > E.g., the bug I fixed in
 > f6213ce caused Makefile's to be processed as Fortran sources...

That one could be handled by a language-agnostic regression test, I 
think. Or just test that for Makefile, but not worry about other languages.

Of course, I'm just speaking from my own experience, and could be 
discounting how error-prone and/or inconsistent C is.

>> We're probably better in some things, and worse in others, than "Ripper
>> Tags" [3]. I haven't tried them yet myself.
>
> Maybe etags should acquire a feature whereby it could run external
> programs to help it find the tags.  Something to think of for future
> projects, perhaps.

Not sure how ripper-tags would benefit from it (they can output in etags 
format already), but you can look at 
https://github.com/universal-ctags/ctags/blob/master/docs/xcmd.rst for 
inspiration.



  parent reply	other threads:[~2016-02-05 12:15 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20160203162536.2954.45438@vcs.savannah.gnu.org>
     [not found] ` <E1aR0FM-0000mG-Up@vcs.savannah.gnu.org>
2016-02-03 23:46   ` [Emacs-diffs] emacs-25 504696d: Etags: yet another improvement in Ruby tags Dmitry Gutov
2016-02-04  3:48     ` Eli Zaretskii
2016-02-04  9:36       ` Dmitry Gutov
2016-02-04 17:28         ` Eli Zaretskii
2016-02-05  5:26           ` Dmitry Gutov
2016-02-05  5:29             ` Dmitry Gutov
2016-02-05  9:14             ` Eli Zaretskii
2016-02-05 10:11               ` Dmitry Gutov
2016-02-05 11:15                 ` Eli Zaretskii
2016-02-05 11:26                   ` Eli Zaretskii
2016-02-05 12:15                   ` Dmitry Gutov [this message]
2016-02-05 14:34                     ` Eli Zaretskii
2016-02-06  9:09                     ` Eli Zaretskii

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=56B4924A.2020207@yandex.ru \
    --to=dgutov@yandex.ru \
    --cc=eliz@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).