Gnus development mailing list
 help / color / mirror / Atom feed
* plstore questions
@ 2011-09-23 21:02 Julien Danjou
  2011-09-26  2:41 ` Daiki Ueno
  0 siblings, 1 reply; 4+ messages in thread
From: Julien Danjou @ 2011-09-23 21:02 UTC (permalink / raw)
  To: Daiki Ueno; +Cc: ding

[-- Attachment #1: Type: text/plain, Size: 811 bytes --]

Hi Daiki,

I've a couple of question about plstore, and I'd prefer to ask you
before doing wrong thing.

1. Why isn't `plstore-encrypt-to' a defcustom rather than a defvar?
2. In `plstore--insert-buffer', I don't understand this test:

      (if (or (eq plstore-select-keys t)
	      (and (null plstore-select-keys)
		   (not (local-variable-p 'plstore-encrypt-to
					  (current-buffer)))))
	(epa-select-keys …

The documentation indicate that if `plstore-select-keys' is to nil and
if `plstore-encrypt-to' is set to something, then no epa-select-keys.
But the test does not check if plstore-encrypt-to is set, but checks if
it is local variable. I don't get why, and that does not make plstore
acts according to the documentation. Could you enlighten me?

Thanks.

-- 
Julien Danjou

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

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

* Re: plstore questions
  2011-09-23 21:02 plstore questions Julien Danjou
@ 2011-09-26  2:41 ` Daiki Ueno
  2011-09-26  9:27   ` Julien Danjou
  0 siblings, 1 reply; 4+ messages in thread
From: Daiki Ueno @ 2011-09-26  2:41 UTC (permalink / raw)
  To: ding

Julien Danjou <julien@danjou.info> writes:

> 1. Why isn't `plstore-encrypt-to' a defcustom rather than a defvar?

Since plstore-encrypt-to is marked as permanent local, I think users
don't want to set it with M-x customize.

> 2. In `plstore--insert-buffer', I don't understand this test:
>
>       (if (or (eq plstore-select-keys t)
> 	      (and (null plstore-select-keys)
> 		   (not (local-variable-p 'plstore-encrypt-to
> 					  (current-buffer)))))
> 	(epa-select-keys …
>
> The documentation indicate that if `plstore-select-keys' is to nil and
> if `plstore-encrypt-to' is set to something, then no epa-select-keys.
> But the test does not check if plstore-encrypt-to is set, but checks if
> it is local variable. I don't get why, and that does not make plstore
> acts according to the documentation. Could you enlighten me?

plstore-encrypt-to is supposed to be set through file variable and the
above check is for the case where plstore-encrypt-to is set to nil.

For example, if plstore-select-keys is nil and a file begins with:

;; plstore-encrypt-to: nil

it will skip epa-select-keys dialog and use symmetric encryption.  If
there is no such line, it will open the dialog with default recipients
(if any) selected.  I agree with that the documentation is a bit
misleading though.

Regards,
-- 
Daiki Ueno



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

* Re: plstore questions
  2011-09-26  2:41 ` Daiki Ueno
@ 2011-09-26  9:27   ` Julien Danjou
  2011-09-27  6:27     ` Daiki Ueno
  0 siblings, 1 reply; 4+ messages in thread
From: Julien Danjou @ 2011-09-26  9:27 UTC (permalink / raw)
  To: Daiki Ueno; +Cc: ding

[-- Attachment #1: Type: text/plain, Size: 839 bytes --]

On Mon, Sep 26 2011, Daiki Ueno wrote:

> plstore-encrypt-to is supposed to be set through file variable and the
> above check is for the case where plstore-encrypt-to is set to nil.
>
> For example, if plstore-select-keys is nil and a file begins with:
>
> ;; plstore-encrypt-to: nil
>
> it will skip epa-select-keys dialog and use symmetric encryption.  If
> there is no such line, it will open the dialog with default recipients
> (if any) selected.  I agree with that the documentation is a bit
> misleading though.

That explains everything. But in the end to achieve what I wanted I had
to set up plstore-encrypt-to to my key id, and plstore-select-keys to
'never, whereas I though I had to set it to nil. Maybe we could check if
the variable is set globally to?
Or fix the documentation. :)

-- 
Julien Danjou

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

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

* Re: plstore questions
  2011-09-26  9:27   ` Julien Danjou
@ 2011-09-27  6:27     ` Daiki Ueno
  0 siblings, 0 replies; 4+ messages in thread
From: Daiki Ueno @ 2011-09-27  6:27 UTC (permalink / raw)
  To: ding

Julien Danjou <julien@danjou.info> writes:

> Maybe we could check if the variable is set globally to?  Or fix the
> documentation. :)

I think such a check would be not that easy since it will need a hack
like local hooks.  I've updated the doc for the time being.

Regards,
-- 
Daiki Ueno



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

end of thread, other threads:[~2011-09-27  6:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-23 21:02 plstore questions Julien Danjou
2011-09-26  2:41 ` Daiki Ueno
2011-09-26  9:27   ` Julien Danjou
2011-09-27  6:27     ` Daiki Ueno

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