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


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 78806 <at> debbugs.gnu.org
Subject: bug#78806: [PATCH] (smerge-refine-region): Add support for a virtual "other cursor"
Date: Sat, 21 Jun 2025 10:35:03 +0300
> Date: Sat, 21 Jun 2025 00:01:50 -0400
> From:  Stefan Monnier via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> 
> > I'm thinking of adding a global `smerge-refine-shadow-cursor-mode` minor
> > mode to enable this feature and am thinking of enabling it by default.
> 
> I made it a defcustom instead.  See new patch below.
> AFAIC, it's ready for `master`.

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 guess this alludes to too much of other terms or features whose
names don't tell enough: "the other side of the diff"?  "where
smerge-refine-exchange-point would jump"?  Is it possible to provide
something less cryptic?

And there's no other documentation of the feature, not even in the doc
strings of the new option and face you added, which just mention "the
shadow cursor" without any other information.  Is it perhaps high time
to have this mode better documented in the user manual?

> +  (with-demoted-errors "cursor-sensor--detect: %S"

I'd appreciate a comment explaining why we demote these errors.

> +(defcustom smerge-refine-shadow-cursor t
> +  "If non-nil, display a shadow cursor on the other side of smerge refined regions."

Please say more about the shadow cursor.  How about saying what it
looks like, not only where?

> +(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?




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.