bug-groff
[Top][All Lists]
Advanced

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

[bug #60666] [grotty] add OSC 8 support for hyperlinks


From: G. Branden Robinson
Subject: [bug #60666] [grotty] add OSC 8 support for hyperlinks
Date: Fri, 1 Oct 2021 08:00:06 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0

Update of bug #60666 (project groff):

                  Status:             In Progress => Fixed                  
             Open/Closed:                    Open => Closed                 
         Planned Release:                    None => 1.23.0                 

    _______________________________________________________

Follow-up Comment #7:


commit 5c250cc6e79c998135b5c30582d28d9565693846
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Fri Oct 1 21:43:31 2021 +1000

    [man]: Use OSC 8 hyperlinks.
    
    * tmac/an.tmac: Add registers `mY` (output driver is "grotty") and `U`
      (generate hyperlinks).  `U` is intended to apply to hyperlinking
      support in general, not just grotty's OSC 8 feature.  If the output
      driver is either grohtml or grotty, make `U` true (`man.local` is read
      subsequently and can override it).
    
      (UR, MT): Conditionalize diversion production on hyperlink support,
      not grohtml use per se.
    
      (UE, ME): Generate device control commands for `tty` device to emit
      hyperlinks.
    
    * tmac/groff_man.7.man.in (Options): Document -U.
    
      (Files) [style]: Add example of `U` register enablement.
    
    * tmac/man.local: Disable `U` register by default, except on the `html`
      device.
    
    * NEWS: Add item.

commit ab73e8189988d15bae12a82c6b3eb07948eda1d7
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Fri Oct 1 20:43:30 2021 +1000

    [grotty]: Add OSC 8 hyperlink support.
    
    * src/devices/grotty/tty.cpp: Do it.  Define `OSC` (Operating System
      Command) and `ST` (String Terminator) preprocessor symbols for these
      ECMA-48 (ISO 6429) character sequences.
    
      (tty_printer::simple_add_char): Add stripped-down alternative to
      `add_char()` member function for cases where we want to use many
      defaults because we're writing a device control command, not rendering
      a glyph.  (A function like `add_char()` that take 8 arguments of
      varying types is a code smell--phew!)
    
      (tty_printer::special): Call `special_link()` member function if the
      device control command is `link`.
    
      (tty_printer::special_link): Add new member function to generate OSC 8
      hyperlinks.
    
    * src/devices/grotty/grotty.1.man: Document it.  Observe in multiple
      places that disablement of SGR escape sequences disables OSC 8 too.
    
    * src/devices/grotty/tests/osc8_works.sh: Test it.
    * src/devices/grotty/grotty.am (TESTS, grotty_TESTS): Run test.
      (EXTRA_DIST): Ship test.
    
    * NEWS: Add item.
    
    Fixes <https://savannah.gnu.org/bugs/?60666>.  Thanks to Steffen
    Nurpmeso for supplying a proof-of-concept.  (I went with my own
    implementation, though, so blame me if it breaks.)


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?60666>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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