Gnus development mailing list
 help / color / mirror / Atom feed
* Simplify code for tooltips in menus
@ 2004-01-01 13:54 Reiner Steib
  2004-01-02 19:45 ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 7+ messages in thread
From: Reiner Steib @ 2004-01-01 13:54 UTC (permalink / raw)


Hi,

when a menu entry has a tooltip (help echo) text, it is done in this
way:

,----[ gnus-sum.el ]
| 	   `(...
| 	      ["Rot 13" gnus-summary-caesar-message
| 	       ,@(if (featurep 'xemacs) '(t)
| 		   '(:help "\"Caesar rotate\" article by 13"))]
|             ...)
`----

Wouldn't the code be more readable (and easier to change if XEmacs
might support this too), if we'd use a utility function (or macro)?

,----[ gnus-sum.el ]
| 	   `(...
| 	      ["Rot 13" gnus-summary-caesar-message
| 	       ,@(gnus-help "\"Caesar rotate\" article by 13")]
|             ...)
`----

,----[ gnus-util.el ]
| (defmacro gnus-help (text)
|   `(if (featurep 'xemacs)
|        '(t)
|      '(:help ,text)))
`----

I'm not too familiar with the details of (macro) expansion.  Feel free
to suggest improvements.

This would also be useful for `message.el'.  Can (should) we use stuff
from `gnus-util.el' there?

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo--- PGP key available via WWW   http://rsteib.home.pages.de/




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

* Re: Simplify code for tooltips in menus
  2004-01-01 13:54 Simplify code for tooltips in menus Reiner Steib
@ 2004-01-02 19:45 ` Lars Magne Ingebrigtsen
  2004-01-02 21:04   ` Steve Youngs
  2004-01-05 14:58   ` Reiner Steib
  0 siblings, 2 replies; 7+ messages in thread
From: Lars Magne Ingebrigtsen @ 2004-01-02 19:45 UTC (permalink / raw)


Reiner Steib <4.uce.03.r.s@nurfuerspam.de> writes:

> Wouldn't the code be more readable (and easier to change if XEmacs
> might support this too), if we'd use a utility function (or macro)?

Yes, that'd be nice.

> This would also be useful for `message.el'.  Can (should) we use stuff
> from `gnus-util.el' there?

Preferably not.

But I've sometimes wished that there was a file in the Gnus
distribution that just had self-contained little helper functions and
macros (like this one).  misc.el or something.  h4x0r.el.  A
collection of functions that could be included anywhere without
worrying about requiring half the world...

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen




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

* Re: Simplify code for tooltips in menus
  2004-01-02 19:45 ` Lars Magne Ingebrigtsen
@ 2004-01-02 21:04   ` Steve Youngs
  2004-01-05 14:58   ` Reiner Steib
  1 sibling, 0 replies; 7+ messages in thread
From: Steve Youngs @ 2004-01-02 21:04 UTC (permalink / raw)
  Cc: XEmacs Beta, Stephen J. Turnbull

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

|--==> "LMI" == Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

  LMI> But I've sometimes wished that there was a file in the Gnus
  LMI> distribution that just had self-contained little helper
  LMI> functions and macros (like this one).  misc.el or something.
  LMI> h4x0r.el.  A collection of functions that could be included
  LMI> anywhere without worrying about requiring half the world...

There's been talk on the XEmacs lists of splitting the Gnus package
into a main package + 1 or more sub-packages [1].  That way, other
packages that have a small dependence on Gnus could require one or
more of these "sub-packages" instead of requiring the whole world and
half of the moon. [2] :-)


Footnotes: 
[1]  They'd be packages in their own right, I'm only calling them
     "sub-packages" to help get my point across.

[2]  Gnus is _bigger_ than the world!

-- 
|---<Steve Youngs>---------------<GnuPG KeyID: A94B3003>---|
|              Ashes to ashes, dust to dust.               |
|      The proof of the pudding, is under the crust.       |
|------------------------------<sryoungs@bigpond.net.au>---|

