nano-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fwd: [PATCH 2/3] new feature: "knots" -- a kind of bookmarks, that can b


From: Marco Diego Aurélio Mesquita
Subject: Fwd: [PATCH 2/3] new feature: "knots" -- a kind of bookmarks, that can be cycled through
Date: Sun, 5 Apr 2020 11:20:04 -0300

Sorry, I replied to you instead of the list.

---------- Forwarded message ---------
From: Marco Diego Aurélio Mesquita <address@hidden>
Date: Sun, Apr 5, 2020 at 11:17 AM
Subject: Re: [PATCH 2/3] new feature: "knots" -- a kind of bookmarks,
that can be cycled through
To: Benno Schulenberg <address@hidden>


On Sun, Apr 5, 2020 at 7:30 AM Benno Schulenberg <address@hidden> wrote:
>
>
> Op 04-04-2020 om 04:45 schreef Marco Diego Aurélio Mesquita:
> > On Thu, Apr 2, 2020 at 6:04 AM Benno Schulenberg <address@hidden> wrote:
> >> With M-' a knot is placed at the current line -- or removed when there
> >> already is one.  With M-PageUp / M-PageDown one can jump to the nearest
> >> knot in the upward and downward direction.  The search for a knot wraps
> >> at the top and bottom.  A knot is not visible in any way.
> >
> > I see a small problem with this implementation: M-' is used to change
> > between windows of the same application on ubuntu.
>
> Hmm.  Is that a default binding?  On which version of Ubuntu?  Is it
> documented anywhere?  I've googled for it, and all I can find is:
>
>
> https://elementaryos.stackexchange.com/questions/10705/switch-only-between-windows-of-the-same-application-not-tabs
>
> https://www.reddit.com/r/Ubuntu/comments/8qrhhq/why_is_something_as_simple_as_alttab_ruined_on/
>
> They both mention <Alt+`> (M-grave, the key above Tab on a US keyboard).
>
> But <Alt+`> and <Alt+'> don't do anything for me.  On Xubuntu (18.04) it
> is <Super+Tab> that switches to the next window of the same program.
>

On my Ubuntu 18.04 with a abnt2-like laptop keyboard pressing alt-'
alternate between windows of the same app.

> However, it differs in an important point.  Your patch set says:
>
>   When a bookmarked line is deleted, the bookmark is deleted too.  When
>   such a deleted line is pasted elsewhere, the bookmark reappears with it.
>
> My implementation doesn't do that.  The third patch then implements a
> different behavior: the knot stays near the place where it was placed
> when a knotted line is deleted.  What do you think of that behavior?
>

This is a feature a have been waiting for a long time. I'm willing to
accept such a compromise to get it accepted.


> > If they are similar enough I really would like to take the credits.
>
> I will add an Original-idea-by tag.  Is that good enough?
>

When macros were implemented you had the idea, I implemented and you
took the credits. Now I had the idea, you implemented and I'm just
getting and "Original-idea-by". Sure, your influence on how macros
should be implemented was much more detailed than my influence on how
bookmarks should work, anyway I still don't think it is fair.

But there is more: I actually think my code is more obvious. The
jump_to function is not a mere "jump to" since it conditionally shows
different messages. Calling a mark "knot" instead of "bookmark" seems
less obvious to me. My implementation mimics how other similar
features are implemented like chop_previous_word and chop_next_word
that call another function with a different argument specifying
direction.

I can update my patches to current master and include the changes in
your "third patch". That is my preferred approach.

Please give me a go-ahead.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]