From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id C4D8E139360 for ; Sat, 7 Aug 2021 07:44:02 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DE221E0937; Sat, 7 Aug 2021 07:43:56 +0000 (UTC) Received: from ciao.gmane.io (ciao.gmane.io [116.202.254.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 7EAF6E090F for ; Sat, 7 Aug 2021 07:43:56 +0000 (UTC) Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1mCGzr-0000d5-9I for gentoo-user@lists.gentoo.org; Sat, 07 Aug 2021 09:43:55 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: gentoo-user@lists.gentoo.org From: Nikos Chantziaras Subject: [gentoo-user] Re: Recommend C source browser/editor? Date: Sat, 7 Aug 2021 10:43:50 +0300 Message-ID: References: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 In-Reply-To: Content-Language: en-US X-Archives-Salt: 603c6156-484d-4dae-b743-a1b67b9a95c0 X-Archives-Hash: 5870c6ca912380332bff78f87b2d87fe On 06/08/2021 23:25, Grant Edwards wrote: > Would anybody care to recommend a tool for browsing around (and > editing) a tree of somebody-else's C code? > > I prefer emacs for day-to-day editing of my code (when I know what's > where), but I'm looking for something to browse around a tree of > unfamiliar source code and make minor changes. I briefly tried > emacs+cscope at a few points in the past, but it just never worked > very well. > > It would be nice to have something that I can just point at a tree of > source files and not to have to spend a lot of time setting up a > "project" or "workspace" or whatever... If emacs has support for compilation databases (a "compile_commands.json" file), then you can generate one. The easiest way to do that is with dev-util/bear: $ bear -- make -j16 This will build the project as usual, but a compile_commands.json file will be generated in the current directory. Load that file into an editor or IDE that supports compilation databases.