Closed FractalWire closed 6 years ago
Can you give some more concrete steps, please? Especially regarding the contents of the GPGEditOptions
buffer.
Hi sorry for the late answer. Yes I was a bit lazy when I report the issue.
So here is the full steps :
1) Create a file test.asc 2) save and exit 3) edit the file again and invoke GPGEditOptions. It gives something like that :
GPG: Please edit the list of recipients, one recipient per line.
GPG: Unknown recipients have a prepended "!".
GPG: Lines beginning with "GPG:" are removed automatically.
GPG: Data after recipients between and including "(" and ")" is ignored.
GPG: Closing this buffer commits changes.
GPG: ----------------------------------------------------------------------
myname <mail@mymail.com> (ID: 0xC1BDCB497E0B9CD6 created at mar. 10 avril 2018 19:40:18 CEST)
GPG: ----------------------------------------------------------------------
GPG: THERE IS NO CHECK OF THE ENTERED OPTIONS!
GPG: YOU NEED TO KNOW WHAT YOU ARE DOING!
GPG: IF IN DOUBT, QUICKLY EXIT USING :x OR :bd.
GPG: Please edit the list of options, one option per line.
GPG: Please refer to the gpg documentation for valid options.
GPG: Lines beginning with "GPG:" are removed automatically.
GPG: Closing this buffer commits changes.
GPG: ----------------------------------------------------------------------
encrypt
armor
Both, the recipient and the options are present in the buffer.
4) Without modifying anything, I try to save and close the buffer and I've got the following error :
The recipient "encrypt" is not in your public keyring !
The recipient "armor" is not in your public keyring !
5) I now have 2 buffers opens :
The recipient "encrypt" is not in your public keyring !
The recipient "armor" is not in your public keyring !
Please use GPGEditRecipients to correct !!
8) So I do that and here is the content of the buffer :
GPG: Please edit the list of recipients, one recipient per line.
GPG: Unknown recipients have a prepended "!".
GPG: Lines beginning with "GPG:" are removed automatically.
GPG: Data after recipients between and including "(" and ")" is ignored.
GPG: Closing this buffer commits changes.
GPG: ----------------------------------------------------------------------
myname <mail@mymail.com> (ID: 0xC1BDCB497E0B9CD6 created at mar. 10 avril 2018 19:40:18 CEST)
GPG: ----------------------------------------------------------------------
GPG: Please edit the list of recipients, one recipient per line.
GPG: Unknown recipients have a prepended "!".
GPG: Lines beginning with "GPG:" are removed automatically.
GPG: Data after recipients between and including "(" and ")" is ignored.
GPG: Closing this buffer commits changes.
GPG: ----------------------------------------------------------------------
myname <mail@mymail.com> (ID: 0xC1BDCB497E0B9CD6 created at mar. 10 avril 2018 19:40:18 CEST)
!encrypt
!armor
9) now I clean up a bit, living only one `myname <mail@mymail.com>` with its commentary, and I save and close the buffer
10) I've now got 2 buffer :
- 1 empty buffer named GPGRecipients_PathToMyFile.asc (that need to be saved)
- my original GPG file
11) So I save and close the empty buffer
12) Finally, when trying to save and close my GPG file I've got the following error :
/bin/sh: -c: line 0: syntax error near unexpected token (' Message could not be encrypted! (Press ENTER) ')
And I'm forced to close without saving now.
I think I'm experiencing the same/similar error. AFAICT, it's happening when we try to edit the options buffer.
Here's what I think may help...
GPG_TTY
set, as described in the vim.org page. vim foo.gpg
. GPGViewRecipients
shows me and GPGViewOptions
is empty.GPGEditOptions
.GPGRecipients_GPGOptions_/home/joedang/foo.gpg
, GPGOptions_/home/joedang/foo.gpg
, and my empty file.This is where I think we're either getting confused or experiencing a bug.
encrypt
, armor
, and sign
options at the end.E382: Cannot write, buftype option is set
.GPGViewOptions
shows me my name and my options, while GPGViewRecipients
has a totally unrelated key from my keyring (the Debian CD signing key) along with !encrypt
and !armor
.Now, if I try something different...
GPGViewRecipients
just shows me now.GPGViewOptions
still shows me and my options.GPGEditOptions
again.GPGViewOptions
now shows only the options.GPGViewRecipients
shows Debian key with !encrypt
and !armor
again.GPGEditRecipients
and change it back to my name.GPGEditOptions
again it messes up the recipients again. (No editing or saving, just quitting those windows.)So, maybe I don't understand how buffers are supposed to work, and quitting is the wrong thing to do. But, it seems like the plugin shouldn't be doing this. As long as the recipients and options are in the state they should be, the files save and open as I'd expect. But changing them really sucks because of this.
Thanks for the report! This should be fixed now.
Hi,
I have an issue with GPGEditOptions. When I called it and then save it, I got an error saying something like :
If I try to save the file, I've got a warning stating I have to edit GPGEditRecipients, which give a content similar to that :
So, somehow, GPGEditOptions and GPGEditRecipients might be mixed up...