nano-devel
[Top][All Lists]
Advanced

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

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


From: Benno Schulenberg
Subject: Re: [PATCH 2/3] new feature: "knots" -- a kind of bookmarks, that can be cycled through
Date: Sun, 5 Apr 2020 12:30:03 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1

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.

> [In] my latest
> implementation, I used M-Insert and I really think its more intuitive.

Not long ago I read an article that said that in computer stuff nothing
is intuitive.  When people use the word "intuitive", what they actually
mean is: familiar.  But I don't think <Alt+Insert> will be familiar to
anyone for setting and removing bookmarks.  When I rebased your version
of the patch set eight days ago, and applied my third patch on top of it
(after renaming "knotted" to "bookmarked"), to see how things would work,
I kept typing M-' to set a bookmark, because that is what I'm used to,
and when then having to reach for M-Insert instead, I felt it was too far
away.  But... when one has become used to M-Insert, it is probably fine.

[When looking at a full keyboard, with the little island of six keys
(Insert, Delete, Home, End, PageUp, PageDown), then one would think
that Insert ought to do the opposite of Delete, just like Home and End,
and PageUp and PageDown are opposites.  So, it is a pity that <Insert>
has been bound by default to "Insert file" -- it should have been a
synonym of ^U, because <Delete> is a synonym of ^D.  But I don't see
how Alt+Insert could be the opposite of Alt+Delete (which erases the
current line), so... Alt+Insert is probably fine for setting a bookmark.]

> Also can you describe how the current implementation is different from
> https://lists.gnu.org/archive/html/nano-devel/2018-12/msg00051.html .

It implements the same idea, so of course it looks very similar.  But it
started from somewhere else, at first from the single anchor:
  https://savannah.gnu.org/bugs/?57577#comment0
and then from a circular list of sliding knots:
  https://savannah.gnu.org/bugs/?57577#comment1

But that took 150 lines to implement.  That was too much.  So I wanted
to see if the idea of one boolean per line could be made to work.  As
noted in https://savannah.gnu.org/bugs/?57577#comment5, I realized
afterward that I had basically re-implemented your work.

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?

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

Benno

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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