unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Daiki Ueno <ueno@unixuser.org>
To: Sascha Wilde <wilde@sha-bang.de>
Cc: emacs-devel@gnu.org
Subject: Re: Suggestion: epa-file-select-keys should show currently selected keys
Date: Wed, 27 Feb 2008 17:07:38 +0900	[thread overview]
Message-ID: <87oda2akl1.fsf@broken.deisui.org> (raw)
In-Reply-To: <m28x18834s.fsf@kenny.sha-bang.de> (Sascha Wilde's message of "Tue, 26 Feb 2008 10:42:59 +0100")

>>>>> In <m28x18834s.fsf@kenny.sha-bang.de> 
>>>>>	Sascha Wilde <wilde@sha-bang.de> wrote:
> Sascha Wilde <wilde@sha-bang.de> wrote:
> > 1. Am I right that `M-x epa-file-select-keys' can be used to change the
> >    recipients in an existing *.gpg file?  If so, that should be
> >    documented more clearly (and might be worth an default binding?)

> Unfortunately it seems that I'm mistaken:
> - Open an existing *.gpg file
> - do M-x epa-file-select-keys and select some keys
> - do any change, so that saving is possible (a problem on its own, as
>   changing the list of recipients should be considered a relevant change
>   it self)
> - C-x C-s leads to an error:

> Debugger entered--Lisp error: (file-error "Opening output file" stringp
> (epg-key . [ultimate ((epg-sub-key . [ultimate (sign certify) nil 17

Ah, that is apperantly a bug.  The attached patch will fix this.

Index: lisp/epa-file.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/epa-file.el,v
retrieving revision 1.4
diff -w -c -r1.4 epa-file.el
*** lisp/epa-file.el	10 Feb 2008 20:57:46 -0000	1.4
--- lisp/epa-file.el	27 Feb 2008 08:06:23 -0000
***************
*** 285,294 ****
    (interactive)
    (make-local-variable 'epa-file-encrypt-to)
    (setq epa-file-encrypt-to
  	(epa-select-keys
  	 (epg-make-context)
  	 "Select recipents for encryption.
! If no one is selected, symmetric encryption will be performed.  ")))
  
  ;;;###autoload
  (defun epa-file-enable ()
--- 285,297 ----
    (interactive)
    (make-local-variable 'epa-file-encrypt-to)
    (setq epa-file-encrypt-to
+ 	(mapcar
+ 	 (lambda (key)
+ 	   (epg-sub-key-id (car (epg-key-sub-key-list key))))
  	 (epa-select-keys
  	  (epg-make-context)
  	  "Select recipents for encryption.
! If no one is selected, symmetric encryption will be performed.  "))))
  
  ;;;###autoload
  (defun epa-file-enable ()

Anyway, thanks for your suggestions.  I'll look at them this weekend
since I've been a bit busy now.

Regards,
-- 
Daiki Ueno




  reply	other threads:[~2008-02-27  8:07 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-25 10:12 Suggestion: epa-file-select-keys should show currently selected keys Sascha Wilde
2008-02-25 19:01 ` Richard Stallman
2008-02-26  9:35   ` Sascha Wilde
2008-02-26 23:47     ` Richard Stallman
2008-02-27  8:39   ` Daiki Ueno
2008-02-27 16:08     ` Richard Stallman
2008-02-28  8:36       ` Daiki Ueno
2008-02-28 13:56     ` Bastien
2008-02-29  1:40       ` Richard Stallman
2008-02-29  4:07       ` Daiki Ueno
2008-02-29  4:59         ` Stefan Monnier
2008-02-29 16:40         ` EasyPG API and usage questions (was: Suggestion: epa-file-select-keys should show currently selected keys) Ted Zlatanov
2008-03-01  0:23           ` Daiki Ueno
2008-03-01  0:38             ` Daiki Ueno
2008-03-03 20:19             ` EasyPG API and usage questions Ted Zlatanov
2008-03-04  6:31               ` Daiki Ueno
2008-03-04 14:42                 ` Ted Zlatanov
2008-03-05  7:25                   ` Daiki Ueno
2008-03-05 16:24                     ` Ted Zlatanov
2008-03-05 16:41                     ` Ted Zlatanov
2008-03-01 10:20           ` Reiner Steib
2008-03-03 19:50             ` Ted Zlatanov
2008-02-26  9:42 ` Suggestion: epa-file-select-keys should show currently selected keys Sascha Wilde
2008-02-27  8:07   ` Daiki Ueno [this message]
2008-02-27 12:01     ` Sascha Wilde
2008-03-04 14:36       ` Sascha Wilde
2008-03-11  8:53         ` Sascha Wilde
2008-03-16  4:05           ` Michael Olson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87oda2akl1.fsf@broken.deisui.org \
    --to=ueno@unixuser.org \
    --cc=emacs-devel@gnu.org \
    --cc=wilde@sha-bang.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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