Gnus development mailing list
 help / color / mirror / Atom feed
* Customize testers wanted
@ 1996-11-20 15:04 Per Abrahamsen
  1996-11-20 20:03 ` Hrvoje Niksic
  1996-12-10 11:01 ` Ilya Zakharevich
  0 siblings, 2 replies; 17+ messages in thread
From: Per Abrahamsen @ 1996-11-20 15:04 UTC (permalink / raw)



Since

- Custom 1.0 is now released and bundled with Red Gnus 0.66.
- All the native part of Red Gnus 0.66 has customize support.
- I use customize for all my Gnus related variables, and it works.

I think it would be nice if you would try the customize package again,
and see if it would be a disaster to release it now.  Setting some of
the variables from your `.gnus' would be a good test.  Suggestions for
how to divide some of the larger customize groups would be very
helpful.

There now is a customize submenu in the help menu.  

A known problem is that only the variables defined in already loaded
files are available.  The proper solution to this problem will require
some cooperation from the (X)Emacs maintainers.


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

* Re: Customize testers wanted
  1996-11-20 15:04 Customize testers wanted Per Abrahamsen
@ 1996-11-20 20:03 ` Hrvoje Niksic
  1996-11-20 21:22   ` Sudish Joseph
  1996-11-20 21:51   ` Hrvoje Niksic
  1996-12-10 11:01 ` Ilya Zakharevich
  1 sibling, 2 replies; 17+ messages in thread
From: Hrvoje Niksic @ 1996-11-20 20:03 UTC (permalink / raw)
  Cc: ding, emacs-custom

Per Abrahamsen (abraham@dina.kvl.dk) wrote:
> - Custom 1.0 is now released and bundled with Red Gnus 0.66.
> - All the native part of Red Gnus 0.66 has customize support.
> - I use customize for all my Gnus related variables, and it works.
> I think it would be nice if you would try the customize package again,
> and see if it would be a disaster to release it now.  Setting some of
> the variables from your `.gnus' would be a good test.  Suggestions for
> how to divide some of the larger customize groups would be very
> helpful.

Does it work under XEmacs?  The FAQ used to claim that it hasn't been
ported to XEmacs.

-- 
Hrvoje Niksic <hniksic@srce.hr> | Student at FER Zagreb, Croatia
--------------------------------+--------------------------------
`VI' - An editor used by those heretics that don't subscribe to
       the Emacs religion.


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

* Re: Customize testers wanted
  1996-11-20 20:03 ` Hrvoje Niksic
@ 1996-11-20 21:22   ` Sudish Joseph
  1996-11-20 21:51   ` Hrvoje Niksic
  1 sibling, 0 replies; 17+ messages in thread
From: Sudish Joseph @ 1996-11-20 21:22 UTC (permalink / raw)


Hrvoje Niksic <hniksic@srce.hr> writes:
> Does it work under XEmacs?  The FAQ used to claim that it hasn't been
> ported to XEmacs.

Yes, it does, and very nicely, too.

-Sudish


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

* Re: Customize testers wanted
  1996-11-20 20:03 ` Hrvoje Niksic
  1996-11-20 21:22   ` Sudish Joseph
@ 1996-11-20 21:51   ` Hrvoje Niksic
  1996-11-20 22:25     ` William Perry
  1 sibling, 1 reply; 17+ messages in thread
From: Hrvoje Niksic @ 1996-11-20 21:51 UTC (permalink / raw)
  Cc: Per Abrahamsen, ding, emacs-custom

Hrvoje Niksic (hniksic@srce.hr) wrote:
> Does it work under XEmacs?  The FAQ used to claim that it hasn't been
> ported to XEmacs.

To followup to my own mail, it seems to work fine.  A little bit slow,
but it's hardly your fault.  I'd like to have an easy get-out key for
custom buffer, e.g. `q'.  Pressing `q' only barfs "buffer is
read-only".

A more serious remark is for face-editing -- I would like to be able
to change the *size* of the face -- then it would be truly useful.

-- 
Hrvoje Niksic <hniksic@srce.hr> | Student at FER Zagreb, Croatia
--------------------------------+--------------------------------
`VI' - An editor used by those heretics that don't subscribe to
       the Emacs religion.


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

* Re: Customize testers wanted
  1996-11-20 21:51   ` Hrvoje Niksic
@ 1996-11-20 22:25     ` William Perry
  1996-11-21  1:36       ` Per Abrahamsen
  0 siblings, 1 reply; 17+ messages in thread
From: William Perry @ 1996-11-20 22:25 UTC (permalink / raw)
  Cc: Per Abrahamsen, ding, emacs-custom

