unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Hongyi Zhao <hongyi.zhao@gmail.com>
To: Gregory Heytings <gregory@heytings.org>
Cc: help-gnu-emacs <help-gnu-emacs@gnu.org>
Subject: Re: Quickly check for differences in code and locate possible errors.
Date: Wed, 29 Mar 2023 10:04:48 +0800	[thread overview]
Message-ID: <CAGP6POKjB+VGSti8uymJkVeY_exG86sEb7Dmf4VEqFQLiDi+JA@mail.gmail.com> (raw)
In-Reply-To: <d60cc5d44d77febffa79@heytings.org>

On Tue, Mar 28, 2023 at 11:03 PM Gregory Heytings <gregory@heytings.org> wrote:
>
>
> >
> > I would like to know whether it's possible to quickly check for
> > differences in code and locate possible errors with the help of Emacs.
> > Any tips will be appreciated.
> >
>
> I think the simplest way to do what you want is:
>
> (defun ediff-regions-characterwise ()
>    (interactive)
>    (let ((ediff-forward-word-function #'forward-char))
>      (call-interactively 'ediff-regions-wordwise)))
>
> Open the two files, call M-x ediff-regions-characterwise, select the two
> buffers, and type C-x h C-M-c twice.

Thank you for the tip. Now, let's consider a further problem: if I
only have the wrong version of the code at hand, I want to quickly
locate the possible problematic code characters from it. Is it
possible?

More specifically, the culprit should be picked out, and the
corresponding modifications should be made as follows:

`,' should be `,'

`\[RightArrow]' should be `->'

Regards,
Zhao



  reply	other threads:[~2023-03-29  2:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-28 13:56 Quickly check for differences in code and locate possible errors Hongyi Zhao
2023-03-28 14:40 ` gebser
2023-03-28 15:03 ` Gregory Heytings
2023-03-29  2:04   ` Hongyi Zhao [this message]
2023-03-29  8:34     ` Gregory Heytings

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=CAGP6POKjB+VGSti8uymJkVeY_exG86sEb7Dmf4VEqFQLiDi+JA@mail.gmail.com \
    --to=hongyi.zhao@gmail.com \
    --cc=gregory@heytings.org \
    --cc=help-gnu-emacs@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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).