[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Configuring .emacs to use some different values when launched by slr
From: |
Adam Funk |
Subject: |
Re: Configuring .emacs to use some different values when launched by slrn? |
Date: |
Tue, 24 Jan 2006 12:03:56 +0000 |
User-agent: |
slrn/0.9.8.1pl1 (Debian) |
On 2006-01-24, Adam Funk <a24061@yahoo.com> wrote:
> I've recently started using slrn with emacs (of course) as my post
> editor. The problem is that sometimes I want to gpg-sign the posts
> (using Mailcrypt) but I use a different e-mail address for usenet
> posts. For example, my ~/.emacs file currently contains the line
>
> (setq mc-gpg-user-id "6F8D3D7D")
>
> but I'd like a different user-id to be in effect when I'm editing
> usenet messages. Is it possible for emacs to know it has been
> launched by slrn and change some parameters accordingly? (And if so,
> how? I'm not an elisp expert.)
>
> Or should I just set the environment variable SLRN_EDITOR to something
> like 'emacs -l ~/.emacs.slrn.extras' and add the changes there? Will
> that command run ~/.emacs first and *then* the file specified with -l?
OK, that approach seems to work. I added one line
export SLRN_EDITOR='/usr/bin/emacs -nw -l ~/.emacs.special.slrn'
to ~/.bashrc, and put one line
(setq mc-gpg-user-id "1701F69C")
in ~/.emacs.special.slrn. Now when slrn edits a post, the correct gpg
key is chosen.
However, I've now got a mailcrypt question. When I select the body of
the message and try M-x mc-sign, the mc-sign-region command is not
available. But if I sign the whole file (including, wrongly, the
headers) then undo it, when I hit M-x again, the mc-sign and
mc-sign-region commands are both available. Why is this, and how can
I make mc-sign-region available from the start?