From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: John J Foerch Newsgroups: gmane.emacs.devel Subject: js-mode, js-find-symbol Date: Wed, 02 Mar 2011 15:49:10 -0500 Message-ID: <87d3m9gse1.fsf@hecubus.retroj.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1299098981 17665 80.91.229.12 (2 Mar 2011 20:49:41 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 2 Mar 2011 20:49:41 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Mar 02 21:49:37 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PuszH-0006IS-ES for ged-emacs-devel@m.gmane.org; Wed, 02 Mar 2011 21:49:35 +0100 Original-Received: from localhost ([127.0.0.1]:47989 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PuszH-000182-2F for ged-emacs-devel@m.gmane.org; Wed, 02 Mar 2011 15:49:35 -0500 Original-Received: from [140.186.70.92] (port=45588 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PuszB-000164-PT for emacs-devel@gnu.org; Wed, 02 Mar 2011 15:49:30 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pusz9-0002np-9B for emacs-devel@gnu.org; Wed, 02 Mar 2011 15:49:29 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]:46694) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pusz8-0002nc-TF for emacs-devel@gnu.org; Wed, 02 Mar 2011 15:49:27 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Pusz5-0006AM-RG for emacs-devel@gnu.org; Wed, 02 Mar 2011 21:49:23 +0100 Original-Received: from 228.sub-75-198-82.myvzw.com ([75.198.82.228]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 02 Mar 2011 21:49:23 +0100 Original-Received: from jjfoerch by 228.sub-75-198-82.myvzw.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 02 Mar 2011 21:49:23 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 40 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 228.sub-75-198-82.myvzw.com User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) Cancel-Lock: sha1:ggGqqdUMe9zA40B/Q+9Kw3xMKAc= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 80.91.229.12 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:136728 Archived-At: 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