unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Configuring .emacs to use some different values when launched by slrn?
@ 2006-01-24 10:03 Adam Funk
  2006-01-24 11:06 ` Ismael Valladolid Torres
  2006-01-24 12:03 ` Adam Funk
  0 siblings, 2 replies; 6+ messages in thread
From: Adam Funk @ 2006-01-24 10:03 UTC (permalink / raw)


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?

Thanks,
Adam

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

* Re: Configuring .emacs to use some different values when launched by slrn?
  2006-01-24 10:03 Configuring .emacs to use some different values when launched by slrn? Adam Funk
@ 2006-01-24 11:06 ` Ismael Valladolid Torres
  2006-01-24 12:03 ` Adam Funk
  1 sibling, 0 replies; 6+ messages in thread
From: Ismael Valladolid Torres @ 2006-01-24 11:06 UTC (permalink / raw)



[-- Attachment #1.1: Type: text/plain, Size: 700 bytes --]

Adam Funk escribe:
> 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.)

How about using a mode hook?

Cordially, Ismael
-- 
Dropping science like when Galileo dropped his orange

[-- Attachment #1.2: Type: application/pgp-signature, Size: 190 bytes --]

[-- Attachment #2: Type: text/plain, Size: 152 bytes --]

_______________________________________________
help-gnu-emacs mailing list
help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

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

* Re: Configuring .emacs to use some different values when launched by slrn?
  2006-01-24 10:03 Configuring .emacs to use some different values when launched by slrn? Adam Funk
  2006-01-24 11:06 ` Ismael Valladolid Torres
@ 2006-01-24 12:03 ` Adam Funk
  2006-01-24 13:05   ` RaoulGough
  1 sibling, 1 reply; 6+ messages in thread
From: Adam Funk @ 2006-01-24 12:03 UTC (permalink / raw)



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?

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

* Re: Configuring .emacs to use some different values when launched by slrn?
  2006-01-24 12:03 ` Adam Funk
@ 2006-01-24 13:05   ` RaoulGough
  2006-01-24 14:21     ` Mailcrypt [was: Re: Configuring .emacs to use some different values when launched by slrn?] Adam Funk
  0 siblings, 1 reply; 6+ messages in thread
From: RaoulGough @ 2006-01-24 13:05 UTC (permalink / raw)


Adam Funk wrote:
> On 2006-01-24, Adam Funk <a24061@yahoo.com> wrote:
[snip]
> 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?

Sounds like one of the functions is autoloaded and the other one isn't.
You can probably fix it by adding a require call in your initialisation
file, e.g. (require 'mc). I don't know anything about mailcrypt, so
that might not be exactly right. Alternatively,  you could also use
(load-library "name_of_mailcrypt_library") to force the whole library
to load.

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

* Mailcrypt [was: Re: Configuring .emacs to use some different values when launched by slrn?]
  2006-01-24 13:05   ` RaoulGough
@ 2006-01-24 14:21     ` Adam Funk
  2006-01-30 12:19       ` Adam Funk
  0 siblings, 1 reply; 6+ messages in thread
From: Adam Funk @ 2006-01-24 14:21 UTC (permalink / raw)


On 2006-01-24, RaoulGough@yahoo.co.uk <RaoulGough@yahoo.co.uk> wrote:
> Adam Funk wrote:
>> On 2006-01-24, Adam Funk <a24061@yahoo.com> wrote:
> [snip]
>> 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?
>
> Sounds like one of the functions is autoloaded and the other one isn't.
> You can probably fix it by adding a require call in your initialisation
> file, e.g. (require 'mc). I don't know anything about mailcrypt, so
> that might not be exactly right. Alternatively,  you could also use
> (load-library "name_of_mailcrypt_library") to force the whole library
> to load.

Hmm.  I've already got the following in .emacs:

  (require 'mailcrypt-init)
  (load-library "mailcrypt")
  (mc-setversion "gpg")

Also, I can't find the mc-sign-region command documented in the
mailcrypt info docs.  Any mailcrypt experts here?

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

* Re: Mailcrypt [was: Re: Configuring .emacs to use some different values when launched by slrn?]
  2006-01-24 14:21     ` Mailcrypt [was: Re: Configuring .emacs to use some different values when launched by slrn?] Adam Funk
@ 2006-01-30 12:19       ` Adam Funk
  0 siblings, 0 replies; 6+ messages in thread
From: Adam Funk @ 2006-01-30 12:19 UTC (permalink / raw)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 2006-01-24, Adam Funk <a24061@yahoo.com> wrote:

>> Adam Funk wrote:
...
>>> 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?

By semi-random googling, I found a solution:

http://www.evenmere.org/~bts/Software/Dotfiles/%20.emacs

(autoload 'mc-sign-region "mc-toplev" nil t)

Hope this helps someone else.
-----BEGIN PGP SIGNATURE-----

iD8DBQFD3gQuthtbURcB9pwRAscIAJ4wcs6nb8nL112GDO3hdFZ0k3pxyACgqFjL
IGh1tggzsMngeCvUj/PrO7c=
=3Wsj
-----END PGP SIGNATURE-----

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

end of thread, other threads:[~2006-01-30 12:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-24 10:03 Configuring .emacs to use some different values when launched by slrn? Adam Funk
2006-01-24 11:06 ` Ismael Valladolid Torres
2006-01-24 12:03 ` Adam Funk
2006-01-24 13:05   ` RaoulGough
2006-01-24 14:21     ` Mailcrypt [was: Re: Configuring .emacs to use some different values when launched by slrn?] Adam Funk
2006-01-30 12:19       ` Adam Funk

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 read-only IMAP folder(s) and NNTP newsgroup(s).