[-- Attachment #2: Type: application/pgp-signature, Size: 256 bytes --]

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

* Re: Simplify code for tooltips in menus
  2004-01-02 19:45 ` Lars Magne Ingebrigtsen
  2004-01-02 21:04   ` Steve Youngs
@ 2004-01-05 14:58   ` Reiner Steib
  2004-01-06  4:45     ` Lars Magne Ingebrigtsen
  1 sibling, 1 reply; 7+ messages in thread
From: Reiner Steib @ 2004-01-05 14:58 UTC (permalink / raw)


On Fri, Jan 02 2004, Lars Magne Ingebrigtsen wrote:

> Reiner Steib <4.uce.03.r.s@nurfuerspam.de> writes:

>> This would also be useful for `message.el'.  Can (should) we use stuff
>> from `gnus-util.el' there?
>
> Preferably not.
>
> But I've sometimes wished that there was a file in the Gnus
> distribution that just had self-contained little helper functions and
> macros (like this one).  misc.el or something.  h4x0r.el.

I think we should do this.  Could you suggest a name and kick-start it
(add to CVS, write something about its purpose [1])?

What about the name-space (package prefix)?  Should the helper
functions start with "gnus-"?  If not, it would be easier to find real
dependencies packages or libraries that are supposed to be independent
from Gnus, like `message.el', `mm-*.el', `mml-*.el', what-else?  But
OTOH, a different name-space would need a lot of renaming in the Gnus
code.

> A collection of functions that could be included anywhere without
> worrying about requiring half the world...

I'd like to add the proposed `gnus-help' and some (self-contained)
functions/macro from `gnus-utils' to that new file.

Is there a reason why there are no ";;;###autoload" statements in
`gnus-util.el'?  Wouldn't it be useful for the new proposed file?

Bye, Reiner.

[1] Similar to this:

,----
| ;;; gnus-util.el --- utility functions for Gnus
| [...]
| ;;; Commentary:
| 
| ;; Nothing in this file depends on any other parts of Gnus -- all
| ;; functions and macros in this file are utility functions that are
| ;; used by Gnus and may be used by any other package without loading
| ;; Gnus first.
| 
| ;; [Unfortunately, it does depend on other parts of Gnus, e.g. the
| ;; autoloads below...]
`----
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo--- PGP key available via WWW   http://rsteib.home.pages.de/




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

* Re: Simplify code for tooltips in menus
  2004-01-05 14:58   ` Reiner Steib
@ 2004-01-06  4:45     ` Lars Magne Ingebrigtsen
  2006-01-16 17:44       ` Small self-contained helper library for Gnus (was: Simplify code for tooltips in menus) Reiner Steib
  0 siblings, 1 reply; 7+ messages in thread
From: Lars Magne Ingebrigtsen @ 2004-01-06  4:45 UTC (permalink / raw)


Reiner Steib <4.uce.03.r.s@nurfuerspam.de> writes:

> I think we should do this.  Could you suggest a name and kick-start it
> (add to CVS, write something about its purpose [1])?
>
> What about the name-space (package prefix)?  Should the helper
> functions start with "gnus-"?  If not, it would be easier to find real
> dependencies packages or libraries that are supposed to be independent
> from Gnus, like `message.el', `mm-*.el', `mml-*.el', what-else?  But
> OTOH, a different name-space would need a lot of renaming in the Gnus
> code.

Let's see...  there's already a mm-util.el file, and a mail-utils.el
file...   How about nnutil.el?  Or how about just stuffing more of
these functions/macros into mm-util?  It looks like it only has
general utility functions and stuff, but quite a few compatibility
functions, too.  Which might or might not be a plus.

> Is there a reason why there are no ";;;###autoload" statements in
> `gnus-util.el'?  Wouldn't it be useful for the new proposed file?

Well, everything requires gnus-util.el, so there's really not much
point.  autoloads are mostly useful for functions from files that you
don't require.

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen




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

* Small self-contained helper library for Gnus (was: Simplify code for tooltips in menus)
  2004-01-06  4:45     ` Lars Magne Ingebrigtsen
@ 2006-01-16 17:44       ` Reiner Steib
  2006-01-20 21:51         ` Small self-contained helper library for Gnus Reiner Steib
  0 siblings, 1 reply; 7+ messages in thread
From: Reiner Steib @ 2006-01-16 17:44 UTC (permalink / raw)


On Tue, Jan 06 2004, Lars Magne Ingebrigtsen wrote:
               ^^^^
[ See http://thread.gmane.org/v9hdzfu64d.fsf%40marauder.physik.uni-ulm.de
  for the complete thread. ]

> Reiner Steib <4.uce.03.r.s@nurfuerspam.de> writes:

>> On Fri, Jan 02 2004, Lars Magne Ingebrigtsen wrote:
>>> But I've sometimes wished that there was a file in the Gnus
>>> distribution that just had self-contained little helper functions and
>>> macros (like this one).  misc.el or something.  h4x0r.el.

>> I think we should do this.  Could you suggest a name and kick-start it
>> (add to CVS, write something about its purpose [1])?
>>
>> What about the name-space (package prefix)?  Should the helper
>> functions start with "gnus-"?  If not, it would be easier to find real
>> dependencies packages or libraries that are supposed to be independent
>> from Gnus, like `message.el', `mm-*.el', `mml-*.el', what-else?  But
>> OTOH, a different name-space would need a lot of renaming in the Gnus
>> code.
>
> Let's see...  there's already a mm-util.el file, and a mail-utils.el
> file...   How about nnutil.el?  

AFAICS nn*.el is for Gnus back end functionality.

> Or how about just stuffing more of these functions/macros into
> mm-util?  It looks like it only has general utility functions and
> stuff, but quite a few compatibility functions, too.  Which might or
> might not be a plus.

I'd rather create a new small self-contained library.  Most of the
helper functions have nothing to do with MIME so it's not useful to
load additional MIME functions.

The name of the library and the prefix for functions and variables
should _not_ be "gnus-" (or "mm-", "nn-" or "message-").  This will
make it easier to detect real Gnus dependencies in the MIME library,
in Message or other parts of Gnus which are supposed to be independent
from Gnus (see texi/gnus-coding.texi).

I intend to install such a self-contained library within the next days
because I need it to improve the Gnus and Message toolbars.  I'm not
sure about the name and the prefix yet.  Maybe "gmu.el" --- Gnus,
Message/MIME Utils --- and "gmu-" as a prefix.  Are there any other
suggestions for the name and the prefix?  The prefix should be quite
short and not in use in other packages upto now.

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/




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

* Re: Small self-contained helper library for Gnus
  2006-01-16 17:44       ` Small self-contained helper library for Gnus (was: Simplify code for tooltips in menus) Reiner Steib
@ 2006-01-20 21:51         ` Reiner Steib
  0 siblings, 0 replies; 7+ messages in thread
From: Reiner Steib @ 2006-01-20 21:51 UTC (permalink / raw)


On Mon, Jan 16 2006, Reiner Steib wrote:

> I intend to install such a self-contained library within the next days
> because I need it to improve the Gnus and Message toolbars.  I'm not
> sure about the name and the prefix yet.  Maybe "gmu.el" --- Gnus,
> Message/MIME Utils --- and "gmu-" as a prefix.  Are there any other
> suggestions for the name and the prefix?  The prefix should be quite
> short and not in use in other packages upto now.

Committed to the trunk:

;;; gmm-utils.el --- Utility functions for Gnus, Message and MML
[...]
;;; Commentary:

;; This library provides self-contained utility functions.  The functions are
;; used in Gnus, Message and MML, but within this library there are no
;; dependencies on Gnus, Message, or MML or Gnus.

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/




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

end of thread, other threads:[~2006-01-20 21:51 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-01 13:54 Simplify code for tooltips in menus Reiner Steib
2004-01-02 19:45 ` Lars Magne Ingebrigtsen
2004-01-02 21:04   ` Steve Youngs
2004-01-05 14:58   ` Reiner Steib
2004-01-06  4:45     ` Lars Magne Ingebrigtsen
2006-01-16 17:44       ` Small self-contained helper library for Gnus (was: Simplify code for tooltips in menus) Reiner Steib
2006-01-20 21:51         ` Small self-contained helper library for Gnus Reiner Steib

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).