Hrvoje Niksic writes:
>Hrvoje Niksic (hniksic@srce.hr) wrote:
>> Does it work under XEmacs?  The FAQ used to claim that it hasn't been
>> ported to XEmacs.
>
>To followup to my own mail, it seems to work fine.  A little bit slow, but
>it's hardly your fault.  I'd like to have an easy get-out key for custom
>buffer, e.g. `q'.  Pressing `q' only barfs "buffer is read-only".
>
>A more serious remark is for face-editing -- I would like to be able to
>change the *size* of the face -- then it would be truly useful.

  This would be nice, but I think really only useful under XEmacs, since
in Emacs 19 all faces have to be the same height.  GACK!  I don't have time
to hack it in right now, and I'm not sure if Per ever uses XEmacs or not.
Anyone got time?

-Bill P.


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

* Re: Customize testers wanted
  1996-11-20 22:25     ` William Perry
@ 1996-11-21  1:36       ` Per Abrahamsen
  1996-11-21  3:33         ` Hrvoje Niksic
  0 siblings, 1 reply; 17+ messages in thread
From: Per Abrahamsen @ 1996-11-21  1:36 UTC (permalink / raw)


William Perry <wmperry@aventail.com> writes:

> GACK!  I don't have time
> to hack it in right now, and I'm not sure if Per ever uses XEmacs or not.

I don't but I tried to make it easy for someone else to add support
for more face attributes.  All you should have to do is to add more
entries to `custom-face-attributes'.  

For example, the entry for `underline' is 

	(:underline (toggle :format "Underline: %v") set-face-underline-p)

:underline
	is the name of the attribute, as used in `defface'.

(toggle :format "Underline: %v")
	is a widget describing how it should be edited.  

set-face-underline-p
	is the function to set the attribute.  It is called with three
	arguments, the face, the new value for that attribute, and an
	optional frame. 

To add support for setting the size, one should be able to do
something like this:

	(setq custom-face-attributes
	      (cons '(:size (integer :format "Size: %v") set-face-font-size)
		    custom-face-attributes))

assuming a `set-face-font-size' function exists.


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

* Re: Customize testers wanted
  1996-11-21  1:36       ` Per Abrahamsen
@ 1996-11-21  3:33         ` Hrvoje Niksic
  1996-11-21 15:20           ` William Perry
  0 siblings, 1 reply; 17+ messages in thread
From: Hrvoje Niksic @ 1996-11-21  3:33 UTC (permalink / raw)
  Cc: ding

Per Abrahamsen (abraham@dina.kvl.dk) wrote:
> 	(setq custom-face-attributes
> 	      (cons '(:size (integer :format "Size: %v") set-face-font-size)
> 		    custom-face-attributes))
> assuming a `set-face-font-size' function exists.

Well, set-face-font-size doesn't exist, but set-face-font exists, and
I think the size must be given through that.  Looks pretty ugly. :(

-- 
Hrvoje Niksic <hniksic@srce.hr> | Hocemo 101-icu!
--------------------------------+--------------------------------
I'm sure they'll listen to reason! -- Neal Stevenson, _Snow Crash_


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

* Re: Customize testers wanted
  1996-11-21  3:33         ` Hrvoje Niksic
@ 1996-11-21 15:20           ` William Perry
  1996-11-21 15:55             ` Per Abrahamsen
  0 siblings, 1 reply; 17+ messages in thread
From: William Perry @ 1996-11-21 15:20 UTC (permalink / raw)
  Cc: Per Abrahamsen, ding

