After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 767230 - Support "marks" (OS X style)
Support "marks" (OS X style)
Status: RESOLVED OBSOLETE
Product: vte
Classification: Core
Component: general
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: VTE Maintainers
VTE Maintainers
: 794128 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2016-06-04 05:28 UTC by Egmont Koblinger
Modified: 2021-06-10 15:14 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Egmont Koblinger 2016-06-04 05:28:17 UTC
http://apple.stackexchange.com/questions/209635/what-functionality-do-marks-offer-in-the-el-capitan-terminal

Do we want something like this? I guess it could be cool.
Comment 1 Christian Persch 2016-06-26 11:08:25 UTC
Yes. Would be simple to do even since the refactoring moved from 'add padding' everywhere in the drawing code to just translating everyting in a few central places (translate cairo context and invalidate regions).
Comment 2 Egmont Koblinger 2016-06-27 12:28:18 UTC
I'd be fine with a version that only makes the hotkeys functional (jump to prev/next prompt), without having a graphical representation. Adding those "[" symbols raises a few questions such as whether we'd increase the left padding, or obscure the glyph within the cell, also what color should that mark have, etc. I'm not saying the visual mark is bad, it could just be a second step :)

The "right click -> add/remove mark" menu entries obviously don't make too much sense without visual marks.

The whole concept of remembering input events rather than output ones is really weird to me and I'd probably be in favor of remembering some output event (escape sequence) instead which is closer to iTerm'2 shell integration. Terminal.app's approach of remembering the Enter keypress however definitely has the advantage that no further configuraion is necessary, works even across ssh by default. So I'm fine with that, too.

Where would we store the mark locations? In-memory linked list is feasible only if they're tied to explicit user action (i.e. pressing Enter), otherwise malicious data could oom vte so we'd need to store in file. Text and attr streams don't seem feasible. Row stream is probably okay. However then the mark locations are tied to physical rows, how much would the behavior make sense after a resize/rewrap? (Should marks belong to paragraphs, rows or characters?)
Comment 3 Egmont Koblinger 2016-06-27 12:30:54 UTC
> In-memory linked list is feasible...

Sorry, I meant anything in-memory (linked list is probably not a really good choice).
Comment 4 Egmont Koblinger 2016-06-27 12:33:24 UTC
If we store the marks in one of the streams (maybe even a new 4th stream) and enable the "add/remove mark" menu entries then we need to implement random-access-writes for streams. As far as I recall, it's not implemented currently, but I think (I hope) it could be implemented reasonably easily.
Comment 5 Egmont Koblinger 2016-08-02 15:31:45 UTC
See also bug 769420 (collapsible scrollback).
Comment 6 Egmont Koblinger 2018-03-06 17:47:56 UTC
*** Bug 794128 has been marked as a duplicate of this bug. ***
Comment 7 Gerald Nunn 2018-04-29 16:29:02 UTC
Just as an FYI, I have implemented the experimental ability to cycle between prompts in the latest version of Tilix (1.7.9). It uses the same technique that Egmont outlined above for Terminal.app, it simply remembers where the enter key is pressed. This does require my patch for implementing a notification on alternate screen mode since you don't want to remember Enter keystrokes in vi, emacs, nano, etc.

Just an FYI if you are interested in following how it goes and implementing the same capability in VTE but obviously with a more integrated approach.
Comment 8 Egmont Koblinger 2018-10-25 11:35:30 UTC
mdcat ("markdown cat") [1] is an example utility that outputs OSC "1337;SetMark" on iTerm2 to add checkpoints where a keyboard shortcut can quickly scroll to.

That is, one vote (one nice use case) for an escape sequence based approach rather than an input event based one.

[1] https://github.com/lunaryorn/mdcat
Comment 9 Christian Persch 2020-10-23 19:55:24 UTC
Continued in https://gitlab.gnome.org/GNOME/vte/-/issues/295 .
Comment 10 GNOME Infrastructure Team 2021-06-10 15:14:04 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/vte/-/issues/2314.