Gnus development mailing list
 help / color / mirror / Atom feed
* The type of gnus-ignored-from-addresses
@ 2007-04-24 13:50 Didier Verna
  2007-04-24 23:49 ` Katsumi Yamaoka
  0 siblings, 1 reply; 8+ messages in thread
From: Didier Verna @ 2007-04-24 13:50 UTC (permalink / raw)
  To: Gnus Beta Testers


        Hi !

As I did some time ago for message-dont-reply-to-names, the type of
gnus-ignored-from-addresses can now be a list of regexps instead of just
one, which greatly improves its readability (and consequently its
maintenance).

-- 
Read the Jazz Blog !! http://jazzblog.didierverna.com

Didier Verna, didier@lrde.epita.fr, http://www.lrde.epita.fr/~didier

EPITA / LRDE, 14-16 rue Voltaire   Tel.+33 (1) 44 08 01 85
94276 Le Kremlin-Bicêtre, France   Fax.+33 (1) 53 14 59 22   didier@xemacs.org



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

* Re: The type of gnus-ignored-from-addresses
  2007-04-24 13:50 The type of gnus-ignored-from-addresses Didier Verna
@ 2007-04-24 23:49 ` Katsumi Yamaoka
  2007-04-25  7:21   ` Didier Verna
  0 siblings, 1 reply; 8+ messages in thread
From: Katsumi Yamaoka @ 2007-04-24 23:49 UTC (permalink / raw)
  To: ding

>>>>> In <muxfy6p3mpq.fsf@uzeb.lrde.epita.fr> Didier Verna wrote:

> As I did some time ago for message-dont-reply-to-names, the type of
> gnus-ignored-from-addresses can now be a list of regexps instead of just
> one, which greatly improves its readability (and consequently its
> maintenance).

Thanks for improving it.  But I think it is better not to load a
Gnus module (i.e., gnus-util.el) at all times since, in principle,
message.el is a module independent of Gnus.

In texi/gnus-coding.texi:
,----
| 1.1.5 message
|
| All message composition from Gnus (both mail and news) takes place in
| Message mode buffers.  Message mode is intended to be a replacement for
| Emacs mail mode.  There should be no Gnus dependencies in `message.el'.
`----

For instance, there might be those who use message.el without Gnus
but don't use it for replying.  Although many Gnus functions are
actually used there, they were all designed so as to be autoloaded.

Regards,



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

* Re: The type of gnus-ignored-from-addresses
  2007-04-24 23:49 ` Katsumi Yamaoka
@ 2007-04-25  7:21   ` Didier Verna
  2007-04-25  8:03     ` Katsumi Yamaoka
  2007-04-26 20:39     ` Reiner Steib
  0 siblings, 2 replies; 8+ messages in thread
From: Didier Verna @ 2007-04-25  7:21 UTC (permalink / raw)
  To: Katsumi Yamaoka; +Cc: ding

Katsumi Yamaoka <yamaoka@jpl.org> wrote:

> Thanks for improving it. But I think it is better not to load a Gnus
> module (i.e., gnus-util.el) at all times since, in principle,
> message.el is a module independent of Gnus.
>
> In texi/gnus-coding.texi:
> ,----
> | 1.1.5 message
> |
> | All message composition from Gnus (both mail and news) takes place in
> | Message mode buffers.  Message mode is intended to be a replacement for
> | Emacs mail mode.  There should be no Gnus dependencies in `message.el'.
> `----

        But gnus-util is a special case because it doesn't 'require any
other part of Gnus[1]; it's really a utility library.


> For instance, there might be those who use message.el without Gnus but
> don't use it for replying. Although many Gnus functions are actually
> used there, they were all designed so as to be autoloaded.

        Sorry, I don't understand this paragraph. Are you suggesting
that I put an autoload cookie on gnus-orify-regexp instead of requiring
gnus-util ? That would only merely delay the time of loading gnus-util.

Point is, I don't want to introduce redundancy for something needed both
in Gnus and in Message.



Footnotes: 
[1]  modulo some redundant defvar's at the top of it (a sign of bad
design at some point BTW)

-- 
Read the Jazz Blog !! http://jazzblog.didierverna.com

Didier Verna, didier@lrde.epita.fr, http://www.lrde.epita.fr/~didier

EPITA / LRDE, 14-16 rue Voltaire   Tel.+33 (1) 44 08 01 85
94276 Le Kremlin-Bicêtre, France   Fax.+33 (1) 53 14 59 22   didier@xemacs.org



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

* Re: The type of gnus-ignored-from-addresses
  2007-04-25  7:21   ` Didier Verna
