GNU bug report logs - #78806
[PATCH] (smerge-refine-region): Add support for a virtual "other cursor"

Previous Next

Package: emacs;

Reported by: Stefan Monnier <monnier <at> iro.umontreal.ca>

Date: Mon, 16 Jun 2025 11:12:01 UTC

Severity: normal

Tags: patch

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


Message #17 received at 78806 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 78806 <at> debbugs.gnu.org
Subject: Re: bug#78806: [PATCH] (smerge-refine-region): Add support for a
 virtual "other cursor"
Date: Sat, 21 Jun 2025 22:21:47 +0300
> From: Stefan Monnier <monnier <at> iro.umontreal.ca>
> Cc: 78806 <at> debbugs.gnu.org
> Date: Sat, 21 Jun 2025 11:31:38 -0400
> 
> > Thanks.  I'm only a seasoned user of SMerge, but this description
> > confuses me so completely that I have no idea what will this "shadow
> > cursor" do for me:
> >
> >   +A "shadow cursor" is now drawn when point is inside a refined diff or
> >   +refined conflict area, that corresponds to point's position in
> >   +the other side of the diff or conflict, i.e. the position to which
> >   +'smerge-refine-exchange-point' would jump.
> 
> I don't really know how to describe it.  I think it becomes obvious when
> you see it.  Here's another attempt:
> 
> `smerge-refine` does a "fine diff" between two regions of text, which
> works by finding similarities between those two regions.  So when point
> is in one of the those two regions, the "shadow cursor" is placed in the
> other region, at the location that the fine-diff considered as "most
> similar".

How about

  When 'smerge-refine' shows the conflict diffs at word granularity, a
  "shadow cursor" is now displayed in the "lower" version when point
  is in the "upper" version, and vice versa.  The "shadow cursor" is
  just the character corresponding to the position where
  'smerge-refine-exchange-point' would jump, shown in a new distinct
  face 'smerge-refine-shadow-cursor', by default a box face.

> >> +(defface smerge-refine-shadow-cursor
> >> +  '((t :box (:line-width (-2 . -2))))
> >> +  "Face used to highlight the shadow cursor.")
> > Why "highlight"?  Isn't this the cursor itself, not its highlight?
> 
> I don't know how to say it clearly: this is the face used to highlight
> a character where the highlighting itself is "the cursor".  Maybe:
> 
>     "Face placed on a character to highlight it as the shadow cursor."

Yes, much better.  But I think the doc string should also include a
reference to 'smerge-refine-shadow-cursor'.

Thanks.




This bug report was last modified 55 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.