unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#13264: 24.2.91; error when set plstore-cache-passphrase-for-symmetric-encryption to t
@ 2012-12-24  9:33 Leo
  2012-12-25 21:50 ` Lars Ingebrigtsen
  2012-12-27  8:11 ` Glenn Morris
  0 siblings, 2 replies; 4+ messages in thread
From: Leo @ 2012-12-24  9:33 UTC (permalink / raw)
  To: 13264; +Cc: ueno

(setq plstore-cache-passphrase-for-symmetric-encryption t)
and start getting an error like this:

Debugger entered--Lisp error: (wrong-type-argument stringp #<buffer  plstore /Users/leo/.emacs.d/oauth2.plstore>)
  file-truename(#<buffer  plstore /Users/leo/.emacs.d/oauth2.plstore>)
  plstore-passphrase-callback-function((epg-context . [OpenPGP nil nil nil nil nil nil (plstore-passphrase-callback-function . [#<buffer  plstore /Users/leo/.emacs.d/oauth2.plstore> (("be779ce11027f97bfaca2c35afcb4c08" :secret-access-token t :secret-refresh-token t :secret-access-response t)) "-----BEGIN PGP MESSAGE-----\nVersion: GnuPG v1.4.12 (Darwin)\n\njA0EAwMCllbjnrJDa/BgycAwvwmrdD/2GojxLAKvL6VZc/a2nVackxSi17RlISLY\nColDmOt9s91/6nhm73uiiUGgEvGKg8IsKd1jDiC70mPfaZYMqADi5tYMsGuEzCwP\nHbg2MBt+cie6kAaBO4+84/lWLY9ZN6bJ0LovTz7vpruSar0nXCdGJabp2tVwP/+j\nOJRmSdSZ562Hb5QSkQ9CuiotgJpPXHGuYaawxIFIAJMUDr+nhAR5ai9TE0ZLIJN6\nJE7qWVpGv3wxLFfgPuCiH+NYlIdPu/CUHq3b5QWmvSo6AerKSgrECWKZLVB4SKa1\nqfpfZPPo5YE0IKqI4rTyz0Y5\n=PmdM\n-----END PGP MESSAGE-----\n" nil (("be779ce11027f97bfaca2c35afcb4c08" :secret-access-token t :secret-refresh-token t :secret-access-response t))]) (plstore-progress-callback-function . "Decrypting /Users/leo/.emacs.d/oauth2.plstore") nil nil #<process epg> "/var/folders/mf/8_qnj_n146d0wxb32wdnb9jh0000gn/T/epg-output17499onV" nil decrypt]) SYM [#<buffer  plstore /Users/leo/.emacs.d/oauth2.plstore> (("be779ce11027f97bfaca2c35afcb4c08" :secret-access-token t :secret-refresh-token t :secret-access-response t)) "-----BEGIN PGP MESSAGE-----\nVersion: GnuPG v1.4.12 (Darwin)\n\njA0EAwMCllbjnrJDa/BgycAwvwmrdD/2GojxLAKvL6VZc/a2nVackxSi17RlISLY\nColDmOt9s91/6nhm73uiiUGgEvGKg8IsKd1jDiC70mPfaZYMqADi5tYMsGuEzCwP\nHbg2MBt+cie6kAaBO4+84/lWLY9ZN6bJ0LovTz7vpruSar0nXCdGJabp2tVwP/+j\nOJRmSdSZ562Hb5QSkQ9CuiotgJpPXHGuYaawxIFIAJMUDr+nhAR5ai9TE0ZLIJN6\nJE7qWVpGv3wxLFfgPuCiH+NYlIdPu/CUHq3b5QWmvSo6AerKSgrECWKZLVB4SKa1\nqfpfZPPo5YE0IKqI4rTyz0Y5\n=PmdM\n-----END PGP MESSAGE-----\n" nil (("be779ce11027f97bfaca2c35afcb4c08" :secret-access-token t :secret-refresh-token t :secret-access-response t))])
  ............


BTW, why doesn't plstore-cache-passphrase-for-symmetric-encryption
default to epa-file-cache-passphrase-for-symmetric-encryption.

patch:

@@ -126,7 +126,7 @@
 
 (defun plstore-passphrase-callback-function (_context _key-id plstore)
   (if plstore-cache-passphrase-for-symmetric-encryption
-      (let* ((file (file-truename (plstore--get-buffer plstore)))
+      (let* ((file (file-truename (buffer-file-name (plstore--get-buffer plstore))))
 	     (entry (assoc file plstore-passphrase-alist))
 	     passphrase)
 	(or (copy-sequence (cdr entry))

Diff finished.  Mon Dec 24 17:31:44 2012





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

* bug#13264: 24.2.91; error when set plstore-cache-passphrase-for-symmetric-encryption to t
  2012-12-24  9:33 bug#13264: 24.2.91; error when set plstore-cache-passphrase-for-symmetric-encryption to t Leo
@ 2012-12-25 21:50 ` Lars Ingebrigtsen
  2012-12-27  8:11 ` Glenn Morris
  1 sibling, 0 replies; 4+ messages in thread
From: Lars Ingebrigtsen @ 2012-12-25 21:50 UTC (permalink / raw)
  To: Leo; +Cc: 13264, ueno

Leo <sdl.web@gmail.com> writes:

> patch:

Thanks; applied.

-- 
(domestic pets only, the antidote for overdose, milk.)
  http://lars.ingebrigtsen.no  *  Lars Magne Ingebrigtsen





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

* bug#13264: 24.2.91; error when set plstore-cache-passphrase-for-symmetric-encryption to t
  2012-12-24  9:33 bug#13264: 24.2.91; error when set plstore-cache-passphrase-for-symmetric-encryption to t Leo
  2012-12-25 21:50 ` Lars Ingebrigtsen
@ 2012-12-27  8:11 ` Glenn Morris
  2012-12-28  4:01   ` Daiki Ueno
  1 sibling, 1 reply; 4+ messages in thread
From: Glenn Morris @ 2012-12-27  8:11 UTC (permalink / raw)
  To: Leo; +Cc: 13264, Lars Magne Ingebrigtsen, ueno

Leo wrote:

> (setq plstore-cache-passphrase-for-symmetric-encryption t)

AFAICS, this variable is totally undocumented and not marked as a user
option.

> -      (let* ((file (file-truename (plstore--get-buffer plstore)))
> +      (let* ((file (file-truename (buffer-file-name (plstore--get-buffer plstore))))

There's a function `plstore-get-file' that does the above. (No idea why
this one gets a plstore- prefix rather than a plstore-- one.)

Anyway, this seems like a safe fix that should be in emacs-24, so I
installed it there as well.






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

* bug#13264: 24.2.91; error when set plstore-cache-passphrase-for-symmetric-encryption to t
  2012-12-27  8:11 ` Glenn Morris
@ 2012-12-28  4:01   ` Daiki Ueno
  0 siblings, 0 replies; 4+ messages in thread
From: Daiki Ueno @ 2012-12-28  4:01 UTC (permalink / raw)
  To: Glenn Morris; +Cc: Lars Magne Ingebrigtsen, 13264, Leo

Glenn Morris <rgm@gnu.org> writes:

>> (setq plstore-cache-passphrase-for-symmetric-encryption t)
>
> AFAICS, this variable is totally undocumented and not marked as a user
> option.

That's because we don't recommend to use Elisp level passphrase cache,
but I agree some people still need it.  Maybe good to add some
documentation on it.

> There's a function `plstore-get-file' that does the above.

Good point, though I don't care much.

> (No idea why this one gets a plstore- prefix rather than a plstore--
> one.)

plstore-- prefix are used to mark private functions, while plstore-
prefix are for public functions.  Here, `plstore-get-file' is a public
function.

> Anyway, this seems like a safe fix that should be in emacs-24, so I
> installed it there as well.

Thanks!
-- 
Daiki Ueno





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

end of thread, other threads:[~2012-12-28  4:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-24  9:33 bug#13264: 24.2.91; error when set plstore-cache-passphrase-for-symmetric-encryption to t Leo
2012-12-25 21:50 ` Lars Ingebrigtsen
2012-12-27  8:11 ` Glenn Morris
2012-12-28  4:01   ` Daiki Ueno

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