all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Daniel Martín" <mardani29@yahoo.es>
To: emacs-devel@gnu.org
Subject: A new command to apply changes to lines referenced in compilation buffers
Date: Tue, 22 Dec 2020 00:43:47 +0100	[thread overview]
Message-ID: <m1a6u67mj0.fsf@yahoo.es> (raw)
In-Reply-To: m1a6u67mj0.fsf.ref@yahoo.es


Today I thought about the following use case: Imagine a user that is
working in a C codebase and wants to rename some function without using
a TAGS file (or maybe the language is not C and there's no good TAGS
support for it).  One possible way to do that in a more or less reliable
way (ie, without changing unrelated matches in documentation files, for
example) is to simply change the definition and compile the code so that
the compiler will refer to each callsite that needs to be renamed.

Compilation-mode already knows about the location (file and line number,
at least) of each error message, so I wonder if we could add a command
to compilation-mode that performs a search and replace over each error
line in a compilation buffer.  The command would be similar to
xref-query-replace-in-results, which does this for results produced by
TAGS or any other Xref backend.

Before I think more about the design of this command, is there potential
interest in having it in Emacs? Is there something available in Emacs
that already implements this use case in a simple way?

Thanks.



       reply	other threads:[~2020-12-21 23:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <m1a6u67mj0.fsf.ref@yahoo.es>
2020-12-21 23:43 ` Daniel Martín [this message]
2020-12-21 23:59   ` A new command to apply changes to lines referenced in compilation buffers Clément Pit-Claudel
2020-12-22  3:34   ` Eli Zaretskii
2020-12-23 11:24     ` Daniel Martín
2020-12-23 15:57       ` Eli Zaretskii
2020-12-23 17:03         ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m1a6u67mj0.fsf@yahoo.es \
    --to=mardani29@yahoo.es \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.