emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

js-mode, js-find-symbol


From: John J Foerch
Subject: js-mode, js-find-symbol
Date: Wed, 02 Mar 2011 15:49:10 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

Hello,

I've just found that js-mode binds M-. to js-find-symbol.  Long story
short, I was wondering for the past several weeks why find-tag seemed to
have stopped working in my emacs setup since my last upgrade (and
switching from espresso.el to js.el) and I finally got around to
investigating it.  (Then it took me way too long to notice that the
source of my problem was a key binding, not a bug in etags.)  Digression
aside...

I can see that js-find-symbol is a useful feature in some situations,
which is to say for some workflows, but I think the decision to override
the default behavior of M-. in js-mode should be revisited.
'js-find-symbol' is not a clear improvement over 'find-tag' for people
who have taken the time to configure etags.  True, js-find-symbol may be
more accurate than etags at deciding what does and does not count as a
tag, since etags apparently does not yet have built-in support for
javascript syntax.  But js-find-symbol only knows how to look in files
that have been visited, while etags can be used to make a tags file for
an entire directory structure, and for projects that consist of source
files of different formats and languages.

Perhaps the way this feature is implemented could be reconsidered.  Some
initial ideas:

 * js-find-symbol could be provided on a different key, or otherwise
   left to the user to enable.

 * etags itself could be improved to better support javascript syntax,
   as well as, on the emacs-side, automatically updating the tables as
   buffers changed.  Then the functionality of the etags system would
   not have to be duplicated in js-mode.

 * js-mode could generate a tags table to be merged with the
   user-configured tables, rather than override them.

Thank you for your time.

-- 
John Foerch




reply via email to

[Prev in Thread] Current Thread [Next in Thread]