unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* GTK documentation in Emacs
@ 2003-01-09 16:58 Jan D.
  2003-01-09 20:54 ` Jan D.
  2003-01-10 19:27 ` Eli Zaretskii
  0 siblings, 2 replies; 15+ messages in thread
From: Jan D. @ 2003-01-09 16:58 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 236 bytes --]

Hello.

I will shortly check in the GTK changes in to CVS,  I really would like
some feedback on the documentation I've written (mostly modified from
GTK API reference) so far.  I have attached the diff to this mail.

Thanks,

	Jan D.


[-- Attachment #2: xresources.texi.diff --]
[-- Type: text/plain, Size: 11096 bytes --]

Index: man/xresources.texi
===================================================================
RCS file: /cvsroot/emacs/emacs/man/xresources.texi,v
retrieving revision 1.13
diff -c -c -r1.13 xresources.texi
*** man/xresources.texi	6 Jan 2003 01:03:44 -0000	1.13
--- man/xresources.texi	9 Jan 2003 16:54:56 -0000
***************
*** 18,23 ****
--- 18,24 ----
  * Face Resources::      X resources for customizing faces.
  * Lucid Resources::     X resources for Lucid menus.
  * LessTif Resources::   X resources for LessTif and Motif menus.
+ * GTK resources::       Resources for GTK widgets.
  @end menu
  
  @node Resources
***************
*** 520,522 ****
--- 521,800 ----
  @item topShadowColor
  The color for the border shadow, on the top and the left.
  @end table
+ 
+ @node GTK resources, GTK widget paths, LessTif Resources, X Resources
+ @appendixsec GTK resources
+ @cindex GTK resources
+ @cindex GTK customize
+ @cindex GTK resource files
+ @cindex @file{~/.gtkrc-2.0} file
+ @cindex @file{~/emacs.d/gtkrc} file
+ 
+   If the Emacs installed at your site was built to use the GTK widget set,
+ then the menu bar, scroll bar and the dialogs can be customized with
+ the standard GTK @file{~/.gtkrc-2.0} file or with the Emacs specific
+ @file{~/.emacs.d/gtkrc} file.  Note that this is only for 
+ customizing specific GTK widget features.  To customize Emacs font,
+ background, faces etc., use the normal X resources, see @ref{Resources}.
+ 
+ In these files one first defines a style and then apply that style 
+ to widget paths.  Here is an example of how to change the font for
+ Emacs menus:
+ 
+ @smallexample
+ # This is a comment.
+ style "menufont"
+ @{
+   font_name = "helvetica bold 14"  # This is a Pango font name
+ @}
+ 
+ widget "*emacs-menuitem*" style "menufont"
+ 
+ @end smallexample
+ 
+ The syntax for GTK resource files is fully described in the GTK
+ API reference manual.  You may have this on your site as:
+ 
+ @file{prefix/share/gtk-doc/html/gtk/gtk-resource-files.html},
+ 
+ @noindent
+ where ``prefix'' is where GTK is installed, usually @file{/usr}.
+ You can find this online at
+  
+ @uref{http://developer.gnome.org/doc/API/2.0/gtk/gtk-Resource-Files.html}.
+ 
+ 
+ @menu
+ * GTK widget paths::      How widgets in GTK are named in general.
+ * GTK names in Emacs::    GTK widget names in Emacs.
+ * GTK styles::            What can be customized in a GTK widget.
+ @end menu
+ 
+ 
+ @node GTK widget paths, GTK names in Emacs, GTK resources, GTK resources
+ @appendixsec GTK widget paths
+ @cindex GTK widget names
+ @cindex GTK widget classes
+ 
+ Widgets can be specified by widget class or by
+ widget name.  Widgets have pathnames made from how they are contained.
+ For example, if a @code{GtkWindow} contains a @code{GtkVBox} which in turn
+ contains a @code{GtkMenuBar}, the class path would then be:
+ @smallexample
+ GtkWindow.GtkVBox.GtkMenuBar
+ @end smallexample
+ 
+ @noindent
+ If the widgets are named ``top'', ``box'' and ``menubar'', the widget
+ path then becomes:
+ @smallexample
+ top.box.menubar
+ @end smallexample
+ 
+   When assigning a style to a path, one can use the class path,
+ the widget path, or a mixture of both.  The key word 
+ @code{widget_class} matches only against the class path.  The key word
+ @code{widget} matches first against the name and secondly against the
+ class.
+ 
+   Matching is done with shell ``glob'' syntax, that is *
+ matches zero or more characters, ? matches one character.  So
+ this assigns @code{base_style} to all widgets:
+ 
+ @smallexample
+ widget "*" style "base_style"
+ @end smallexample
+ 
+   Given the class path @code{GtkWindow.GtkVBox.GtkMenuBar} and the widget
+ path @code{top.box.menubar}, these all assign @code{my_style} to the menu bar:
+ 
+ @smallexample
+ widget_class "GtkWindow.GtkVBox.GtkMenuBar" style "my_style"
+ widget_class "GtkWindow.*.GtkMenuBar" style "my_style"
+ widget_class "*GtkMenuBar" style "my_style"
+ widget "GtkWindow*menubar" style "my_style"
+ widget "*top.menubar" style "my_style"
+ widget "*menubar" style "my_style"
+ widget "*menu*" style "my_style"
+ @end smallexample
+ 
+ @node GTK names in Emacs, GTK styles, GTK widget paths, GTK resources
+ @appendixsec GTK names in Emacs
+ @cindex GTK widget names
+ @cindex GTK widget classes
+ 
+   In Emacs the top level widget for a frame is a @code{GtkWindow} that
+ contains a @code{GtkVBox}.  The @code{GtkVBox} contains the 
+ @code{GtkMenuBar} and a @code{GtkFixed} widget.  
+ The vertical scroll bars, @code{GtkVScrollbar},
+ are contained in the @code{GtkFixed} widget.
+ The text you write in Emacs is drawn in the @code{GtkFixed} widget.
+ 
+   Dialogs in Emacs are @code{GtkDialog} widgets.  The file dialog is a
+ @code{GtkFileSelection} widget.
+ 
+ @noindent
+ To set a style for the menu bar using the full class path, use:
+ 
+ @smallexample
+ widget_class "GtkWindow.GtkVBox.GtkMenuBar" style "my_style"
+ @end smallexample
+ 
+ @noindent
+ And for the scroll bar, the full path is:
+ 
+ @smallexample
+ widget_class 
+   "GtkWindow.GtkVBox.GtkFixed.GtkVScrollbar"
+      style "my_style"
+ @end smallexample
+ 
+   The names for the widgets are:
+ 
+ @multitable {@code{GtkFileSelection} and some} {@code{verticalScrollbar plus}}
+ @item @code{GtkFileSelection}
+ @tab @code{emacs-filedialog}
+ @item @code{GtkDialog}
+ @tab @code{emacs-dialog}
+ @item @code{GtkWindow}
+ @tab @code{Emacs}
+ @item @code{GtkVHbox}
+ @tab @code{pane}
+ @item @code{GtkFixed}
+ @tab @code{emacs}
+ @item @code{GtkMenuBar}
+ @tab @code{menubar}
+ @item @code{GtkVScrollbar}
+ @tab @code{verticalScrollbar}
+ @item anything in menus
+ @tab @code{emacs-menuitem}
+ @end multitable
+ 
+   Thus, for Emacs you can write the two examples above as:
+ 
+ @smallexample
+ widget "Emacs.pane.menubar" style "my_style"
+ widget "Emacs.pane.emacs.verticalScrollbar" style "my_style"
+ @end smallexample
+ 
+   GTK absolute paths are quite strange when it comes to menus
+ and dialogs.  The paths do not start with Emacs as they are free standing
+ windows and not contained in the GTK sense by the Emacs GtkWindow.
+ To customize the dialogs and menus, use wildcards like this:
+ 
+ @smallexample
+ widget "*emacs-dialog*" style "my_dialog_style"
+ widget "*emacs-filedialog* style "my_file_style"
+ widget "*emacs-menuitem* style "my_menu_style"
+ @end smallexample
+ 
+   An alternative is to put customization into @file{~/.emacs.d/gtkrc}.
+ This file is only read by Emacs, so anything in it affects Emacs but
+ leaves other applications unaffected.
+ For example, the drop down menu in the file dialog can not
+ be customized by any widget path, only by a class path.  It does not
+ have a name and it is not contained by the Emacs GtkWindow.
+ To have all menus in Emacs look the same, use:
+ 
+ @smallexample
+ widget "*Menu*" style "my_menu_style"
+ @end smallexample
+ 
+ @node GTK styles,  , GTK names in Emacs, GTK resources
+ @appendixsec GTK styles
+ @cindex GTK style
+ 
+ This is mostly taken from the GTK reference documentation.
+ 
+ Within a style declaration, the possible elements are:
+ 
+ @table @code
+ @item bg[state] = color
+ Sets the color used for the background of most widgets.  The widget where
+ you edit text in Emacs ignores this.  Use X resources (i.e.
+ @code{Emacs.background: color}) for this, see @ref{Resources}.
+ 
+ @item fg[state] = color
+ Sets the color used for the foreground of most widgets.  The widget where
+ you edit text in Emacs ignores this.  Use X resources (i.e.
+ @code{Emacs.foreground: color}) for this, see @ref{Resources}.
+ 
+ @item base[state] = color
+ Sets the color used for the background of widgets displaying editable
+ text. In Emacs, this color is used for the background of the text
+ fields in the file dialog.
+ 
+ @item text[state] = color
+ Sets the color used for foreground of widgets using base for the background
+ color.  In Emacs, this color is used for the text color in
+ fields in the file dialog.
+ 
+ @item bg_pixmap[state] = pixmap
+ Sets a background pixmap to be used in place of the background color.
+ The special value @code{<parent>}
+ may be used to indicate that the widget should use the same background
+ pixmap as its parent. The special value @code{<none>} may be used to
+ indicate no background pixmap.
+ 
+   The place to find the pixmap seems
+ to be the directory where the gtkrc file is.  So if you have this
+ in @file{~/.emacs.d/gtkrc}, the pixmap is looked for in
+ @file{~/.emacs.d}.  It does not seem possible to refer to a
+ file by its absolute path name.
+ 
+ @item font = font
+ Sets the font for a widget. font must be an X font description,
+ e.g. "-*-helvetica-medium-r-normal--10-*-*-*-*-*-*-*".  However,
+ this does not work, it seems that for GTK 2.0 you have to use
+ @code{font_name}.
+ 
+ @item fontset = font
+ Sets the fontset for a widget. Overrides any font declarations. font
+ must be a comma-separated list of X font descriptions,
+ e.g.
+ @smallexample
+   "-JIS-Fixed-Medium-R-Normal--26-180-100-100-C-240,
+    -JIS-Fixed-Medium-R-Normal--26-180-100-100-C-120,
+    -GB-Fixed-Medium-R-Normal--26-180-100-100-C-240,
+    -Adobe-Courier-Bold-R-Normal--25-180-100-100-M-150"
+ @end smallexample
+ 
+ @item font_name = font
+ Sets the font for a widget. Overrides any font or fontset declarations.
+ Font must be a Pango font name, for example ``Sans Italic 10'',
+ ``Helvetica Bold 12'', ``Courier 14'', ``Times 18''.  The names
+ are case insensitive.
+ @end table
+ 
+ The colors and background pixmaps are specified as a function of the state
+ of the widget. The states are:
+ 
+ @table @code
+ @item NORMAL
+ A color used for a widget in its normal state.
+ @item ACTIVE
+ A variant of the @code{NORMAL} color used when the widget is in the
+ active state, and also for the trough of a scroll bar, i.e.
+ @code{bg[ACTIVE] = "red"} sets the scroll bar trough to red.
+ Buttons that have been pressed but not released yet (``armed'') are in
+ active state.
+ @item PRELIGHT
+ A color used for widgets in the prelight state. This state is
+ the used for buttons and menu items that have the mouse cursor over them.
+ Also when the mouse is over the thumb in the scroll bar.
+ @item SELECTED
+ A color used to highlight data selected by the user. for instance, 
+ the selected items in a list widget, and the selection in an editable widget.
+ There is no place in Emacs where this setting has any effect.
+ @item INSENSITIVE
+ A color used for the background of widgets that have been set insensitive,
+ for example text for menu items that are not available can be set to
+ yellow with @code{fg[INSENSITIVE] = "yellow"}.
+ @end table
+ 
+ Colors can be specified as a string containing a color name (GTK knows
+ all names from the X color database @file{rgb.txt}), in one of the
+ hexadecimal forms @code{#rrrrggggbbbb}, @code{#rrrgggbbb}, @code{#rrggbb},
+ or @code{#rgb}, where r, g and b are hex digits, or they can be specified
+ as a triplet @code{@{ r, g, b@}}, where r, g and b are either integers 
+ in the range 0-65635 or floats in the range 0.0-1.0.

[-- Attachment #3: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/emacs-devel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: GTK documentation in Emacs
  2003-01-09 16:58 GTK documentation in Emacs Jan D.
@ 2003-01-09 20:54 ` Jan D.
  2003-01-10  3:27   ` Miles Bader
  2003-01-10 19:27 ` Eli Zaretskii
  1 sibling, 1 reply; 15+ messages in thread
From: Jan D. @ 2003-01-09 20:54 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 879 bytes --]

> Hello.
> 
> I will shortly check in the GTK changes in to CVS,  I really would like
> some feedback on the documentation I've written (mostly modified from
> GTK API reference) so far.  I have attached the diff to this mail.
> 
> Thanks,

Since I just got some new information I have made an update (attached).
It seems that X font names won't work in GTK 2.0 and newer, and Pango
font names is the way to go (the GTK documentation is not correct here).
 
I also got a pointer to where Pango font names are described (sort of
anyway), so I added this also.

New to me was that you can actually specify a default font for all GTK
widgets without defining a style.  Just put the line

   gtk-font-name = "Helvetica 14"

in your ~/.gtkrc-2.0 and that's it.  This is not that obvious when
reading GTK documentation.

See http://bugzilla.gnome.org/show_bug.cgi?id=102936.

	Jan D.


[-- Attachment #2: xresources.texi.diff --]
[-- Type: text/plain, Size: 13010 bytes --]

Index: man/xresources.texi
===================================================================
RCS file: /cvsroot/emacs/emacs/man/xresources.texi,v
retrieving revision 1.13
diff -c -c -r1.13 xresources.texi
*** man/xresources.texi	6 Jan 2003 01:03:44 -0000	1.13
--- man/xresources.texi	9 Jan 2003 20:46:30 -0000
***************
*** 18,23 ****
--- 18,24 ----
  * Face Resources::      X resources for customizing faces.
  * Lucid Resources::     X resources for Lucid menus.
  * LessTif Resources::   X resources for LessTif and Motif menus.
+ * GTK resources::       Resources for GTK widgets.
  @end menu
  
  @node Resources
***************
*** 520,522 ****
--- 521,858 ----
  @item topShadowColor
  The color for the border shadow, on the top and the left.
  @end table
+ 
+ @node GTK resources, GTK widget paths, LessTif Resources, X Resources
+ @appendixsec GTK resources
+ @cindex GTK resources
+ @cindex GTK customize
+ @cindex GTK resource files
+ @cindex @file{~/.gtkrc-2.0} file
+ @cindex @file{~/emacs.d/gtkrc} file
+ 
+   If the Emacs installed at your site was built to use the GTK widget set,
+ then the menu bar, scroll bar and the dialogs can be customized with
+ the standard GTK @file{~/.gtkrc-2.0} file or with the Emacs specific
+ @file{~/.emacs.d/gtkrc} file.  Note that this is only for 
+ customizing specific GTK widget features.  To customize Emacs font,
+ background, faces etc., use the normal X resources, see @ref{Resources}.
+ 
+ In these files one first defines a style and then apply that style 
+ to widget paths.  Here is an example of how to change the font for
+ Emacs menus:
+ 
+ @smallexample
+ # This is a comment.
+ style "menufont"
+ @{
+   font_name = "helvetica bold 14"  # This is a Pango font name
+ @}
+ 
+ widget "*emacs-menuitem*" style "menufont"
+ 
+ @end smallexample
+ 
+   There are some items you can set without using any style or widget path,
+ that affects GTK as a whole.  Most of these are poorly documented but
+ can be found as properties in the documentation for @code{GtkSetting} in the
+ GTK document references below.
+ One property of interest is gtk-font-name which sets
+ a default font.  You have to use Pango font names, see @ref{GTK styles}.
+ A @file{~/.gtkrc-2.0} file that just sets a default font looks like this:
+ @smallexample
+ gtk-font-name = "courier 12"
+ @end smallexample
+ 
+ 
+   The syntax for GTK resource files is fully described in the GTK
+ API reference manual.  You may have this on your site as:
+ 
+ @file{prefix/share/gtk-doc/html/gtk/gtk-resource-files.html},
+ 
+ @noindent
+ where ``prefix'' is where GTK is installed, usually @file{/usr}.
+ You can find this online at
+  
+ @uref{http://developer.gnome.org/doc/API/2.0/gtk/gtk-Resource-Files.html}.
+ 
+ 
+ @menu
+ * GTK widget paths::      How widgets in GTK are named in general.
+ * GTK names in Emacs::    GTK widget names in Emacs.
+ * GTK styles::            What can be customized in a GTK widget.
+ @end menu
+ 
+ 
+ @node GTK widget paths, GTK names in Emacs, GTK resources, GTK resources
+ @appendixsec GTK widget paths
+ @cindex GTK widget names
+ @cindex GTK widget classes
+ 
+ Widgets can be specified by widget class or by
+ widget name.  Widgets have pathnames made from how they are contained.
+ For example, if a @code{GtkWindow} contains a @code{GtkVBox} which in turn
+ contains a @code{GtkMenuBar}, the class path would then be:
+ @smallexample
+ GtkWindow.GtkVBox.GtkMenuBar
+ @end smallexample
+ 
+ @noindent
+ If the widgets are named ``top'', ``box'' and ``menubar'', the widget
+ path then becomes:
+ @smallexample
+ top.box.menubar
+ @end smallexample
+ 
+   When assigning a style to a path, one can use the class path,
+ the widget path, or a mixture of both.  The key word 
+ @code{widget_class} matches only against the class path.  The key word
+ @code{widget} matches first against the name and secondly against the
+ class.
+ 
+   Matching is done with shell ``glob'' syntax, that is *
+ matches zero or more characters, ? matches one character.  So
+ this assigns @code{base_style} to all widgets:
+ 
+ @smallexample
+ widget "*" style "base_style"
+ @end smallexample
+ 
+   Given the class path @code{GtkWindow.GtkVBox.GtkMenuBar} and the widget
+ path @code{top.box.menubar}, these all assign @code{my_style} to the menu bar:
+ 
+ @smallexample
+ widget_class "GtkWindow.GtkVBox.GtkMenuBar" style "my_style"
+ widget_class "GtkWindow.*.GtkMenuBar" style "my_style"
+ widget_class "*GtkMenuBar" style "my_style"
+ widget "GtkWindow*menubar" style "my_style"
+ widget "*top.menubar" style "my_style"
+ widget "*menubar" style "my_style"
+ widget "*menu*" style "my_style"
+ @end smallexample
+ 
+ @node GTK names in Emacs, GTK styles, GTK widget paths, GTK resources
+ @appendixsec GTK names in Emacs
+ @cindex GTK widget names
+ @cindex GTK widget classes
+ 
+   In Emacs the top level widget for a frame is a @code{GtkWindow} that
+ contains a @code{GtkVBox}.  The @code{GtkVBox} contains the 
+ @code{GtkMenuBar} and a @code{GtkFixed} widget.  
+ The vertical scroll bars, @code{GtkVScrollbar},
+ are contained in the @code{GtkFixed} widget.
+ The text you write in Emacs is drawn in the @code{GtkFixed} widget.
+ 
+   Dialogs in Emacs are @code{GtkDialog} widgets.  The file dialog is a
+ @code{GtkFileSelection} widget.
+ 
+ @noindent
+ To set a style for the menu bar using the full class path, use:
+ 
+ @smallexample
+ widget_class "GtkWindow.GtkVBox.GtkMenuBar" style "my_style"
+ @end smallexample
+ 
+ @noindent
+ And for the scroll bar, the full path is:
+ 
+ @smallexample
+ widget_class 
+   "GtkWindow.GtkVBox.GtkFixed.GtkVScrollbar"
+      style "my_style"
+ @end smallexample
+ 
+   The names for the widgets are:
+ 
+ @multitable {@code{GtkFileSelection} and some} {@code{verticalScrollbar plus}}
+ @item @code{GtkFileSelection}
+ @tab @code{emacs-filedialog}
+ @item @code{GtkDialog}
+ @tab @code{emacs-dialog}
+ @item @code{GtkWindow}
+ @tab @code{Emacs}
+ @item @code{GtkVHbox}
+ @tab @code{pane}
+ @item @code{GtkFixed}
+ @tab @code{emacs}
+ @item @code{GtkMenuBar}
+ @tab @code{menubar}
+ @item @code{GtkVScrollbar}
+ @tab @code{verticalScrollbar}
+ @item anything in menus
+ @tab @code{emacs-menuitem}
+ @end multitable
+ 
+   Thus, for Emacs you can write the two examples above as:
+ 
+ @smallexample
+ widget "Emacs.pane.menubar" style "my_style"
+ widget "Emacs.pane.emacs.verticalScrollbar" style "my_style"
+ @end smallexample
+ 
+   GTK absolute paths are quite strange when it comes to menus
+ and dialogs.  The paths do not start with Emacs as they are free standing
+ windows and not contained in the GTK sense by the Emacs GtkWindow.
+ To customize the dialogs and menus, use wildcards like this:
+ 
+ @smallexample
+ widget "*emacs-dialog*" style "my_dialog_style"
+ widget "*emacs-filedialog* style "my_file_style"
+ widget "*emacs-menuitem* style "my_menu_style"
+ @end smallexample
+ 
+   An alternative is to put customization into @file{~/.emacs.d/gtkrc}.
+ This file is only read by Emacs, so anything in it affects Emacs but
+ leaves other applications unaffected.
+ For example, the drop down menu in the file dialog can not
+ be customized by any widget path, only by a class path.  It does not
+ have a name and it is not contained by the Emacs GtkWindow.
+ To have all menus in Emacs look the same, use:
+ 
+ @smallexample
+ widget "*Menu*" style "my_menu_style"
+ @end smallexample
+ 
+ @node GTK styles,  , GTK names in Emacs, GTK resources
+ @appendixsec GTK styles
+ @cindex GTK style
+ 
+   This is mostly taken from the GTK reference documentation.
+ Within a style declaration, the possible elements are:
+ 
+ @table @code
+ @item bg[state] = color
+ Sets the color used for the background of most widgets.  The widget where
+ you edit text in Emacs ignores this.  Use X resources (i.e.
+ @code{Emacs.background: color}) for this, see @ref{Resources}.  The values
+ for @code{state} are enumerated below.
+ 
+ @item fg[state] = color
+ Sets the color used for the foreground of most widgets.  The widget where
+ you edit text in Emacs ignores this.  Use X resources (i.e.
+ @code{Emacs.foreground: color}) for this, see @ref{Resources}.
+ 
+ @item base[state] = color
+ Sets the color used for the background of widgets displaying editable
+ text. In Emacs, this color is used for the background of the text
+ fields in the file dialog.
+ 
+ @item text[state] = color
+ Sets the color used for foreground of widgets using base for the background
+ color.  In Emacs, this color is used for the text color in
+ fields in the file dialog.
+ 
+ @item bg_pixmap[state] = pixmap
+ Sets a background pixmap to be used in place of the background color.
+ The special value @code{<parent>}
+ may be used to indicate that the widget should use the same background
+ pixmap as its parent. The special value @code{<none>} may be used to
+ indicate no background pixmap.
+ 
+   The place to find the pixmap seems
+ to be the directory where the gtkrc file is.  So if you have this
+ in @file{~/.emacs.d/gtkrc}, the pixmap is looked for in
+ @file{~/.emacs.d}.  It does not seem possible to refer to a
+ file by its absolute path name.
+ 
+ @item font_name = font
+ Sets the font for a widget.  The font must be a Pango font name,
+ for example ``Sans Italic 10'', ``Helvetica Bold 12'', ``Courier 14'',
+ ``Times 18''.  See below for exact syntax.  The names are case insensitive.
+ @end table
+ 
+   The colors and background pixmaps are specified as a function of the state
+ of the widget. The states are:
+ 
+ @table @code
+ @item NORMAL
+ A color used for a widget in its normal state.
+ @item ACTIVE
+ A variant of the @code{NORMAL} color used when the widget is in the
+ active state, and also for the trough of a scroll bar, i.e.
+ @code{bg[ACTIVE] = "red"} sets the scroll bar trough to red.
+ Buttons that have been pressed but not released yet (``armed'') are in
+ active state.
+ @item PRELIGHT
+ A color used for widgets in the prelight state. This state is
+ the used for buttons and menu items that have the mouse cursor over them.
+ Also when the mouse is over the thumb in the scroll bar.
+ @item SELECTED
+ A color used to highlight data selected by the user. for instance, 
+ the selected items in a list widget, and the selection in an editable widget.
+ There is no place in Emacs where this setting has any effect.
+ @item INSENSITIVE
+ A color used for the background of widgets that have been set insensitive,
+ for example text for menu items that are not available can be set to
+ yellow with @code{fg[INSENSITIVE] = "yellow"}.
+ @end table
+ 
+   Colors can be specified as a string containing a color name (GTK knows
+ all names from the X color database @file{rgb.txt}), in one of the
+ hexadecimal forms @code{#rrrrggggbbbb}, @code{#rrrgggbbb}, @code{#rrggbb},
+ or @code{#rgb}, where r, g and b are hex digits, or they can be specified
+ as a triplet @code{@{ r, g, b @}}, where r, g and b are either integers 
+ in the range 0-65535 or floats in the range 0.0-1.0.
+ 
+   Pang font names have the form ``FAMILY-LIST STYLE-OPTIONS SIZE''.
+ 
+ @noindent
+ FAMILY-LIST is a comma separated list of families optionally terminated 
+ by a comma.  This way you can specify several families and the first
+ one found will be used.  The FAMILY corresponds to the second part in
+ an X font name, for example in
+ ``-adobe-times-medium-r-normal--12-120-75-75-p-64-iso10646-1''
+ the family name is ``times''.
+ 
+ @noindent
+ STYLE-OPTIONS is a whitespace separated list of words where each word
+ describes one of style, variant, weight, or stretch.
+ The @code{normal} values below does not need to be specified in a Pango
+ font name, they are the default.
+ 
+ 
+ @noindent
+ Style corresponds to the fourth part of an X font name.  In X font names
+ it is the character ``r'', ``i'' or ``o''.  In Pango font names
+ it is one of
+ @itemize @bullet
+ @item @code{normal}
+ @item @code{italic}
+ @item @code{oblique}
+ @end itemize
+ 
+ @noindent
+ Variant is either @code{normal} or @code{small-caps}.
+ Small caps is a font with the lower case characters replaced by
+ smaller variants of the capital characters.
+ 
+ @noindent
+ Weight describes the ``boldness'' of a font.  It corresponds to the third
+ part of an X font name.  It is one of
+ @itemize @bullet
+ @item @code{ultra-light}
+ @item @code{light}
+ @item @code{normal}
+ @item @code{bold}
+ @item @code{ultra-bold}
+ @item @code{heavy}
+ @end itemize
+ 
+ @noindent
+ Stretch gives the width of the font relative to other designs within a 
+ family.  It corresponds to the fifth part of an X font name.
+ It is one of
+ @itemize @bullet
+ @item @code{ultra-condensed}
+ @item @code{extra-condensed}
+ @item @code{condensed}
+ @item @code{semi-condensed}
+ @item @code{normal}
+ @item @code{semi-expanded}
+ @item @code{expanded}
+ @item @code{extra-expanded}
+ @item @code{ultra-expanded}
+ @end itemize
+ 
+ @noindent
+ SIZE is a decimal number that describes the font size in points.
+ 

[-- Attachment #3: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/emacs-devel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: GTK documentation in Emacs
  2003-01-09 20:54 ` Jan D.
@ 2003-01-10  3:27   ` Miles Bader
  2003-01-10 17:20     ` Jan D.
  0 siblings, 1 reply; 15+ messages in thread
From: Miles Bader @ 2003-01-10  3:27 UTC (permalink / raw)
  Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 167 bytes --]

Absolutely excellent -- I now understand what's going on!

Here's a patch that makes some minor clarifications, corrections, and
formatting changes to what you did:



[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Patch to xresources.texi --]
[-- Type: text/x-patch, Size: 13609 bytes --]

diff -up man/xresources.texi.\~2\~ man/xresources.texi
--- man/xresources.texi.~2~	2003-01-10 11:19:42.000000000 +0900
+++ man/xresources.texi	2003-01-10 12:24:24.000000000 +0900
@@ -1,5 +1,5 @@
 @c This is part of the Emacs manual.
-@c Copyright (C) 1987,93,94,95,1997,2001 Free Software Foundation, Inc.
+@c Copyright (C) 1987,93,94,95,1997,2001,03 Free Software Foundation, Inc.
 @c See file emacs.texi for copying conditions.
 @node X Resources, Antinews, Command Arguments, Top
 @appendix X Options and Resources
@@ -533,13 +533,13 @@ The color for the border shadow, on the 
   If the Emacs installed at your site was built to use the GTK widget set,
 then the menu bar, scroll bar and the dialogs can be customized with
 the standard GTK @file{~/.gtkrc-2.0} file or with the Emacs specific
-@file{~/.emacs.d/gtkrc} file.  Note that this is only for 
+@file{~/.emacs.d/gtkrc} file; note that these files are only for 
 customizing specific GTK widget features.  To customize Emacs font,
 background, faces etc., use the normal X resources, see @ref{Resources}.
 
-In these files one first defines a style and then apply that style 
-to widget paths.  Here is an example of how to change the font for
-Emacs menus:
+In these files one first defines a style and then how to apply that style
+to widget paths (@pxref{GTK widget paths}).  Here is an example of how to
+change the font for Emacs menus:
 
 @smallexample
 # This is a comment.
@@ -552,13 +552,15 @@ widget "*emacs-menuitem*" style "menufon
 
 @end smallexample
 
-  There are some items you can set without using any style or widget path,
-that affects GTK as a whole.  Most of these are poorly documented but
-can be found as properties in the documentation for @code{GtkSetting} in the
-GTK document references below.
-One property of interest is gtk-font-name which sets
-a default font.  You have to use Pango font names, see @ref{GTK styles}.
-A @file{~/.gtkrc-2.0} file that just sets a default font looks like this:
+  There are some things you can set without using any style or widget path,
+which affect GTK as a whole.  Most of these are poorly documented, but can
+be found in the `Properties' section of the documentation page for
+@code{GtkSetting}, in the GTK document references below.
+
+One property of interest is @code{gtk-font-name} which sets the default
+font for GTK; you must use Pango font names (@pxref{GTK styles}).  A
+@file{~/.gtkrc-2.0} file that just sets a default font looks like this:
+
 @smallexample
 gtk-font-name = "courier 12"
 @end smallexample
@@ -567,11 +569,11 @@ gtk-font-name = "courier 12"
   The syntax for GTK resource files is fully described in the GTK
 API reference manual.  You may have this on your site as:
 
-@file{prefix/share/gtk-doc/html/gtk/gtk-resource-files.html},
+@file{@var{prefix}/share/gtk-doc/html/gtk/gtk-resource-files.html},
 
 @noindent
-where ``prefix'' is where GTK is installed, usually @file{/usr}.
-You can find this online at
+where @var{prefix} is the prefix under which GTK is installed, usually
+@file{/usr} or @file{/usr/local}.  You can find the same document online at:
  
 @uref{http://developer.gnome.org/doc/API/2.0/gtk/gtk-Resource-Files.html}.
 
@@ -588,37 +590,41 @@ You can find this online at
 @cindex GTK widget names
 @cindex GTK widget classes
 
-Widgets can be specified by widget class or by
-widget name.  Widgets have pathnames made from how they are contained.
-For example, if a @code{GtkWindow} contains a @code{GtkVBox} which in turn
-contains a @code{GtkMenuBar}, the class path would then be:
+Widgets can be specified by widget class or by widget name.  Widget paths
+are sequences of widget names or classes, corresponding to hierarchies of
+widgets embedded within other widgets.  For example, if a @code{GtkWindow}
+contains a @code{GtkVBox} which in turn contains a @code{GtkMenuBar}, the
+widget class path would then be:
+
 @smallexample
 GtkWindow.GtkVBox.GtkMenuBar
 @end smallexample
 
 @noindent
-If the widgets are named ``top'', ``box'' and ``menubar'', the widget
-path then becomes:
+If the widgets are named ``top'', ``box'' and ``menubar'', the widget name
+path would be:
+
 @smallexample
 top.box.menubar
 @end smallexample
 
-  When assigning a style to a path, one can use the class path,
-the widget path, or a mixture of both.  The key word 
-@code{widget_class} matches only against the class path.  The key word
-@code{widget} matches first against the name and secondly against the
-class.
-
-  Matching is done with shell ``glob'' syntax, that is *
-matches zero or more characters, ? matches one character.  So
-this assigns @code{base_style} to all widgets:
+  When assigning a style to a path, one can use the class path, the widget
+path, or a mixture of both.  There are two commands:  @code{widget_class}
+will assign a style to a widget path, matching only against the class path,
+whereas the @code{widget} command will match first against the name and
+secondly against the class.
+
+  Matching of widget paths uses shell ``glob'' syntax, that is @code{*}
+matches zero or more characters and @code{?} matches one character.  So the
+following would assign @code{base_style} to all widgets:
 
 @smallexample
 widget "*" style "base_style"
 @end smallexample
 
   Given the class path @code{GtkWindow.GtkVBox.GtkMenuBar} and the widget
-path @code{top.box.menubar}, these all assign @code{my_style} to the menu bar:
+path @code{top.box.menubar}, the following all assign @code{my_style} to
+the menu bar:
 
 @smallexample
 widget_class "GtkWindow.GtkVBox.GtkMenuBar" style "my_style"
@@ -653,7 +659,7 @@ widget_class "GtkWindow.GtkVBox.GtkMenuB
 @end smallexample
 
 @noindent
-And for the scroll bar, the full path is:
+For the scroll bar, the full path is:
 
 @smallexample
 widget_class 
@@ -661,28 +667,30 @@ widget_class 
      style "my_style"
 @end smallexample
 
-  The names for the widgets are:
+@noindent
+The names for the emacs widgets, and their classes, are:
 
-@multitable {@code{GtkFileSelection} and some} {@code{verticalScrollbar plus}}
-@item @code{GtkFileSelection}
-@tab @code{emacs-filedialog}
-@item @code{GtkDialog}
-@tab @code{emacs-dialog}
-@item @code{GtkWindow}
-@tab @code{Emacs}
-@item @code{GtkVHbox}
-@tab @code{pane}
-@item @code{GtkFixed}
-@tab @code{emacs}
-@item @code{GtkMenuBar}
-@tab @code{menubar}
-@item @code{GtkVScrollbar}
-@tab @code{verticalScrollbar}
-@item anything in menus
-@tab @code{emacs-menuitem}
+@multitable {@code{verticalScrollbar plus}} {@code{GtkFileSelection} and some}
+@item @code{emacs-filedialog}
+@tab @code{GtkFileSelection}
+@item @code{emacs-dialog}
+@tab @code{GtkDialog}
+@item @code{Emacs}
+@tab @code{GtkWindow}
+@item @code{pane}
+@tab @code{GtkVHbox}
+@item @code{emacs}
+@tab @code{GtkFixed}
+@item @code{menubar}
+@tab @code{GtkMenuBar}
+@item @code{verticalScrollbar}
+@tab @code{GtkVScrollbar}
+@item @code{emacs-menuitem}
+@tab anything in menus
 @end multitable
 
-  Thus, for Emacs you can write the two examples above as:
+@noindent
+Thus, for Emacs you can write the two examples above as:
 
 @smallexample
 widget "Emacs.pane.menubar" style "my_style"
@@ -691,7 +699,7 @@ widget "Emacs.pane.emacs.verticalScrollb
 
   GTK absolute paths are quite strange when it comes to menus
 and dialogs.  The paths do not start with Emacs as they are free standing
-windows and not contained in the GTK sense by the Emacs GtkWindow.
+windows and not contained (in the GTK sense) by the Emacs GtkWindow.
 To customize the dialogs and menus, use wildcards like this:
 
 @smallexample
@@ -714,34 +722,35 @@ widget "*Menu*" style "my_menu_style"
 
 @node GTK styles,  , GTK names in Emacs, GTK resources
 @appendixsec GTK styles
-@cindex GTK style
+@cindex GTK styles
 
   This is mostly taken from the GTK reference documentation.
 Within a style declaration, the possible elements are:
 
 @table @code
-@item bg[state] = color
+@item bg[@var{state}] = @var{color}
 Sets the color used for the background of most widgets.  The widget where
-you edit text in Emacs ignores this.  Use X resources (i.e.
-@code{Emacs.background: color}) for this, see @ref{Resources}.  The values
-for @code{state} are enumerated below.
+you edit text in Emacs ignores this; for it, use X resources (i.e.
+@code{Emacs.background: color}; @ref{Resources})), or emacs faces
+(@pxref{Faces}).  The possible values for @var{state} are enumerated below.
 
-@item fg[state] = color
+@item fg[@var{state}] = @var{color}
 Sets the color used for the foreground of most widgets.  The widget where
-you edit text in Emacs ignores this.  Use X resources (i.e.
-@code{Emacs.foreground: color}) for this, see @ref{Resources}.
+you edit text in Emacs ignores this; for it, use X resources (i.e.
+@code{Emacs.foreground: @var{color}}; @ref{Resources})), or emacs faces
+(@pxref{Faces}).
 
-@item base[state] = color
+@item base[@var{state}] = @var{color}
 Sets the color used for the background of widgets displaying editable
 text. In Emacs, this color is used for the background of the text
 fields in the file dialog.
 
-@item text[state] = color
+@item text[@var{state}] = @var{color}
 Sets the color used for foreground of widgets using base for the background
 color.  In Emacs, this color is used for the text color in
 fields in the file dialog.
 
-@item bg_pixmap[state] = pixmap
+@item bg_pixmap[@var{state}] = @var{pixmap}
 Sets a background pixmap to be used in place of the background color.
 The special value @code{<parent>}
 may be used to indicate that the widget should use the same background
@@ -754,8 +763,8 @@ in @file{~/.emacs.d/gtkrc}, the pixmap i
 @file{~/.emacs.d}.  It does not seem possible to refer to a
 file by its absolute path name.
 
-@item font_name = font
-Sets the font for a widget.  The font must be a Pango font name,
+@item font_name = @var{font}
+Sets the font for a widget to @var{font}, which must be a Pango font name,
 for example ``Sans Italic 10'', ``Helvetica Bold 12'', ``Courier 14'',
 ``Times 18''.  See below for exact syntax.  The names are case insensitive.
 @end table
@@ -793,66 +802,43 @@ or @code{#rgb}, where r, g and b are hex
 as a triplet @code{@{ r, g, b @}}, where r, g and b are either integers 
 in the range 0-65535 or floats in the range 0.0-1.0.
 
-  Pang font names have the form ``FAMILY-LIST STYLE-OPTIONS SIZE''.
+  Pango font names have the form ``@var{family-list} @var{style-options}
+@var{size}''.
 
 @noindent
-FAMILY-LIST is a comma separated list of families optionally terminated 
-by a comma.  This way you can specify several families and the first
-one found will be used.  The FAMILY corresponds to the second part in
+@var{family-list} is a comma separated list of font families optionally
+terminated by a comma.  This way you can specify several families and the
+first one found will be used.  @var{family} corresponds to the second part in
 an X font name, for example in
-``-adobe-times-medium-r-normal--12-120-75-75-p-64-iso10646-1''
-the family name is ``times''.
+``-adobe-times-medium-r-normal--12-120-75-75-p-64-iso10646-1'' the family
+name is ``times''.
 
 @noindent
-STYLE-OPTIONS is a whitespace separated list of words where each word
-describes one of style, variant, weight, or stretch.
-The @code{normal} values below does not need to be specified in a Pango
-font name, they are the default.
-
+@var{style-options} is a whitespace separated list of words where each word
+is a style, variant, weight, or stretch.  The default value for all of
+these is @code{normal}.
 
 @noindent
-Style corresponds to the fourth part of an X font name.  In X font names
-it is the character ``r'', ``i'' or ``o''.  In Pango font names
-it is one of
-@itemize @bullet
-@item @code{normal}
-@item @code{italic}
-@item @code{oblique}
-@end itemize
+A `style' corresponds to the fourth part of an X font name.  In X font
+names it is the character ``r'', ``i'' or ``o''; in Pango font names the
+corresponding values are @code{normal}, @code{italic}, or @code{oblique}.
 
 @noindent
-Variant is either @code{normal} or @code{small-caps}.
+a `variant' is either @code{normal} or @code{small-caps}.
 Small caps is a font with the lower case characters replaced by
 smaller variants of the capital characters.
 
 @noindent
 Weight describes the ``boldness'' of a font.  It corresponds to the third
-part of an X font name.  It is one of
-@itemize @bullet
-@item @code{ultra-light}
-@item @code{light}
-@item @code{normal}
-@item @code{bold}
-@item @code{ultra-bold}
-@item @code{heavy}
-@end itemize
-
-@noindent
-Stretch gives the width of the font relative to other designs within a 
-family.  It corresponds to the fifth part of an X font name.
-It is one of
-@itemize @bullet
-@item @code{ultra-condensed}
-@item @code{extra-condensed}
-@item @code{condensed}
-@item @code{semi-condensed}
-@item @code{normal}
-@item @code{semi-expanded}
-@item @code{expanded}
-@item @code{extra-expanded}
-@item @code{ultra-expanded}
-@end itemize
+part of an X font name.  It is one of @code{ultra-light}, @code{light},
+@code{normal}, @code{bold}, @code{ultra-bold}, or @code{heavy}.
 
 @noindent
-SIZE is a decimal number that describes the font size in points.
+Stretch gives the width of the font relative to other designs within a
+family.  It corresponds to the fifth part of an X font name.  It is one of
+@code{ultra-condensed}, @code{extra-condensed}, @code{condensed},
+@code{semi-condensed}, @code{normal}, @code{semi-expanded},
+@code{expanded}, @code{extra-expanded}, or @code{ultra-expanded}.
 
+@noindent
+@var{size} is a decimal number that describes the font size in points.

[-- Attachment #3: Type: text/plain, Size: 165 bytes --]



-Miles
-- 
I'm beginning to think that life is just one long Yoko Ono album; no rhyme
or reason, just a lot of incoherent shrieks and then it's over.  --Ian Wolff

[-- Attachment #4: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/emacs-devel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: GTK documentation in Emacs
  2003-01-10  3:27   ` Miles Bader
@ 2003-01-10 17:20     ` Jan D.
  2003-01-11  1:27       ` Miles Bader
  0 siblings, 1 reply; 15+ messages in thread
From: Jan D. @ 2003-01-10 17:20 UTC (permalink / raw)
  Cc: emacs-devel

> Absolutely excellent -- I now understand what's going on!
> 
> Here's a patch that makes some minor clarifications, corrections, and
> formatting changes to what you did:

Thanks, I applied it, except for the @itemize parts.  I think it is
easier to find what to write in lists like this than in running text.

	Jan D.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: GTK documentation in Emacs
  2003-01-09 16:58 GTK documentation in Emacs Jan D.
  2003-01-09 20:54 ` Jan D.
@ 2003-01-10 19:27 ` Eli Zaretskii
  2003-01-10 20:45   ` Jan D.
  1 sibling, 1 reply; 15+ messages in thread
From: Eli Zaretskii @ 2003-01-10 19:27 UTC (permalink / raw)
  Cc: emacs-devel

> From: "Jan D." <jan.h.d@swipnet.se>
> Date: Thu, 9 Jan 2003 17:58:06 +0100 (CET)
> 
> I will shortly check in the GTK changes in to CVS,  I really would like
> some feedback on the documentation I've written

Thanks!  A couple of technical points:

> + @node GTK resources, GTK widget paths, LessTif Resources, X Resources
> + @appendixsec GTK resources
> + @cindex GTK resources
> + @cindex GTK customize
> + @cindex GTK resource files

It is not useful to have multiple index entries pointing to the same
place and beginning with the same string.  So I suggest to replace the
3 index entries above with this:

  @cindex GTK resources and customization
  @cindex resource files for GTK

> + @node GTK widget paths, GTK names in Emacs, GTK resources, GTK resources

In general, please use just "@node Foo", without the prev/next/up
links, as in "@node GTK widget paths".  This makes it easier to move
nodes around.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: GTK documentation in Emacs
  2003-01-10 20:45   ` Jan D.
@ 2003-01-10 19:56     ` Eli Zaretskii
  2003-01-11  8:29       ` Jan D.
  0 siblings, 1 reply; 15+ messages in thread
From: Eli Zaretskii @ 2003-01-10 19:56 UTC (permalink / raw)
  Cc: emacs-devel

> Date: Fri, 10 Jan 2003 21:45:39 +0100
> From: "Jan D." <jan.h.d@swipnet.se>
> >
> > In general, please use just "@node Foo", without the prev/next/up
> > links, as in "@node GTK widget paths".  This makes it easier to move
> > nodes around.
> 
> Hmm, I had that at first and then makeinfo complained.  I probably
> did something wrong, I'll look in to this.

For this to work, you need to put the nodes in the depth-first-search
order, and you need to have a menu item in the parent node for each of
its child nodes.  makeinfo should tell what is wrong, but if you
cannot figure out its messages, please post them and I will try to
help.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: GTK documentation in Emacs
  2003-01-10 19:27 ` Eli Zaretskii
@ 2003-01-10 20:45   ` Jan D.
  2003-01-10 19:56     ` Eli Zaretskii
  0 siblings, 1 reply; 15+ messages in thread
From: Jan D. @ 2003-01-10 20:45 UTC (permalink / raw)



>> I will shortly check in the GTK changes in to CVS,  I really would like
>> some feedback on the documentation I've written
>
> Thanks!  A couple of technical points:
>
>> + @node GTK resources, GTK widget paths, LessTif Resources, X Resources
>> + @appendixsec GTK resources
>> + @cindex GTK resources
>> + @cindex GTK customize
>> + @cindex GTK resource files
>
> It is not useful to have multiple index entries pointing to the same
> place and beginning with the same string.  So I suggest to replace the
> 3 index entries above with this:
>
>   @cindex GTK resources and customization
>   @cindex resource files for GTK

Good point, I will change this.


>> + @node GTK widget paths, GTK names in Emacs, GTK resources, GTK resources
>
> In general, please use just "@node Foo", without the prev/next/up
> links, as in "@node GTK widget paths".  This makes it easier to move
> nodes around.

Hmm, I had that at first and then makeinfo complained.  I probably
did something wrong, I'll look in to this.

	Jan D.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: GTK documentation in Emacs
  2003-01-10 17:20     ` Jan D.
@ 2003-01-11  1:27       ` Miles Bader
  0 siblings, 0 replies; 15+ messages in thread
From: Miles Bader @ 2003-01-11  1:27 UTC (permalink / raw)
  Cc: emacs-devel

On Fri, Jan 10, 2003 at 06:20:49PM +0100, Jan D. wrote:
> > Here's a patch that makes some minor clarifications, corrections, and
> > formatting changes to what you did:
> 
> Thanks, I applied it, except for the @itemize parts.  I think it is
> easier to find what to write in lists like this than in running text.

The problem is that in info they look really ugly (mostly because it
inserts a newline between each entry in the list, so it ends up looking
really tall, skinny, and `sparse' [and taking up lots of screen
real-estate]).  Since these particular lists are `intuitive' -- that is
they consist of many related words arranged in an obvious order -- I
think there's less need for distinguishing each individual entry than if
they were lists of unrelated items.

Despite the above reasoning, I wasn't quite sure either which was the
best way, so I looked at other places in the emacs manual that use
similar lists -- in particular the description of faces (which in fact
have almost exactly the same lists, like bold, ultra-bold, etc.) -- and
they use in-text lists.  So that's why I made that change: when in
doubt, be consistent... :o)

-Miles
-- 
Quidquid latine dictum sit, altum viditur.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: GTK documentation in Emacs
  2003-01-10 19:56     ` Eli Zaretskii
@ 2003-01-11  8:29       ` Jan D.
  2003-01-11  9:23         ` Eli Zaretskii
  2003-01-11  9:49         ` Kai Großjohann
  0 siblings, 2 replies; 15+ messages in thread
From: Jan D. @ 2003-01-11  8:29 UTC (permalink / raw)
  Cc: emacs-devel

> > Date: Fri, 10 Jan 2003 21:45:39 +0100
> > From: "Jan D." <jan.h.d@swipnet.se>
> > >
> > > In general, please use just "@node Foo", without the prev/next/up
> > > links, as in "@node GTK widget paths".  This makes it easier to move
> > > nodes around.
> > 
> > Hmm, I had that at first and then makeinfo complained.  I probably
> > did something wrong, I'll look in to this.
> 
> For this to work, you need to put the nodes in the depth-first-search
> order, and you need to have a menu item in the parent node for each of
> its child nodes.  makeinfo should tell what is wrong, but if you
> cannot figure out its messages, please post them and I will try to
> help.

When I use "@node Foo" only I get this:
./xresources.texi:585: `GTK widget paths' has no Up field.
./xresources.texi:636: `GTK names in Emacs' has no Up field.
./xresources.texi:720: `GTK styles' has no Up field.
makeinfo: Removing output file `../info/emacs' due to errors; use --force to preserve.

I don't know how to fix that except by adding the prev/next/up links.

	Jan D.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: GTK documentation in Emacs
  2003-01-11  8:29       ` Jan D.
@ 2003-01-11  9:23         ` Eli Zaretskii
  2003-01-11 11:01           ` Jan D.
  2003-01-11  9:49         ` Kai Großjohann
  1 sibling, 1 reply; 15+ messages in thread
From: Eli Zaretskii @ 2003-01-11  9:23 UTC (permalink / raw)
  Cc: emacs-devel

> From: "Jan D." <jan.h.d@swipnet.se>
> Date: Sat, 11 Jan 2003 09:29:18 +0100 (CET)
> 
> When I use "@node Foo" only I get this:
> ./xresources.texi:585: `GTK widget paths' has no Up field.
> ./xresources.texi:636: `GTK names in Emacs' has no Up field.
> ./xresources.texi:720: `GTK styles' has no Up field.
> makeinfo: Removing output file `../info/emacs' due to errors; use --force to preserve.

This happens because your top-level GTK section has the @appendixsec
directive in it, but all the other sections, which are subsections of
the top-level section, always use @appendixsec.  You should instead
use @appendixsubsec in the 3 subsections; then the problem will go
away.  (Sorry I didn't mention this restriction in my message.)

As the node "makeinfo Pointer Creation" in the Texinfo manual
explains, makeinfo uses the sectioning commands to deduce the
hierarchical structure of the document.  So you must use the
sectioning commands, and you must mark each chapter and section
correctly with sectioning commands, for the automatic pointer creation
to work.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: GTK documentation in Emacs
  2003-01-11  8:29       ` Jan D.
  2003-01-11  9:23         ` Eli Zaretskii
@ 2003-01-11  9:49         ` Kai Großjohann
  2003-01-11 10:57           ` Jan D.
  1 sibling, 1 reply; 15+ messages in thread
From: Kai Großjohann @ 2003-01-11  9:49 UTC (permalink / raw)


"Jan D." <jan.h.d@swipnet.se> writes:

> When I use "@node Foo" only I get this:
> ./xresources.texi:585: `GTK widget paths' has no Up field.

Is there another node, earlier in the file, which contains a menu
that contains an item for `GTK widget paths'?  I think that's the
missing link, though I'm but a novice in Texinfo.
-- 
Ambibibentists unite!

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: GTK documentation in Emacs
  2003-01-11  9:49         ` Kai Großjohann
@ 2003-01-11 10:57           ` Jan D.
  0 siblings, 0 replies; 15+ messages in thread
From: Jan D. @ 2003-01-11 10:57 UTC (permalink / raw)


> "Jan D." <jan.h.d@swipnet.se> writes:
> 
> > When I use "@node Foo" only I get this:
> > ./xresources.texi:585: `GTK widget paths' has no Up field.
> 
> Is there another node, earlier in the file, which contains a menu
> that contains an item for `GTK widget paths'?  I think that's the
> missing link, though I'm but a novice in Texinfo.

I finally figured this out.  I need to use @appendixsubsec for the
three "lowest" menu nodes instead of just @appendixsec.  That way
the structure becomes consistent with the menu layout.

I do think the error message from makeinfo is a bit cryptic.

	Jan D.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: GTK documentation in Emacs
  2003-01-11  9:23         ` Eli Zaretskii
@ 2003-01-11 11:01           ` Jan D.
  2003-01-11 14:48             ` Eli Zaretskii
  0 siblings, 1 reply; 15+ messages in thread
From: Jan D. @ 2003-01-11 11:01 UTC (permalink / raw)
  Cc: emacs-devel

> 
> > From: "Jan D." <jan.h.d@swipnet.se>
> > Date: Sat, 11 Jan 2003 09:29:18 +0100 (CET)
> > 
> > When I use "@node Foo" only I get this:
> > ./xresources.texi:585: `GTK widget paths' has no Up field.
> > ./xresources.texi:636: `GTK names in Emacs' has no Up field.
> > ./xresources.texi:720: `GTK styles' has no Up field.
> > makeinfo: Removing output file `../info/emacs' due to errors; use --force to preserve.
> 
> This happens because your top-level GTK section has the @appendixsec
> directive in it, but all the other sections, which are subsections of
> the top-level section, always use @appendixsec.  You should instead
> use @appendixsubsec in the 3 subsections; then the problem will go
> away.  (Sorry I didn't mention this restriction in my message.)

I just figured this out :-)

> As the node "makeinfo Pointer Creation" in the Texinfo manual
> explains, makeinfo uses the sectioning commands to deduce the
> hierarchical structure of the document.  So you must use the
> sectioning commands, and you must mark each chapter and section
> correctly with sectioning commands, for the automatic pointer creation
> to work.

This makes sense.  I wish maekinfo said something about "sectioning
structure not consistent with menu structure" or something like
that.

	Jan D.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: GTK documentation in Emacs
  2003-01-11 11:01           ` Jan D.
@ 2003-01-11 14:48             ` Eli Zaretskii
  0 siblings, 0 replies; 15+ messages in thread
From: Eli Zaretskii @ 2003-01-11 14:48 UTC (permalink / raw)
  Cc: emacs-devel

> From: "Jan D." <jan.h.d@swipnet.se>
> Date: Sat, 11 Jan 2003 12:01:21 +0100 (MET)
> Cc: emacs-devel@gnu.org
> 
> > 
> > > From: "Jan D." <jan.h.d@swipnet.se>
> > > Date: Sat, 11 Jan 2003 09:29:18 +0100 (CET)
> > > 
> > > When I use "@node Foo" only I get this:
> > > ./xresources.texi:585: `GTK widget paths' has no Up field.
> > > ./xresources.texi:636: `GTK names in Emacs' has no Up field.
> > > ./xresources.texi:720: `GTK styles' has no Up field.
> > > makeinfo: Removing output file `../info/emacs' due to errors; use --force to preserve.
> > 
> > This happens because your top-level GTK section has the @appendixsec
> > directive in it, but all the other sections, which are subsections of
> > the top-level section, always use @appendixsec.  You should instead
> > use @appendixsubsec in the 3 subsections; then the problem will go
> > away.  (Sorry I didn't mention this restriction in my message.)
> 
> I just figured this out :-)
> 
> > As the node "makeinfo Pointer Creation" in the Texinfo manual
> > explains, makeinfo uses the sectioning commands to deduce the
> > hierarchical structure of the document.  So you must use the
> > sectioning commands, and you must mark each chapter and section
> > correctly with sectioning commands, for the automatic pointer creation
> > to work.
> 
> This makes sense.  I wish maekinfo said something about "sectioning
> structure not consistent with menu structure" or something like
> that.

I agree.  I cc'ed Karl Berry, who is the Texinfo maintainer, in the
hope that the error message could be improved in some future release.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: GTK documentation in Emacs
@ 2003-01-11 16:50 Karl Berry
  0 siblings, 0 replies; 15+ messages in thread
From: Karl Berry @ 2003-01-11 16:50 UTC (permalink / raw)
  Cc: jan.h.d

    You should instead use @appendixsubsec in the 3 subsections;

Actually, I recommend using @section/@subsection/@subsubsection in all
contexts, and avoiding the old @{appendix,unnumbered}sub[sub]sec commands.
Just for simplicity.

    > This makes sense.  I wish maekinfo said something about "sectioning
    > structure not consistent with menu structure" or something like

That would be better.  Thanks for the suggestion.  (And thanks for
forwarding, Eli.)


Thanks,
karl

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2003-01-11 16:50 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-09 16:58 GTK documentation in Emacs Jan D.
2003-01-09 20:54 ` Jan D.
2003-01-10  3:27   ` Miles Bader
2003-01-10 17:20     ` Jan D.
2003-01-11  1:27       ` Miles Bader
2003-01-10 19:27 ` Eli Zaretskii
2003-01-10 20:45   ` Jan D.
2003-01-10 19:56     ` Eli Zaretskii
2003-01-11  8:29       ` Jan D.
2003-01-11  9:23         ` Eli Zaretskii
2003-01-11 11:01           ` Jan D.
2003-01-11 14:48             ` Eli Zaretskii
2003-01-11  9:49         ` Kai Großjohann
2003-01-11 10:57           ` Jan D.
  -- strict thread matches above, loose matches on Subject: below --
2003-01-11 16:50 Karl Berry

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).