help-texinfo
[Top][All Lists]
Advanced

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

Re: info info; man info (documentation about info)


From: Gavin Smith
Subject: Re: info info; man info (documentation about info)
Date: Sat, 7 Jan 2023 23:27:45 +0000

On Sat, Jan 07, 2023 at 09:33:40PM +0100, Arsen Arsenović wrote:
> Hi Alex,
> 
> Alejandro Colomar <alx.manpages@gmail.com> writes:
> 
> > Hello,
> >
> > As someone with zero knowledge of how info(1) works, but considerable 
> > knowledge
> > of how to read a manual page (well, there's little to it; less(1) is really
> > simple), I'd like to recommend something for the info(1) manual page.
> 
> Check out ``info "(info)Help"''.  This page is also linked through the
> info viewer welcome message: "Welcome to Info version 7.0.1.  Type H for
> help, h for tutorial".  Pressing h at any point in the info viewer takes
> you to that page.
> 
> This message seems to often be missed by users, in my experience.  I
> don't know why - perhaps because it's on the bottom of the screen, below
> the interesting stuff.

I'm tempted to suggest emphasizing the message with the use of colour.
A patch is at the end of this mail.

This would be distracting for users who already know how to use Info,
of course.

You can also make the message blink by adding | BLINK_MASK after BOLD_MASK.

diff --git a/info/display.c b/info/display.c
index 5a30ca4747..b8e34e889c 100644
--- a/info/display.c
+++ b/info/display.c
@@ -697,10 +697,17 @@ display_update_one_window (WINDOW *win)
 
   if (win->node)
     {
+      if (win->flags & W_Emphasize)
+        {
+          terminal_switch_rendition (COLOUR_YELLOW | BOLD_MASK);
+        }
+
       if (!win->line_starts)
         calculate_line_starts (win);
       line_index = display_update_node_text (win);
 
+      terminal_switch_rendition (0);
+
       if (display_was_interrupted_p)
        goto funexit;
     }
diff --git a/info/window.c b/info/window.c
index bef2a3bcde..f6e3806d6b 100644
--- a/info/window.c
+++ b/info/window.c
@@ -1009,10 +1009,12 @@ void
 window_message_in_echo_area (const char *format, ...)
 {
   va_list ap;
-  
+
+  the_echo_area->flags |= W_Emphasize;
   va_start (ap, format);
   vwindow_message_in_echo_area (format, ap);
   va_end (ap);
+  the_echo_area->flags &= ~W_Emphasize;
 }
 
 /* Place a temporary message in the echo area built from FORMAT, ARG1
diff --git a/info/window.h b/info/window.h
index 1f38ca84a0..11467a37f6 100644
--- a/info/window.h
+++ b/info/window.h
@@ -109,6 +109,7 @@ typedef struct window_struct
 #define W_NoWrap        0x10    /* Lines do not wrap in this window. */
 #define W_InputWindow   0x20    /* Window accepts input. */
 #define W_TempWindow    0x40    /* Window is less important. */
+#define W_Emphasize     0x80    /* Bright colours in window. */
 
 extern WINDOW *windows;         /* List of visible Info windows. */
 extern WINDOW *active_window;   /* The currently active window. */




reply via email to

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