bugGNU nano - Bugs: bug #57577, [Request] the ability to set...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #57577: [Request] the ability to set bookmarks between which one can cycle

Submitter:  Benno Schulenberg <bens>
Submitted:  Fri 10 Jan 2020 06:34:26 PM UTC
   
 
Severity:  1 - Wish Status:  Fixed
Assigned to:  bens Open/Closed:  Closed

Jump to the original submission

Thu 30 Jul 2020 07:12:46 AM UTC, comment #8: 

Released in nano-5.0.

Benno Schulenberg <bens>
Group administrator
Sun 19 Apr 2020 10:16:34 AM UTC, comment #7: 

Fulfilled in git, at first with commit f091c34b (patch by Marco Diego Aurélio Mesquita), and then improving its behavior (preserving the bookmark when a bookmarked line is deleted) with commit 732cf887, and then renaming "bookmark" to "anchor" in commit 40053593, and then using my own implementation of the anchoring routines in commit e8618011.

Benno Schulenberg <bens>
Group administrator
Mon 30 Mar 2020 03:28:38 PM UTC, comment #6: 

Okay, here's an improved patch set, against current git, that should behave correctly.  Whenever a line or region that contains a knot (or knots) is deleted, the line where the cursor is left then gets the knot.  The knot does not migrate into the cutbuffer and is thus not pasted elsewhere.

(file #48713, file #48714, file #48715)

Benno Schulenberg <bens>
Group administrator
Mon 30 Mar 2020 11:27:13 AM UTC, comment #5: 

Attached is different implementation, using an extra boolean for every linestruct.  It appears I have reimplemented Marco's work.

(The implementation duplicates a knot when copying lines with M-6.  Fixing that requires reimplementing the copying routine, which is underway.)

(file #48708, file #48709, file #48710)

Benno Schulenberg <bens>
Group administrator
Fri 27 Mar 2020 04:11:05 PM UTC, comment #4: 

With the attached patch (updated for current git), multiple knots at the same line are trimmed.

The patch does not bother to free the knots when a buffer is closed.  And when an operation that trimmed a knot is undone, the knot is not restored.  Knots are more like chalk marks: if you wipe the text in which some line was marked, the location of that mark is forgotten.

(file #48687)

Benno Schulenberg <bens>
Group administrator
Fri 27 Mar 2020 12:34:13 PM UTC, comment #3: 

(A further improved second patch, to do the right thing when pasting or pressing <Enter> at the start of the line (where the knot is virtually located) and when it happens somewhere inside the line.)

There is still a problem when cutting lines and two or more knots land on the same line.  All but one ought to be removed.

(file #48686)

Benno Schulenberg <bens>
Group administrator
Fri 27 Mar 2020 11:35:10 AM UTC, comment #2: 

(Updated the second patch to also cover the undoing of line breaks and line joins.)

(file #48685)

Benno Schulenberg <bens>
Group administrator
Fri 27 Mar 2020 11:00:50 AM UTC, comment #1: 

Attached is a better/fuller implementation, in two patches.  It allows setting multiple bookmarks in a buffer.  The jumping to bookmarks occurs only inside a buffer, not between buffers.

(file #48683, file #48684)

Benno Schulenberg <bens>
Group administrator
Fri 10 Jan 2020 06:34:26 PM UTC, original submission:  

(The original suggestion was by Ken Tyler, nearly fourteen years ago, in https://lists.gnu.org/archive/html/nano-devel/2006-06/msg00012.html.)

It would be nice if one could tag any line (plus maybe column) with a bookmark with a certain keystroke, and cycle through the existing bookmarks with another keystroke.

A very limited and simplistic implementation of this feature I myself posted a good year ago: https://lists.gnu.org/archive/html/nano-devel/2018-10/msg00136.html.  A little later Marco Mesquita posted a better implementation (https://lists.gnu.org/archive/html/nano-devel/2018-11/msg00037.html) which went through many revisions (until https://lists.gnu.org/archive/html/nano-devel/2018-12/msg00051.html) and was then apparently abandonned.

Attached is an improved version of my limited implementation of this feature: a single anchor to which one can jump back.  The anchor is cleared when one jumps back to it.

Benno Schulenberg <bens>
Group administrator

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by bens (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 18 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-07-30 bens Open/ClosedOpen Closed
    2020-04-19 bens StatusReady For Test Fixed
    2020-03-30 bens Attached File- Added 0001-input-recognize-the-keystrokes-to-be-used-for-jumpin.patch, #48713
        Attached File- Added 0002-new-feature-knots-a-kind-of-bookmarks-that-can-be-cy.patch, #48714
        Attached File- Added 0003-knots-make-current-line-knotted-when-deleting-a-knot.patch, #48715
        StatusIn Progress Ready For Test
    2020-03-30 bens Attached File- Added 0001-input-recognize-the-keystrokes-to-be-used-for-jumpin.patch, #48708
        Attached File- Added 0002-new-feature-knots-a-kind-of-bookmarks-that-can-be-cy.patch, #48709
        Attached File- Added 0003-knots-make-the-current-line-knotted-if-knotted-line-.patch, #48710
    2020-03-27 bens Attached File- Added 0002-new-feature-knots-a-kind-of-bookmarks-that-can-be-cy.patch, #48687
    2020-03-27 bens Attached File- Added 0002-new-feature-knots-a-kind-of-bookmarks-that-can-be-cy.patch, #48686
    2020-03-27 bens Attached File- Added 0002-new-feature-knots-a-kind-of-bookmarks-that-can-be-cy.patch, #48685
    2020-03-27 bens Attached File#48684 Removed
    2020-03-27 bens Attached File- Added 0001-input-recognize-the-keystrokes-to-be-used-for-jumpin.patch, #48683
        Attached File- Added 0002-new-feature-knots-a-kind-of-bookmarks-that-can-be-cy.patch, #48684
        StatusReady For Test In Progress
        Assigned toNone bens
    2020-01-10 bens Attached File- Added 0001-possible-feature-the-ability-to-set-an-anchor-to-whi.patch, #48198

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code