From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Hongyi Zhao Newsgroups: gmane.emacs.help Subject: Re: Quickly check for differences in code and locate possible errors. Date: Wed, 29 Mar 2023 10:04:48 +0800 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23029"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs To: Gregory Heytings Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Mar 29 04:05:51 2023 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 1phLCB-0005lP-Ce for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 29 Mar 2023 04:05:51 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1phLBS-00031c-3Y; Tue, 28 Mar 2023 22:05:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1phLBQ-00031C-JQ for help-gnu-emacs@gnu.org; Tue, 28 Mar 2023 22:05:04 -0400 Original-Received: from mail-ed1-x530.google.com ([2a00:1450:4864:20::530]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1phLBO-00030U-Qq for help-gnu-emacs@gnu.org; Tue, 28 Mar 2023 22:05:04 -0400 Original-Received: by mail-ed1-x530.google.com with SMTP id er13so16354797edb.9 for ; Tue, 28 Mar 2023 19:05:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680055500; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=x5KFextQiLRZeXLlHwy9HFKMSTwQAqg952emRgJK8NU=; b=jl86TDd2W8eHsE7FfY4Tcj8PFUEW3DrQrEYJJNY975M7eExtOzmxDR4tFbgG6YF6XJ tNElwb7v3x7gkInd9kHPvhNHg6HP3LS1Tag8DXbgqQJuFiFemLXjTisOcS7IFi2xVvXI wVcP652zun3K+yFswWn6fbhzmN9TzDWIp1gRaszR6Zsm6Va9a8IBuYVX0+M+/mG4wrt/ mFFQkbgFJ1oBVCmiutJAwbUHAeS9rtyWYatvCEHv1IKK6krCDryThJbhEVkxPDCFrpBt D9m17V5Q1Oh2JBYLyoUdqezQjPR/Sd4Inv+J4crLkWXN2/zMbNY0QTXupAMAQea5CQRO gYig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680055500; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=x5KFextQiLRZeXLlHwy9HFKMSTwQAqg952emRgJK8NU=; b=xBTqOQIwkvCxBbYngoKGbzpzpN+/GqzrCfWhWeMVzIl1vCsvXGComANc/4p1c87q66 L1+j+VUdr132Iao4zhUwU0Nx8uTLXLQip/hm3KK3wJa970P6gPzcLJa9ihDAKzeeALyd mhhqT335pCtlMx6X7DFD3G7pr3K4CUkdOuoiNDOEWhsxP4FsGlwczoDH2KOc8fsom1/E tY4Up0oaHdCywnyIPb1PeK0Ro8DI6QhID05dpDPFPFSWVhEBeCGewSOq04E57pBEcqbx NyFETSG8BeLJLT+q4wo/WeY/zwHLzvSxvcSiQNeydPWZv/xZJriX9kS6rhjyKoGPHtyW sZXA== X-Gm-Message-State: AAQBX9fESIQgQPt70vhstMJgWh6kv0GMIW6BFXOMtHl51znjj9XRORyW GOiSH6nOFivkanxg/7tS1Zupy3BJYJVMFK4pBhrWJkcf5ew= X-Google-Smtp-Source: AKy350Z2+PHRMAOUZwV6GLSyUlHDXEI+keJR58TvcllINSLgv2xxRqeYeDmAkPSn1TDkioR4wu4M2hfPCTHOQyIK/4o= X-Received: by 2002:a17:906:4ac5:b0:92f:cbfe:1635 with SMTP id u5-20020a1709064ac500b0092fcbfe1635mr9277968ejt.6.1680055500429; Tue, 28 Mar 2023 19:05:00 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2a00:1450:4864:20::530; envelope-from=hongyi.zhao@gmail.com; helo=mail-ed1-x530.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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.29 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-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:143144 Archived-At: On Tue, Mar 28, 2023 at 11:03=E2=80=AFPM Gregory Heytings 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: `=EF=BC=8C' should be `,' `\[RightArrow]' should be `->' Regards, Zhao