From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jambunathan K Newsgroups: gmane.emacs.bugs Subject: bug#14436: 24.3.50; cscope + compilation-mode Date: Wed, 22 May 2013 11:57:03 +0530 Message-ID: <87ppwj7cnc.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1369206029 32229 80.91.229.3 (22 May 2013 07:00:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 22 May 2013 07:00:29 +0000 (UTC) To: 14436@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed May 22 09:00:29 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Uf32D-0003DJ-03 for geb-bug-gnu-emacs@m.gmane.org; Wed, 22 May 2013 09:00:29 +0200 Original-Received: from localhost ([::1]:56536 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uf32C-0002on-DS for geb-bug-gnu-emacs@m.gmane.org; Wed, 22 May 2013 03:00:28 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:52868) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uf324-0002oP-Kv for bug-gnu-emacs@gnu.org; Wed, 22 May 2013 03:00:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uf31w-0000vR-JS for bug-gnu-emacs@gnu.org; Wed, 22 May 2013 03:00:20 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:39076) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uf31w-0000v1-GE for bug-gnu-emacs@gnu.org; Wed, 22 May 2013 03:00:12 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1Uf2Xm-0007J6-C6 for bug-gnu-emacs@gnu.org; Wed, 22 May 2013 02:29:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jambunathan K Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 22 May 2013 06:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 14436 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.136920411028038 (code B ref -1); Wed, 22 May 2013 06:29:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 22 May 2013 06:28:30 +0000 Original-Received: from localhost ([127.0.0.1]:55643 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Uf2XD-0007I9-Eh for submit@debbugs.gnu.org; Wed, 22 May 2013 02:28:29 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:33036) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Uf2X6-0007Hm-2l for submit@debbugs.gnu.org; Wed, 22 May 2013 02:28:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uf2WF-0000uk-Di for submit@debbugs.gnu.org; Wed, 22 May 2013 02:27:32 -0400 Original-Received: from lists.gnu.org ([208.118.235.17]:57671) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uf2WF-0000ug-A4 for submit@debbugs.gnu.org; Wed, 22 May 2013 02:27:27 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:44353) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uf2WA-000411-Ch for bug-gnu-emacs@gnu.org; Wed, 22 May 2013 02:27:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uf2W5-0000sk-2k for bug-gnu-emacs@gnu.org; Wed, 22 May 2013 02:27:22 -0400 Original-Received: from mail-pb0-x233.google.com ([2607:f8b0:400e:c01::233]:53046) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uf2W4-0000sd-In for bug-gnu-emacs@gnu.org; Wed, 22 May 2013 02:27:16 -0400 Original-Received: by mail-pb0-f51.google.com with SMTP id jt11so1370155pbb.10 for ; Tue, 21 May 2013 23:27:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:mime-version:content-type; bh=WC8JWb9y3pSDRS6uwLngfQY8pmRhiQOd3ca18iA0rqk=; b=zdDcRMnMaQA1FGvI/FgtAHWMqh3EfYjMHVnls3MdsAzSHnV5aJSnLvCydrO0g2RQza OzYfkhRhE2RWs/aw3EMG34HhY1PVikJHmxj0uXl15H3KDT4Uhbwsspuy63/LRn1qFvxE HJm/OA7/pbPMGPe9fLNEq3PzH7gDUi75QwyE82xusNtAatQmWsF5tddWmRPyVOmdDhaR FqbTObTJ53GWr6e2e6grwyoUNZMOBUNfs7XexpvnHx33z7qr8WCoRnzKbtkECLH6tqG5 4kiwYNBNkQ6eKCateD3V8dvjvbFnqwIMzIbDDh+eWh/CoxWlJSKKHvHjp267/19Pmlt+ 1sAQ== X-Received: by 10.66.232.230 with SMTP id tr6mr6949918pac.83.1369204035756; Tue, 21 May 2013 23:27:15 -0700 (PDT) Original-Received: from debian-6.05 ([115.242.186.42]) by mx.google.com with ESMTPSA id qb1sm5924638pbb.33.2013.05.21.23.27.12 for (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Tue, 21 May 2013 23:27:14 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:74443 Archived-At: --=-=-= Content-Type: text/plain Being a C programmer, I always missed not having support for cscope "out of the box" in my vanilla Emacs. It is unfortunate that xcscope.el is not part of Emacs proper. Here is a quick and dirty means to alleviate this drawback and make cscope "one another" search engine (similar to rgrep etc). This bug is a continuation of my earlier bug#13459. Ideally I want to be able to see the "function context" in search results. See earlier screenshot http://debbugs.gnu.org/cgi/bugreport.cgi?msg=5;filename=grep-proof-of-concept-cf-cscope.png;att=3;bug=13549 I have more ideas on how the symbol searches could be imporved in Emacs. I will document these in future bug reports. ---------------------------------------------------------------- For a first cut, the following works. Update `compilation-error-regexp-alist-alist' as below. --=-=-= Content-Type: text/x-diff Content-Disposition: inline === modified file 'lisp/progmodes/compile.el' --- lisp/progmodes/compile.el 2013-04-24 13:50:22 +0000 +++ lisp/progmodes/compile.el 2013-05-22 06:03:23 +0000 @@ -447,7 +447,9 @@ File = \\(.+\\), Line = \\([0-9]+\\)\\(? ;; "^\\([^ \t\r\n(]+\\) (\\([0-9]+\\):\\([0-9]+\\)) " 1 2 3) - ) + (cscope + "^\\([^ \t]+\\)[ \t]+\\([^ \t]+\\)[ \t]+\\([0-9]+\\)[ \t]+\\(.*\\)\n" + 1 3)) "Alist of values for `compilation-error-regexp-alist'.") (defcustom compilation-error-regexp-alist --=-=-= Content-Type: text/plain While in ~/src/emacs/trunk/src, do M-! cscope -f cscope.out -L -0 interval_block You will see the following in *Shell Command Output*. Put that in compilation mode and navigate through the search results the usual way. --8<---------------cut here---------------start------------->8--- alloc.c 1150 struct interval_block alloc.c 1154 struct interval_block *next; alloc.c 1160 static struct interval_block *interval_block; alloc.c INTERVAL_BLOCK_SIZE 1145 ((1020 - sizeof (struct interval_block *)) / sizeof (struct interval)) alloc.c make_interval 1193 struct interval_block *newi alloc.c make_interval 1196 newi->next = interval_block; alloc.c make_interval 1197 interval_block = newi; alloc.c make_interval 1201 val = &interval_block->intervals[interval_block_index++]; alloc.c gc_sweep 6227 register struct interval_block *iblk; alloc.c gc_sweep 6228 struct interval_block **iprev = &interval_block; alloc.c gc_sweep 6234 for (iblk = interval_block; iblk; iblk = *iprev) --8<---------------cut here---------------end--------------->8--- In GNU Emacs 24.3.50.1 (i686-pc-linux-gnu, GTK+ Version 2.20.1) of 2013-05-20 on debian-6.05 Bzr revision: 112643 mituharu@math.s.chiba-u.ac.jp-20130520031520-pq1c1qjertan94kq Windowing system distributor `The X.Org Foundation', version 11.0.10707000 Important settings: value of $LANG: en_IN locale-coding-system: iso-latin-1-unix default enable-multibyte-characters: t Major mode: Fundamental --=-=-=--