From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gregory Heytings via Users list for the GNU Emacs text editor Newsgroups: gmane.emacs.help Subject: Re: Exploring a code base? Date: Sat, 07 Nov 2020 14:33:25 +0000 Message-ID: References: <57dcdf06-3bf4-4281-88d9-0e9c46adc757@yandex.ru> <83d00p6zj1.fsf@gnu.org> Reply-To: Gregory Heytings Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26120"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Alpine 2.22 (NEB 394 2020-01-19) Cc: help-gnu-emacs@gnu.org To: Eli Zaretskii Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 07 15:34:09 2020 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kbPI8-0006g4-FG for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 07 Nov 2020 15:34:08 +0100 Original-Received: from localhost ([::1]:57404 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kbPI7-0006VW-HH for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 07 Nov 2020 09:34:07 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39614) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kbPHj-0006T8-Vx for help-gnu-emacs@gnu.org; Sat, 07 Nov 2020 09:33:44 -0500 Original-Received: from mx.sdf.org ([205.166.94.24]:58309) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kbPHg-0005Py-AZ; Sat, 07 Nov 2020 09:33:43 -0500 Original-Received: from sdf.org (IDENT:ghe@faeroes.freeshell.org [205.166.94.9]) by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id 0A7EXSaE011948 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO); Sat, 7 Nov 2020 14:33:29 GMT Original-Received: (from ghe@localhost) by sdf.org (8.15.2/8.12.8/Submit) id 0A7EXvOn022449; Sat, 7 Nov 2020 14:33:57 GMT In-Reply-To: <83d00p6zj1.fsf@gnu.org> Received-SPF: pass client-ip=205.166.94.24; envelope-from=ghe@sdf.org; helo=mx.sdf.org X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/07 09:33:32 X-ACL-Warn: Detected OS = ??? X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:125090 Archived-At: > > Maybe you could step back and describe in a bit more detail what kind of > workflow you are trying to support, and how that contributes to the kind > of code-base exploring job you have in mind. I do this quite a lot, and > IME a combination of M-. and M-? (with the latter using the back-end of > ID Utils, if possible) is entirely adequate. In particular, I don't > think I ever was in the need of some graph to refactor a data type, I > only needed to examine its uses. > > Basically, I'm asking why having a flat list of all the users of a data > type, and reading the code of all of them, is not enough for this kind > of job? What am I missing? > IIUC, Yuri, Stefan and Dmitry all described the same problem, each with their own words: using M-. and M-? works fine for simple tasks (say, change the name of a given function or struct field in a codebase, or see where a given type is used), but when you are tackling a more complex task you often have to put searches on a kind of "stack", on which you can save your current search state, and from which you can resume your current search at a later stage. Say, you are making changes to the occurrences of "foo", and at some point during that work you see that you need to change something around the occurrences of "bar", and at some point during that work you see that you need to change the occurrences of "baz", and so forth.