Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* referring to local variables
@ 2005-02-18 17:01 Andreas Balser
  2005-02-18 17:46 ` pkd
  0 siblings, 1 reply; 6+ messages in thread
From: Andreas Balser @ 2005-02-18 17:01 UTC (permalink / raw)


Dear group,

I would like the signature file to depend on whether I post to
newsgroups or send email, and I would like not to have a signature
separator above the signature file.
This does not work, because I get something wrong about local
variables, I suppose:


In order to have a different signature depending on whether I post to
news-groups or send private email, I have the following:

(setq gnus-posting-styles
      '(("nntp"
         (signature-file "~/.signature.short"))))

I am sending this message with (in gnus 5.10.6, emacs 21.2.1)
(setq message-signature t)


However, I would like my signature file to contain the signature
seperator (see below), and hence, I would rather set

(setq message-signature nil)

(defun ab-sig ()
  (save-excursion
    (goto-char (point-max))
     (insert-file-contents message-signature-file)))

(add-hook 'message-signature-setup-hook 'ab-sig t)


When I do this, this works for email-messages (where
signature-file is not changed), but when I try to post to a newsgroup, 
I get
wrong type of argument: stringp, nil


If I set the message-signature-file variable as group parameter, then
this is ignored by my ab-sig function, although M-x apropos-variable
knows about the local meaning of message-signature-file.


-- 


Andreas

-- 
something funny comes here


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

* Re: referring to local variables
  2005-02-18 17:01 referring to local variables Andreas Balser
@ 2005-02-18 17:46 ` pkd
  2005-02-19 23:44   ` François LAGARDE
  2005-02-28 13:50   ` Andreas Balser
  0 siblings, 2 replies; 6+ messages in thread
From: pkd @ 2005-02-18 17:46 UTC (permalink / raw)


On ven, 18 feb 2005, Andreas Balser wrote:

> I would like the signature file to depend on whether I post to
> newsgroups or send email, and I would like not to have a signature
> separator above the signature file.

check

,----[ C-h f message-news-p RET ]
| message-news-p is a compiled Lisp function in `message'.
| (message-news-p)
| 
| Say whether the current buffer contains a news message.
`----

and

,----[ C-h v gnus-message-setup-hook RET ]
| gnus-message-setup-hook's value is 
| (pkd-message-setup-quoting pkd-gnus-use-xna)
| 
| 
| Hook run after setting up a message buffer.
| 
| You can customize this variable.
| 
| Defined in `gnus-msg'.
`----

-- 
.signature: not found


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

* Re: referring to local variables
  2005-02-18 17:46 ` pkd
@ 2005-02-19 23:44   ` François LAGARDE
  2005-02-20 16:30     ` pkd
  2005-02-28 13:50   ` Andreas Balser
  1 sibling, 1 reply; 6+ messages in thread
From: François LAGARDE @ 2005-02-19 23:44 UTC (permalink / raw)


Hello,

p_u_n_k_i_n_d@yahoo.it le 18 fév à 18:46, a écrit:

I would like to know what is ur macro to set the 2 following  boxes:

>
> ,----[ Something ]
> | ur box
> |

-- 
François Lagarde


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

* Re: referring to local variables
  2005-02-19 23:44   ` François LAGARDE
@ 2005-02-20 16:30     ` pkd
  0 siblings, 0 replies; 6+ messages in thread
From: pkd @ 2005-02-20 16:30 UTC (permalink / raw)


On dom, 20 feb 2005, François LAGARDE wrote:

> Hello,

> p_u_n_k_i_n_d@yahoo.it le 18 fév à 18:46, a écrit:

> I would like to know what is ur macro to set the 2 following boxes:

>> ,----[ Something ]
>> | ur box
>> |

look for boxquote.el

-- 
.signature: not found


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

* Re: referring to local variables
  2005-02-18 17:46 ` pkd
  2005-02-19 23:44   ` François LAGARDE
@ 2005-02-28 13:50   ` Andreas Balser
  2005-02-28 19:04     ` pkd
  1 sibling, 1 reply; 6+ messages in thread
From: Andreas Balser @ 2005-02-28 13:50 UTC (permalink / raw)


>> I would like the signature file to depend on whether I post to
>> newsgroups or send email, and I would like not to have a signature
>> separator above the signature file.
>
> check
>
> ,----[ C-h f message-news-p RET ]

thanks; this solved the problem!

(However, I am still confused about the problem with referring to
local variables...)

Andreas


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

* Re: referring to local variables
  2005-02-28 13:50   ` Andreas Balser
@ 2005-02-28 19:04     ` pkd
  0 siblings, 0 replies; 6+ messages in thread
From: pkd @ 2005-02-28 19:04 UTC (permalink / raw)


On lun, 28 feb 2005, Andreas Balser wrote:

> (However, I am still confused about the problem with referring to
> local variables...)

,----[ C-h v gnus-newsgroup-variables RET ]
| gnus-newsgroup-variables's value is (gnus-visible-headers
| message-user-fqdn message-use-mail-followup-to)
| 
| 
| A list of variables that have separate values in different newsgroups.
| A list of newsgroup (summary buffer) local variables, or cons of
| variables and their default expressions to be evalled (when the
| default values are not nil), that should be made global while the
| summary buffer is active.
| 
| Note: The default expressions will be evaluated (using function
| `eval') before assignment to the local variable rather than just
| assigned to it. If the default expression is the symbol `global', that
| symbol will not be evaluated but the global value of the local
| variable will be used instead.
| 
| These variables can be used to set variables in the group parameters
| while still allowing them to affect operations done in other buffers.
| For example:
| 
| (setq gnus-newsgroup-variables
|      '(message-use-followup-to
|        (gnus-visible-headers .
| 	 "^From:\\|^Newsgroups:\\|^Subject:\\|^Date:\\|^To:")))
| 
| 
| Defined in `gnus-sum'.
| 
| [back]
`----

-- 
.signature: not found


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

end of thread, other threads:[~2005-02-28 19:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-18 17:01 referring to local variables Andreas Balser
2005-02-18 17:46 ` pkd
2005-02-19 23:44   ` François LAGARDE
2005-02-20 16:30     ` pkd
2005-02-28 13:50   ` Andreas Balser
2005-02-28 19:04     ` pkd

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