Hrvoje Niksic writes:
>Per Abrahamsen (abraham@dina.kvl.dk) wrote:
>> 	(setq custom-face-attributes
>> 	      (cons '(:size (integer :format "Size: %v") set-face-font-size)
>> 		    custom-face-attributes))
>> assuming a `set-face-font-size' function exists.
>
>Well, set-face-font-size doesn't exist, but set-face-font exists, and
>I think the size must be given through that.  Looks pretty ugly. :(

(load-library "font")
t
(setq x (make-font))
[:family nil :weight nil :style 0 :size nil :registry nil :encoding nil]
(set-font-size x "24pt")
"24pt"
(set-face-font 'default x (current-buffer))
nil

  Works for me! :) This is using the 'font' package I wrote for (X)Emacs
19.  It allows you to specify just specific of a font, and let it fill in
the rest.  This is the way Emacs needs to go to support better font
handling (especially under other windowing systems like NeXTstep or Win32
(or TTY)).

  This parallels the Cascading Style Sheet properties for fonts pretty well
(also semi-DSSSLy), since I wrote it to make my life easier with Emacs-W3
when doing stylesheets.

  You can specify the following styles for a font (these are all
appropriate to the FONT used in a face, even though some of them get
outside the 'font' property of a face as normally used in Emacs).

Style                       Effect
--------------------------------------------------
bold                        Font is bold
italic                      Font is italic
oblique                     Font is oblique
dim                         Font is dimmed down (TTY)
underline                   Font is underlined
overline                    Font is overlined
linethrough | strikethru    Font is rendered in 'strikken' - line thru middle
reverse                     Font is reversed (TTY)
blink                       Font is blinking (TTY)
smallcaps*                  Use smallcaps when drawing text
bigcaps*                    Use bigcaps when drawing text
dropcaps*                   Use dropcaps when drawing text

* = XEmacs only, until Emacs provides set-face-display-table

As well as various font-specific things (normally encoded in the X LOGFONT
- gack).

weight               - extralight, light, demi-light, medium, normal,
                       demi-bold, bold, extra-bold
family               - The font family - can be a generic font family like
                       'serif' as well, and font-family-mappings is
                       consulted to find the first 'serif' font that is
                       available on your system.
size                 - The size of the font.  This can be specified in many
                       different physical sizes: pixels, points, picas,
                       inches, millimeters, and centimeters.  Everything
                       but pixels takes into account your physical screen
                       resolution, so when you ask for a '1 inch' font, you
                       will get a 1 inch font on a 14" or a 21" monitor.
                       Break out the ruler if you don't believe me. :)

It would be fairly easy to construct a widget on top of this.  Anyone
volunteering?  I'd put it into the main 'font' package.  I've talked to RMS
in the past about putting this in Emacs, but haven't really had the time to
pursue it recently.

-Bill P.


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

* Re: Customize testers wanted
  1996-11-21 15:20           ` William Perry
@ 1996-11-21 15:55             ` Per Abrahamsen
  1996-11-21 18:18               ` William Perry
  1996-11-21 18:34               ` David Moore
  0 siblings, 2 replies; 17+ messages in thread
From: Per Abrahamsen @ 1996-11-21 15:55 UTC (permalink / raw)



Would it be this simple?

(load-library "font")

(defun set-face-font-size (face size &optional frame)
  "Set the font of FACE to SIZE in optional FRAME."
  (let ((font (get-face-font face frame)))
    (set-font-size font size)
    (set-face-font face  font frame)))


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

* Re: Customize testers wanted
  1996-11-21 15:55             ` Per Abrahamsen
@ 1996-11-21 18:18               ` William Perry
  1996-11-22 17:29                 ` Per Abrahamsen
  1996-11-21 18:34               ` David Moore
  1 sibling, 1 reply; 17+ messages in thread
From: William Perry @ 1996-11-21 18:18 UTC (permalink / raw)
  Cc: ding

Per Abrahamsen writes:
>
>Would it be this simple?
>
>(load-library "font")
>
>(defun set-face-font-size (face size &optional frame)
>  "Set the font of FACE to SIZE in optional FRAME."
>  (let ((font (get-face-font face frame)))
>    (set-font-size font size)
>    (set-face-font face  font frame)))

  Uhmmm...

(require 'font)
(if (not (fboundp 'face-font-name))
    (defun face-font-name (face &rest args)
      (apply 'face-font face args)))

(defun set-face-font-size (face size &rest args)
  "Set the font of FACE to SIZE"
  (let* ((font (apply 'face-font-name face args))
	 (fontobj (font-create-object font)))
    (set-font-size fontobj size)
    (apply 'set-face-font face fontobj args)))

-Bill P.


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

* Re: Customize testers wanted
  1996-11-21 15:55             ` Per Abrahamsen
  1996-11-21 18:18               ` William Perry
@ 1996-11-21 18:34               ` David Moore
  1 sibling, 0 replies; 17+ messages in thread
From: David Moore @ 1996-11-21 18:34 UTC (permalink / raw)


Per Abrahamsen <abraham@dina.kvl.dk> writes:

> Would it be this simple?
> 
> (load-library "font")
> 
> (defun set-face-font-size (face size &optional frame)
>   "Set the font of FACE to SIZE in optional FRAME."
>   (let ((font (get-face-font face frame)))
>     (set-font-size font size)
>     (set-face-font face  font frame)))

	Except for the lack of get-face-font, in the version of
"font.el" that is currently in xemacs 19.14.

	I think you might be able to use something like:

