* Posting styles and negation of rules; proposal of new syntax
@ 2003-08-11 14:09 Karl Pflästerer
2003-08-13 17:06 ` Karl Pflästerer
2003-10-17 20:01 ` Lars Magne Ingebrigtsen
0 siblings, 2 replies; 24+ messages in thread
From: Karl Pflästerer @ 2003-08-11 14:09 UTC (permalink / raw)
[-- Attachment #1: Type: text/plain, Size: 3849 bytes --]
Hi,
the subject says nearly all but I will explain it a bit verbosely here
what I mean and why I think it's necessary.
Rational
========
Posting styles are a very powerful tool for Gnus newbies as well as
oldies; sometimes Gnus newbie implies also Emas Lisp newbie so it should
be possible to write most of the rules without any deeper knowledge of
Lisp. This is *not* true if you want to negate rules which are written
as regular expression to match against the groupname.
You could rewrite that rule as a Lisp form but that's pretty ugly and
clearly no alternative for someone who doesn't grok Lisp.
Solution
========
Therefore I propose an addition to the syntax of posting styles which
allows easy negation. I will show some possibilities which only differ
in the symbol which is used to indicate negation.
Here is an example for a posting style how it's written at the moment:
(setq posting-styles
'((".*"
(signature "Peace and happiness")
(organization "What me?"))
("^comp"
(signature "Death to everybody"))
("comp.emacs.i-love-it"
(organization "Emacs is it"))))
You needn't know Lisp to be able to write these rules. But how do you
say `all groups which do *not* start with comp'? With a regular
expression that's not possible in Emacs Lisp (no lookbehind assertions).
You could write an expression instead of the simple rule but I think an
simpler and IMO much more aesthetic solution exists.
(setq posting-styles
'((".*"
(signature "Peace and happiness")
(organization "What me?"))
((not "^comp")
(signature "Death to everybody"))
("comp.emacs.i-love-it"
(organization "Emacs is it"))))
Here I used `not' to indicate the negation but I will show that other
symbols are also possible and it's merely a matter of style which one to
use.
The negation is achieved with a simple macro.
(defmacro gnus-msg-unlorile (test &rest body)
"If TEST is t expands to \(unless BODY\) otherwise to \(while BODY\)."
`(if ,test
(unless ,@body)
(when ,@body)))
That macro allows us to write a test and depending on that test the
macro expands to `unless' or `while'.
The test could be like that:
(when (and (consp match) (eq (car match) 'not))
(setq match (cadr match)))
`match' is in the function `gnus-configure-posting-styles' the element
which is used to see if a posting style entry should be used. So we
look here at the car of our rule if it's eq to some symbol (which one is
a matter of taste) we take the cadr of the rule as new match and the
macro expands to
(unless <match>
do_something)
So we have a negation of our match.
I think the new syntax is pretty simple and makes posting styles even
more powerfull.
Now to the possibilities for the symbol. There are some which come to
mind. I will list them up with some comments of mine.
(a) `(not <match>'
This is one of the first thoughts one could have if you think about
negation. The advantage is it is well known and naturally to write.
Existing rules (which can also be forms) will not be affected since
the expansion would be sematically equal.
(b) `(~ <match>'
This comes also to mind. The advantage is that from logic
expressions that symbol may be known to some as sign of complement.
You hopefully won't look at the whole rule and mistakenly believe it
to be a `normal' Lisp expression (like with `not').
(c) `(! <match>'
The same holds true for that symbol. People who programmed a bit in
languages like C will know.
The attached patch which is for testing only uses `not'.
I know that at the moment whe have a feature freeze but as it is quite
silent at the moment here I think now we have the time to discuss and
try it out.
If others also think the solution is worth to be added I would write
also something for the manual.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: gnus-msg.el.patch --]
[-- Type: text/x-patch, Size: 8192 bytes --]
Index: gnus-msg.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/gnus-msg.el,v
retrieving revision 6.137
diff -u -r6.137 gnus-msg.el
--- gnus-msg.el 9 Jul 2003 16:00:07 -0000 6.137
+++ gnus-msg.el 11 Aug 2003 14:15:45 -0000
@@ -1815,6 +1815,12 @@
;;; Posting styles.
+(defmacro gnus-msg-unlorile (test &rest body)
+ "If TEST is t expands to \(unless BODY\) otherwise to \(while BODY\)."
+ `(if ,test
+ (unless ,@body)
+ (when ,@body)))
+
(defun gnus-configure-posting-styles (&optional group-name)
"Configure posting styles according to `gnus-posting-styles'."
(unless gnus-inhibit-posting-styles
@@ -1833,82 +1839,85 @@
(dolist (style styles)
(setq match (pop style))
(goto-char (point-min))
- (when (cond
- ((stringp match)
- ;; Regexp string match on the group name.
- (string-match match group))
- ((eq match 'header)
- ;; Obsolete format of header match.
- (and (gnus-buffer-live-p gnus-article-copy)
- (with-current-buffer gnus-article-copy
- (let ((header (message-fetch-field (pop style))))
- (and header
- (string-match (pop style) header))))))
- ((or (symbolp match)
- (functionp match))
- (cond
- ((functionp match)
- ;; Function to be called.
- (funcall match))
- ((boundp match)
- ;; Variable to be checked.
- (symbol-value match))))
- ((listp match)
- (cond
- ((eq (car match) 'header)
- ;; New format of header match.
- (and (gnus-buffer-live-p gnus-article-copy)
- (with-current-buffer gnus-article-copy
- (let ((header (message-fetch-field (nth 1 match))))
- (and header
- (string-match (nth 2 match) header))))))
- (t
- ;; This is a form to be evaled.
- (eval match)))))
- ;; We have a match, so we set the variables.
- (dolist (attribute style)
- (setq element (pop attribute)
- filep nil)
- (setq value
- (cond
- ((eq (car attribute) :file)
- (setq filep t)
- (cadr attribute))
- ((eq (car attribute) :value)
- (cadr attribute))
- (t
- (car attribute))))
- ;; We get the value.
- (setq v
- (cond
- ((stringp value)
- value)
- ((or (symbolp value)
- (functionp value))
- (cond ((functionp value)
- (funcall value))
- ((boundp value)
- (symbol-value value))))
- ((listp value)
- (eval value))))
- ;; Translate obsolescent value.
- (cond
+ (gnus-msg-unlorile
+ (when (and (consp match) (eq (car match) 'not))
+ (setq match (cadr match)))
+ (cond
+ ((stringp match)
+ ;; Regexp string match on the group name.
+ (string-match match group))
+ ((eq match 'header)
+ ;; Obsolete format of header match.
+ (and (gnus-buffer-live-p gnus-article-copy)
+ (with-current-buffer gnus-article-copy
+ (let ((header (message-fetch-field (pop style))))
+ (and header
+ (string-match (pop style) header))))))
+ ((or (symbolp match)
+ (functionp match))
+ (cond
+ ((functionp match)
+ ;; Function to be called.
+ (funcall match))
+ ((boundp match)
+ ;; Variable to be checked.
+ (symbol-value match))))
+ ((listp match)
+ (cond
+ ((eq (car match) 'header)
+ ;; New format of header match.
+ (and (gnus-buffer-live-p gnus-article-copy)
+ (with-current-buffer gnus-article-copy
+ (let ((header (message-fetch-field (nth 1 match))))
+ (and header
+ (string-match (nth 2 match) header))))))
+ (t
+ ;; This is a form to be evaled.
+ (eval match)))))
+ ;; We have a match, so we set the variables.
+ (dolist (attribute style)
+ (setq element (pop attribute)
+ filep nil)
+ (setq value
+ (cond
+ ((eq (car attribute) :file)
+ (setq filep t)
+ (cadr attribute))
+ ((eq (car attribute) :value)
+ (cadr attribute))
+ (t
+ (car attribute))))
+ ;; We get the value.
+ (setq v
+ (cond
+ ((stringp value)
+ value)
+ ((or (symbolp value)
+ (functionp value))
+ (cond ((functionp value)
+ (funcall value))
+ ((boundp value)
+ (symbol-value value))))
+ ((listp value)
+ (eval value))))
+ ;; Translate obsolescent value.
+ (cond
((eq element 'signature-file)
- (setq element 'signature
- filep t))
+ (setq element 'signature
+ filep t))
((eq element 'x-face-file)
- (setq element 'x-face
- filep t)))
- ;; Get the contents of file elems.
- (when (and filep v)
- (setq v (with-temp-buffer
- (insert-file-contents v)
- (goto-char (point-max))
- (while (bolp)
- (delete-char -1))
- (buffer-string))))
- (setq results (delq (assoc element results) results))
- (push (cons element v) results))))
+ (setq element 'x-face
+ filep t)))
+ ;; Get the contents of file elems.
+ (when (and filep v)
+ (setq v (with-temp-buffer
+ (insert-file-contents v)
+ (goto-char (point-max))
+ (while (bolp)
+ (delete-char -1))
+ (buffer-string))))
+ (setq results (delq (assoc element results) results))
+ (push (cons element v) results))))
;; Now we have all the styles, so we insert them.
(setq name (assq 'name results)
address (assq 'address results))
@@ -1919,50 +1928,50 @@
(dolist (result results)
(add-hook 'message-setup-hook
(cond
- ((eq 'eval (car result))
- 'ignore)
- ((eq 'body (car result))
- `(lambda ()
- (save-excursion
- (message-goto-body)
- (insert ,(cdr result)))))
- ((eq 'signature (car result))
- (set (make-local-variable 'message-signature) nil)
- (set (make-local-variable 'message-signature-file) nil)
- (if (not (cdr result))
- 'ignore
+ ((eq 'eval (car result))
+ 'ignore)
+ ((eq 'body (car result))
`(lambda ()
- (save-excursion
- (let ((message-signature ,(cdr result)))
- (when message-signature
- (message-insert-signature)))))))
- (t
- (let ((header
- (if (symbolp (car result))
- (capitalize (symbol-name (car result)))
- (car result))))
- `(lambda ()
- (save-excursion
- (message-remove-header ,header)
- (let ((value ,(cdr result)))
- (when value
- (message-goto-eoh)
- (insert ,header ": " value)
- (unless (bolp)
- (insert "\n")))))))))
+ (save-excursion
+ (message-goto-body)
+ (insert ,(cdr result)))))
+ ((eq 'signature (car result))
+ (set (make-local-variable 'message-signature) nil)
+ (set (make-local-variable 'message-signature-file) nil)
+ (if (not (cdr result))
+ 'ignore
+ `(lambda ()
+ (save-excursion
+ (let ((message-signature ,(cdr result)))
+ (when message-signature
+ (message-insert-signature)))))))
+ (t
+ (let ((header
+ (if (symbolp (car result))
+ (capitalize (symbol-name (car result)))
+ (car result))))
+ `(lambda ()
+ (save-excursion
+ (message-remove-header ,header)
+ (let ((value ,(cdr result)))
+ (when value
+ (message-goto-eoh)
+ (insert ,header ": " value)
+ (unless (bolp)
+ (insert "\n")))))))))
nil 'local))
(when (or name address)
(add-hook 'message-setup-hook
`(lambda ()
- (set (make-local-variable 'user-mail-address)
- ,(or (cdr address) user-mail-address))
- (let ((user-full-name ,(or (cdr name) (user-full-name)))
- (user-mail-address
+ (set (make-local-variable 'user-mail-address)
+ ,(or (cdr address) user-mail-address))
+ (let ((user-full-name ,(or (cdr name) (user-full-name)))
+ (user-mail-address
,(or (cdr address) user-mail-address)))
- (save-excursion
- (message-remove-header "From")
- (message-goto-eoh)
- (insert "From: " (message-make-from) "\n"))))
+ (save-excursion
+ (message-remove-header "From")
+ (message-goto-eoh)
+ (insert "From: " (message-make-from) "\n"))))
nil 'local)))))
;;; Allow redefinition of functions.
[-- Attachment #3: Type: text/plain, Size: 181 bytes --]
KP
--
"Programs must be written for people to read, and only incidentally
for machines to execute."
-- Abelson & Sussman, SICP (preface to the first edition)
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: Posting styles and negation of rules; proposal of new syntax
2003-08-11 14:09 Posting styles and negation of rules; proposal of new syntax Karl Pflästerer
@ 2003-08-13 17:06 ` Karl Pflästerer
2003-08-13 17:48 ` Reiner Steib
` (2 more replies)
2003-10-17 20:01 ` Lars Magne Ingebrigtsen
1 sibling, 3 replies; 24+ messages in thread
From: Karl Pflästerer @ 2003-08-13 17:06 UTC (permalink / raw)
On 11 Aug 2003, Karl Pflästerer <- sigurd@12move.de wrote:
[a lot]
So I see there is absolutely no interest in such a functionality.
KP
--
The difference between a child and a hacker is the amount he flames about
his toys.
-- Ed Schwalenberg
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: Posting styles and negation of rules; proposal of new syntax
2003-08-13 17:06 ` Karl Pflästerer
@ 2003-08-13 17:48 ` Reiner Steib
2003-08-13 18:35 ` Simon Josefsson
2003-08-14 6:47 ` Xavier Maillard
2 siblings, 0 replies; 24+ messages in thread
From: Reiner Steib @ 2003-08-13 17:48 UTC (permalink / raw)
On Wed, Aug 13 2003, Karl Pflästerer wrote:
> On 11 Aug 2003, Karl Pflästerer <- sigurd@12move.de wrote:
> [a lot]
> So I see there is absolutely no interest in such a functionality.
NACK. I suspect that Gnus feature freeze, vacation time and the
extraordinary heat in Europe are some of the reasons. Please give
people more time... ;-)
I think that this new functionality is very useful (you already know,
from dcsg, the German Gnus group). Thanks for your suggestion and the
implementation! I applied the patch against my local copy of
`gnus-msg.el'. In case of any problems, I will speak up.
FWIW: I'd prefer the `not' syntax:
| (a) `(not <match>'
Bye, Reiner.
--
,,,
(o o)
---ooO-(_)-Ooo--- PGP key available via WWW http://rsteib.home.pages.de/
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: Posting styles and negation of rules; proposal of new syntax
2003-08-13 17:06 ` Karl Pflästerer
2003-08-13 17:48 ` Reiner Steib
@ 2003-08-13 18:35 ` Simon Josefsson
2003-08-13 20:19 ` Karl Pflästerer
` (2 more replies)
2003-08-14 6:47 ` Xavier Maillard
2 siblings, 3 replies; 24+ messages in thread
From: Simon Josefsson @ 2003-08-13 18:35 UTC (permalink / raw)
sigurd@12move.de (Karl Pflästerer) writes:
> On 11 Aug 2003, Karl Pflästerer <- sigurd@12move.de wrote:
>
> [a lot]
>
> So I see there is absolutely no interest in such a functionality.
What I'm missing is a reason NOT to install it. Is there any? It's
not backwards compatible in any way, is it? I vote for installing it
(when the, err, feature heat is over). I also prefer "not" as the
mnemonic; I don't recall seeing ! or ~ used as logical negation in
elisp related situations.
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: Posting styles and negation of rules; proposal of new syntax
2003-08-13 18:35 ` Simon Josefsson
@ 2003-08-13 20:19 ` Karl Pflästerer
2003-08-13 21:21 ` Simon Josefsson
2003-08-14 6:46 ` Xavier Maillard
2003-08-13 20:28 ` Ted Zlatanov
2003-08-13 20:31 ` lawrence mitchell
2 siblings, 2 replies; 24+ messages in thread
From: Karl Pflästerer @ 2003-08-13 20:19 UTC (permalink / raw)
On 13 Aug 2003, Simon Josefsson <- jas@extundo.com wrote:
> sigurd@12move.de (Karl Pflästerer) writes:
>> On 11 Aug 2003, Karl Pflästerer <- sigurd@12move.de wrote:
>> [a lot]
>> So I see there is absolutely no interest in such a functionality.
> What I'm missing is a reason NOT to install it. Is there any? It's
IMO (well I'm a bit biased) there is none.
> not backwards compatible in any way, is it? I vote for installing it
You mean backwards incompatible? Or do we mean the same? There is
(there should be) absolutely no problem. It's only a new feature but
changes nothing in the meaning of existing rules.
> (when the, err, feature heat is over). I also prefer "not" as the
> mnemonic; I don't recall seeing ! or ~ used as logical negation in
> elisp related situations.
Fine. It's only a matter of tase. So at the moment we have 2 votes for
`not' (Reiner's and yours). I also prefer `not' but from me only a half
vote :-)
KP
--
The difference between a child and a hacker is the amount he flames about
his toys.
-- Ed Schwalenberg
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: Posting styles and negation of rules; proposal of new syntax
2003-08-13 20:19 ` Karl Pflästerer
@ 2003-08-13 21:21 ` Simon Josefsson
2003-08-14 6:46 ` Xavier Maillard
1 sibling, 0 replies; 24+ messages in thread
From: Simon Josefsson @ 2003-08-13 21:21 UTC (permalink / raw)
sigurd@12move.de (Karl Pflästerer) writes:
>> not backwards compatible in any way, is it? I vote for installing it
>
> You mean backwards incompatible?
Yes, sorry.
> Or do we mean the same? There is (there should be) absolutely no
> problem. It's only a new feature but changes nothing in the meaning
> of existing rules.
Good. I guess adding a manual patch too would be even better.
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: Posting styles and negation of rules; proposal of new syntax
2003-08-13 20:19 ` Karl Pflästerer
2003-08-13 21:21 ` Simon Josefsson
@ 2003-08-14 6:46 ` Xavier Maillard
1 sibling, 0 replies; 24+ messages in thread
From: Xavier Maillard @ 2003-08-14 6:46 UTC (permalink / raw)
[-- Attachment #1: Type: text/plain, Size: 1433 bytes --]
Karl Pflästerer <sigurd@12move.de> writes:
On 13 Aug 2003, Simon Josefsson <- jas@extundo.com wrote:
>
> > sigurd@12move.de (Karl Pflästerer) writes:
>
> > > On 11 Aug 2003, Karl Pflästerer <- sigurd@12move.de wrote:
>
> > > [a lot]
>
> > > So I see there is absolutely no interest in such a functionality.
>
> > What I'm missing is a reason NOT to install it. Is there any?
> > It's
>
> IMO (well I'm a bit biased) there is none.
> > not backwards compatible in any way, is it? I vote for installing
> > it
>
> You mean backwards incompatible? Or do we mean the same? There is
> (there should be) absolutely no problem. It's only a new feature but
> changes nothing in the meaning of existing rules.
>
> > (when the, err, feature heat is over). I also prefer "not" as the
> > mnemonic; I don't recall seeing ! or ~ used as logical negation in
> > elisp related situations.
>
> Fine. It's only a matter of tase. So at the moment we have 2 votes
> for `not' (Reiner's and yours). I also prefer `not' but from me only
> a half vote :-)
Do you need more votes ?? :) If yes, take mine. BTW this patch is
awesome and I definetely recommend people to give it a try :p
Now my rules are a bit cleaner :p
zeDek
--
"Sie werden lachen, ich kann überhaupt nicht lesen."
Revisionist Manfred Koch erlaeutert die Probleme der
Ewiggestrigen in dsp*
[-- Attachment #2: Type: application/pgp-signature, Size: 188 bytes --]
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: Posting styles and negation of rules; proposal of new syntax
2003-08-13 18:35 ` Simon Josefsson
2003-08-13 20:19 ` Karl Pflästerer
@ 2003-08-13 20:28 ` Ted Zlatanov
2003-08-13 20:31 ` lawrence mitchell
2 siblings, 0 replies; 24+ messages in thread
From: Ted Zlatanov @ 2003-08-13 20:28 UTC (permalink / raw)
On Wed, 13 Aug 2003, jas@extundo.com wrote:
> sigurd@12move.de (Karl Pflästerer) writes:
>
>> On 11 Aug 2003, Karl Pflästerer <- sigurd@12move.de wrote:
>>
>> [a lot]
>>
>> So I see there is absolutely no interest in such a functionality.
>
> What I'm missing is a reason NOT to install it. Is there any? It's
> not backwards compatible in any way, is it? I vote for installing
> it (when the, err, feature heat is over). I also prefer "not" as
> the mnemonic; I don't recall seeing ! or ~ used as logical negation
> in elisp related situations.
I was thinking that maybe gnus-parameters and all the variables and
parameters defined through gnus-define-group-parameter should take
some sort of "not" notation. It won't necessarily be available
through the user-visible customization page, but those who know Lisp
can go in and modify it to suit them. I have no idea how complex this
would be, but it does seem like some redundant code could be
eliminated, and cool functionality could be added, if a general
parsing approach was taken to all the various parameters and settings.
Ted
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: Posting styles and negation of rules; proposal of new syntax
2003-08-13 18:35 ` Simon Josefsson
2003-08-13 20:19 ` Karl Pflästerer
2003-08-13 20:28 ` Ted Zlatanov
@ 2003-08-13 20:31 ` lawrence mitchell
2003-08-14 6:45 ` Xavier Maillard
2 siblings, 1 reply; 24+ messages in thread
From: lawrence mitchell @ 2003-08-13 20:31 UTC (permalink / raw)
Simon Josefsson wrote:
[...]
> What I'm missing is a reason NOT to install it. Is there any? It's
> not backwards compatible in any way, is it? I vote for installing it
> (when the, err, feature heat is over). I also prefer "not" as the
> mnemonic; I don't recall seeing ! or ~ used as logical negation in
> elisp related situations.
The Gnus score file format uses it, but that's about all.
While we're at it, what do people think of being able to name
posting styles, and being able to choose them by name?
--
lawrence mitchell <s0198183+ding@sms.ed.ac.uk>
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: Posting styles and negation of rules; proposal of new syntax
2003-08-13 20:31 ` lawrence mitchell
@ 2003-08-14 6:45 ` Xavier Maillard
2003-08-15 16:01 ` David S Goldberg
0 siblings, 1 reply; 24+ messages in thread
From: Xavier Maillard @ 2003-08-14 6:45 UTC (permalink / raw)
[-- Attachment #1: Type: text/plain, Size: 803 bytes --]
lawrence mitchell <s0198183+ding@sms.ed.ac.uk> writes:
Simon Josefsson wrote:
>
> [...]
>
> > What I'm missing is a reason NOT to install it. Is there any?
> > It's not backwards compatible in any way, is it? I vote for
> > installing it (when the, err, feature heat is over). I also prefer
> > "not" as the mnemonic; I don't recall seeing ! or ~ used as
> > logical negation in elisp related situations.
>
> The Gnus score file format uses it, but that's about all.
>
> While we're at it, what do people think of being able to name
> posting styles, and being able to choose them by name?
\o\ \o/ /o/ I vote for ! Definetely a good idea
zeDek
--
Heh. How about this one: "make UNIX usable for normal people". Nobody
has done that before. Linus
[-- Attachment #2: Type: application/pgp-signature, Size: 188 bytes --]
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: Posting styles and negation of rules; proposal of new syntax
2003-08-14 6:45 ` Xavier Maillard
@ 2003-08-15 16:01 ` David S Goldberg
2003-08-15 18:35 ` Xavier Maillard
0 siblings, 1 reply; 24+ messages in thread
From: David S Goldberg @ 2003-08-15 16:01 UTC (permalink / raw)
>> While we're at it, what do people think of being able to name
>> posting styles, and being able to choose them by name?
This would be particularly sweet if one could make that choice
interactively, maybe even after the message buffer has been generated,
though prior would probably be good enough. I've actually tried to
accomplish this by deleting the headers and signature, saving any
message composition and attachments to a register and attempting to
run something like (this is from memory so I've probably got some
names wrong here; this is pseudo code)
(let ((gnus-posting-styles '(list (car gnus-posting-styles)))
(gnus-configure-posting-styles)))
And then restoring from registers as needed. I've had almost no
success with it, though and haven't had time to further develop it.
The reason I'd like the capability is: occasionally I'm in a group
with, say a "personal" posting style and want to forward a message to
a colleague. I want that message to go out with my "work" posting
style applied. Right now I have to attempt something like the above
or, more likely, munge the headers by hand.
--
Dave Goldberg
david.goldberg6@verizon.net
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: Posting styles and negation of rules; proposal of new syntax
2003-08-15 16:01 ` David S Goldberg
@ 2003-08-15 18:35 ` Xavier Maillard
2003-08-16 0:05 ` Alex Schroeder
2003-08-19 17:33 ` lawrence mitchell
0 siblings, 2 replies; 24+ messages in thread
From: Xavier Maillard @ 2003-08-15 18:35 UTC (permalink / raw)
Cc: The Gnus Mailing List
[-- Attachment #1: Type: text/plain, Size: 1582 bytes --]
David S. Goldberg <david.goldberg6@verizon.net> writes:
> > > While we're at it, what do people think of being able to name
> > > posting styles, and being able to choose them by name?
>
> This would be particularly sweet if one could make that choice
> interactively, maybe even after the message buffer has been
> generated, though prior would probably be good enough. I've actually
> tried to accomplish this by deleting the headers and signature,
> saving any message composition and attachments to a register and
> attempting to run something like (this is from memory so I've
> probably got some names wrong here; this is pseudo code)
>
> (let ((gnus-posting-styles '(list (car gnus-posting-styles)))
> (gnus-configure-posting-styles)))
>
> And then restoring from registers as needed. I've had almost no
> success with it, though and haven't had time to further develop it.
>
> The reason I'd like the capability is: occasionally I'm in a group
> with, say a "personal" posting style and want to forward a message to
> a colleague. I want that message to go out with my "work" posting
> style applied. Right now I have to attempt something like the above
> or, more likely, munge the headers by hand.
This is actually, exactly the same situation I would like to have named
posting-styles. I have tried a few times ago to develop something
closed to it but gave up facing lack of time.
zeDek
--
We've seen the restless children at the head of the columns
Come to purify the future with the arrogance of youth
[-- Attachment #2: Type: application/pgp-signature, Size: 188 bytes --]
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: Posting styles and negation of rules; proposal of new syntax
2003-08-15 18:35 ` Xavier Maillard
@ 2003-08-16 0:05 ` Alex Schroeder
2003-08-18 22:27 ` Xavier Maillard
2003-08-19 17:33 ` lawrence mitchell
1 sibling, 1 reply; 24+ messages in thread
From: Alex Schroeder @ 2003-08-16 0:05 UTC (permalink / raw)
Cc: bilko
> David S. Goldberg <david.goldberg6@verizon.net> writes:
>
>> This would be particularly sweet if one could make that choice
>> interactively, maybe even after the message buffer has been
>> generated...
Xavier Maillard <zedek@gnu-rox.org> writes:
> This is actually, exactly the same situation I would like to have named
> posting-styles. I have tried a few times ago to develop something
> closed to it but gave up facing lack of time.
http://www.comsecmilnavpac.net/elisp/ has a package called
gnus-pers.el which does this. Maybe we should make it part of Gnus?
Alex.
--
http://www.emacswiki.org/alex/
There is no substitute for experience.
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: Posting styles and negation of rules; proposal of new syntax
2003-08-15 18:35 ` Xavier Maillard
2003-08-16 0:05 ` Alex Schroeder
@ 2003-08-19 17:33 ` lawrence mitchell
1 sibling, 0 replies; 24+ messages in thread
From: lawrence mitchell @ 2003-08-19 17:33 UTC (permalink / raw)
Xavier Maillard wrote:
[...] Named posting styles
> This is actually, exactly the same situation I would like to have named
> posting-styles. I have tried a few times ago to develop something
> closed to it but gave up facing lack of time.
I'm away from home at the moment, but, when I'm back (this may be
a while, maybe a month or so), I shall try and dig up the patches
that I had, and make them applicable to the latest Gnus.
The advantage of this over the existing packages (gnus-pers and
gnus-alias) is that it's backward compatible with older Gnusae
(and their configuration), meaning that you don't have to try and
learn a new posting style syntax.
--
lawrence mitchell <s0198183+ding@sms.ed.ac.uk>
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: Posting styles and negation of rules; proposal of new syntax
2003-08-13 17:06 ` Karl Pflästerer
2003-08-13 17:48 ` Reiner Steib
2003-08-13 18:35 ` Simon Josefsson
@ 2003-08-14 6:47 ` Xavier Maillard
2 siblings, 0 replies; 24+ messages in thread
From: Xavier Maillard @ 2003-08-14 6:47 UTC (permalink / raw)
[-- Attachment #1: Type: text/plain, Size: 408 bytes --]
Karl Pflästerer <sigurd@12move.de> writes:
On 11 Aug 2003, Karl Pflästerer <- sigurd@12move.de wrote:
>
> [a lot]
>
> So I see there is absolutely no interest in such a functionality.
Hug ?? There *IS* interest at least to me :p
zeDek
--
"hallo erfolglose emanze, wenn du unbefriedigt bist, dann lese 'dein
wixword' und lass andere leute in ruh ..." "herman" <herman@netway.at>
[-- Attachment #2: Type: application/pgp-signature, Size: 188 bytes --]
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: Posting styles and negation of rules; proposal of new syntax
2003-08-11 14:09 Posting styles and negation of rules; proposal of new syntax Karl Pflästerer
2003-08-13 17:06 ` Karl Pflästerer
@ 2003-10-17 20:01 ` Lars Magne Ingebrigtsen
2003-10-19 0:58 ` Karl Pflästerer
1 sibling, 1 reply; 24+ messages in thread
From: Lars Magne Ingebrigtsen @ 2003-10-17 20:01 UTC (permalink / raw)
sigurd@12move.de (Karl Pflästerer) writes:
> ((not "^comp")
> (signature "Death to everybody"))
Hey, nice. Do you have copyright assignment papers on file with the
FSF?
> If others also think the solution is worth to be added I would write
> also something for the manual.
That would be good.
--
(domestic pets only, the antidote for overdose, milk.)
larsi@gnus.org * Lars Magne Ingebrigtsen
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: Posting styles and negation of rules; proposal of new syntax
2003-10-17 20:01 ` Lars Magne Ingebrigtsen
@ 2003-10-19 0:58 ` Karl Pflästerer
2003-10-19 11:22 ` Lars Magne Ingebrigtsen
2004-01-05 13:15 ` Reiner Steib
0 siblings, 2 replies; 24+ messages in thread
From: Karl Pflästerer @ 2003-10-19 0:58 UTC (permalink / raw)
On 17 Oct 2003, Lars Magne Ingebrigtsen <- larsi@gnus.org wrote:
> sigurd@12move.de (Karl Pflästerer) writes:
>> ((not "^comp")
>> (signature "Death to everybody"))
> Hey, nice. Do you have copyright assignment papers on file with the
> FSF?
Yes. I signed them exactly because of that some weeks ago.
>> If others also think the solution is worth to be added I would write
>> also something for the manual.
> That would be good.
So I'll wait till No Gnus starts and then I will send a diff against
the actual libs.
KP
--
"Lisp is worth learning for the profound enlightenment experience you
will have when you finally get it; that experience will make you a
better programmer for the rest of your days, even if you never
actually use Lisp itself a lot." -- Eric S. Raymond
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: Posting styles and negation of rules; proposal of new syntax
2003-10-19 0:58 ` Karl Pflästerer
@ 2003-10-19 11:22 ` Lars Magne Ingebrigtsen
2004-01-05 13:15 ` Reiner Steib
1 sibling, 0 replies; 24+ messages in thread
From: Lars Magne Ingebrigtsen @ 2003-10-19 11:22 UTC (permalink / raw)
sigurd@12move.de (Karl Pflästerer) writes:
> So I'll wait till No Gnus starts and then I will send a diff against
> the actual libs.
Great.
--
(domestic pets only, the antidote for overdose, milk.)
larsi@gnus.org * Lars Magne Ingebrigtsen
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: Posting styles and negation of rules; proposal of new syntax
2003-10-19 0:58 ` Karl Pflästerer
2003-10-19 11:22 ` Lars Magne Ingebrigtsen
@ 2004-01-05 13:15 ` Reiner Steib
2004-01-05 22:20 ` Karl Pflästerer
1 sibling, 1 reply; 24+ messages in thread
From: Reiner Steib @ 2004-01-05 13:15 UTC (permalink / raw)
On Sun, Oct 19 2003, Karl Pflästerer wrote:
> On 17 Oct 2003, Lars Magne Ingebrigtsen <- larsi@gnus.org wrote:
>> sigurd@12move.de (Karl Pflästerer) writes:
>
>>> ((not "^comp")
>>> (signature "Death to everybody"))
>
>> Hey, nice. Do you have copyright assignment papers on file with the
>> FSF?
>
> Yes. I signed them exactly because of that some weeks ago.
>
>>> If others also think the solution is worth to be added I would write
>>> also something for the manual.
>
>> That would be good.
>
> So I'll wait till No Gnus starts and then I will send a diff against
> the actual libs.
Karl, the patch still applies cleanly to the current version. Do you
already have a modified one or is it okay to apply the old? How about
patches for the manual and to "New Features" (gnus.texi and
GNUS-NEWS)?
Bye, Reiner.
--
,,,
(o o)
---ooO-(_)-Ooo--- PGP key available via WWW http://rsteib.home.pages.de/
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: Posting styles and negation of rules; proposal of new syntax
2004-01-05 13:15 ` Reiner Steib
@ 2004-01-05 22:20 ` Karl Pflästerer
2004-01-06 17:13 ` Karl Pflästerer
0 siblings, 1 reply; 24+ messages in thread
From: Karl Pflästerer @ 2004-01-05 22:20 UTC (permalink / raw)
On 5 Jan 2004, Reiner Steib <- 4.uce.03.r.s@nurfuerspam.de wrote:
> Karl, the patch still applies cleanly to the current version. Do you
> already have a modified one or is it okay to apply the old? How about
> patches for the manual and to "New Features" (gnus.texi and
> GNUS-NEWS)?
I like to write a cleanly version tomorrow (also for gnus.texi and
GNUS-NEWS). Don't commit the old one; thanks.
KP
--
Männer der Wissenschaft! Man sagt ihr viele nach,
aber die meisten mit Unrecht.
Karl Kraus 'Aphorismen'
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: Posting styles and negation of rules; proposal of new syntax
2004-01-05 22:20 ` Karl Pflästerer
@ 2004-01-06 17:13 ` Karl Pflästerer
2004-01-07 2:58 ` Lars Magne Ingebrigtsen
0 siblings, 1 reply; 24+ messages in thread
From: Karl Pflästerer @ 2004-01-06 17:13 UTC (permalink / raw)
On 5 Jan 2004, Karl Pflästerer <- sigurd@12move.de wrote:
> On 5 Jan 2004, Reiner Steib <- 4.uce.03.r.s@nurfuerspam.de wrote:
>> Karl, the patch still applies cleanly to the current version. Do you
>> already have a modified one or is it okay to apply the old? How about
>> patches for the manual and to "New Features" (gnus.texi and
>> GNUS-NEWS)?
> I like to write a cleanly version tomorrow (also for gnus.texi and
> GNUS-NEWS). Don't commit the old one; thanks.
Waiting seems sometimes to be a good thing. As I tried to write the
documentation I reasoned again abot the sense of the code and couuldn't
find a good example which could not also easily be written now with.
Since a rule like ".*" matches ever you just put a your common rules
there and if for some group you don't ant them you write a style for
that group. Hence the negation is implicit in the ".*". So theres no
need for complication of the code. If I'm totally wrong please correct.
KP
--
My other car's a cdr.
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: Posting styles and negation of rules; proposal of new syntax
2004-01-06 17:13 ` Karl Pflästerer
@ 2004-01-07 2:58 ` Lars Magne Ingebrigtsen
0 siblings, 0 replies; 24+ messages in thread
From: Lars Magne Ingebrigtsen @ 2004-01-07 2:58 UTC (permalink / raw)
sigurd@12move.de (Karl Pflästerer) writes:
> Hence the negation is implicit in the ".*". So theres no need for
> complication of the code. If I'm totally wrong please correct.
I think you're correct.
--
(domestic pets only, the antidote for overdose, milk.)
larsi@gnus.org * Lars Magne Ingebrigtsen
^ permalink raw reply [flat|nested] 24+ messages in thread
end of thread, other threads:[~2004-01-07 2:58 UTC | newest]
Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-11 14:09 Posting styles and negation of rules; proposal of new syntax Karl Pflästerer
2003-08-13 17:06 ` Karl Pflästerer
2003-08-13 17:48 ` Reiner Steib
2003-08-13 18:35 ` Simon Josefsson
2003-08-13 20:19 ` Karl Pflästerer
2003-08-13 21:21 ` Simon Josefsson
2003-08-14 6:46 ` Xavier Maillard
2003-08-13 20:28 ` Ted Zlatanov
2003-08-13 20:31 ` lawrence mitchell
2003-08-14 6:45 ` Xavier Maillard
2003-08-15 16:01 ` David S Goldberg
2003-08-15 18:35 ` Xavier Maillard
2003-08-16 0:05 ` Alex Schroeder
2003-08-18 22:27 ` Xavier Maillard
2003-08-18 23:22 ` Alex Schroeder
2003-08-19 17:33 ` lawrence mitchell
2003-08-14 6:47 ` Xavier Maillard
2003-10-17 20:01 ` Lars Magne Ingebrigtsen
2003-10-19 0:58 ` Karl Pflästerer
2003-10-19 11:22 ` Lars Magne Ingebrigtsen
2004-01-05 13:15 ` Reiner Steib
2004-01-05 22:20 ` Karl Pflästerer
2004-01-06 17:13 ` Karl Pflästerer
2004-01-07 2:58 ` Lars Magne Ingebrigtsen
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).