@ 2007-04-25  8:03     ` Katsumi Yamaoka
  2007-04-25 10:04       ` Didier Verna
  2007-04-26 20:39     ` Reiner Steib
  1 sibling, 1 reply; 8+ messages in thread
From: Katsumi Yamaoka @ 2007-04-25  8:03 UTC (permalink / raw)
  To: ding

>>>>> In <muxy7kg2a33.fsf@uzeb.lrde.epita.fr> Didier Verna wrote:

> Katsumi Yamaoka <yamaoka@jpl.org> wrote:

>> Thanks for improving it. But I think it is better not to load a Gnus
>> module (i.e., gnus-util.el) at all times since, in principle,
>> message.el is a module independent of Gnus.
>>
>> In texi/gnus-coding.texi:
>> ,----
>>| 1.1.5 message
>>|
>>| All message composition from Gnus (both mail and news) takes place in
>>| Message mode buffers.  Message mode is intended to be a replacement for
>>| Emacs mail mode.  There should be no Gnus dependencies in `message.el'.
>> `----

>         But gnus-util is a special case because it doesn't 'require any
> other part of Gnus[1]; it's really a utility library.

I don't think so.

;;; gmm-utils.el --- Utility functions for Gnus, Message and MML
;;; gnus-util.el --- utility functions for Gnus
;;; mm-util.el --- Utility functions for Mule and low level things

>> For instance, there might be those who use message.el without Gnus but
>> don't use it for replying. Although many Gnus functions are actually
>> used there, they were all designed so as to be autoloaded.

>         Sorry, I don't understand this paragraph. Are you suggesting
> that I put an autoload cookie on gnus-orify-regexp instead of requiring
> gnus-util ? That would only merely delay the time of loading gnus-util.

No.  I'd suggest replacing `(require 'gnus-util)' with:

(eval-and-compile
  (autoload 'gnus-orify-regexp "gnus-util")
  )

The most suitable place to put it seems to be around the 1777th
line in message.el.  You will see a lot of autoloads there.

Regards,



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

* Re: The type of gnus-ignored-from-addresses
  2007-04-25  8:03     ` Katsumi Yamaoka
@ 2007-04-25 10:04       ` Didier Verna
  2007-04-25 11:10         ` Katsumi Yamaoka
  0 siblings, 1 reply; 8+ messages in thread
From: Didier Verna @ 2007-04-25 10:04 UTC (permalink / raw)
  To: Katsumi Yamaoka; +Cc: ding

Katsumi Yamaoka <yamaoka@jpl.org> wrote:

>>         But gnus-util is a special case because it doesn't 'require
>> any other part of Gnus[1]; it's really a utility library.
>
> I don't think so.
>
> ;;; gmm-utils.el --- Utility functions for Gnus, Message and MML
> ;;; gnus-util.el --- utility functions for Gnus
> ;;; mm-util.el --- Utility functions for Mule and low level things

        Again, you're not very clear. OK, so there are 3 special cases. 
Are you suggesting that gnus-orify-regexp would be better placed in
gmm-utils (since both Message and Gnus could use it) ?


>>         Sorry, I don't understand this paragraph. Are you suggesting
>> that I put an autoload cookie on gnus-orify-regexp instead of
>> requiring gnus-util ? That would only merely delay the time of
>> loading gnus-util.
>
> No.  I'd suggest replacing `(require 'gnus-util)' with:
>
> (eval-and-compile
>   (autoload 'gnus-orify-regexp "gnus-util")
>   )
>
> The most suitable place to put it seems to be around the 1777th
> line in message.el.  You will see a lot of autoloads there.

        I agree, but see above though.

-- 
Read the Jazz Blog !! http://jazzblog.didierverna.com

Didier Verna, didier@lrde.epita.fr, http://www.lrde.epita.fr/~didier

EPITA / LRDE, 14-16 rue Voltaire   Tel.+33 (1) 44 08 01 85
94276 Le Kremlin-Bicêtre, France   Fax.+33 (1) 53 14 59 22   didier@xemacs.org



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

* Re: The type of gnus-ignored-from-addresses
  2007-04-25 10:04       ` Didier Verna
@ 2007-04-25 11:10         ` Katsumi Yamaoka
  0 siblings, 0 replies; 8+ messages in thread
From: Katsumi Yamaoka @ 2007-04-25 11:10 UTC (permalink / raw)
  To: ding

>>>>> In <muxodlc22ic.fsf@uzeb.lrde.epita.fr> Didier Verna wrote:

> Katsumi Yamaoka <yamaoka@jpl.org> wrote:

>> ;;; gmm-utils.el --- Utility functions for Gnus, Message and MML
>> ;;; gnus-util.el --- utility functions for Gnus
>> ;;; mm-util.el --- Utility functions for Mule and low level things

>         Again, you're not very clear. OK, so there are 3 special cases.
> Are you suggesting that gnus-orify-regexp would be better placed in
> gmm-utils (since both Message and Gnus could use it) ?

I think that is the best, however we also have to consider
integrating of many other functions being scattered in
gnus-util.el and mm-util.el.  I mean integrating of
`gnus-replace-in-string' and `mm-replace-in-string' into
`gmm-replace-in-string', for example.

Although we had better do that sooner or later, probably it is
not time to do that now because it might make maintaining of No
Gnus and Gnus v5.11 difficult.

So, I will follow in the footsteps if I add a function which is
used by both Gnus and message.el now, since I think it is better
to do the integration at a time but very carefully in the future.

Regards,



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

* Re: The type of gnus-ignored-from-addresses
  2007-04-25  7:21   ` Didier Verna
  2007-04-25  8:03     ` Katsumi Yamaoka
@ 2007-04-26 20:39     ` Reiner Steib
  2007-04-27  4:00       ` Miles Bader
  1 sibling, 1 reply; 8+ messages in thread
From: Reiner Steib @ 2007-04-26 20:39 UTC (permalink / raw)
  To: ding

On Wed, Apr 25 2007, Didier Verna wrote:

>         Sorry, I don't understand this paragraph. Are you suggesting
> that I put an autoload cookie on gnus-orify-regexp instead of requiring
> gnus-util ? That would only merely delay the time of loading gnus-util.

Many of the autoloaded gnus-* functions in `message.el' are only
called when the user actually uses Gnus, not otherwise.

> Point is, I don't want to introduce redundancy for something needed both
> in Gnus and in Message.

Please put it in `gmm-utils.el' with a `gmm-' prefix.

Some remarks...

I had to read the source to figure out what "orify" could mean.  Maybe
we could find a more clear name.

The defsubst `gnus-ignored-from-addresses' should have a doc string.

I don't want to start another discussion about conventions, but...

,----
| 2007-04-24  Didier Verna  <didier@xemacs.org>
| 
| 	* gnus-util.el (gnus-orify-regexp): New function.
| 
| 	* message.el (gnus-util): Require it.
| 	(message-dont-reply-to-names): Use gnus-orify-regexp.
| 
| 	* gnus-sum.el (gnus-ignored-from-addresses): Allow a list of regexps.
| 	(gnus-ignored-from-addresses): New function.
| 
| 	* gnus-sum.el (gnus-summary-from-or-to-or-newsgroups): Use it.
|
| 	* gnus-sum.el, gnus-utils.el: Fix some trailing whitespaces.
`----

... is preferable to...

,----
| 2007-04-24  Didier Verna  <didier@xemacs.org>
| 
| 	Improve the type of gnus-ignored-from-addresses.
| 	* gnus-util.el (gnus-orify-regexp): New function.
| 	* message.el (gnus-util): Require it.
| 	* message.el (message-dont-reply-to-names): Use gnus-orify-regexp.
| 	* gnus-sum.el (gnus-ignored-from-addresses): New function.
| 	* gnus-sum.el (gnus-summary-from-or-to-or-newsgroups): Use it.
| 
| 2007-04-24  Didier Verna  <didier@xemacs.org>
| 
| 	* gnus-sum.el:
| 	* gnus-utils.el: Fix some trailing whitespaces.
`----

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




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

* Re: The type of gnus-ignored-from-addresses
  2007-04-26 20:39     ` Reiner Steib
@ 2007-04-27  4:00       ` Miles Bader
  0 siblings, 0 replies; 8+ messages in thread
From: Miles Bader @ 2007-04-27  4:00 UTC (permalink / raw)
  To: ding

Reiner Steib <reinersteib+gmane@imap.cc> writes:
> I don't want to start another discussion about conventions, but...
>
> | 	* gnus-util.el (gnus-orify-regexp): New function.
> | 
> | 	* message.el (gnus-util): Require it.
> | 	(message-dont-reply-to-names): Use gnus-orify-regexp.
>
> ... is preferable to...
>
> | 	Improve the type of gnus-ignored-from-addresses.
> | 	* gnus-util.el (gnus-orify-regexp): New function.
> | 	* message.el (gnus-util): Require it.

Is it?  I think it's often more readable if blank lines are reserved for
separating independent logical changes, which the above clearly aren't.

While too few blank lines can make things hard to read, too _many_ blank
lines can also hurt -- and at a glance I think Didier's entry is
actually a fair-bit more readable than your "better" example, simply
because it's more concise.

[I think it would be even better to use something in between, where the
related stuff was grouped, and the unrelated stuff was blank-line separated.]

-Miles
-- 
Everywhere is walking distance if you have the time.  -- Steven Wright




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

end of thread, other threads:[~2007-04-27  4:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-24 13:50 The type of gnus-ignored-from-addresses Didier Verna
2007-04-24 23:49 ` Katsumi Yamaoka
2007-04-25  7:21   ` Didier Verna
2007-04-25  8:03     ` Katsumi Yamaoka
2007-04-25 10:04       ` Didier Verna
2007-04-25 11:10         ` Katsumi Yamaoka
2007-04-26 20:39     ` Reiner Steib
2007-04-27  4:00       ` Miles Bader

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