(let ((font-spec (face-property face 'font-specification frame)))
  (when font-spec
     (set-font-size font-spec size)
     (set-face-font face font-spec frame)))

This would only let you set the font sizes of fonts created after the
font.el library was loaded, however.  Although I guess if custom.el
loaded it first thing, it'd work for everything custom cares about.


-- 
David Moore <dmoore@ucsd.edu>       | Computer Systems Lab      __o
UCSD Dept. Computer Science - 0114  | Work: (619) 534-8604    _ \<,_
La Jolla, CA 92093-0114             | Fax:  (619) 534-1445   (_)/ (_)
<URL:http://oj.egbt.org/dmoore/>    | Solo Furnace Creek 508 -- 1996!


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

* Re: Customize testers wanted
  1996-11-21 18:18               ` William Perry
@ 1996-11-22 17:29                 ` Per Abrahamsen
  1996-11-22 19:47                   ` Jens Lautenbacher
  1996-11-23 11:15                   ` Hrvoje Niksic
  0 siblings, 2 replies; 17+ messages in thread
From: Per Abrahamsen @ 1996-11-22 17:29 UTC (permalink / raw)



Thanks!  I'll add :size support for XEmacs to the next custom.el
version.  Here is the code:


(when (string-match "XEmacs" emacs-version)
  ;; Support for special XEmacs font attributes.
  (require 'font)

  (unless (fboundp 'face-font-name)
    (defun face-font-name (face &rest args)
      (apply 'face-font face args)))

  (defun set-face-font-size (face size &rest args)
    "Set the font of FACE to SIZE"
    (let* ((font (apply 'face-font-name face args))
	   (fontobj (font-create-object font)))
      (set-font-size fontobj size)
      (apply 'set-face-font face fontobj args)))

  (nconc custom-face-attributes
	 '((:size (editable-field :format "Size: %v" :value "pt")
		  set-face-font-size))))


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

* Re: Customize testers wanted
  1996-11-22 17:29                 ` Per Abrahamsen
@ 1996-11-22 19:47                   ` Jens Lautenbacher
  1996-11-22 20:41                     ` William Perry
  1996-11-23 16:38                     ` Per Abrahamsen
  1996-11-23 11:15                   ` Hrvoje Niksic
  1 sibling, 2 replies; 17+ messages in thread
From: Jens Lautenbacher @ 1996-11-22 19:47 UTC (permalink / raw)


>>>>> "Per" == Per Abrahamsen <abraham@dina.kvl.dk> writes:

    Per> Thanks!  I'll add :size support for XEmacs to the next
    Per> custom.el version.  Here is the code:


But one should also be able to enter the family (Helevetica, Courier etc)

	Jens


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

* Re: Customize testers wanted
  1996-11-22 19:47                   ` Jens Lautenbacher
@ 1996-11-22 20:41                     ` William Perry
  1996-11-23 16:38                     ` Per Abrahamsen
  1 sibling, 0 replies; 17+ messages in thread
From: William Perry @ 1996-11-22 20:41 UTC (permalink / raw)
  Cc: ding

Jens Lautenbacher writes:
>>>>>> "Per" == Per Abrahamsen <abraham@dina.kvl.dk> writes:
>
>    Per> Thanks!  I'll add :size support for XEmacs to the next
>    Per> custom.el version.  Here is the code:
>
>
>But one should also be able to enter the family (Helevetica, Courier etc)

  You should be able to specify everything about a font.  This would
probably best be done via a specific 'font' widget, that a 'face' widget
would have as one of its children.  I'm trying to clear some time this
weekend to work on Emacs-W3 and various related Emacs-things.  Will try to
at least sketch out how this might be done at that time.

-Bill P.


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

* Re: Customize testers wanted
  1996-11-22 17:29                 ` Per Abrahamsen
  1996-11-22 19:47                   ` Jens Lautenbacher
@ 1996-11-23 11:15                   ` Hrvoje Niksic
  1 sibling, 0 replies; 17+ messages in thread
From: Hrvoje Niksic @ 1996-11-23 11:15 UTC (permalink / raw)
  Cc: ding

Per Abrahamsen (abraham@dina.kvl.dk) wrote:
> Thanks!  I'll add :size support for XEmacs to the next custom.el
> version.  Here is the code:

Yohoo!  Great. :-)

-- 
Hrvoje Niksic <hniksic@srce.hr> | Hocemo 101-icu!
--------------------------------+--------------------------------
If a President doesn't do it to his wife, he'll do it to his country.


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

* Re: Customize testers wanted
  1996-11-22 19:47                   ` Jens Lautenbacher
  1996-11-22 20:41                     ` William Perry
@ 1996-11-23 16:38                     ` Per Abrahamsen
  1 sibling, 0 replies; 17+ messages in thread
From: Per Abrahamsen @ 1996-11-23 16:38 UTC (permalink / raw)


Jens Lautenbacher <jens@lemcbed.lem.uni-karlsruhe.de> writes:

> But one should also be able to enter the family (Helevetica, Courier etc)

Try the patch below.  However adding *all* the possible attributes is
going to be crowded.

Index: custom.el
===================================================================
RCS file: /home/user_22/abraham/cvs/custom/custom.el,v
retrieving revision 1.22
diff -c -r1.22 custom.el
*** 1.22	1996/11/22 17:59:39
--- custom.el	1996/11/23 14:31:05
***************
*** 380,387 ****
        (set-font-size fontobj size)
        (apply 'set-face-font face fontobj args)))
  
    (nconc custom-face-attributes
! 	 '((:size (editable-field :format "Size: %v")
  		  set-face-font-size))))
  
  (defun custom-face-attribites-set (face frame &rest atts)
--- 380,396 ----
        (set-font-size fontobj size)
        (apply 'set-face-font face fontobj args)))
  
+   (defun set-face-font-family (face family &rest args)
+     "Set the font of FACE to FAMILY"
+     (let* ((font (apply 'face-font-name face args))
+ 	   (fontobj (font-create-object font)))
+       (set-font-family fontobj family)
+       (apply 'set-face-font face fontobj args)))
+ 
    (nconc custom-face-attributes
! 	 '((:family (editable-field :format "Family: %v") 
! 		    set-face-font-family)
! 	   (:size (editable-field :format "Size: %v")
  		  set-face-font-size))))
  
  (defun custom-face-attribites-set (face frame &rest atts)


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

* Re: Customize testers wanted
  1996-11-20 15:04 Customize testers wanted Per Abrahamsen
  1996-11-20 20:03 ` Hrvoje Niksic
@ 1996-12-10 11:01 ` Ilya Zakharevich
  1 sibling, 0 replies; 17+ messages in thread
From: Ilya Zakharevich @ 1996-12-10 11:01 UTC (permalink / raw)
  Cc: ding, emacs-custom

Per Abrahamsen writes:
> 
> 
> Since
> 
> - Custom 1.0 is now released and bundled with Red Gnus 0.66.

I tried the latest version (2 hours ago on the Web site), and it still
does nothing for me.

I tried to use `customize' to customize `widget'. The interface still
stinks, (how am I supposed to interprete all these [!] and the colors
changing on the fly? Do you suppose that a user with many years of
experience would read the docs? Do you suppose that a user without
many years of experience would read the docs, btw? ;-)

Anyway, I could easily change the colors (except these "unactive"
buttons, like "Mode hook"). I pressed "Apply" and it did apply, I
pressed "Set default" and nothing happened (as I expected), I pressed
"Save" and it wrote "Writing ~/.emacs.custom" (as it should).

This is all. New copies of emacs do not have any customizations in
them, and the contents of ~/.emacs.custom is quite pityful:

(custom-set-variables
 '(custom-file "~/.emacs.custom"))
(custom-set-faces)

Is it how it is supposed to work? If yes, what is the point in the
package? It is OS/2 19.33.

My less important remarks: 
	[!], colors of [+], (A line at the top with 2-word
		explanations? Shown by default, switchable off?)
		(Or maybe just an entry "About" ("mini help"?) 
		before "emacs"?)
	Color of "dead buttons";
	There should be a [Quit] choice.

Best,
Ilya


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

end of thread, other threads:[~1996-12-10 11:01 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-11-20 15:04 Customize testers wanted Per Abrahamsen
1996-11-20 20:03 ` Hrvoje Niksic
1996-11-20 21:22   ` Sudish Joseph
1996-11-20 21:51   ` Hrvoje Niksic
1996-11-20 22:25     ` William Perry
1996-11-21  1:36       ` Per Abrahamsen
1996-11-21  3:33         ` Hrvoje Niksic
1996-11-21 15:20           ` William Perry
1996-11-21 15:55             ` Per Abrahamsen
1996-11-21 18:18               ` William Perry
1996-11-22 17:29                 ` Per Abrahamsen
1996-11-22 19:47                   ` Jens Lautenbacher
1996-11-22 20:41                     ` William Perry
1996-11-23 16:38                     ` Per Abrahamsen
1996-11-23 11:15                   ` Hrvoje Niksic
1996-11-21 18:34               ` David Moore
1996-12-10 11:01 ` Ilya Zakharevich

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 NNTP newsgroup(s).