From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Francesco Potorti` Newsgroups: gmane.emacs.devel Subject: Re: etags.el tags-search use global syntax table Date: Wed, 18 Jul 2007 14:54:11 +0200 Message-ID: References: NNTP-Posting-Host: lo.gmane.org X-Trace: sea.gmane.org 1184763365 5827 80.91.229.12 (18 Jul 2007 12:56:05 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 18 Jul 2007 12:56:05 +0000 (UTC) Cc: Emacs developers To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jul 18 14:56:00 2007 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.50) id 1IB94Q-0007hO-RW for ged-emacs-devel@m.gmane.org; Wed, 18 Jul 2007 14:55:59 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IB94Q-0000yC-FR for ged-emacs-devel@m.gmane.org; Wed, 18 Jul 2007 08:55:58 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IB93K-0000Pa-Je for emacs-devel@gnu.org; Wed, 18 Jul 2007 08:54:50 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IB93I-0000Ne-PF for emacs-devel@gnu.org; Wed, 18 Jul 2007 08:54:50 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IB93I-0000Na-Kd for emacs-devel@gnu.org; Wed, 18 Jul 2007 08:54:48 -0400 Original-Received: from mx1.isti.cnr.it ([194.119.192.3]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IB92t-000428-U8; Wed, 18 Jul 2007 08:54:25 -0400 Original-Received: from conversionlocal.isti.cnr.it by mx.isti.cnr.it (PMDF V6.3 #31408) id <01MJ3OZ6ZKE8A8F0SX@mx.isti.cnr.it>; Wed, 18 Jul 2007 14:54:11 +0200 Original-Received: from tucano.isti.cnr.it (tucano.isti.cnr.it [146.48.81.102]) by mx.isti.cnr.it (PMDF V6.3 #31251) with ESMTPSA id <01MJ3OZ7L3RKAAUZKE@mx.isti.cnr.it>; Wed, 18 Jul 2007 14:54:12 +0200 Original-Received: from pot by tucano.isti.cnr.it with local (Exim 4.67) (envelope-from ) id 1IB92h-0002mN-Sf; Wed, 18 Jul 2007 14:54:11 +0200 In-reply-to: X-INSM-ip-source: 146.48.81.102 Auth Done X-fingerprint: 4B02 6187 5C03 D6B1 2E31 7666 09DF 2DC9 BE21 6115 X-detected-kernel: OpenVMS 7.2 (Multinet 4.3-4.4 stack) 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:75061 Archived-At: > The reason is that the next-file function in etags.el loads non-visited > files in a temporary buffer with insert-file-contents, rather than using > find-file, so the mode remains Fundamental. I am not sure why it is so. > >There are two reasons for this. One is that some major modes can be >rather intrusive in what they do. The other is that visiting a file >is much slower. > >Of course, it was all based on the idea that it wouldn't really matter >for searching, and if it actually finds a match, then it visits the >file properly. This bug shows that the major mode does matter in some >cases for searching. > >I am not sure whether it is better to fix this bug or not. >If it is a big slowdown, we are better off not fixing it. A reasonable compromise would be using for searching the same syntax table of the buffer that is current when the tags-search command is issued. This would not work in various situations, but would work in most cases, and probably would work in many more cases than the current situation. If nothing smarter comes up and no one does it first, I'll try to implement that in the next days.