emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] org-crypt-decrypt-entry: Apply initial visibility upon decryption
@ 2023-04-30 20:21 Ihor Radchenko
  2023-05-01  3:41 ` [SUGGESTION] " Christopher M. Miles
                   ` (2 more replies)
  0 siblings, 3 replies; 29+ messages in thread
From: Ihor Radchenko @ 2023-04-30 20:21 UTC (permalink / raw)
  To: emacs-orgmode

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

Hi,

I'd like to propose applying initial visibility to the freshly decrypted
headings. IMHO, it makes much more sense by default compared to showing
all the text unfolded, including property drawers.

Any objections?


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-org-crypt-decrypt-entry-Apply-initial-visibility-upo.patch --]
[-- Type: text/x-patch, Size: 4789 bytes --]

From 5f90460cf565e9c3185f58a631500207e9b14d39 Mon Sep 17 00:00:00 2001
Message-Id: <5f90460cf565e9c3185f58a631500207e9b14d39.1682886052.git.yantar92@posteo.net>
From: Ihor Radchenko <yantar92@posteo.net>
Date: Sun, 30 Apr 2023 22:15:11 +0200
Subject: [PATCH] org-crypt-decrypt-entry: Apply initial visibility upon
 decryption

* lisp/org-crypt.el: Call `org-cycle-set-startup-visibility' on the
decrypted entries.  Still re-fold if the decrypted entry has been
inside an existing fold.
* lisp/org-cycle.el (org-cycle-set-visibility-according-to-property):
Respect narrowing.
* etc/ORG-NEWS (=org-crypt.el= now applies initial visibility settings
to decrypted entries): Announce the change.

This patch solves a slight annoyance when the freshly decrypted entry
is fully unfolded, including all the property drawers.  It will make
more sense to make the folding state follow initial visibility
settings, including VISIBILITY properties.
---
 etc/ORG-NEWS      |  4 ++++
 lisp/org-crypt.el | 11 ++++++++++-
 lisp/org-cycle.el | 15 ++++++++-------
 3 files changed, 22 insertions(+), 8 deletions(-)

diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index 03894f128..70e684d10 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -214,6 +214,10 @@ execution completes.  The new ~:async~ header allows users to continue
 editing with Emacs while a ~:session~ block executes.
 
 ** Miscellaneous
+*** =org-crypt.el= now applies initial visibility settings to decrypted entries
+
+Previously, all the text was unfolded unconditionally, including property drawers.
+
 *** Blank lines after removed objects are not retained during export
 
 When certain objects in Org document are to be excluded from export,
diff --git a/lisp/org-crypt.el b/lisp/org-crypt.el
index b5df115cf..39d1a421d 100644
--- a/lisp/org-crypt.el
+++ b/lisp/org-crypt.el
@@ -81,6 +81,7 @@ (declare-function org-make-tags-matcher "org" (match))
 (declare-function org-previous-visible-heading "org" (arg))
 (declare-function org-scan-tags "org" (action matcher todo-only &optional start-level))
 (declare-function org-set-property "org" (property value))
+(declare-function org-cycle-set-startup-visibility "org-cycle" ())
 
 (defgroup org-crypt nil
   "Org Crypt."
@@ -269,10 +270,12 @@ (defun org-decrypt-entry ()
 	      (decrypted-text
 	       (decode-coding-string
 		(epg-decrypt-string epg-context encrypted-text)
-		'utf-8)))
+		'utf-8))
+              origin-marker)
 	 ;; Delete region starting just before point, because the
 	 ;; outline property starts at the \n of the heading.
 	 (delete-region (1- (point)) end)
+         (setq origin-marker (point-marker))
 	 ;; Store a checksum of the decrypted and the encrypted text
 	 ;; value.  This allows reusing the same encrypted text if the
 	 ;; text does not change, and therefore avoid a re-encryption
@@ -282,6 +285,12 @@ (defun org-decrypt-entry ()
 			     'org-crypt-checksum (sha1 decrypted-text)
 			     'org-crypt-key (org-crypt-key-for-heading)
 			     'org-crypt-text encrypted-text))
+         ;; Apply initial visibility.
+         (save-restriction
+           (narrow-to-region origin-marker (point))
+           (set-marker origin-marker nil)
+           (org-cycle-set-startup-visibility))
+         ;; ... but keep the previous folded state.
 	 (when folded-heading
 	   (goto-char folded-heading)
 	   (org-fold-subtree t))
diff --git a/lisp/org-cycle.el b/lisp/org-cycle.el
index 50aa0d21d..44e015746 100644
--- a/lisp/org-cycle.el
+++ b/lisp/org-cycle.el
@@ -638,20 +638,21 @@ (defun org-cycle-set-visibility-according-to-property ()
   "Switch subtree visibility according to VISIBILITY property."
   (interactive)
   (let ((regexp (org-re-property "VISIBILITY")))
-    (org-with-point-at 1
+    (save-restriction
+      (goto-char (point-min))
       (while (re-search-forward regexp nil t)
-	(let ((state (match-string 3)))
+        (let ((state (match-string 3)))
 	  (if (not (org-at-property-p)) (outline-next-heading)
 	    (save-excursion
 	      (org-back-to-heading t)
 	      (org-fold-subtree t)
 	      (pcase state
-		("folded"
+	        ("folded"
 		 (org-fold-subtree t))
-		("children"
+	        ("children"
 		 (org-fold-show-hidden-entry)
 		 (org-fold-show-children))
-		("content"
+	        ("content"
                  ;; Newline before heading will be outside the
                  ;; narrowing.  Make sure that it is revealed.
                  (org-fold-heading nil)
@@ -659,9 +660,9 @@ (defun org-cycle-set-visibility-according-to-property ()
 		   (save-restriction
 		     (org-narrow-to-subtree)
 		     (org-cycle-content))))
-		((or "all" "showall")
+	        ((or "all" "showall")
 		 (org-fold-show-subtree))
-		(_ nil)))
+	        (_ nil)))
 	    (org-end-of-subtree t)))))))
 
 (defun org-cycle-overview ()
-- 
2.40.0


[-- Attachment #3: Type: text/plain, Size: 224 bytes --]


-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>

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

* [SUGGESTION] Re: [PATCH] org-crypt-decrypt-entry: Apply initial visibility upon decryption
  2023-04-30 20:21 [PATCH] org-crypt-decrypt-entry: Apply initial visibility upon decryption Ihor Radchenko
@ 2023-05-01  3:41 ` Christopher M. Miles
  2023-05-01  7:50   ` Ihor Radchenko
  2023-05-15 13:38 ` [PATCH] org-crypt-decrypt-entry: Apply initial visibility upon decryption Ihor Radchenko
  2023-05-15 15:56 ` Christopher M. Miles
  2 siblings, 1 reply; 29+ messages in thread
From: Christopher M. Miles @ 2023-05-01  3:41 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: emacs-orgmode

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


Thanks Ihor for improve this file.

I'm also try to improve this file to improve large Org buffer saving performance.

I have some ideas:

- auto encrypt buffer on buffer save hook (currently mechanism, your patch improved it)
- auto decrypt on org-cycle expand headline if current headline is encrypted. e.g. on `org-cycle-hook`
- auto encrypt ONLY current fold action on headline scope if has crypt key specified. e.g. on `org-cycle-hook`

-- 

[ stardiviner ]
I try to make every word tell the meaning that I want to express without misunderstanding.

Blog: https://stardiviner.github.io/
IRC(libera.chat, freenode): stardiviner, Matrix: stardiviner
GPG: F09F650D7D674819892591401B5DF1C95AE89AC3

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

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

* Re: [SUGGESTION] Re: [PATCH] org-crypt-decrypt-entry: Apply initial visibility upon decryption
  2023-05-01  3:41 ` [SUGGESTION] " Christopher M. Miles
@ 2023-05-01  7:50   ` Ihor Radchenko
  2023-05-01 11:32     ` Christopher M. Miles
  0 siblings, 1 reply; 29+ messages in thread
From: Ihor Radchenko @ 2023-05-01  7:50 UTC (permalink / raw)
  To: numbchild; +Cc: emacs-orgmode

"Christopher M. Miles" <numbchild@gmail.com> writes:

> I'm also try to improve this file to improve large Org buffer saving performance.

org-encrypt already caches the encrypted text and takes basically no
time for the repeated encryption, as long the text to be encrypted is unchanged.

> I have some ideas:
>
> - auto encrypt buffer on buffer save hook (currently mechanism, your patch improved it)

Sorry, but my patch has nothing to do with save hook. It only changes decryption.

> - auto decrypt on org-cycle expand headline if current headline is encrypted. e.g. on `org-cycle-hook`

I am not sure how it has anything to do with performance.
You can already use C-c C-r (or M-x org-reveal) to decrypt entry at
point.
We should certainly not attempt decryption on <tab> by default - it may
be annoying when you actually do not want to decrypt anything, just look inside.

> - auto encrypt ONLY current fold action on headline scope if has crypt key specified. e.g. on `org-cycle-hook`

That might be possible, but I often do not want my encrypted
sub-headings being encrypted while I re-structure and re-fold my file.

May you elaborate what performance issues you are experiencing?

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


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

* Re: [SUGGESTION] Re: [PATCH] org-crypt-decrypt-entry: Apply initial visibility upon decryption
  2023-05-01  7:50   ` Ihor Radchenko
@ 2023-05-01 11:32     ` Christopher M. Miles
  2023-05-01 11:46       ` Ihor Radchenko
  0 siblings, 1 reply; 29+ messages in thread
From: Christopher M. Miles @ 2023-05-01 11:32 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: numbchild, emacs-orgmode

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


Ihor Radchenko <yantar92@posteo.net> writes:

> "Christopher M. Miles" <numbchild@gmail.com> writes:
>
>> I'm also try to improve this file to improve large Org buffer saving performance.
>
> org-encrypt already caches the encrypted text and takes basically no
> time for the repeated encryption, as long the text to be encrypted is unchanged.
>
>> I have some ideas:
>>
>> - auto encrypt buffer on buffer save hook (currently mechanism, your patch improved it)
>
> Sorry, but my patch has nothing to do with save hook. It only changes decryption.
>
>> - auto decrypt on org-cycle expand headline if current headline is encrypted. e.g. on `org-cycle-hook`
>
> I am not sure how it has anything to do with performance.
> You can already use C-c C-r (or M-x org-reveal) to decrypt entry at
> point.
> We should certainly not attempt decryption on <tab> by default - it may
> be annoying when you actually do not want to decrypt anything, just
> look inside.

You're right, I have not consider enough.

>
>> - auto encrypt ONLY current fold action on headline scope if has crypt key specified. e.g. on `org-cycle-hook`
>
> That might be possible, but I often do not want my encrypted
> sub-headings being encrypted while I re-structure and re-fold my file.
>
> May you elaborate what performance issues you are experiencing?

My performance issue is a large Org file about 2M size on saving. I will
reproduce and generate profiler report for more detailed data and update
in this thread.

-- 

[ stardiviner ]
I try to make every word tell the meaning that I want to express without misunderstanding.

Blog: https://stardiviner.github.io/
IRC(libera.chat, freenode): stardiviner, Matrix: stardiviner
GPG: F09F650D7D674819892591401B5DF1C95AE89AC3

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

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

* Re: [SUGGESTION] Re: [PATCH] org-crypt-decrypt-entry: Apply initial visibility upon decryption
  2023-05-01 11:32     ` Christopher M. Miles
@ 2023-05-01 11:46       ` Ihor Radchenko
  2023-05-01 12:26         ` Christopher M. Miles
  0 siblings, 1 reply; 29+ messages in thread
From: Ihor Radchenko @ 2023-05-01 11:46 UTC (permalink / raw)
  To: Christopher M. Miles; +Cc: emacs-orgmode

"Christopher M. Miles" <numbchild@gmail.com> writes:

>> We should certainly not attempt decryption on <tab> by default - it may
>> be annoying when you actually do not want to decrypt anything, just
>> look inside.
>
> You're right, I have not consider enough.

Of course, you can still use `org-cycle-hook' if you want this behaviour
in your personal setup.

>> May you elaborate what performance issues you are experiencing?
>
> My performance issue is a large Org file about 2M size on saving. I will
> reproduce and generate profiler report for more detailed data and update
> in this thread.

Please save the report using M-x profiler-report-write-profile - it will
produce Elisp data that can be re-opened and examined directly.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


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

* Re: [SUGGESTION] Re: [PATCH] org-crypt-decrypt-entry: Apply initial visibility upon decryption
  2023-05-01 11:46       ` Ihor Radchenko
@ 2023-05-01 12:26         ` Christopher M. Miles
  2023-05-01 12:38           ` Ihor Radchenko
  0 siblings, 1 reply; 29+ messages in thread
From: Christopher M. Miles @ 2023-05-01 12:26 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Christopher M. Miles, emacs-orgmode


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


Ihor Radchenko <yantar92@posteo.net> writes:

> "Christopher M. Miles" <numbchild@gmail.com> writes:
>
>>> We should certainly not attempt decryption on <tab> by default - it may
>>> be annoying when you actually do not want to decrypt anything, just
>>> look inside.
>>
>> You're right, I have not consider enough.
>
> Of course, you can still use `org-cycle-hook' if you want this behaviour
> in your personal setup.
>
>>> May you elaborate what performance issues you are experiencing?
>>
>> My performance issue is a large Org file about 2M size on saving. I will
>> reproduce and generate profiler report for more detailed data and update
>> in this thread.
>
> Please save the report using M-x profiler-report-write-profile - it will
> produce Elisp data that can be re-opened and examined directly.

I attached CPU and Memory report in attachments.


[-- Attachment #1.2: CPU Report --]
[-- Type: application/emacs-lisp, Size: 29623 bytes --]

[-- Attachment #1.3: Memory Report --]
[-- Type: application/emacs-lisp, Size: 92694 bytes --]

[-- Attachment #1.4: Type: text/plain, Size: 269 bytes --]



-- 

[ stardiviner ]
I try to make every word tell the meaning that I want to express without misunderstanding.

Blog: https://stardiviner.github.io/
IRC(libera.chat, freenode): stardiviner, Matrix: stardiviner
GPG: F09F650D7D674819892591401B5DF1C95AE89AC3

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

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

* Re: [SUGGESTION] Re: [PATCH] org-crypt-decrypt-entry: Apply initial visibility upon decryption
  2023-05-01 12:26         ` Christopher M. Miles
@ 2023-05-01 12:38           ` Ihor Radchenko
  2023-05-01 13:12             ` Christopher M. Miles
       [not found]             ` <m2sfcgmbpo.fsf@numbchild>
  0 siblings, 2 replies; 29+ messages in thread
From: Ihor Radchenko @ 2023-05-01 12:38 UTC (permalink / raw)
  To: Christopher M. Miles; +Cc: emacs-orgmode

"Christopher M. Miles" <numbchild@gmail.com> writes:

>>>> May you elaborate what performance issues you are experiencing?
>>>
>>> My performance issue is a large Org file about 2M size on saving. I will
>>> reproduce and generate profiler report for more detailed data and update
>>> in this thread.
>>
>> Please save the report using M-x profiler-report-write-profile - it will
>> produce Elisp data that can be re-opened and examined directly.
>
> I attached CPU and Memory report in attachments.

This CPU report is not just for saving. You did M-x (vectico), `undo',
`org-clock-in', and `save-buffer'. `save-buffer' took no time. And
everything took less than one second.

Are you sure that it is the correct profile?

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


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

* Re: [SUGGESTION] Re: [PATCH] org-crypt-decrypt-entry: Apply initial visibility upon decryption
  2023-05-01 12:38           ` Ihor Radchenko
@ 2023-05-01 13:12             ` Christopher M. Miles
  2023-05-01 13:38               ` Ihor Radchenko
       [not found]             ` <m2sfcgmbpo.fsf@numbchild>
  1 sibling, 1 reply; 29+ messages in thread
From: Christopher M. Miles @ 2023-05-01 13:12 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Christopher M. Miles, emacs-orgmode

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


Ihor Radchenko <yantar92@posteo.net> writes:

> "Christopher M. Miles" <numbchild@gmail.com> writes:
>
>>>>> May you elaborate what performance issues you are experiencing?
>>>>
>>>> My performance issue is a large Org file about 2M size on saving. I will
>>>> reproduce and generate profiler report for more detailed data and update
>>>> in this thread.
>>>
>>> Please save the report using M-x profiler-report-write-profile - it will
>>> produce Elisp data that can be re-opened and examined directly.
>>
>> I attached CPU and Memory report in attachments.
>
> This CPU report is not just for saving. You did M-x (vectico), `undo',
> `org-clock-in', and `save-buffer'. `save-buffer' took no time. And
> everything took less than one second.
>
> Are you sure that it is the correct profile?

The current CPU report indeed not contains heavy org-crypt. Because my
epa get problem. When I edit a GnuPG encrypted "encrypt.org.gpg", it
suspend on epa waiting for process to finished. It never ends unless I
press [C-g] to quit it. So I can't reproduce the Org file contains
org-crypt headlines saving profiler report.

Sorry that I have not mentioned this actual background reason. I indeed
did a profiler report before (about 3 months ago), and the profiler
report use lot of time on org-crypt invocation. Hmm, maybe problem gone
as time scrolls.

I will mark this as task in my Org Agenda, and take time to profiler
report again, make sure org-crypt is heavy, then update here.

Regards,

-- 

[ stardiviner ]
I try to make every word tell the meaning that I want to express without misunderstanding.

Blog: https://stardiviner.github.io/
IRC(libera.chat, freenode): stardiviner, Matrix: stardiviner
GPG: F09F650D7D674819892591401B5DF1C95AE89AC3

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

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

* Re: [SUGGESTION] Re: [PATCH] org-crypt-decrypt-entry: Apply initial visibility upon decryption
  2023-05-01 13:12             ` Christopher M. Miles
@ 2023-05-01 13:38               ` Ihor Radchenko
  2023-05-01 19:10                 ` Christopher M. Miles
  0 siblings, 1 reply; 29+ messages in thread
From: Ihor Radchenko @ 2023-05-01 13:38 UTC (permalink / raw)
  To: Christopher M. Miles; +Cc: emacs-orgmode

"Christopher M. Miles" <numbchild@gmail.com> writes:

> The current CPU report indeed not contains heavy org-crypt. Because my
> epa get problem. When I edit a GnuPG encrypted "encrypt.org.gpg", it
> suspend on epa waiting for process to finished. It never ends unless I
> press [C-g] to quit it.

Which looks like gpg tried to display password prompt is some awkward
place (like in bash sub-process under Emacs) and is forever waiting for
your input.

I have (setenv "DISPLAY" ":0.0") in my init.el to let graphical
dialogues know how to popup from under Emacs process.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


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

* Re: [SUGGESTION] Re: [PATCH] org-crypt-decrypt-entry: Apply initial visibility upon decryption
  2023-05-01 13:38               ` Ihor Radchenko
@ 2023-05-01 19:10                 ` Christopher M. Miles
  2023-05-01 19:18                   ` Ihor Radchenko
  0 siblings, 1 reply; 29+ messages in thread
From: Christopher M. Miles @ 2023-05-01 19:10 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Christopher M. Miles, emacs-orgmode

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


Ihor Radchenko <yantar92@posteo.net> writes:

> "Christopher M. Miles" <numbchild@gmail.com> writes:
>
>> The current CPU report indeed not contains heavy org-crypt. Because my
>> epa get problem. When I edit a GnuPG encrypted "encrypt.org.gpg", it
>> suspend on epa waiting for process to finished. It never ends unless I
>> press [C-g] to quit it.
>
> Which looks like gpg tried to display password prompt is some awkward
> place (like in bash sub-process under Emacs) and is forever waiting for
> your input.
>
> I have (setenv "DISPLAY" ":0.0") in my init.el to let graphical
> dialogues know how to popup from under Emacs process.

I'm under macOS system. the result of (getenv "DISPLAY") is
"ssh-askpass". This is weird...

I will dig deeper about this issue, update here later.

-- 

[ stardiviner ]
I try to make every word tell the meaning that I want to express without misunderstanding.

Blog: https://stardiviner.github.io/
IRC(libera.chat, freenode): stardiviner, Matrix: stardiviner
GPG: F09F650D7D674819892591401B5DF1C95AE89AC3

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

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

* Re: [SUGGESTION] Re: [PATCH] org-crypt-decrypt-entry: Apply initial visibility upon decryption
  2023-05-01 19:10                 ` Christopher M. Miles
@ 2023-05-01 19:18                   ` Ihor Radchenko
  0 siblings, 0 replies; 29+ messages in thread
From: Ihor Radchenko @ 2023-05-01 19:18 UTC (permalink / raw)
  To: Christopher M. Miles; +Cc: emacs-orgmode

"Christopher M. Miles" <numbchild@gmail.com> writes:

> I'm under macOS system. the result of (getenv "DISPLAY") is
> "ssh-askpass". This is weird...

I also have (setenv "SSH_ASKPASS" "ssh-askpass-fullscreen")
in my config. Maybe you are setting similar things in bashrc or init.el.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


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

* [EasyPG (epa)] Emacs can't save modified encrypted file
       [not found]             ` <m2sfcgmbpo.fsf@numbchild>
@ 2023-05-02  4:00               ` Christopher M. Miles
  2023-05-02 11:57                 ` Ihor Radchenko
  0 siblings, 1 reply; 29+ messages in thread
From: Christopher M. Miles @ 2023-05-02  4:00 UTC (permalink / raw)
  To: Ihor Radchenko, Christopher M. Miles, emacs-orgmode


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


"Christopher M. Miles" <numbchild@gmail.com> writes:

> [[PGP Signed Part:Undecided]]
>
> Ihor Radchenko <yantar92@posteo.net> writes:
>
>> "Christopher M. Miles" <numbchild@gmail.com> writes:
>>
>>>>>> May you elaborate what performance issues you are experiencing?
>>>>>
>>>>> My performance issue is a large Org file about 2M size on saving. I will
>>>>> reproduce and generate profiler report for more detailed data and update
>>>>> in this thread.
>>>>
>>>> Please save the report using M-x profiler-report-write-profile - it will
>>>> produce Elisp data that can be re-opened and examined directly.
>>>
>>> I attached CPU and Memory report in attachments.
>>
>> This CPU report is not just for saving. You did M-x (vectico), `undo',
>> `org-clock-in', and `save-buffer'. `save-buffer' took no time. And
>> everything took less than one second.
>>
>> Are you sure that it is the correct profile?
>
> The current CPU report indeed not contains heavy org-crypt. Because my
> epa get problem. When I edit a GnuPG encrypted "encrypt.org.gpg", it
> suspend on epa waiting for process to finished. It never ends unless I
> press [C-g] to quit it. So I can't reproduce the Org file contains
> org-crypt headlines saving profiler report.
>
> Sorry that I have not mentioned this actual background reason. I indeed
> did a profiler report before (about 3 months ago), and the profiler
> report use lot of time on org-crypt invocation. Hmm, maybe problem gone
> as time scrolls.
>
> I will mark this as task in my Org Agenda, and take time to profiler
> report again, make sure org-crypt is heavy, then update here.
>
> Regards,

I tried to reproduce and study the problem of Emacs saving modified encrypted file.

Because the investigate log is very long, so I write conclusion here at first:

I downgrade gnupg, then the problem solved. But the downgrade version is
very old (gnupg@2.4.1 -> gnupg@2.2.41). I suspend problem is somewhere
else, like Emacs interaction with GnuPG process.

Here the the whole process and log:

Reproduce:

1. =[M-x toggle-debug-on-quit]=

2. edit "authinfo.gpg" encrypted file in Emacs, then press =[C-x C-s]= to save file.

3. but Emacs have not actually save file, the mode-line file status is still "modified", and Emacs suspending.

4. I press =[C-g]= to quit got following stacktrace:

#+begin_example
Debugger entered--Lisp error: (quit)
  accept-process-output(#<process epg> 1)
  epg-wait-for-status(#s(epg-context :protocol OpenPGP :program "/opt/homebrew/bin/gpg" :home-directory "/Users/stardiviner/.gnupg" :armor nil :textmode nil :include-certs nil :cipher-algorithm nil :digest-algorithm nil :compress-algorithm nil :passphrase-callback (epa-file-passphrase-callback-function . "/Users/stardiviner/.config/emacs/secrets/authinfo....") :progress-callback (epa-progress-callback-function . "Encrypting /Users/stardiviner/.config/emacs/secret...") :edit-callback nil :signers nil :sender nil :sig-notations nil :process #<process epg> :output-file "/var/folders/ym/f3v5_yk1279g5ls70x3hzblh0000gn/T/e..." :result nil :operation encrypt :pinentry-mode loopback :error-output "" :error-buffer #<buffer  *epg-error*>) ("BEGIN_ENCRYPTION"))
  epg-start-encrypt(#s(epg-context :protocol OpenPGP :program "/opt/homebrew/bin/gpg" :home-directory "/Users/stardiviner/.gnupg" :armor nil :textmode nil :include-certs nil :cipher-algorithm nil :digest-algorithm nil :compress-algorithm nil :passphrase-callback (epa-file-passphrase-callback-function . "/Users/stardiviner/.config/emacs/secrets/authinfo....") :progress-callback (epa-progress-callback-function . "Encrypting /Users/stardiviner/.config/emacs/secret...") :edit-callback nil :signers nil :sender nil :sig-notations nil :process #<process epg> :output-file "/var/folders/ym/f3v5_yk1279g5ls70x3hzblh0000gn/T/e..." :result nil :operation encrypt :pinentry-mode loopback :error-output "" :error-buffer #<buffer  *epg-error*>) #s(epg-data :file nil :string "# -*- epa-file-encrypt-to: (\"stardiviner\") -*-\n\n# ...") (#s(epg-key :owner-trust ultimate :sub-key-list (#s(epg-sub-key :validity ultimate :capability (sign certify) :secret-p nil :algorithm 1 :length 2048 :id "1B5DF1C95AE89AC3" :creation-time 1422686308 :expiration-time nil :fingerprint "F09F650D7D674819892591401B5DF1C95AE89AC3") #s(epg-sub-key :validity ultimate :capability (encrypt) :secret-p nil :algorithm 1 :length 2048 :id "0251FA6886EB6B77" :creation-time 1422686308 :expiration-time nil :fingerprint "32A8581A6E137ABD26DA2F570251FA6886EB6B77")) :user-id-list (#s(epg-user-id :validity ultimate :string "stardiviner (numbchild@gmail.com) <numbchild@gmail..." :signature-list nil) #s(epg-user-id :validity ultimate :string "stardiviner (Christopher Miles) <numbchild@gmail.c..." :signature-list nil))) #s(epg-key :owner-trust none :sub-key-list (#s(epg-sub-key :validity none :capability (sign certify) :secret-p nil :algorithm 1 :length 2048 :id "B8C4B8E547C32433" :creation-time 1330690561 :expiration-time nil :fingerprint "9BAA92BCCDDDB9EF3B36CB99B8C4B8E547C32433") #s(epg-sub-key :validity none :capability (encrypt) :secret-p nil :algorithm 1 :length 2048 :id "AEDA8A17BB08B786" :creation-time 1330690561 :expiration-time nil :fingerprint "0DEF7425E79FE2E0090B424BAEDA8A17BB08B786")) :user-id-list (#s(epg-user-id :validity none :string "Christopher Miles (stardiviner, numbchild) <numbch..." :signature-list nil)))) nil nil)
  epg-encrypt-string(#s(epg-context :protocol OpenPGP :program "/opt/homebrew/bin/gpg" :home-directory "/Users/stardiviner/.gnupg" :armor nil :textmode nil :include-certs nil :cipher-algorithm nil :digest-algorithm nil :compress-algorithm nil :passphrase-callback (epa-file-passphrase-callback-function . "/Users/stardiviner/.config/emacs/secrets/authinfo....") :progress-callback (epa-progress-callback-function . "Encrypting /Users/stardiviner/.config/emacs/secret...") :edit-callback nil :signers nil :sender nil :sig-notations nil :process #<process epg> :output-file "/var/folders/ym/f3v5_yk1279g5ls70x3hzblh0000gn/T/e..." :result nil :operation encrypt :pinentry-mode loopback :error-output "" :error-buffer #<buffer  *epg-error*>) "# -*- epa-file-encrypt-to: (\"stardiviner\") -*-\n\n# ..." (#s(epg-key :owner-trust ultimate :sub-key-list (#s(epg-sub-key :validity ultimate :capability (sign certify) :secret-p nil :algorithm 1 :length 2048 :id "1B5DF1C95AE89AC3" :creation-time 1422686308 :expiration-time nil :fingerprint "F09F650D7D674819892591401B5DF1C95AE89AC3") #s(epg-sub-key :validity ultimate :capability (encrypt) :secret-p nil :algorithm 1 :length 2048 :id "0251FA6886EB6B77" :creation-time 1422686308 :expiration-time nil :fingerprint "32A8581A6E137ABD26DA2F570251FA6886EB6B77")) :user-id-list (#s(epg-user-id :validity ultimate :string "stardiviner (numbchild@gmail.com) <numbchild@gmail..." :signature-list nil) #s(epg-user-id :validity ultimate :string "stardiviner (Christopher Miles) <numbchild@gmail.c..." :signature-list nil))) #s(epg-key :owner-trust none :sub-key-list (#s(epg-sub-key :validity none :capability (sign certify) :secret-p nil :algorithm 1 :length 2048 :id "B8C4B8E547C32433" :creation-time 1330690561 :expiration-time nil :fingerprint "9BAA92BCCDDDB9EF3B36CB99B8C4B8E547C32433") #s(epg-sub-key :validity none :capability (encrypt) :secret-p nil :algorithm 1 :length 2048 :id "AEDA8A17BB08B786" :creation-time 1330690561 :expiration-time nil :fingerprint "0DEF7425E79FE2E0090B424BAEDA8A17BB08B786")) :user-id-list (#s(epg-user-id :validity none :string "Christopher Miles (stardiviner, numbchild) <numbch..." :signature-list nil)))))
  epa-file-write-region(nil nil "/Users/stardiviner/.config/emacs/secrets/authinfo...." nil t "~/.config/emacs/secrets/authinfo.gpg" nil)
  apply(epa-file-write-region (nil nil "/Users/stardiviner/.config/emacs/secrets/authinfo...." nil t "~/.config/emacs/secrets/authinfo.gpg" nil))
  epa-file-handler(write-region nil nil "/Users/stardiviner/.config/emacs/secrets/authinfo...." nil t "~/.config/emacs/secrets/authinfo.gpg" nil)
  write-region(nil nil "/Users/stardiviner/.config/emacs/secrets/authinfo...." nil t "~/.config/emacs/secrets/authinfo.gpg")
  basic-save-buffer-2()
  basic-save-buffer-1()
  basic-save-buffer(nil)
  save-buffer()
  #f(compiled-function (buffer) #<bytecode 0x8c750db3599e00a>)(#<buffer authinfo.gpg>)
  map-y-or-n-p(#f(compiled-function (buffer) #<bytecode 0x3861ff2c85e5a70>) #f(compiled-function (buffer) #<bytecode 0x8c750db3599e00a>) (#<buffer authinfo.gpg>) ("buffer" "buffers" "save") ((18 #f(compiled-function (buf) #<bytecode -0x13c467336852d4a4>) "view this buffer") (6 #f(compiled-function (buf) #<bytecode 0x81e69c1bf6c6e9c>) "view this buffer and quit") (100 #f(compiled-function (buf) #<bytecode -0x24aad661d8a3566>) "view changes in this buffer")))
  save-some-buffers(:no-prompt #f(compiled-function () #<bytecode 0x11658fcd9d115b5c>))
  apply(save-some-buffers (:no-prompt #f(compiled-function () #<bytecode 0x11658fcd9d115b5c>)))
  timer-event-handler([nil 0 5 0 :repeat save-some-buffers (:no-prompt #f(compiled-function () #<bytecode 0x11658fcd9d115b5c>)) idle 0 nil])
#+end_example

----------------------------------------------------------------------------------------------------

When I save modified "=~/.config/emacs/secrets/authinfo.gpg=", got prompt:

#+begin_example
Untrusted key AEDA8A17BB08B786 Christopher Miles (stardiviner, numbchild) <numbchild@gmail.com>.  Use anyway? (y or n)
#+end_example

If I input "n" for prompt:

#+begin_example
Debugger entered--Lisp error: (file-error "Opening output file" "Encrypt failed" "Unusable public key: B8C4B8E547C32433 (key not tru...")
  apply(debug error (file-error "Opening output file" "Encrypt failed" "Unusable public key: B8C4B8E547C32433 (key not tru..."))
  edebug(error (file-error "Opening output file" "Encrypt failed" "Unusable public key: B8C4B8E547C32433 (key not tru..."))
  signal(file-error ("Opening output file" "Encrypt failed" "Unusable public key: B8C4B8E547C32433 (key not tru..."))
  edebug-signal(file-error ("Opening output file" "Encrypt failed" "Unusable public key: B8C4B8E547C32433 (key not tru..."))
  signal(file-error ("Opening output file" "Encrypt failed" "Unusable public key: B8C4B8E547C32433 (key not tru..."))
  (edebug-after (edebug-before 157) 163 (signal 'file-error (edebug-after (edebug-before 158) 162 (cons "Opening output file" (edebug-after (edebug-before 159) 161 (cdr (edebug-after 0 160 error)))))))
  (condition-case error (edebug-after (edebug-before 67) 142 (setq string (edebug-after (edebug-before 68) 141 (epg-encrypt-string (edebug-after 0 69 context) (edebug-after (edebug-before 70) 109 (if (edebug-after ... 73 ...) (edebug-after ... 77 ...) (edebug-after ... 86 ...) (edebug-after ... 90 ...) (edebug-after ... 108 ...))) (edebug-after (edebug-before 110) 140 (if (edebug-after ... 126 ...) (edebug-after ... 130 ...) (edebug-after ... 139 ...))))))) (error (edebug-after (edebug-before 143) 145 (epa-display-error (edebug-after 0 144 context))) (edebug-after (edebug-before 146) 156 (if (edebug-after (edebug-before 147) 152 (setq entry (edebug-after (edebug-before 148) 151 (assoc ... ...)))) (edebug-after (edebug-before 153) 155 (setcdr (edebug-after 0 154 entry) nil)))) (edebug-after (edebug-before 157) 163 (signal 'file-error (edebug-after (edebug-before 158) 162 (cons "Opening output file" (edebug-after (edebug-before 159) 161 (cdr ...))))))))
  (edebug-after (edebug-before 66) 164 (condition-case error (edebug-after (edebug-before 67) 142 (setq string (edebug-after (edebug-before 68) 141 (epg-encrypt-string (edebug-after 0 69 context) (edebug-after (edebug-before 70) 109 (if ... ... ... ... ...)) (edebug-after (edebug-before 110) 140 (if ... ... ...)))))) (error (edebug-after (edebug-before 143) 145 (epa-display-error (edebug-after 0 144 context))) (edebug-after (edebug-before 146) 156 (if (edebug-after (edebug-before 147) 152 (setq entry (edebug-after ... 151 ...))) (edebug-after (edebug-before 153) 155 (setcdr (edebug-after 0 154 entry) nil)))) (edebug-after (edebug-before 157) 163 (signal 'file-error (edebug-after (edebug-before 158) 162 (cons "Opening output file" (edebug-after ... 161 ...))))))))
  (let* ((coding-system (edebug-after (edebug-before 11) 27 (or (edebug-after 0 12 coding-system-for-write) (edebug-after (edebug-before 13) 26 (if (edebug-after ... 15 ...) (edebug-after ... 24 ...) (edebug-after 0 25 buffer-file-coding-system)))))) (context (edebug-after (edebug-before 28) 29 (epg-make-context))) (coding-system-for-write 'binary) string entry (recipients (edebug-after (edebug-before 30) 41 (cond ((edebug-after (edebug-before 31) 33 (listp ...)) (edebug-after 0 34 epa-file-encrypt-to)) ((edebug-after (edebug-before 35) 37 (stringp ...)) (edebug-after (edebug-before 38) 40 (list ...)))))) buffer) (edebug-after (edebug-before 42) 49 (epg-context-set-passphrase-callback (edebug-after 0 43 context) (edebug-after (edebug-before 44) 48 (cons (edebug-after (edebug-before 45) 46 #'epa-file-passphrase-callback-function) (edebug-after 0 47 file))))) (edebug-after (edebug-before 50) 59 (epg-context-set-progress-callback (edebug-after 0 51 context) (edebug-after (edebug-before 52) 58 (cons (edebug-after (edebug-before 53) 54 #'epa-progress-callback-function) (edebug-after (edebug-before 55) 57 (format "Encrypting %s" (edebug-after 0 56 file))))))) (edebug-after (edebug-before 60) 65 (let ((cl-x (edebug-after 0 62 context))) (or (let ((cl-x cl-x)) (progn (and (memq ... cl-struct-epg-context-tags) t))) (signal 'wrong-type-argument (list 'epg-context cl-x))) (let* ((v cl-x)) (edebug-after (edebug-before 61) 63 (aset v 4 (edebug-after 0 64 epa-armor)))))) (edebug-after (edebug-before 66) 164 (condition-case error (edebug-after (edebug-before 67) 142 (setq string (edebug-after (edebug-before 68) 141 (epg-encrypt-string (edebug-after 0 69 context) (edebug-after ... 109 ...) (edebug-after ... 140 ...))))) (error (edebug-after (edebug-before 143) 145 (epa-display-error (edebug-after 0 144 context))) (edebug-after (edebug-before 146) 156 (if (edebug-after (edebug-before 147) 152 (setq entry ...)) (edebug-after (edebug-before 153) 155 (setcdr ... nil)))) (edebug-after (edebug-before 157) 163 (signal 'file-error (edebug-after (edebug-before 158) 162 (cons "Opening output file" ...))))))) (edebug-after (edebug-before 165) 176 (epa-file-run-real-handler (edebug-after (edebug-before 166) 167 #'write-region) (edebug-after (edebug-before 168) 175 (list (edebug-after 0 169 string) nil (edebug-after 0 170 file) (edebug-after 0 171 append) (edebug-after 0 172 visit) (edebug-after 0 173 lockname) (edebug-after 0 174 mustbenew))))) (edebug-after (edebug-before 177) 183 (if (edebug-after (edebug-before 178) 179 (boundp 'last-coding-system-used)) (edebug-after (edebug-before 180) 182 (setq last-coding-system-used (edebug-after 0 181 coding-system))))) (edebug-after (edebug-before 184) 207 (if (edebug-after (edebug-before 185) 187 (eq (edebug-after 0 186 visit) t)) (edebug-after (edebug-before 188) 194 (progn (edebug-after (edebug-before 189) 191 (setq buffer-file-name (edebug-after 0 190 file))) (edebug-after (edebug-before 192) 193 (set-visited-file-modtime)))) (edebug-after (edebug-before 195) 206 (if (edebug-after (edebug-before 196) 198 (stringp (edebug-after 0 197 visit))) (edebug-after (edebug-before 199) 205 (progn (edebug-after ... 201 ...) (edebug-after ... 204 ...))))))) (edebug-after (edebug-before 208) 223 (if (edebug-after (edebug-before 209) 219 (or (edebug-after (edebug-before 210) 212 (eq (edebug-after 0 211 visit) t)) (edebug-after (edebug-before 213) 215 (eq (edebug-after 0 214 visit) nil)) (edebug-after (edebug-before 216) 218 (stringp (edebug-after 0 217 visit))))) (edebug-after (edebug-before 220) 222 (message "Wrote %s" (edebug-after 0 221 buffer-file-name))))))
  (edebug-after (edebug-before 10) 224 (let* ((coding-system (edebug-after (edebug-before 11) 27 (or (edebug-after 0 12 coding-system-for-write) (edebug-after (edebug-before 13) 26 (if ... ... ...))))) (context (edebug-after (edebug-before 28) 29 (epg-make-context))) (coding-system-for-write 'binary) string entry (recipients (edebug-after (edebug-before 30) 41 (cond ((edebug-after ... 33 ...) (edebug-after 0 34 epa-file-encrypt-to)) ((edebug-after ... 37 ...) (edebug-after ... 40 ...))))) buffer) (edebug-after (edebug-before 42) 49 (epg-context-set-passphrase-callback (edebug-after 0 43 context) (edebug-after (edebug-before 44) 48 (cons (edebug-after (edebug-before 45) 46 #'epa-file-passphrase-callback-function) (edebug-after 0 47 file))))) (edebug-after (edebug-before 50) 59 (epg-context-set-progress-callback (edebug-after 0 51 context) (edebug-after (edebug-before 52) 58 (cons (edebug-after (edebug-before 53) 54 #'epa-progress-callback-function) (edebug-after (edebug-before 55) 57 (format "Encrypting %s" ...)))))) (edebug-after (edebug-before 60) 65 (let ((cl-x (edebug-after 0 62 context))) (or (let ((cl-x cl-x)) (progn (and ... t))) (signal 'wrong-type-argument (list 'epg-context cl-x))) (let* ((v cl-x)) (edebug-after (edebug-before 61) 63 (aset v 4 (edebug-after 0 64 epa-armor)))))) (edebug-after (edebug-before 66) 164 (condition-case error (edebug-after (edebug-before 67) 142 (setq string (edebug-after (edebug-before 68) 141 (epg-encrypt-string ... ... ...)))) (error (edebug-after (edebug-before 143) 145 (epa-display-error (edebug-after 0 144 context))) (edebug-after (edebug-before 146) 156 (if (edebug-after ... 152 ...) (edebug-after ... 155 ...))) (edebug-after (edebug-before 157) 163 (signal 'file-error (edebug-after ... 162 ...)))))) (edebug-after (edebug-before 165) 176 (epa-file-run-real-handler (edebug-after (edebug-before 166) 167 #'write-region) (edebug-after (edebug-before 168) 175 (list (edebug-after 0 169 string) nil (edebug-after 0 170 file) (edebug-after 0 171 append) (edebug-after 0 172 visit) (edebug-after 0 173 lockname) (edebug-after 0 174 mustbenew))))) (edebug-after (edebug-before 177) 183 (if (edebug-after (edebug-before 178) 179 (boundp 'last-coding-system-used)) (edebug-after (edebug-before 180) 182 (setq last-coding-system-used (edebug-after 0 181 coding-system))))) (edebug-after (edebug-before 184) 207 (if (edebug-after (edebug-before 185) 187 (eq (edebug-after 0 186 visit) t)) (edebug-after (edebug-before 188) 194 (progn (edebug-after (edebug-before 189) 191 (setq buffer-file-name ...)) (edebug-after (edebug-before 192) 193 (set-visited-file-modtime)))) (edebug-after (edebug-before 195) 206 (if (edebug-after (edebug-before 196) 198 (stringp ...)) (edebug-after (edebug-before 199) 205 (progn ... ...)))))) (edebug-after (edebug-before 208) 223 (if (edebug-after (edebug-before 209) 219 (or (edebug-after (edebug-before 210) 212 (eq ... t)) (edebug-after (edebug-before 213) 215 (eq ... nil)) (edebug-after (edebug-before 216) 218 (stringp ...)))) (edebug-after (edebug-before 220) 222 (message "Wrote %s" (edebug-after 0 221 buffer-file-name)))))))
  (closure ((mustbenew) (lockname . "~/.config/emacs/secrets/authinfo.gpg") (visit . t) (append) (file . "/Users/stardiviner/.config/emacs/secrets/authinfo....") (end . 1960) (start . 1) t) nil :closure-dont-trim-context (edebug-after (edebug-before 0) 4 (if (edebug-after 0 1 append) (edebug-after (edebug-before 2) 3 (error "Can't append to the file")))) (edebug-after (edebug-before 5) 9 (setq file (edebug-after (edebug-before 6) 8 (expand-file-name (edebug-after 0 7 file))))) (edebug-after (edebug-before 10) 224 (let* ((coding-system (edebug-after (edebug-before 11) 27 (or (edebug-after 0 12 coding-system-for-write) (edebug-after ... 26 ...)))) (context (edebug-after (edebug-before 28) 29 (epg-make-context))) (coding-system-for-write 'binary) string entry (recipients (edebug-after (edebug-before 30) 41 (cond (... ...) (... ...)))) buffer) (edebug-after (edebug-before 42) 49 (epg-context-set-passphrase-callback (edebug-after 0 43 context) (edebug-after (edebug-before 44) 48 (cons (edebug-after ... 46 ...) (edebug-after 0 47 file))))) (edebug-after (edebug-before 50) 59 (epg-context-set-progress-callback (edebug-after 0 51 context) (edebug-after (edebug-before 52) 58 (cons (edebug-after ... 54 ...) (edebug-after ... 57 ...))))) (edebug-after (edebug-before 60) 65 (let ((cl-x (edebug-after 0 62 context))) (or (let (...) (progn ...)) (signal 'wrong-type-argument (list ... cl-x))) (let* ((v cl-x)) (edebug-after (edebug-before 61) 63 (aset v 4 ...))))) (edebug-after (edebug-before 66) 164 (condition-case error (edebug-after (edebug-before 67) 142 (setq string (edebug-after ... 141 ...))) (error (edebug-after (edebug-before 143) 145 (epa-display-error ...)) (edebug-after (edebug-before 146) 156 (if ... ...)) (edebug-after (edebug-before 157) 163 (signal ... ...))))) (edebug-after (edebug-before 165) 176 (epa-file-run-real-handler (edebug-after (edebug-before 166) 167 #'write-region) (edebug-after (edebug-before 168) 175 (list (edebug-after 0 169 string) nil (edebug-after 0 170 file) (edebug-after 0 171 append) (edebug-after 0 172 visit) (edebug-after 0 173 lockname) (edebug-after 0 174 mustbenew))))) (edebug-after (edebug-before 177) 183 (if (edebug-after (edebug-before 178) 179 (boundp 'last-coding-system-used)) (edebug-after (edebug-before 180) 182 (setq last-coding-system-used (edebug-after 0 181 coding-system))))) (edebug-after (edebug-before 184) 207 (if (edebug-after (edebug-before 185) 187 (eq (edebug-after 0 186 visit) t)) (edebug-after (edebug-before 188) 194 (progn (edebug-after ... 191 ...) (edebug-after ... 193 ...))) (edebug-after (edebug-before 195) 206 (if (edebug-after ... 198 ...) (edebug-after ... 205 ...))))) (edebug-after (edebug-before 208) 223 (if (edebug-after (edebug-before 209) 219 (or (edebug-after ... 212 ...) (edebug-after ... 215 ...) (edebug-after ... 218 ...))) (edebug-after (edebug-before 220) 222 (message "Wrote %s" (edebug-after 0 221 buffer-file-name))))))))()
  edebug-default-enter(epa-file-write-region (nil nil "/Users/stardiviner/.config/emacs/secrets/authinfo...." nil t "~/.config/emacs/secrets/authinfo.gpg" nil) (closure ((mustbenew) (lockname . "~/.config/emacs/secrets/authinfo.gpg") (visit . t) (append) (file . "/Users/stardiviner/.config/emacs/secrets/authinfo....") (end . 1960) (start . 1) t) nil :closure-dont-trim-context (edebug-after (edebug-before 0) 4 (if (edebug-after 0 1 append) (edebug-after (edebug-before 2) 3 (error "Can't append to the file")))) (edebug-after (edebug-before 5) 9 (setq file (edebug-after (edebug-before 6) 8 (expand-file-name (edebug-after 0 7 file))))) (edebug-after (edebug-before 10) 224 (let* ((coding-system (edebug-after (edebug-before 11) 27 (or ... ...))) (context (edebug-after (edebug-before 28) 29 (epg-make-context))) (coding-system-for-write 'binary) string entry (recipients (edebug-after (edebug-before 30) 41 (cond ... ...))) buffer) (edebug-after (edebug-before 42) 49 (epg-context-set-passphrase-callback (edebug-after 0 43 context) (edebug-after (edebug-before 44) 48 (cons ... ...)))) (edebug-after (edebug-before 50) 59 (epg-context-set-progress-callback (edebug-after 0 51 context) (edebug-after (edebug-before 52) 58 (cons ... ...)))) (edebug-after (edebug-before 60) 65 (let ((cl-x ...)) (or (let ... ...) (signal ... ...)) (let* (...) (edebug-after ... 63 ...)))) (edebug-after (edebug-before 66) 164 (condition-case error (edebug-after (edebug-before 67) 142 (setq string ...)) (error (edebug-after ... 145 ...) (edebug-after ... 156 ...) (edebug-after ... 163 ...)))) (edebug-after (edebug-before 165) 176 (epa-file-run-real-handler (edebug-after (edebug-before 166) 167 #'write-region) (edebug-after (edebug-before 168) 175 (list ... nil ... ... ... ... ...)))) (edebug-after (edebug-before 177) 183 (if (edebug-after (edebug-before 178) 179 (boundp ...)) (edebug-after (edebug-before 180) 182 (setq last-coding-system-used ...)))) (edebug-after (edebug-before 184) 207 (if (edebug-after (edebug-before 185) 187 (eq ... t)) (edebug-after (edebug-before 188) 194 (progn ... ...)) (edebug-after (edebug-before 195) 206 (if ... ...)))) (edebug-after (edebug-before 208) 223 (if (edebug-after (edebug-before 209) 219 (or ... ... ...)) (edebug-after (edebug-before 220) 222 (message "Wrote %s" ...))))))))
  edebug-default-enter(epa-file-write-region (nil nil "/Users/stardiviner/.config/emacs/secrets/authinfo...." nil t "~/.config/emacs/secrets/authinfo.gpg" nil) (closure ((mustbenew) (lockname . "~/.config/emacs/secrets/authinfo.gpg") (visit . t) (append) (file . "/Users/stardiviner/.config/emacs/secrets/authinfo....") (end . 1960) (start . 1) t) nil :closure-dont-trim-context (edebug-after (edebug-before 0) 4 (if (edebug-after 0 1 append) (edebug-after (edebug-before 2) 3 (error "Can't append to the file")))) (edebug-after (edebug-before 5) 9 (setq file (edebug-after (edebug-before 6) 8 (expand-file-name (edebug-after 0 7 file))))) (edebug-after (edebug-before 10) 224 (let* ((coding-system (edebug-after (edebug-before 11) 27 (or ... ...))) (context (edebug-after (edebug-before 28) 29 (epg-make-context))) (coding-system-for-write 'binary) string entry (recipients (edebug-after (edebug-before 30) 41 (cond ... ...))) buffer) (edebug-after (edebug-before 42) 49 (epg-context-set-passphrase-callback (edebug-after 0 43 context) (edebug-after (edebug-before 44) 48 (cons ... ...)))) (edebug-after (edebug-before 50) 59 (epg-context-set-progress-callback (edebug-after 0 51 context) (edebug-after (edebug-before 52) 58 (cons ... ...)))) (edebug-after (edebug-before 60) 65 (let ((cl-x ...)) (or (let ... ...) (signal ... ...)) (let* (...) (edebug-after ... 63 ...)))) (edebug-after (edebug-before 66) 164 (condition-case error (edebug-after (edebug-before 67) 142 (setq string ...)) (error (edebug-after ... 145 ...) (edebug-after ... 156 ...) (edebug-after ... 163 ...)))) (edebug-after (edebug-before 165) 176 (epa-file-run-real-handler (edebug-after (edebug-before 166) 167 #'write-region) (edebug-after (edebug-before 168) 175 (list ... nil ... ... ... ... ...)))) (edebug-after (edebug-before 177) 183 (if (edebug-after (edebug-before 178) 179 (boundp ...)) (edebug-after (edebug-before 180) 182 (setq last-coding-system-used ...)))) (edebug-after (edebug-before 184) 207 (if (edebug-after (edebug-before 185) 187 (eq ... t)) (edebug-after (edebug-before 188) 194 (progn ... ...)) (edebug-after (edebug-before 195) 206 (if ... ...)))) (edebug-after (edebug-before 208) 223 (if (edebug-after (edebug-before 209) 219 (or ... ... ...)) (edebug-after (edebug-before 220) 222 (message "Wrote %s" ...))))))))
  edebug-enter(epa-file-write-region (nil nil "/Users/stardiviner/.config/emacs/secrets/authinfo...." nil t "~/.config/emacs/secrets/authinfo.gpg" nil) (closure ((mustbenew) (lockname . "~/.config/emacs/secrets/authinfo.gpg") (visit . t) (append) (file . "/Users/stardiviner/.config/emacs/secrets/authinfo....") (end . 1960) (start . 1) t) nil :closure-dont-trim-context (edebug-after (edebug-before 0) 4 (if (edebug-after 0 1 append) (edebug-after (edebug-before 2) 3 (error "Can't append to the file")))) (edebug-after (edebug-before 5) 9 (setq file (edebug-after (edebug-before 6) 8 (expand-file-name (edebug-after 0 7 file))))) (edebug-after (edebug-before 10) 224 (let* ((coding-system (edebug-after (edebug-before 11) 27 (or ... ...))) (context (edebug-after (edebug-before 28) 29 (epg-make-context))) (coding-system-for-write 'binary) string entry (recipients (edebug-after (edebug-before 30) 41 (cond ... ...))) buffer) (edebug-after (edebug-before 42) 49 (epg-context-set-passphrase-callback (edebug-after 0 43 context) (edebug-after (edebug-before 44) 48 (cons ... ...)))) (edebug-after (edebug-before 50) 59 (epg-context-set-progress-callback (edebug-after 0 51 context) (edebug-after (edebug-before 52) 58 (cons ... ...)))) (edebug-after (edebug-before 60) 65 (let ((cl-x ...)) (or (let ... ...) (signal ... ...)) (let* (...) (edebug-after ... 63 ...)))) (edebug-after (edebug-before 66) 164 (condition-case error (edebug-after (edebug-before 67) 142 (setq string ...)) (error (edebug-after ... 145 ...) (edebug-after ... 156 ...) (edebug-after ... 163 ...)))) (edebug-after (edebug-before 165) 176 (epa-file-run-real-handler (edebug-after (edebug-before 166) 167 #'write-region) (edebug-after (edebug-before 168) 175 (list ... nil ... ... ... ... ...)))) (edebug-after (edebug-before 177) 183 (if (edebug-after (edebug-before 178) 179 (boundp ...)) (edebug-after (edebug-before 180) 182 (setq last-coding-system-used ...)))) (edebug-after (edebug-before 184) 207 (if (edebug-after (edebug-before 185) 187 (eq ... t)) (edebug-after (edebug-before 188) 194 (progn ... ...)) (edebug-after (edebug-before 195) 206 (if ... ...)))) (edebug-after (edebug-before 208) 223 (if (edebug-after (edebug-before 209) 219 (or ... ... ...)) (edebug-after (edebug-before 220) 222 (message "Wrote %s" ...))))))))
  epa-file-write-region(nil nil "/Users/stardiviner/.config/emacs/secrets/authinfo...." nil t "~/.config/emacs/secrets/authinfo.gpg" nil)
  apply(epa-file-write-region (nil nil "/Users/stardiviner/.config/emacs/secrets/authinfo...." nil t "~/.config/emacs/secrets/authinfo.gpg" nil))
  (if (and op (not epa-inhibit)) (apply op args) (epa-file-run-real-handler operation args))
  (let ((op (get operation 'epa-file))) (if (and op (not epa-inhibit)) (apply op args) (epa-file-run-real-handler operation args)))
  (progn (let ((op (get operation 'epa-file))) (if (and op (not epa-inhibit)) (apply op args) (epa-file-run-real-handler operation args))))
  (unwind-protect (progn (let ((op (get operation 'epa-file))) (if (and op (not epa-inhibit)) (apply op args) (epa-file-run-real-handler operation args)))) (set-match-data saved-match-data t))
  (let ((saved-match-data (match-data))) (unwind-protect (progn (let ((op (get operation 'epa-file))) (if (and op (not epa-inhibit)) (apply op args) (epa-file-run-real-handler operation args)))) (set-match-data saved-match-data t)))
  epa-file-handler(write-region nil nil "/Users/stardiviner/.config/emacs/secrets/authinfo...." nil t "~/.config/emacs/secrets/authinfo.gpg" nil)
  write-region(nil nil "/Users/stardiviner/.config/emacs/secrets/authinfo...." nil t "~/.config/emacs/secrets/authinfo.gpg")
  basic-save-buffer-2()
  basic-save-buffer-1()
  basic-save-buffer(nil)
  save-buffer()
  #f(compiled-function (buffer) #<bytecode 0x8c750db3599e00a>)(#<buffer authinfo.gpg>)
  map-y-or-n-p(#f(compiled-function (buffer) #<bytecode 0x3861ff2c85e5a70>) #f(compiled-function (buffer) #<bytecode 0x8c750db3599e00a>) (#<buffer authinfo.gpg>) ("buffer" "buffers" "save") ((18 #f(compiled-function (buf) #<bytecode -0x13c467336852d4a4>) "view this buffer") (6 #f(compiled-function (buf) #<bytecode 0x81e69c1bf6c6e9c>) "view this buffer and quit") (100 #f(compiled-function (buf) #<bytecode -0x24aad661d8a3566>) "view changes in this buffer")))
  save-some-buffers(:no-prompt #f(compiled-function () #<bytecode 0x11658fcd9d115b5c>))
  apply(save-some-buffers (:no-prompt #f(compiled-function () #<bytecode 0x11658fcd9d115b5c>)))
  timer-event-handler([t 0 5 0 :repeat save-some-buffers (:no-prompt #f(compiled-function () #<bytecode 0x11658fcd9d115b5c>)) idle 0 nil])
  recursive-edit()
  edebug--recursive-edit(after)
  edebug--display-1((#s(epg-key :owner-trust ultimate :sub-key-list (#s(epg-sub-key :validity ultimate :capability (sign certify) :secret-p nil :algorithm 1 :length 2048 :id "1B5DF1C95AE89AC3" :creation-time 1422686308 :expiration-time nil :fingerprint "F09F650D7D674819892591401B5DF1C95AE89AC3") #s(epg-sub-key :validity ultimate :capability (encrypt) :secret-p nil :algorithm 1 :length 2048 :id "0251FA6886EB6B77" :creation-time 1422686308 :expiration-time nil :fingerprint "32A8581A6E137ABD26DA2F570251FA6886EB6B77")) :user-id-list (#s(epg-user-id :validity ultimate :string "stardiviner (numbchild@gmail.com) <numbchild@gmail..." :signature-list nil) #s(epg-user-id :validity ultimate :string "stardiviner (Christopher Miles) <numbchild@gmail.c..." :signature-list nil))) #s(epg-key :owner-trust none :sub-key-list (#s(epg-sub-key :validity none :capability (sign certify) :secret-p nil :algorithm 1 :length 2048 :id "B8C4B8E547C32433" :creation-time 1330690561 :expiration-time nil :fingerprint "9BAA92BCCDDDB9EF3B36CB99B8C4B8E547C32433") #s(epg-sub-key :validity none :capability (encrypt) :secret-p nil :algorithm 1 :length 2048 :id "AEDA8A17BB08B786" :creation-time 1330690561 :expiration-time nil :fingerprint "0DEF7425E79FE2E0090B424BAEDA8A17BB08B786")) :user-id-list (#s(epg-user-id :validity none :string "Christopher Miles (stardiviner, numbchild) <numbch..." :signature-list nil)))) 137 after)
  edebug--display((#s(epg-key :owner-trust ultimate :sub-key-list (#s(epg-sub-key :validity ultimate :capability (sign certify) :secret-p nil :algorithm 1 :length 2048 :id "1B5DF1C95AE89AC3" :creation-time 1422686308 :expiration-time nil :fingerprint "F09F650D7D674819892591401B5DF1C95AE89AC3") #s(epg-sub-key :validity ultimate :capability (encrypt) :secret-p nil :algorithm 1 :length 2048 :id "0251FA6886EB6B77" :creation-time 1422686308 :expiration-time nil :fingerprint "32A8581A6E137ABD26DA2F570251FA6886EB6B77")) :user-id-list (#s(epg-user-id :validity ultimate :string "stardiviner (numbchild@gmail.com) <numbchild@gmail..." :signature-list nil) #s(epg-user-id :validity ultimate :string "stardiviner (Christopher Miles) <numbchild@gmail.c..." :signature-list nil))) #s(epg-key :owner-trust none :sub-key-list (#s(epg-sub-key :validity none :capability (sign certify) :secret-p nil :algorithm 1 :length 2048 :id "B8C4B8E547C32433" :creation-time 1330690561 :expiration-time nil :fingerprint "9BAA92BCCDDDB9EF3B36CB99B8C4B8E547C32433") #s(epg-sub-key :validity none :capability (encrypt) :secret-p nil :algorithm 1 :length 2048 :id "AEDA8A17BB08B786" :creation-time 1330690561 :expiration-time nil :fingerprint "0DEF7425E79FE2E0090B424BAEDA8A17BB08B786")) :user-id-list (#s(epg-user-id :validity none :string "Christopher Miles (stardiviner, numbchild) <numbch..." :signature-list nil)))) 137 after)
  edebug-debugger(137 after (#s(epg-key :owner-trust ultimate :sub-key-list (#s(epg-sub-key :validity ultimate :capability (sign certify) :secret-p nil :algorithm 1 :length 2048 :id "1B5DF1C95AE89AC3" :creation-time 1422686308 :expiration-time nil :fingerprint "F09F650D7D674819892591401B5DF1C95AE89AC3") #s(epg-sub-key :validity ultimate :capability (encrypt) :secret-p nil :algorithm 1 :length 2048 :id "0251FA6886EB6B77" :creation-time 1422686308 :expiration-time nil :fingerprint "32A8581A6E137ABD26DA2F570251FA6886EB6B77")) :user-id-list (#s(epg-user-id :validity ultimate :string "stardiviner (numbchild@gmail.com) <numbchild@gmail..." :signature-list nil) #s(epg-user-id :validity ultimate :string "stardiviner (Christopher Miles) <numbchild@gmail.c..." :signature-list nil))) #s(epg-key :owner-trust none :sub-key-list (#s(epg-sub-key :validity none :capability (sign certify) :secret-p nil :algorithm 1 :length 2048 :id "B8C4B8E547C32433" :creation-time 1330690561 :expiration-time nil :fingerprint "9BAA92BCCDDDB9EF3B36CB99B8C4B8E547C32433") #s(epg-sub-key :validity none :capability (encrypt) :secret-p nil :algorithm 1 :length 2048 :id "AEDA8A17BB08B786" :creation-time 1330690561 :expiration-time nil :fingerprint "0DEF7425E79FE2E0090B424BAEDA8A17BB08B786")) :user-id-list (#s(epg-user-id :validity none :string "Christopher Miles (stardiviner, numbchild) <numbch..." :signature-list nil)))))
  edebug-after(134 137 (#s(epg-key :owner-trust ultimate :sub-key-list (#s(epg-sub-key :validity ultimate :capability (sign certify) :secret-p nil :algorithm 1 :length 2048 :id "1B5DF1C95AE89AC3" :creation-time 1422686308 :expiration-time nil :fingerprint "F09F650D7D674819892591401B5DF1C95AE89AC3") #s(epg-sub-key :validity ultimate :capability (encrypt) :secret-p nil :algorithm 1 :length 2048 :id "0251FA6886EB6B77" :creation-time 1422686308 :expiration-time nil :fingerprint "32A8581A6E137ABD26DA2F570251FA6886EB6B77")) :user-id-list (#s(epg-user-id :validity ultimate :string "stardiviner (numbchild@gmail.com) <numbchild@gmail..." :signature-list nil) #s(epg-user-id :validity ultimate :string "stardiviner (Christopher Miles) <numbchild@gmail.c..." :signature-list nil))) #s(epg-key :owner-trust none :sub-key-list (#s(epg-sub-key :validity none :capability (sign certify) :secret-p nil :algorithm 1 :length 2048 :id "B8C4B8E547C32433" :creation-time 1330690561 :expiration-time nil :fingerprint "9BAA92BCCDDDB9EF3B36CB99B8C4B8E547C32433") #s(epg-sub-key :validity none :capability (encrypt) :secret-p nil :algorithm 1 :length 2048 :id "AEDA8A17BB08B786" :creation-time 1330690561 :expiration-time nil :fingerprint "0DEF7425E79FE2E0090B424BAEDA8A17BB08B786")) :user-id-list (#s(epg-user-id :validity none :string "Christopher Miles (stardiviner, numbchild) <numbch..." :signature-list nil)))))
  (epg--filter-revoked-keys (edebug-after (edebug-before 134) 137 (epg-list-keys (edebug-after 0 135 context) (edebug-after 0 136 recipients))))
  (edebug-after (edebug-before 133) 138 (epg--filter-revoked-keys (edebug-after (edebug-before 134) 137 (epg-list-keys (edebug-after 0 135 context) (edebug-after 0 136 recipients)))))
  (if (edebug-after 0 132 epa-file-encrypt-to) (edebug-after (edebug-before 133) 138 (epg--filter-revoked-keys (edebug-after (edebug-before 134) 137 (epg-list-keys (edebug-after 0 135 context) (edebug-after 0 136 recipients))))))
  (edebug-after (edebug-before 131) 139 (if (edebug-after 0 132 epa-file-encrypt-to) (edebug-after (edebug-before 133) 138 (epg--filter-revoked-keys (edebug-after (edebug-before 134) 137 (epg-list-keys (edebug-after 0 135 context) (edebug-after 0 136 recipients)))))))
  (if (edebug-after (edebug-before 111) 126 (or (edebug-after (edebug-before 112) 114 (eq (edebug-after 0 113 epa-file-select-keys) t)) (edebug-after (edebug-before 115) 125 (and (edebug-after (edebug-before 116) 118 (null (edebug-after 0 117 epa-file-select-keys))) (edebug-after (edebug-before 119) 124 (not (edebug-after ... 123 ...))))))) (edebug-after (edebug-before 127) 130 (epa-select-keys (edebug-after 0 128 context) "Select recipients for encryption.\nIf no one is sel..." (edebug-after 0 129 recipients))) (edebug-after (edebug-before 131) 139 (if (edebug-after 0 132 epa-file-encrypt-to) (edebug-after (edebug-before 133) 138 (epg--filter-revoked-keys (edebug-after (edebug-before 134) 137 (epg-list-keys (edebug-after 0 135 context) (edebug-after 0 136 recipients))))))))
  (edebug-after (edebug-before 110) 140 (if (edebug-after (edebug-before 111) 126 (or (edebug-after (edebug-before 112) 114 (eq (edebug-after 0 113 epa-file-select-keys) t)) (edebug-after (edebug-before 115) 125 (and (edebug-after (edebug-before 116) 118 (null ...)) (edebug-after (edebug-before 119) 124 (not ...)))))) (edebug-after (edebug-before 127) 130 (epa-select-keys (edebug-after 0 128 context) "Select recipients for encryption.\nIf no one is sel..." (edebug-after 0 129 recipients))) (edebug-after (edebug-before 131) 139 (if (edebug-after 0 132 epa-file-encrypt-to) (edebug-after (edebug-before 133) 138 (epg--filter-revoked-keys (edebug-after (edebug-before 134) 137 (epg-list-keys ... ...))))))))
  (epg-encrypt-string (edebug-after 0 69 context) (edebug-after (edebug-before 70) 109 (if (edebug-after (edebug-before 71) 73 (stringp (edebug-after 0 72 start))) (edebug-after (edebug-before 74) 77 (encode-coding-string (edebug-after 0 75 start) (edebug-after 0 76 coding-system))) (edebug-after (edebug-before 78) 86 (if (edebug-after 0 79 start) nil (edebug-after (edebug-before 80) 85 (progn (setq start ...) (setq end ...))))) (edebug-after (edebug-before 87) 90 (setq buffer (edebug-after (edebug-before 88) 89 (current-buffer)))) (edebug-after (edebug-before 91) 108 (let ((temp-buffer (generate-new-buffer " *temp*" t))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn ... ... ...) (and ... ...))))))) (edebug-after (edebug-before 110) 140 (if (edebug-after (edebug-before 111) 126 (or (edebug-after (edebug-before 112) 114 (eq (edebug-after 0 113 epa-file-select-keys) t)) (edebug-after (edebug-before 115) 125 (and (edebug-after ... 118 ...) (edebug-after ... 124 ...))))) (edebug-after (edebug-before 127) 130 (epa-select-keys (edebug-after 0 128 context) "Select recipients for encryption.\nIf no one is sel..." (edebug-after 0 129 recipients))) (edebug-after (edebug-before 131) 139 (if (edebug-after 0 132 epa-file-encrypt-to) (edebug-after (edebug-before 133) 138 (epg--filter-revoked-keys (edebug-after ... 137 ...))))))))
  (edebug-after (edebug-before 68) 141 (epg-encrypt-string (edebug-after 0 69 context) (edebug-after (edebug-before 70) 109 (if (edebug-after (edebug-before 71) 73 (stringp (edebug-after 0 72 start))) (edebug-after (edebug-before 74) 77 (encode-coding-string (edebug-after 0 75 start) (edebug-after 0 76 coding-system))) (edebug-after (edebug-before 78) 86 (if (edebug-after 0 79 start) nil (edebug-after (edebug-before 80) 85 (progn ... ...)))) (edebug-after (edebug-before 87) 90 (setq buffer (edebug-after (edebug-before 88) 89 (current-buffer)))) (edebug-after (edebug-before 91) 108 (let ((temp-buffer ...)) (save-current-buffer (set-buffer temp-buffer) (unwind-protect ... ...)))))) (edebug-after (edebug-before 110) 140 (if (edebug-after (edebug-before 111) 126 (or (edebug-after (edebug-before 112) 114 (eq ... t)) (edebug-after (edebug-before 115) 125 (and ... ...)))) (edebug-after (edebug-before 127) 130 (epa-select-keys (edebug-after 0 128 context) "Select recipients for encryption.\nIf no one is sel..." (edebug-after 0 129 recipients))) (edebug-after (edebug-before 131) 139 (if (edebug-after 0 132 epa-file-encrypt-to) (edebug-after (edebug-before 133) 138 (epg--filter-revoked-keys ...))))))))
  (setq string (edebug-after (edebug-before 68) 141 (epg-encrypt-string (edebug-after 0 69 context) (edebug-after (edebug-before 70) 109 (if (edebug-after (edebug-before 71) 73 (stringp (edebug-after 0 72 start))) (edebug-after (edebug-before 74) 77 (encode-coding-string (edebug-after 0 75 start) (edebug-after 0 76 coding-system))) (edebug-after (edebug-before 78) 86 (if (edebug-after 0 79 start) nil (edebug-after ... 85 ...))) (edebug-after (edebug-before 87) 90 (setq buffer (edebug-after ... 89 ...))) (edebug-after (edebug-before 91) 108 (let (...) (save-current-buffer ... ...))))) (edebug-after (edebug-before 110) 140 (if (edebug-after (edebug-before 111) 126 (or (edebug-after ... 114 ...) (edebug-after ... 125 ...))) (edebug-after (edebug-before 127) 130 (epa-select-keys (edebug-after 0 128 context) "Select recipients for encryption.\nIf no one is sel..." (edebug-after 0 129 recipients))) (edebug-after (edebug-before 131) 139 (if (edebug-after 0 132 epa-file-encrypt-to) (edebug-after ... 138 ...))))))))
  (edebug-after (edebug-before 67) 142 (setq string (edebug-after (edebug-before 68) 141 (epg-encrypt-string (edebug-after 0 69 context) (edebug-after (edebug-before 70) 109 (if (edebug-after (edebug-before 71) 73 (stringp ...)) (edebug-after (edebug-before 74) 77 (encode-coding-string ... ...)) (edebug-after (edebug-before 78) 86 (if ... nil ...)) (edebug-after (edebug-before 87) 90 (setq buffer ...)) (edebug-after (edebug-before 91) 108 (let ... ...)))) (edebug-after (edebug-before 110) 140 (if (edebug-after (edebug-before 111) 126 (or ... ...)) (edebug-after (edebug-before 127) 130 (epa-select-keys ... "Select recipients for encryption.\nIf no one is sel..." ...)) (edebug-after (edebug-before 131) 139 (if ... ...))))))))
  (condition-case error (edebug-after (edebug-before 67) 142 (setq string (edebug-after (edebug-before 68) 141 (epg-encrypt-string (edebug-after 0 69 context) (edebug-after (edebug-before 70) 109 (if (edebug-after ... 73 ...) (edebug-after ... 77 ...) (edebug-after ... 86 ...) (edebug-after ... 90 ...) (edebug-after ... 108 ...))) (edebug-after (edebug-before 110) 140 (if (edebug-after ... 126 ...) (edebug-after ... 130 ...) (edebug-after ... 139 ...))))))) (error (edebug-after (edebug-before 143) 145 (epa-display-error (edebug-after 0 144 context))) (edebug-after (edebug-before 146) 156 (if (edebug-after (edebug-before 147) 152 (setq entry (edebug-after (edebug-before 148) 151 (assoc ... ...)))) (edebug-after (edebug-before 153) 155 (setcdr (edebug-after 0 154 entry) nil)))) (edebug-after (edebug-before 157) 163 (signal 'file-error (edebug-after (edebug-before 158) 162 (cons "Opening output file" (edebug-after (edebug-before 159) 161 (cdr ...))))))))
  (edebug-after (edebug-before 66) 164 (condition-case error (edebug-after (edebug-before 67) 142 (setq string (edebug-after (edebug-before 68) 141 (epg-encrypt-string (edebug-after 0 69 context) (edebug-after (edebug-before 70) 109 (if ... ... ... ... ...)) (edebug-after (edebug-before 110) 140 (if ... ... ...)))))) (error (edebug-after (edebug-before 143) 145 (epa-display-error (edebug-after 0 144 context))) (edebug-after (edebug-before 146) 156 (if (edebug-after (edebug-before 147) 152 (setq entry (edebug-after ... 151 ...))) (edebug-after (edebug-before 153) 155 (setcdr (edebug-after 0 154 entry) nil)))) (edebug-after (edebug-before 157) 163 (signal 'file-error (edebug-after (edebug-before 158) 162 (cons "Opening output file" (edebug-after ... 161 ...))))))))
  (let* ((coding-system (edebug-after (edebug-before 11) 27 (or (edebug-after 0 12 coding-system-for-write) (edebug-after (edebug-before 13) 26 (if (edebug-after ... 15 ...) (edebug-after ... 24 ...) (edebug-after 0 25 buffer-file-coding-system)))))) (context (edebug-after (edebug-before 28) 29 (epg-make-context))) (coding-system-for-write 'binary) string entry (recipients (edebug-after (edebug-before 30) 41 (cond ((edebug-after (edebug-before 31) 33 (listp ...)) (edebug-after 0 34 epa-file-encrypt-to)) ((edebug-after (edebug-before 35) 37 (stringp ...)) (edebug-after (edebug-before 38) 40 (list ...)))))) buffer) (edebug-after (edebug-before 42) 49 (epg-context-set-passphrase-callback (edebug-after 0 43 context) (edebug-after (edebug-before 44) 48 (cons (edebug-after (edebug-before 45) 46 #'epa-file-passphrase-callback-function) (edebug-after 0 47 file))))) (edebug-after (edebug-before 50) 59 (epg-context-set-progress-callback (edebug-after 0 51 context) (edebug-after (edebug-before 52) 58 (cons (edebug-after (edebug-before 53) 54 #'epa-progress-callback-function) (edebug-after (edebug-before 55) 57 (format "Encrypting %s" (edebug-after 0 56 file))))))) (edebug-after (edebug-before 60) 65 (let ((cl-x (edebug-after 0 62 context))) (or (let ((cl-x cl-x)) (progn (and (memq ... cl-struct-epg-context-tags) t))) (signal 'wrong-type-argument (list 'epg-context cl-x))) (let* ((v cl-x)) (edebug-after (edebug-before 61) 63 (aset v 4 (edebug-after 0 64 epa-armor)))))) (edebug-after (edebug-before 66) 164 (condition-case error (edebug-after (edebug-before 67) 142 (setq string (edebug-after (edebug-before 68) 141 (epg-encrypt-string (edebug-after 0 69 context) (edebug-after ... 109 ...) (edebug-after ... 140 ...))))) (error (edebug-after (edebug-before 143) 145 (epa-display-error (edebug-after 0 144 context))) (edebug-after (edebug-before 146) 156 (if (edebug-after (edebug-before 147) 152 (setq entry ...)) (edebug-after (edebug-before 153) 155 (setcdr ... nil)))) (edebug-after (edebug-before 157) 163 (signal 'file-error (edebug-after (edebug-before 158) 162 (cons "Opening output file" ...))))))) (edebug-after (edebug-before 165) 176 (epa-file-run-real-handler (edebug-after (edebug-before 166) 167 #'write-region) (edebug-after (edebug-before 168) 175 (list (edebug-after 0 169 string) nil (edebug-after 0 170 file) (edebug-after 0 171 append) (edebug-after 0 172 visit) (edebug-after 0 173 lockname) (edebug-after 0 174 mustbenew))))) (edebug-after (edebug-before 177) 183 (if (edebug-after (edebug-before 178) 179 (boundp 'last-coding-system-used)) (edebug-after (edebug-before 180) 182 (setq last-coding-system-used (edebug-after 0 181 coding-system))))) (edebug-after (edebug-before 184) 207 (if (edebug-after (edebug-before 185) 187 (eq (edebug-after 0 186 visit) t)) (edebug-after (edebug-before 188) 194 (progn (edebug-after (edebug-before 189) 191 (setq buffer-file-name (edebug-after 0 190 file))) (edebug-after (edebug-before 192) 193 (set-visited-file-modtime)))) (edebug-after (edebug-before 195) 206 (if (edebug-after (edebug-before 196) 198 (stringp (edebug-after 0 197 visit))) (edebug-after (edebug-before 199) 205 (progn (edebug-after ... 201 ...) (edebug-after ... 204 ...))))))) (edebug-after (edebug-before 208) 223 (if (edebug-after (edebug-before 209) 219 (or (edebug-after (edebug-before 210) 212 (eq (edebug-after 0 211 visit) t)) (edebug-after (edebug-before 213) 215 (eq (edebug-after 0 214 visit) nil)) (edebug-after (edebug-before 216) 218 (stringp (edebug-after 0 217 visit))))) (edebug-after (edebug-before 220) 222 (message "Wrote %s" (edebug-after 0 221 buffer-file-name))))))
  (edebug-after (edebug-before 10) 224 (let* ((coding-system (edebug-after (edebug-before 11) 27 (or (edebug-after 0 12 coding-system-for-write) (edebug-after (edebug-before 13) 26 (if ... ... ...))))) (context (edebug-after (edebug-before 28) 29 (epg-make-context))) (coding-system-for-write 'binary) string entry (recipients (edebug-after (edebug-before 30) 41 (cond ((edebug-after ... 33 ...) (edebug-after 0 34 epa-file-encrypt-to)) ((edebug-after ... 37 ...) (edebug-after ... 40 ...))))) buffer) (edebug-after (edebug-before 42) 49 (epg-context-set-passphrase-callback (edebug-after 0 43 context) (edebug-after (edebug-before 44) 48 (cons (edebug-after (edebug-before 45) 46 #'epa-file-passphrase-callback-function) (edebug-after 0 47 file))))) (edebug-after (edebug-before 50) 59 (epg-context-set-progress-callback (edebug-after 0 51 context) (edebug-after (edebug-before 52) 58 (cons (edebug-after (edebug-before 53) 54 #'epa-progress-callback-function) (edebug-after (edebug-before 55) 57 (format "Encrypting %s" ...)))))) (edebug-after (edebug-before 60) 65 (let ((cl-x (edebug-after 0 62 context))) (or (let ((cl-x cl-x)) (progn (and ... t))) (signal 'wrong-type-argument (list 'epg-context cl-x))) (let* ((v cl-x)) (edebug-after (edebug-before 61) 63 (aset v 4 (edebug-after 0 64 epa-armor)))))) (edebug-after (edebug-before 66) 164 (condition-case error (edebug-after (edebug-before 67) 142 (setq string (edebug-after (edebug-before 68) 141 (epg-encrypt-string ... ... ...)))) (error (edebug-after (edebug-before 143) 145 (epa-display-error (edebug-after 0 144 context))) (edebug-after (edebug-before 146) 156 (if (edebug-after ... 152 ...) (edebug-after ... 155 ...))) (edebug-after (edebug-before 157) 163 (signal 'file-error (edebug-after ... 162 ...)))))) (edebug-after (edebug-before 165) 176 (epa-file-run-real-handler (edebug-after (edebug-before 166) 167 #'write-region) (edebug-after (edebug-before 168) 175 (list (edebug-after 0 169 string) nil (edebug-after 0 170 file) (edebug-after 0 171 append) (edebug-after 0 172 visit) (edebug-after 0 173 lockname) (edebug-after 0 174 mustbenew))))) (edebug-after (edebug-before 177) 183 (if (edebug-after (edebug-before 178) 179 (boundp 'last-coding-system-used)) (edebug-after (edebug-before 180) 182 (setq last-coding-system-used (edebug-after 0 181 coding-system))))) (edebug-after (edebug-before 184) 207 (if (edebug-after (edebug-before 185) 187 (eq (edebug-after 0 186 visit) t)) (edebug-after (edebug-before 188) 194 (progn (edebug-after (edebug-before 189) 191 (setq buffer-file-name ...)) (edebug-after (edebug-before 192) 193 (set-visited-file-modtime)))) (edebug-after (edebug-before 195) 206 (if (edebug-after (edebug-before 196) 198 (stringp ...)) (edebug-after (edebug-before 199) 205 (progn ... ...)))))) (edebug-after (edebug-before 208) 223 (if (edebug-after (edebug-before 209) 219 (or (edebug-after (edebug-before 210) 212 (eq ... t)) (edebug-after (edebug-before 213) 215 (eq ... nil)) (edebug-after (edebug-before 216) 218 (stringp ...)))) (edebug-after (edebug-before 220) 222 (message "Wrote %s" (edebug-after 0 221 buffer-file-name)))))))
  (closure ((mustbenew) (lockname . "~/.config/emacs/secrets/authinfo.gpg") (visit . t) (append) (file . "/Users/stardiviner/.config/emacs/secrets/authinfo....") (end . 1960) (start . 1) t) nil :closure-dont-trim-context (edebug-after (edebug-before 0) 4 (if (edebug-after 0 1 append) (edebug-after (edebug-before 2) 3 (error "Can't append to the file")))) (edebug-after (edebug-before 5) 9 (setq file (edebug-after (edebug-before 6) 8 (expand-file-name (edebug-after 0 7 file))))) (edebug-after (edebug-before 10) 224 (let* ((coding-system (edebug-after (edebug-before 11) 27 (or (edebug-after 0 12 coding-system-for-write) (edebug-after ... 26 ...)))) (context (edebug-after (edebug-before 28) 29 (epg-make-context))) (coding-system-for-write 'binary) string entry (recipients (edebug-after (edebug-before 30) 41 (cond (... ...) (... ...)))) buffer) (edebug-after (edebug-before 42) 49 (epg-context-set-passphrase-callback (edebug-after 0 43 context) (edebug-after (edebug-before 44) 48 (cons (edebug-after ... 46 ...) (edebug-after 0 47 file))))) (edebug-after (edebug-before 50) 59 (epg-context-set-progress-callback (edebug-after 0 51 context) (edebug-after (edebug-before 52) 58 (cons (edebug-after ... 54 ...) (edebug-after ... 57 ...))))) (edebug-after (edebug-before 60) 65 (let ((cl-x (edebug-after 0 62 context))) (or (let (...) (progn ...)) (signal 'wrong-type-argument (list ... cl-x))) (let* ((v cl-x)) (edebug-after (edebug-before 61) 63 (aset v 4 ...))))) (edebug-after (edebug-before 66) 164 (condition-case error (edebug-after (edebug-before 67) 142 (setq string (edebug-after ... 141 ...))) (error (edebug-after (edebug-before 143) 145 (epa-display-error ...)) (edebug-after (edebug-before 146) 156 (if ... ...)) (edebug-after (edebug-before 157) 163 (signal ... ...))))) (edebug-after (edebug-before 165) 176 (epa-file-run-real-handler (edebug-after (edebug-before 166) 167 #'write-region) (edebug-after (edebug-before 168) 175 (list (edebug-after 0 169 string) nil (edebug-after 0 170 file) (edebug-after 0 171 append) (edebug-after 0 172 visit) (edebug-after 0 173 lockname) (edebug-after 0 174 mustbenew))))) (edebug-after (edebug-before 177) 183 (if (edebug-after (edebug-before 178) 179 (boundp 'last-coding-system-used)) (edebug-after (edebug-before 180) 182 (setq last-coding-system-used (edebug-after 0 181 coding-system))))) (edebug-after (edebug-before 184) 207 (if (edebug-after (edebug-before 185) 187 (eq (edebug-after 0 186 visit) t)) (edebug-after (edebug-before 188) 194 (progn (edebug-after ... 191 ...) (edebug-after ... 193 ...))) (edebug-after (edebug-before 195) 206 (if (edebug-after ... 198 ...) (edebug-after ... 205 ...))))) (edebug-after (edebug-before 208) 223 (if (edebug-after (edebug-before 209) 219 (or (edebug-after ... 212 ...) (edebug-after ... 215 ...) (edebug-after ... 218 ...))) (edebug-after (edebug-before 220) 222 (message "Wrote %s" (edebug-after 0 221 buffer-file-name))))))))()
  edebug-default-enter(epa-file-write-region (nil nil "/Users/stardiviner/.config/emacs/secrets/authinfo...." nil t "~/.config/emacs/secrets/authinfo.gpg" nil) (closure ((mustbenew) (lockname . "~/.config/emacs/secrets/authinfo.gpg") (visit . t) (append) (file . "/Users/stardiviner/.config/emacs/secrets/authinfo....") (end . 1960) (start . 1) t) nil :closure-dont-trim-context (edebug-after (edebug-before 0) 4 (if (edebug-after 0 1 append) (edebug-after (edebug-before 2) 3 (error "Can't append to the file")))) (edebug-after (edebug-before 5) 9 (setq file (edebug-after (edebug-before 6) 8 (expand-file-name (edebug-after 0 7 file))))) (edebug-after (edebug-before 10) 224 (let* ((coding-system (edebug-after (edebug-before 11) 27 (or ... ...))) (context (edebug-after (edebug-before 28) 29 (epg-make-context))) (coding-system-for-write 'binary) string entry (recipients (edebug-after (edebug-before 30) 41 (cond ... ...))) buffer) (edebug-after (edebug-before 42) 49 (epg-context-set-passphrase-callback (edebug-after 0 43 context) (edebug-after (edebug-before 44) 48 (cons ... ...)))) (edebug-after (edebug-before 50) 59 (epg-context-set-progress-callback (edebug-after 0 51 context) (edebug-after (edebug-before 52) 58 (cons ... ...)))) (edebug-after (edebug-before 60) 65 (let ((cl-x ...)) (or (let ... ...) (signal ... ...)) (let* (...) (edebug-after ... 63 ...)))) (edebug-after (edebug-before 66) 164 (condition-case error (edebug-after (edebug-before 67) 142 (setq string ...)) (error (edebug-after ... 145 ...) (edebug-after ... 156 ...) (edebug-after ... 163 ...)))) (edebug-after (edebug-before 165) 176 (epa-file-run-real-handler (edebug-after (edebug-before 166) 167 #'write-region) (edebug-after (edebug-before 168) 175 (list ... nil ... ... ... ... ...)))) (edebug-after (edebug-before 177) 183 (if (edebug-after (edebug-before 178) 179 (boundp ...)) (edebug-after (edebug-before 180) 182 (setq last-coding-system-used ...)))) (edebug-after (edebug-before 184) 207 (if (edebug-after (edebug-before 185) 187 (eq ... t)) (edebug-after (edebug-before 188) 194 (progn ... ...)) (edebug-after (edebug-before 195) 206 (if ... ...)))) (edebug-after (edebug-before 208) 223 (if (edebug-after (edebug-before 209) 219 (or ... ... ...)) (edebug-after (edebug-before 220) 222 (message "Wrote %s" ...))))))))
  edebug-default-enter(epa-file-write-region (nil nil "/Users/stardiviner/.config/emacs/secrets/authinfo...." nil t "~/.config/emacs/secrets/authinfo.gpg" nil) (closure ((mustbenew) (lockname . "~/.config/emacs/secrets/authinfo.gpg") (visit . t) (append) (file . "/Users/stardiviner/.config/emacs/secrets/authinfo....") (end . 1960) (start . 1) t) nil :closure-dont-trim-context (edebug-after (edebug-before 0) 4 (if (edebug-after 0 1 append) (edebug-after (edebug-before 2) 3 (error "Can't append to the file")))) (edebug-after (edebug-before 5) 9 (setq file (edebug-after (edebug-before 6) 8 (expand-file-name (edebug-after 0 7 file))))) (edebug-after (edebug-before 10) 224 (let* ((coding-system (edebug-after (edebug-before 11) 27 (or ... ...))) (context (edebug-after (edebug-before 28) 29 (epg-make-context))) (coding-system-for-write 'binary) string entry (recipients (edebug-after (edebug-before 30) 41 (cond ... ...))) buffer) (edebug-after (edebug-before 42) 49 (epg-context-set-passphrase-callback (edebug-after 0 43 context) (edebug-after (edebug-before 44) 48 (cons ... ...)))) (edebug-after (edebug-before 50) 59 (epg-context-set-progress-callback (edebug-after 0 51 context) (edebug-after (edebug-before 52) 58 (cons ... ...)))) (edebug-after (edebug-before 60) 65 (let ((cl-x ...)) (or (let ... ...) (signal ... ...)) (let* (...) (edebug-after ... 63 ...)))) (edebug-after (edebug-before 66) 164 (condition-case error (edebug-after (edebug-before 67) 142 (setq string ...)) (error (edebug-after ... 145 ...) (edebug-after ... 156 ...) (edebug-after ... 163 ...)))) (edebug-after (edebug-before 165) 176 (epa-file-run-real-handler (edebug-after (edebug-before 166) 167 #'write-region) (edebug-after (edebug-before 168) 175 (list ... nil ... ... ... ... ...)))) (edebug-after (edebug-before 177) 183 (if (edebug-after (edebug-before 178) 179 (boundp ...)) (edebug-after (edebug-before 180) 182 (setq last-coding-system-used ...)))) (edebug-after (edebug-before 184) 207 (if (edebug-after (edebug-before 185) 187 (eq ... t)) (edebug-after (edebug-before 188) 194 (progn ... ...)) (edebug-after (edebug-before 195) 206 (if ... ...)))) (edebug-after (edebug-before 208) 223 (if (edebug-after (edebug-before 209) 219 (or ... ... ...)) (edebug-after (edebug-before 220) 222 (message "Wrote %s" ...))))))))
  edebug-enter(epa-file-write-region (nil nil "/Users/stardiviner/.config/emacs/secrets/authinfo...." nil t "~/.config/emacs/secrets/authinfo.gpg" nil) (closure ((mustbenew) (lockname . "~/.config/emacs/secrets/authinfo.gpg") (visit . t) (append) (file . "/Users/stardiviner/.config/emacs/secrets/authinfo....") (end . 1960) (start . 1) t) nil :closure-dont-trim-context (edebug-after (edebug-before 0) 4 (if (edebug-after 0 1 append) (edebug-after (edebug-before 2) 3 (error "Can't append to the file")))) (edebug-after (edebug-before 5) 9 (setq file (edebug-after (edebug-before 6) 8 (expand-file-name (edebug-after 0 7 file))))) (edebug-after (edebug-before 10) 224 (let* ((coding-system (edebug-after (edebug-before 11) 27 (or ... ...))) (context (edebug-after (edebug-before 28) 29 (epg-make-context))) (coding-system-for-write 'binary) string entry (recipients (edebug-after (edebug-before 30) 41 (cond ... ...))) buffer) (edebug-after (edebug-before 42) 49 (epg-context-set-passphrase-callback (edebug-after 0 43 context) (edebug-after (edebug-before 44) 48 (cons ... ...)))) (edebug-after (edebug-before 50) 59 (epg-context-set-progress-callback (edebug-after 0 51 context) (edebug-after (edebug-before 52) 58 (cons ... ...)))) (edebug-after (edebug-before 60) 65 (let ((cl-x ...)) (or (let ... ...) (signal ... ...)) (let* (...) (edebug-after ... 63 ...)))) (edebug-after (edebug-before 66) 164 (condition-case error (edebug-after (edebug-before 67) 142 (setq string ...)) (error (edebug-after ... 145 ...) (edebug-after ... 156 ...) (edebug-after ... 163 ...)))) (edebug-after (edebug-before 165) 176 (epa-file-run-real-handler (edebug-after (edebug-before 166) 167 #'write-region) (edebug-after (edebug-before 168) 175 (list ... nil ... ... ... ... ...)))) (edebug-after (edebug-before 177) 183 (if (edebug-after (edebug-before 178) 179 (boundp ...)) (edebug-after (edebug-before 180) 182 (setq last-coding-system-used ...)))) (edebug-after (edebug-before 184) 207 (if (edebug-after (edebug-before 185) 187 (eq ... t)) (edebug-after (edebug-before 188) 194 (progn ... ...)) (edebug-after (edebug-before 195) 206 (if ... ...)))) (edebug-after (edebug-before 208) 223 (if (edebug-after (edebug-before 209) 219 (or ... ... ...)) (edebug-after (edebug-before 220) 222 (message "Wrote %s" ...))))))))
  epa-file-write-region(nil nil "/Users/stardiviner/.config/emacs/secrets/authinfo...." nil t "~/.config/emacs/secrets/authinfo.gpg" nil)
  apply(epa-file-write-region (nil nil "/Users/stardiviner/.config/emacs/secrets/authinfo...." nil t "~/.config/emacs/secrets/authinfo.gpg" nil))
  (if (and op (not epa-inhibit)) (apply op args) (epa-file-run-real-handler operation args))
  (let ((op (get operation 'epa-file))) (if (and op (not epa-inhibit)) (apply op args) (epa-file-run-real-handler operation args)))
  (progn (let ((op (get operation 'epa-file))) (if (and op (not epa-inhibit)) (apply op args) (epa-file-run-real-handler operation args))))
  (unwind-protect (progn (let ((op (get operation 'epa-file))) (if (and op (not epa-inhibit)) (apply op args) (epa-file-run-real-handler operation args)))) (set-match-data saved-match-data t))
  (let ((saved-match-data (match-data))) (unwind-protect (progn (let ((op (get operation 'epa-file))) (if (and op (not epa-inhibit)) (apply op args) (epa-file-run-real-handler operation args)))) (set-match-data saved-match-data t)))
  epa-file-handler(write-region nil nil "/Users/stardiviner/.config/emacs/secrets/authinfo...." nil t "~/.config/emacs/secrets/authinfo.gpg" nil)
  write-region(nil nil "/Users/stardiviner/.config/emacs/secrets/authinfo...." nil t "~/.config/emacs/secrets/authinfo.gpg")
  basic-save-buffer-2()
  basic-save-buffer-1()
  basic-save-buffer(t)
  save-buffer(1)
  funcall-interactively(save-buffer 1)
  call-interactively(save-buffer nil nil)
  command-execute(save-buffer)
#+end_example

Environment:

#+begin_src sh :eval no
$ gpg --version
gpg (GnuPG) 2.4.1
libgcrypt 1.10.2
Copyright (C) 2023 g10 Code GmbH
License GNU GPL-3.0-or-later <https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Home: /Users/stardiviner/.gnupg
Supported algorithms:
Pubkey: RSA, ELG, DSA, ECDH, ECDSA, EDDSA
Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH,
        CAMELLIA128, CAMELLIA192, CAMELLIA256
Hash: SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
Compression: Uncompressed, ZIP, ZLIB, BZIP2
#+end_src

#+begin_src emacs-lisp
(emacs-version)
#+end_src

#+RESULTS[(2023-05-02 10:57:56) ad277f3210da682b9a8f2b15d7843ef0163e6cf2]:
: GNU Emacs 30.0.50 (build 1, aarch64-apple-darwin22.4.0, NS appkit-2299.50 Version 13.3.1 (Build 22E261))
:  of 2023-04-27

----------------------------------------------------------------------------------------------------

- [X] troubleshooting
  + [X] uninstall newly installed Emacs packages "chatgpt-shell" etc.
  + [X] check out GnuPG config files
  + [X] redo encrypt & sign =authinfo.gpg= file
  + [X] emacs minimal config for reproduce -> confirmed problem
- [X] search
  + [X] https://superuser.com/questions/366035/how-can-i-disable-prompt-about-trust-when-encrypting-file-with-gpg-in-emacs
  + [X] https://superuser.com/questions/1204820/emacs-easypg-asks-what-key-to-use-although-epa-file-encrypt-to-already-specified
- [X] troubleshooting
  - [X] src_emacs-lisp{(getenv "DISPLAY")} {{{results(=ssh-askpass=)}}} 
- [X] edebug
  + [X] save-buffer
    - [X] epa-file-handler
      + [X] epa-file-write-region
        - [X] epg-encrypt-string
          + [X] epg-start-encrypt
            - [X] epg-wait-for-status
              + [X] accept-process-output -> the process seems return 1 exit code?

- [X] epg context

#+begin_src emacs-lisp
(epg-make-context)
#+end_src

#+RESULTS[(2023-05-02 09:42:28) ff5134e662dc53f52cd8e5807acefe25a94cc5c3]:
: #s(epg-context :protocol OpenPGP :program "/opt/homebrew/bin/gpg" :home-directory "/Users/stardiviner/.gnupg" :armor nil :textmode nil :include-certs nil :cipher-algorithm nil :digest-algorithm nil :compress-algorithm nil :passphrase-callback (epa-passphrase-callback-function) :progress-callback nil :edit-callback nil :signers nil :sender nil :sig-notations nil :process nil :output-file nil :result nil :operation nil :pinentry-mode loopback :error-output "" :error-buffer nil)

I took a screenshot of edebugged function internal error. (NOTE: The result is shown in yellow line of "Result: ...")


[-- Attachment #1.2: Edebug screenshot --]
[-- Type: image/png, Size: 477347 bytes --]

[-- Attachment #1.3: edebug screenshot --]
[-- Type: image/png, Size: 477347 bytes --]

[-- Attachment #1.4: Type: text/plain, Size: 3009 bytes --]


- [X] find bellowing two key ID belongs where

Untrusted key "AEDA8A17BB08B786" ---> fingerprint "0DEF7425E79FE2E0090B424BAEDA8A17BB08B786" --> my old key
((invalid-recipient (reason . 10) (requested . "B8C4B8E547C32433"))) --> "F09F650D7D674819892591401B5DF1C95AE89AC3" --> my current new gnupg key

Question: I don't know why my current gnupg key and old gnupg key are together.

Here is my Emacs EasyPG (epa) config:

#+begin_src emacs-lisp
(use-package epa
  ;; force Emacs to use its own internal password prompt instead of an external
  ;; pinentry program.
  :preface (setenv "GPG_AGENT_INFO" nil)
  :custom ((epa-pinentry-mode 'loopback) ; let EasyPG Assistant to use loopback for pinentry.
           ;; cache passphrase for symmetric encryption.
           ;; For security reasons, this option is turned off by default and
           ;; not recommended to use.  Instead, consider using gpg-agent which
           ;; does the same job in a safer way.
           (epa-file-cache-passphrase-for-symmetric-encryption t)
           (epa-file-inhibit-auto-save t)
           (epa-keyserver "keys.openpgp.org")
           (epa-file-encrypt-to '("F09F650D7D674819892591401B5DF1C95AE89AC3"
                                  "stardiviner" "numbchild@gmail.com"))
           (epa-file-select-keys (if (null epa-file-encrypt-to) t nil)))
  :commands (epa-search-keys)
  :init (epa-file-enable)
  (add-to-list 'display-buffer-alist '("^\\*Keys\\*" . (display-buffer-below-selected)))
  :config
  ;; Decrypt to load session at Emacs startup beginning to avoid pause prompt.
  (my/json-read-value my/account-file 'ejc-sql-postgresql))
#+end_src

#+begin_src sh
gpg --list-public-keys 0DEF7425E79FE2E0090B424BAEDA8A17BB08B786
#+end_src

#+RESULTS[(2023-05-02 10:28:48) 8315506b0a6956294dbacb0276a25b482a834e5c]:
: pub   rsa2048 2012-03-02 [SC]
:       9BAA92BCCDDDB9EF3B36CB99B8C4B8E547C32433
: uid           [ultimate] Christopher Miles (stardiviner, numbchild) <numbchild@gmail.com>
: sub   rsa2048 2012-03-02 [E]
: 

#+begin_src sh :eval no
gpg --edit-key 0DEF7425E79FE2E0090B424BAEDA8A17BB08B786
#+end_src

- [X] downgrade macOS Homebrew installed GnuPG version
  Formula: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/gnupg.rb
  History: https://github.com/Homebrew/homebrew-core/commits/c72069733f8b12857afe9a9cdd1c9a73bc16f4a8/Formula/gnupg.rb
  #+begin_src sh
  brew install gnupg@2.2
  #+end_src
- [X] restart macOS system

- [X] =$ emacs-minimal-init=
  + [X] open and save modified "authinfo.gpg" file success

- [X] try to re-install gnupg broken version, re-install emacs@30 through Homebrew -> still have
  problem, so I think problem is not on Emacs side.

-- 

[ stardiviner ]
I try to make every word tell the meaning that I want to express without misunderstanding.

Blog: https://stardiviner.github.io/
IRC(libera.chat, freenode): stardiviner, Matrix: stardiviner
GPG: F09F650D7D674819892591401B5DF1C95AE89AC3

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

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

* Re: [EasyPG (epa)] Emacs can't save modified encrypted file
  2023-05-02  4:00               ` [EasyPG (epa)] Emacs can't save modified encrypted file Christopher M. Miles
@ 2023-05-02 11:57                 ` Ihor Radchenko
  2023-05-02 17:38                   ` Christopher M. Miles
  0 siblings, 1 reply; 29+ messages in thread
From: Ihor Radchenko @ 2023-05-02 11:57 UTC (permalink / raw)
  To: Christopher M. Miles; +Cc: emacs-orgmode, Karl Voit

"Christopher M. Miles" <numbchild@gmail.com> writes:

> I downgrade gnupg, then the problem solved. But the downgrade version is
> very old (gnupg@2.4.1 -> gnupg@2.2.41). I suspend problem is somewhere
> else, like Emacs interaction with GnuPG process.

Do you have any issues decrypting and encrypting files from command
line? If no, what about from M-x shell? If yet no, what if you call gpg
via `start-process'?

> 4. I press =[C-g]= to quit got following stacktrace:
>
> #+begin_example
> Debugger entered--Lisp error: (quit)
>   accept-process-output(#<process epg> 1)

This certainly looks like gpg itself is waiting for something and Emacs
is waiting for gpg...

> When I save modified "=~/.config/emacs/secrets/authinfo.gpg=", got prompt:
>
> #+begin_example
> Untrusted key AEDA8A17BB08B786 Christopher Miles (stardiviner, numbchild) <numbchild@gmail.com>.  Use anyway? (y or n)
> #+end_example

> If I input "n" for prompt:
>
> #+begin_example
> Debugger entered--Lisp error: (file-error "Opening output file" "Encrypt failed" "Unusable public key: B8C4B8E547C32433 (key not tru...")

This reminds me of https://orgmode.org/list/2023-01-22T18-32-17@devnull.Karl-Voit.at
CC-ing Karl as he might be interested to join this discussion.

> - [X] find bellowing two key ID belongs where
>
> Untrusted key "AEDA8A17BB08B786" ---> fingerprint "0DEF7425E79FE2E0090B424BAEDA8A17BB08B786" --> my old key
> ((invalid-recipient (reason . 10) (requested . "B8C4B8E547C32433"))) --> "F09F650D7D674819892591401B5DF1C95AE89AC3" --> my current new gnupg key
>
> Question: I don't know why my current gnupg key and old gnupg key are together.
>
> Here is my Emacs EasyPG (epa) config:
>
> #+begin_src emacs-lisp
> (use-package epa
>   ;; force Emacs to use its own internal password prompt instead of an external
>   ;; pinentry program.
>   :preface (setenv "GPG_AGENT_INFO" nil)

I do not use this setting on my side and simply stick to gtk password
prompt.

Not sure if it is of any help, but on my side I used
https://wiki.gentoo.org/wiki/GnuPG for GPG configuration. That wiki
page is rather detailed - you might find some clues.

Also, my gpg config, for reference
https://github.com/yantar92/emacs-config/blob/master/system-config.org#gpg

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


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

* Re: [EasyPG (epa)] Emacs can't save modified encrypted file
  2023-05-02 11:57                 ` Ihor Radchenko
@ 2023-05-02 17:38                   ` Christopher M. Miles
  2023-05-02 20:08                     ` Ihor Radchenko
  0 siblings, 1 reply; 29+ messages in thread
From: Christopher M. Miles @ 2023-05-02 17:38 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Christopher M. Miles, emacs-orgmode, Karl Voit

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


Ihor Radchenko <yantar92@posteo.net> writes:

> "Christopher M. Miles" <numbchild@gmail.com> writes:
>
>> I downgrade gnupg, then the problem solved. But the downgrade version is
>> very old (gnupg@2.4.1 -> gnupg@2.2.41). I suspend problem is somewhere
>> else, like Emacs interaction with GnuPG process.
>
> Do you have any issues decrypting and encrypting files from command
> line? If no, what about from M-x shell? If yet no, what if you call gpg
> via `start-process'?
>

- [X] test decrypt & encrypt in terminal with gpg command. -> works fine.

- [X] test decrypt & encrypt in Emacs =[M-x shell]= with gpg command. -> works fine.

  #+begin_example
  bash-5.2$ bash-5.2$ 
  bash-5.2$ pwd 
  /Users/stardiviner/.config/emacs/secrets
  bash-5.2$ gpg -d authinfo.gpg > authinfo 
  gpg: encrypted with rsa2048 key, ID 0251FA6886EB6B77, created 2015-01-31
        "stardiviner (numbchild@gmail.com) <numbchild@gmail.com>"
  gpg: encrypted with rsa2048 key, ID AEDA8A17BB08B786, created 2012-03-02
        "Christopher Miles (stardiviner, numbchild) <numbchild@gmail.com>"
  gpg: using "F09F650D7D674819892591401B5DF1C95AE89AC3" as default secret key for signing
  bash-5.2$ ls 
  accounts.json.gpg	authinfo		authinfo.gpg
  bash-5.2$ 
  #+end_example

- [X] test decrypt & encrypt in Emacs with ~start-process~ -> works fine

  #+begin_src emacs-lisp :dir "~/.config/emacs/secrets/" :results output
  (let ((output-buffer "*gnupg-decrypt*"))
    (pwd)
    (when (get-buffer output-buffer)
      (with-current-buffer (get-buffer output-buffer)
        (erase-buffer)))
    (start-process
     "gnupg-testing"
     output-buffer
     "gpg"
     "--decrypt" "authinfo.gpg"
     ;; ">" "authinfo"
     )
    (sleep-for 2)
    (print
     (with-current-buffer (get-buffer output-buffer)
       (buffer-substring-no-properties (point-min) (point-max)))))
  #+end_src

>> 4. I press =[C-g]= to quit got following stacktrace:
>>
>> #+begin_example
>> Debugger entered--Lisp error: (quit)
>>   accept-process-output(#<process epg> 1)
>
> This certainly looks like gpg itself is waiting for something and Emacs
> is waiting for gpg...
>
>> When I save modified "=~/.config/emacs/secrets/authinfo.gpg=", got prompt:
>>
>> #+begin_example
>> Untrusted key AEDA8A17BB08B786 Christopher Miles (stardiviner, numbchild) <numbchild@gmail.com>.  Use anyway? (y or n)
>> #+end_example
>
>> If I input "n" for prompt:
>>
>> #+begin_example
>> Debugger entered--Lisp error: (file-error "Opening output file" "Encrypt failed" "Unusable public key: B8C4B8E547C32433 (key not tru...")
>
> This reminds me of https://orgmode.org/list/2023-01-22T18-32-17@devnull.Karl-Voit.at
> CC-ing Karl as he might be interested to join this discussion.
>

His error indeed same with mine. I have read email and check my private
key. Here is my private key info:

Check out my private key info:

#+begin_src sh
# gpg -K
gpg --list-secret-keys --verbose --with-subkey-fingerprints
#+end_src

#+RESULTS[(2023-05-03 01:41:09) 80ae7b09060704481af2e01ae6f6086262d4a05c]:
#+begin_example
/Users/stardiviner/.gnupg/pubring.kbx
-------------------------------------
sec   rsa2048 2015-01-31 [SC]
      F09F650D7D674819892591401B5DF1C95AE89AC3
uid           [ultimate] stardiviner (numbchild@gmail.com) <numbchild@gmail.com>
uid           [ultimate] stardiviner (Christopher Miles) <numbchild@gmail.com>
uid           [ultimate] [jpeg image of size 3384]
ssb   rsa2048 2015-01-31 [E]
      32A8581A6E137ABD26DA2F570251FA6886EB6B77

#+end_example

>> - [X] find bellowing two key ID belongs where
>>
>> Untrusted key "AEDA8A17BB08B786" ---> fingerprint "0DEF7425E79FE2E0090B424BAEDA8A17BB08B786" --> my old key
>> ((invalid-recipient (reason . 10) (requested . "B8C4B8E547C32433"))) --> "F09F650D7D674819892591401B5DF1C95AE89AC3" --> my current new gnupg key
>>
>> Question: I don't know why my current gnupg key and old gnupg key are together.
>>
>> Here is my Emacs EasyPG (epa) config:
>>
>> #+begin_src emacs-lisp
>> (use-package epa
>>   ;; force Emacs to use its own internal password prompt instead of an external
>>   ;; pinentry program.
>>   :preface (setenv "GPG_AGENT_INFO" nil)
>
> I do not use this setting on my side and simply stick to gtk password
> prompt.
>

I check my pinentry on macOS. Found package "pinentry-mac" installed by
Homebrew. Then I use it as pinentry-program in "gpg-agent.conf" config file.

Then I tested by remove upper (setenv "GPG_AGENT_INFO" nil) line.
Restart Emacs still same problem.

Then I disable my "epa" config, restart Emacs, still same problem.

> Not sure if it is of any help, but on my side I used
> https://wiki.gentoo.org/wiki/GnuPG for GPG configuration. That wiki
> page is rather detailed - you might find some clues.
>
> Also, my gpg config, for reference
> https://github.com/yantar92/emacs-config/blob/master/system-config.org#gpg

Thanks for sharing helpful links.

I read whole page of Gentoo wiki of GnuPG. I have not found clue about
my problem. I Googled more similar search query keywords. Still no clue.

Paste my gpg.conf here for reference:

#+begin_src conf
default-recipient stardiviner
require-cross-certification
charset utf-8
keyserver  hkp://keys.gnupg.net
auto-key-retrieve

pinentry-mode loopback

default-key F09F650D7D674819892591401B5DF1C95AE89AC3
encrypt-to  32A8581A6E137ABD26DA2F570251FA6886EB6B77
# default-key  1B5DF1C95AE89AC3
# encrypt-to   0251FA6886EB6B77

# gpg-agent
use-agent

cert-digest-algo SHA256
no-emit-version
no-comments
personal-cipher-preferences AES AES256 AES192 CAST5
personal-digest-preferences SHA256 SHA512 SHA384 SHA224
ignore-time-conflict
allow-freeform-uid
#+end_src

-- 

[ stardiviner ]
I try to make every word tell the meaning that I want to express without misunderstanding.

Blog: https://stardiviner.github.io/
IRC(libera.chat, freenode): stardiviner, Matrix: stardiviner
GPG: F09F650D7D674819892591401B5DF1C95AE89AC3

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

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

* Re: [EasyPG (epa)] Emacs can't save modified encrypted file
  2023-05-02 17:38                   ` Christopher M. Miles
@ 2023-05-02 20:08                     ` Ihor Radchenko
  2023-05-03 10:40                       ` Christopher M. Miles
  0 siblings, 1 reply; 29+ messages in thread
From: Ihor Radchenko @ 2023-05-02 20:08 UTC (permalink / raw)
  To: Christopher M. Miles; +Cc: emacs-orgmode, Karl Voit

"Christopher M. Miles" <numbchild@gmail.com> writes:

>> Do you have any issues decrypting and encrypting files from command
>> line? If no, what about from M-x shell? If yet no, what if you call gpg
>> via `start-process'?
>>
>
> - [X] test decrypt & encrypt in terminal with gpg command. -> works fine.
>
> - [X] test decrypt & encrypt in Emacs =[M-x shell]= with gpg command. -> works fine.
> ...
> - [X] test decrypt & encrypt in Emacs with ~start-process~ -> works fine

Ok. The further step we can try is following what epg does.
I am now looking into `epg--start' source code and I note
`epg-debug' variable, which might provide some more info to think about.
Also, note the `make-process' call in `epg--start' - you may try to run
it manually, similar to `start-process' and check if it fails. (For me,
:connection-type 'pipe part is a bit fishy - I recall there were some
quirks related to it;
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=44824 ... but it was the
opposite to having 'pipe AFAIR).

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


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

* Re: [EasyPG (epa)] Emacs can't save modified encrypted file
  2023-05-02 20:08                     ` Ihor Radchenko
@ 2023-05-03 10:40                       ` Christopher M. Miles
  2023-05-03 12:08                         ` Ihor Radchenko
  0 siblings, 1 reply; 29+ messages in thread
From: Christopher M. Miles @ 2023-05-03 10:40 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Christopher M. Miles, emacs-orgmode, Karl Voit

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


Ihor Radchenko <yantar92@posteo.net> writes:

> "Christopher M. Miles" <numbchild@gmail.com> writes:
>
>>> Do you have any issues decrypting and encrypting files from command
>>> line? If no, what about from M-x shell? If yet no, what if you call gpg
>>> via `start-process'?
>>>
>>
>> - [X] test decrypt & encrypt in terminal with gpg command. -> works fine.
>>
>> - [X] test decrypt & encrypt in Emacs =[M-x shell]= with gpg command. -> works fine.
>> ...
>> - [X] test decrypt & encrypt in Emacs with ~start-process~ -> works fine
>
> Ok. The further step we can try is following what epg does.
> I am now looking into `epg--start' source code and I note
> `epg-debug' variable, which might provide some more info to think about.
> Also, note the `make-process' call in `epg--start' - you may try to run
> it manually, similar to `start-process' and check if it fails. (For me,
> :connection-type 'pipe part is a bit fishy - I recall there were some
> quirks related to it;
> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=44824 ... but it was the
> opposite to having 'pipe AFAIR).

Ok, I followed your suggestions, did following steps.

- [X] toggle option ~epg-debug~

  #+begin_src emacs-lisp
  (setq epg-debug t)
  #+end_src

  #+begin_example :file "*epg-debug*"
  GPG_AGENT_INFO is not set
  /opt/homebrew/bin/gpg --no-tty --status-fd 1 --yes --enable-progress-filter --command-fd 0 --output /var/folders/ym/f3v5_yk1279g5ls70x3hzblh0000gn/T/epg-outputMMP3Zp --pinentry-mode loopback --decrypt -- /Users/stardiviner/.config/emacs/secrets/authinfo.gpg
  [GNUPG:] PROGRESS /Users/stardiviner/. ? 0 1204 B
  [GNUPG:] ENC_TO AEDA8A17BB08B786 1 0
  [GNUPG:] ENC_TO 0251FA6886EB6B77 1 0
  [GNUPG:] KEY_CONSIDERED F09F650D7D674819892591401B5DF1C95AE89AC3 0
  [GNUPG:] KEY_CONSIDERED 9BAA92BCCDDDB9EF3B36CB99B8C4B8E547C32433 0
  [GNUPG:] KEY_CONSIDERED F09F650D7D674819892591401B5DF1C95AE89AC3 0
  [GNUPG:] KEY_CONSIDERED F09F650D7D674819892591401B5DF1C95AE89AC3 0
  [GNUPG:] DECRYPTION_KEY 32A8581A6E137ABD26DA2F570251FA6886EB6B77 F09F650D7D674819892591401B5DF1C95AE89AC3 u
  [GNUPG:] NO_SECKEY AEDA8A17BB08B786
  [GNUPG:] BEGIN_DECRYPTION
  [GNUPG:] DECRYPTION_INFO 2 7 0
  [GNUPG:] PROGRESS /Users/stardiviner/. ? 1204 1204 B
  [GNUPG:] PLAINTEXT 62 1682998161 
  [GNUPG:] DECRYPTION_OKAY
  [GNUPG:] GOODMDC
  [GNUPG:] END_DECRYPTION
  GPG_AGENT_INFO is not set
  /opt/homebrew/bin/gpg --no-tty --status-fd 1 --yes --enable-progress-filter --command-fd 0 --output /var/folders/ym/f3v5_yk1279g5ls70x3hzblh0000gn/T/epg-outputE3zoeh --pinentry-mode loopback --encrypt -r 1B5DF1C95AE89AC3 -r B8C4B8E547C32433
  [GNUPG:] KEY_CONSIDERED F09F650D7D674819892591401B5DF1C95AE89AC3 0
  [GNUPG:] KEY_CONSIDERED 9BAA92BCCDDDB9EF3B36CB99B8C4B8E547C32433 0
  [GNUPG:] KEY_CONSIDERED F09F650D7D674819892591401B5DF1C95AE89AC3 0
  GPG_AGENT_INFO is not set
  /opt/homebrew/bin/gpg --no-tty --status-fd 1 --yes --enable-progress-filter --command-fd 0 --output /var/folders/ym/f3v5_yk1279g5ls70x3hzblh0000gn/T/epg-outputxPZRrb --pinentry-mode loopback --encrypt -r 1B5DF1C95AE89AC3 -r B8C4B8E547C32433
  [GNUPG:] KEY_CONSIDERED F09F650D7D674819892591401B5DF1C95AE89AC3 0
  [GNUPG:] KEY_CONSIDERED 9BAA92BCCDDDB9EF3B36CB99B8C4B8E547C32433 0
  [GNUPG:] KEY_CONSIDERED F09F650D7D674819892591401B5DF1C95AE89AC3 0
  #+end_example

- [X] test the debug output buffer printed full command in terminal. (remove =--output= option to see the output)

  #+begin_src sh :eval no
  gpg --no-tty --status-fd 1 --yes --enable-progress-filter --command-fd 0 --pinentry-mode loopback --decrypt -- /Users/stardiviner/.config/emacs/secrets/authinfo.gpg
  # after input password, it decrypted success
  #+end_src
    
  The encrypt command seems missing input file.

  #+begin_src sh :eval no
  gpg --no-tty --status-fd 1 --yes --enable-progress-filter --command-fd 0 --pinentry-mode loopback --encrypt -r 1B5DF1C95AE89AC3 -r B8C4B8E547C32433
  #+end_src

- [X] I look into ~epg--start~ source code. note the ~make-process~ call in ~epg--start~ - you may try to
  run it manually, similar to ~start-process~ and check if it fails. (For me, ~:connection-type 'pipe~
  part is a bit fishy.)

  #+begin_src emacs-lisp :eval no
  ;;; `epg-start-encrypt' -> `epg--start'
  (let ((context
         #s(epg-context :protocol OpenPGP :program "/opt/homebrew/bin/gpg" :home-directory nil :armor nil :textmode nil :include-certs nil :cipher-algorithm nil :digest-algorithm nil :compress-algorithm nil :passphrase-callback (epa-file-passphrase-callback-function . "/Users/stardiviner/.config/emacs/secrets/authinfo.gpg") :progress-callback (epa-progress-callback-function . "Encrypting /Users/stardiviner/.config/emacs/secrets/authinfo.gpg") :edit-callback nil :signers nil :sender nil :sig-notations nil :process nil :output-file "/var/folders/ym/f3v5_yk1279g5ls70x3hzblh0000gn/T/epg-outputsyLCLb" :result nil :operation encrypt :pinentry-mode loopback :error-output "" :error-buffer nil))
        (args '("--encrypt" #1="-r" "1B5DF1C95AE89AC3" #1# "B8C4B8E547C32433"))
        (error-process (make-pipe-process :name "epg-error"
                                          :buffer (generate-new-buffer " *epg-error*")
                                          ;; Suppress "XXX finished" line.
                                          :sentinel #'ignore
                                          :noquery t)))
    (make-process
     :name "epg"
     :buffer (generate-new-buffer " *epg*")
     :command (cons (epg-context-program context) args)
     :connection-type 'pipe
     :coding 'raw-text
     :filter #'epg--process-filter
     :stderr error-process
     :noquery t))
  #+end_src

- [X] record screen record for edebug process (430M), then compress big recorded video (~170M).

  I uploaded to here: https://file.io/5fvOAbW5DPi6

-- 

[ stardiviner ]
I try to make every word tell the meaning that I want to express without misunderstanding.

Blog: https://stardiviner.github.io/
IRC(libera.chat, freenode): stardiviner, Matrix: stardiviner
GPG: F09F650D7D674819892591401B5DF1C95AE89AC3

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

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

* Re: [EasyPG (epa)] Emacs can't save modified encrypted file
  2023-05-03 10:40                       ` Christopher M. Miles
@ 2023-05-03 12:08                         ` Ihor Radchenko
  2023-05-03 16:51                           ` Christopher M. Miles
  0 siblings, 1 reply; 29+ messages in thread
From: Ihor Radchenko @ 2023-05-03 12:08 UTC (permalink / raw)
  To: Christopher M. Miles; +Cc: emacs-orgmode, Karl Voit

"Christopher M. Miles" <numbchild@gmail.com> writes:

>   GPG_AGENT_INFO is not set
>   /opt/homebrew/bin/gpg --no-tty --status-fd 1 --yes --enable-progress-filter --command-fd 0 --output /var/folders/ym/f3v5_yk1279g5ls70x3hzblh0000gn/T/epg-outputxPZRrb --pinentry-mode loopback --encrypt -r 1B5DF1C95AE89AC3 -r B8C4B8E547C32433
>   [GNUPG:] KEY_CONSIDERED F09F650D7D674819892591401B5DF1C95AE89AC3 0
>   [GNUPG:] KEY_CONSIDERED 9BAA92BCCDDDB9EF3B36CB99B8C4B8E547C32433 0
>   [GNUPG:] KEY_CONSIDERED F09F650D7D674819892591401B5DF1C95AE89AC3 0
>   #+end_example
>
> ...
>   The encrypt command seems missing input file.

Which is clearly wrong, AFAIU. I guess it is then time to report bug to
Emacs? You may also try to find where the input file gets lost from the
argument list.

> - [X] record screen record for edebug process (430M), then compress big recorded video (~170M).
>
>   I uploaded to here: https://file.io/5fvOAbW5DPi6

No longer available.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


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

* Re: [EasyPG (epa)] Emacs can't save modified encrypted file
  2023-05-03 12:08                         ` Ihor Radchenko
@ 2023-05-03 16:51                           ` Christopher M. Miles
  2023-05-03 17:02                             ` Ihor Radchenko
  0 siblings, 1 reply; 29+ messages in thread
From: Christopher M. Miles @ 2023-05-03 16:51 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Christopher M. Miles, emacs-orgmode, Karl Voit

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


Ihor Radchenko <yantar92@posteo.net> writes:

> "Christopher M. Miles" <numbchild@gmail.com> writes:
>
>>   GPG_AGENT_INFO is not set
>>   /opt/homebrew/bin/gpg --no-tty --status-fd 1 --yes --enable-progress-filter --command-fd 0
>> --output /var/folders/ym/f3v5_yk1279g5ls70x3hzblh0000gn/T/epg-outputxPZRrb --pinentry-mode
>> loopback --encrypt -r 1B5DF1C95AE89AC3 -r B8C4B8E547C32433
>>   [GNUPG:] KEY_CONSIDERED F09F650D7D674819892591401B5DF1C95AE89AC3 0
>>   [GNUPG:] KEY_CONSIDERED 9BAA92BCCDDDB9EF3B36CB99B8C4B8E547C32433 0
>>   [GNUPG:] KEY_CONSIDERED F09F650D7D674819892591401B5DF1C95AE89AC3 0
>>   #+end_example
>>
>> ...
>>   The encrypt command seems missing input file.
>
> Which is clearly wrong, AFAIU. I guess it is then time to report bug to
> Emacs? You may also try to find where the input file gets lost from the
> argument list.
>

Thanks for checking out, Ihor.

I tried to figure it out in the Edebug process, but don't know where
data is wrong. May you can check out my uploaded video.

I also will report bug to Emacs.

>> - [X] record screen record for edebug process (430M), then compress big recorded video (~170M).
>>
>>   I uploaded to here: https://file.io/5fvOAbW5DPi6
>
> No longer available.

I uploaded again, don't know why the file expired not available.

https://file.io/j17OelAJFVVi

-- 

[ stardiviner ]
I try to make every word tell the meaning that I want to express without misunderstanding.

Blog: https://stardiviner.github.io/
IRC(libera.chat, freenode): stardiviner, Matrix: stardiviner
GPG: F09F650D7D674819892591401B5DF1C95AE89AC3

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

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

* Re: [EasyPG (epa)] Emacs can't save modified encrypted file
  2023-05-03 16:51                           ` Christopher M. Miles
@ 2023-05-03 17:02                             ` Ihor Radchenko
  2023-05-03 17:29                               ` [Uploaded Edebug video] " Christopher M. Miles
  0 siblings, 1 reply; 29+ messages in thread
From: Ihor Radchenko @ 2023-05-03 17:02 UTC (permalink / raw)
  To: Christopher M. Miles; +Cc: emacs-orgmode, Karl Voit

"Christopher M. Miles" <numbchild@gmail.com> writes:

>>>   I uploaded to here: https://file.io/5fvOAbW5DPi6
>>
>> No longer available.
>
> I uploaded again, don't know why the file expired not available.
>
> https://file.io/j17OelAJFVVi

It is again not available. You can try https://0x0.st/
(https://github.com/emacsmirror/0x0) or https://upload.disroot.org/

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


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

* [Uploaded Edebug video] Re: [EasyPG (epa)] Emacs can't save modified encrypted file
  2023-05-03 17:02                             ` Ihor Radchenko
@ 2023-05-03 17:29                               ` Christopher M. Miles
  2023-05-03 19:08                                 ` Ihor Radchenko
  0 siblings, 1 reply; 29+ messages in thread
From: Christopher M. Miles @ 2023-05-03 17:29 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Christopher M. Miles, emacs-orgmode, Karl Voit

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


Ihor Radchenko <yantar92@posteo.net> writes:

> "Christopher M. Miles" <numbchild@gmail.com> writes:
>
>>>>   I uploaded to here: https://file.io/5fvOAbW5DPi6
>>>
>>> No longer available.
>>
>> I uploaded again, don't know why the file expired not available.
>>
>> https://file.io/j17OelAJFVVi
>
> It is again not available. You can try https://0x0.st/
> (https://github.com/emacsmirror/0x0) or https://upload.disroot.org/

Ok, I upload on Disroot website:

https://upload.disroot.org/r/7skmXw7a#zt0jISsPuV0f3LkY9aRyz77X3iAOyD3cuue1Fbi9zy0=

-- 

[ stardiviner ]
I try to make every word tell the meaning that I want to express without misunderstanding.

Blog: https://stardiviner.github.io/
IRC(libera.chat, freenode): stardiviner, Matrix: stardiviner
GPG: F09F650D7D674819892591401B5DF1C95AE89AC3

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

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

* Re: [Uploaded Edebug video] Re: [EasyPG (epa)] Emacs can't save modified encrypted file
  2023-05-03 17:29                               ` [Uploaded Edebug video] " Christopher M. Miles
@ 2023-05-03 19:08                                 ` Ihor Radchenko
  2023-05-04  2:28                                   ` Christopher M. Miles
  0 siblings, 1 reply; 29+ messages in thread
From: Ihor Radchenko @ 2023-05-03 19:08 UTC (permalink / raw)
  To: Christopher M. Miles; +Cc: emacs-orgmode, Karl Voit

"Christopher M. Miles" <numbchild@gmail.com> writes:

> Ok, I upload on Disroot website:
>
> https://upload.disroot.org/r/7skmXw7a#zt0jISsPuV0f3LkY9aRyz77X3iAOyD3cuue1Fbi9zy0=

So, the hang happens on `epg-wait-for-status'.
So, again, may you try to run the exact command line (including absence
of input file) manually in terminal?

Basically, `epg-wait-for-status' is looking at the output of gpg,
waiting for "[GNUPG:] BEGIN_ENCRYPTION" and never gets that status from
gpg. AFAIU.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


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

* Re: [Uploaded Edebug video] Re: [EasyPG (epa)] Emacs can't save modified encrypted file
  2023-05-03 19:08                                 ` Ihor Radchenko
@ 2023-05-04  2:28                                   ` Christopher M. Miles
  2023-05-04 17:28                                     ` Ihor Radchenko
  0 siblings, 1 reply; 29+ messages in thread
From: Christopher M. Miles @ 2023-05-04  2:28 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Christopher M. Miles, emacs-orgmode, Karl Voit

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


Ihor Radchenko <yantar92@posteo.net> writes:

> "Christopher M. Miles" <numbchild@gmail.com> writes:
>
>> Ok, I upload on Disroot website:
>>
>> https://upload.disroot.org/r/7skmXw7a#zt0jISsPuV0f3LkY9aRyz77X3iAOyD3cuue1Fbi9zy0=
>
> So, the hang happens on `epg-wait-for-status'.
> So, again, may you try to run the exact command line (including absence
> of input file) manually in terminal?
>
> Basically, `epg-wait-for-status' is looking at the output of gpg,
> waiting for "[GNUPG:] BEGIN_ENCRYPTION" and never gets that status from
> gpg. AFAIU.

I executed bellowing command in terminal without input file. (I added
aside comment using marker "|<--")

#+begin_src sh :eval no
$ gpg --no-tty --status-fd 1 --yes --enable-progress-filter --command-fd 0 --pinentry-mode loopback --encrypt -r 1B5DF1C95AE89AC3 -r B8C4B8E547C32433

[GNUPG:] KEY_CONSIDERED F09F650D7D674819892591401B5DF1C95AE89AC3 0
[GNUPG:] KEY_CONSIDERED 9BAA92BCCDDDB9EF3B36CB99B8C4B8E547C32433 0
[GNUPG:] KEY_CONSIDERED F09F650D7D674819892591401B5DF1C95AE89AC3 0
gpg: 1B5DF1C95AE89AC3: skipped: public key already present   |<-- gpg wait for input and stopped here.
[GNUPG:] BEGIN_ENCRYPTION                                    |<-- followed your hints, I input "[GNUPG:] BEGIN_ENCRYPTION" manually here.
hello                                                        |<-- I input text manually here.
[GNUPG:] PROGRESS stdin ? 0 0 B                              |<-- gpg start to encrypting

=9I'iz^z=Ⱥ*pD>n̯dCj.:wD"zCy
                          8$|
xMIiEXM{q2]"k1vx_$xIc3^L!L' $_уp
             T%QC a^i
WۄSuڅk?#\T}7
            QhkwvUI#>^xNg{
#v/jͽrW[q9,W'%ϽVZ53BJGm_0VL`*vgT}[eQA:amRs?+z}6A/"b(?QU5*>ɨWQD$ih@ep^9<~[=5<r<DLu`Y46k
                                                                                      ѪM951M$'R@"nL^f곬:&vI[GNUPG:] BEGIN_ENCRYPTION 2 7
                                                             |<-- gpg stop here, wait for more input again.
happy                                                        |<-- I try input text more to test whether gpg will encrypt more input.
[GNUPG:] BEGIN_ENCRYPTION                                    |<-- because upper input no response, so I insert beginning encryption marker again here.
testing input from stdin                                     |<-- input again. still no response.

^C                                                           |<-- then I press [C-c] to quit command.
gpg: signal Interrupt caught ... exiting
#+end_src

From the testing, should be confirmed that gpg is fine.

With your hints, I seems can try Edebug again to find more clue. Will update here.

-- 

[ stardiviner ]
I try to make every word tell the meaning that I want to express without misunderstanding.

Blog: https://stardiviner.github.io/
IRC(libera.chat, freenode): stardiviner, Matrix: stardiviner
GPG: F09F650D7D674819892591401B5DF1C95AE89AC3

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

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

* Re: [Uploaded Edebug video] Re: [EasyPG (epa)] Emacs can't save modified encrypted file
  2023-05-04  2:28                                   ` Christopher M. Miles
@ 2023-05-04 17:28                                     ` Ihor Radchenko
  2023-05-05  6:30                                       ` Christopher M. Miles
  0 siblings, 1 reply; 29+ messages in thread
From: Ihor Radchenko @ 2023-05-04 17:28 UTC (permalink / raw)
  To: Christopher M. Miles; +Cc: emacs-orgmode, Karl Voit


Some more info: https://old.reddit.com/r/emacs/comments/137r7j7/gnupg_241_encryption_issues_with_emacs_orgmode/



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

* Re: [EasyPG (epa)] Emacs can't save modified encrypted file
  2023-05-04 17:28                                     ` Ihor Radchenko
@ 2023-05-05  6:30                                       ` Christopher M. Miles
  2023-05-05  8:36                                         ` Ihor Radchenko
  0 siblings, 1 reply; 29+ messages in thread
From: Christopher M. Miles @ 2023-05-05  6:30 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Christopher M. Miles, emacs-orgmode, Karl Voit

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


Ihor Radchenko <yantar92@posteo.net> writes:

> Some more info: https://old.reddit.com/r/emacs/comments/137r7j7/gnupg_241_encryption_issues_with_emacs_orgmode/

Indeed same problem as mine. Thanks Ihor

- [X] *downgrade* GnuPG from 2.4.1 -> 2.4.0 temporary get around the problem.

  #+begin_src sh
  brew info gnupg | grep "From:" | cut -d " " -f 2
  #+end_src

  #+RESULTS[(2023-05-05 14:19:54) 0e3dbbad14b66a4f05d2d70fb5cfd59db46f49bc]:
  : https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/gnupg.rb

  #+begin_src sh
  URL=https://raw.githubusercontent.com/Homebrew/homebrew-core/59edfe598541186430d49cc34f42671e849e2fc9/Formula/gnupg.rb
  wget $URL
  brew uninstall gnupg
  brew install -s gnupg.rb
  #+end_src

- [X] Check out GnuPG homepage changelog, Found new feature "ADSK: The Additional Decryption Subkey" for the problem gnupg version "2.4.1".
  After I executed bellowing command, -->> I still has problem.
  https://www.gnupg.org/blog/20230321-adsk.html

  #+begin_src sh
  gpg -K --with-subkey-fingerprint stardiviner
  #+end_src

  #+RESULTS[(2023-05-05 14:44:34) bc8e7497ce39ff0a8ae3fc45c332d64685e8da46]:
  : sec   rsa2048 2015-01-31 [SC]
  :       F09F650D7D674819892591401B5DF1C95AE89AC3
  : uid           [ultimate] stardiviner (numbchild@gmail.com) <numbchild@gmail.com>
  : uid           [ultimate] stardiviner (Christopher Miles) <numbchild@gmail.com>
  : uid           [ultimate] [jpeg image of size 3384]
  : ssb   rsa2048 2015-01-31 [E]
  :       32A8581A6E137ABD26DA2F570251FA6886EB6B77
  : 

  #+begin_src sh
  gpg --quick-add-adsk F09F650D7D674819892591401B5DF1C95AE89AC3 32A8581A6E137ABD26DA2F570251FA6886EB6B77
  #+end_src

- [X] Then I check out Emacs source code file "epg.el" & "epa.el" file
  git log. -> have not found obvious gpg command-line options related to
  the problem. One small possible commit might be
  "82388dff8ed006cecb65ea7a4afd8667ec44b5e3".

-- 

[ stardiviner ]
I try to make every word tell the meaning that I want to express without misunderstanding.

Blog: https://stardiviner.github.io/
IRC(libera.chat, freenode): stardiviner, Matrix: stardiviner
GPG: F09F650D7D674819892591401B5DF1C95AE89AC3

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

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

* Re: [EasyPG (epa)] Emacs can't save modified encrypted file
  2023-05-05  6:30                                       ` Christopher M. Miles
@ 2023-05-05  8:36                                         ` Ihor Radchenko
  2023-05-05 13:20                                           ` Christopher M. Miles
  2023-05-05 15:29                                           ` Christopher M. Miles
  0 siblings, 2 replies; 29+ messages in thread
From: Ihor Radchenko @ 2023-05-05  8:36 UTC (permalink / raw)
  To: Christopher M. Miles; +Cc: emacs-orgmode, Karl Voit

"Christopher M. Miles" <numbchild@gmail.com> writes:

> - [X] Then I check out Emacs source code file "epg.el" & "epa.el" file
>   git log. -> have not found obvious gpg command-line options related to
>   the problem. One small possible commit might be
>   "82388dff8ed006cecb65ea7a4afd8667ec44b5e3".

One of the reddit comments mentioned that the newer gpg hangs when not
provided input. If this is true, I notice that `epg-start-encrypt' first
calls (epg-wait-for-status context '("BEGIN_SIGNING")) and only then
sends the buffer string for encryption (process-send-string).

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


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

* Re: [EasyPG (epa)] Emacs can't save modified encrypted file
  2023-05-05  8:36                                         ` Ihor Radchenko
@ 2023-05-05 13:20                                           ` Christopher M. Miles
  2023-05-05 15:29                                           ` Christopher M. Miles
  1 sibling, 0 replies; 29+ messages in thread
From: Christopher M. Miles @ 2023-05-05 13:20 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Christopher M. Miles, emacs-orgmode, Karl Voit


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


Ihor Radchenko <yantar92@posteo.net> writes:

> "Christopher M. Miles" <numbchild@gmail.com> writes:
>
>> - [X] Then I check out Emacs source code file "epg.el" & "epa.el" file
>>   git log. -> have not found obvious gpg command-line options related to
>>   the problem. One small possible commit might be
>>   "82388dff8ed006cecb65ea7a4afd8667ec44b5e3".
>
> One of the reddit comments mentioned that the newer gpg hangs when not
> provided input. If this is true, I notice that `epg-start-encrypt' first
> calls (epg-wait-for-status context '("BEGIN_SIGNING")) and only then
> sends the buffer string for encryption (process-send-string).

Indeed, I'm superised by myself that haven't notice this steps.

(epg-wait-for-status context '("BEGIN_ENCRYPTION")), it suspended and
wair for "BEGIN_ENCRYPTION" input. But The real input is from bellowing
(process-send-string (epg-context-process context) (epg-data-string plain)).

Finally found the reason in Elisp code.

I will send this update info to Emacs bug report.


[-- Attachment #1.2: Screenshot 2023-05-05 at 21.14.06@2x.png --]
[-- Type: #("image/png" 0 9 (prescient-regexps nil prescient-ignore-case t)), Size: 1814100 bytes --]

[-- Attachment #1.3: Screenshot 2023-05-05 at 21.24.44@2x.png --]
[-- Type: #("image/png" 0 9 (prescient-regexps nil prescient-ignore-case t)), Size: 1517339 bytes --]

[-- Attachment #1.4: Type: text/plain, Size: 269 bytes --]



-- 

[ stardiviner ]
I try to make every word tell the meaning that I want to express without misunderstanding.

Blog: https://stardiviner.github.io/
IRC(libera.chat, freenode): stardiviner, Matrix: stardiviner
GPG: F09F650D7D674819892591401B5DF1C95AE89AC3

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

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

* Re: [EasyPG (epa)] Emacs can't save modified encrypted file
  2023-05-05  8:36                                         ` Ihor Radchenko
  2023-05-05 13:20                                           ` Christopher M. Miles
@ 2023-05-05 15:29                                           ` Christopher M. Miles
  1 sibling, 0 replies; 29+ messages in thread
From: Christopher M. Miles @ 2023-05-05 15:29 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Christopher M. Miles, emacs-orgmode, Karl Voit

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


Ihor Radchenko <yantar92@posteo.net> writes:

> "Christopher M. Miles" <numbchild@gmail.com> writes:
>
>> - [X] Then I check out Emacs source code file "epg.el" & "epa.el" file
>>   git log. -> have not found obvious gpg command-line options related to
>>   the problem. One small possible commit might be
>>   "82388dff8ed006cecb65ea7a4afd8667ec44b5e3".
>
> One of the reddit comments mentioned that the newer gpg hangs when not
> provided input. If this is true, I notice that `epg-start-encrypt' first
> calls (epg-wait-for-status context '("BEGIN_SIGNING")) and only then
> sends the buffer string for encryption (process-send-string).

In order to connect this mail list thread with the Emacs bug report.
Put bug report link here:
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=63256

-- 

[ stardiviner ]
I try to make every word tell the meaning that I want to express without misunderstanding.

Blog: https://stardiviner.github.io/
IRC(libera.chat, freenode): stardiviner, Matrix: stardiviner
GPG: F09F650D7D674819892591401B5DF1C95AE89AC3

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

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

* Re: [PATCH] org-crypt-decrypt-entry: Apply initial visibility upon decryption
  2023-04-30 20:21 [PATCH] org-crypt-decrypt-entry: Apply initial visibility upon decryption Ihor Radchenko
  2023-05-01  3:41 ` [SUGGESTION] " Christopher M. Miles
@ 2023-05-15 13:38 ` Ihor Radchenko
  2023-05-15 15:56 ` Christopher M. Miles
  2 siblings, 0 replies; 29+ messages in thread
From: Ihor Radchenko @ 2023-05-15 13:38 UTC (permalink / raw)
  To: emacs-orgmode

Ihor Radchenko <yantar92@posteo.net> writes:

> I'd like to propose applying initial visibility to the freshly decrypted
> headings. IMHO, it makes much more sense by default compared to showing
> all the text unfolded, including property drawers.
>
> Any objections?

Applied, onto main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=fe74a3ed2

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


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

* Re: [PATCH] org-crypt-decrypt-entry: Apply initial visibility upon decryption
  2023-04-30 20:21 [PATCH] org-crypt-decrypt-entry: Apply initial visibility upon decryption Ihor Radchenko
  2023-05-01  3:41 ` [SUGGESTION] " Christopher M. Miles
  2023-05-15 13:38 ` [PATCH] org-crypt-decrypt-entry: Apply initial visibility upon decryption Ihor Radchenko
@ 2023-05-15 15:56 ` Christopher M. Miles
  2 siblings, 0 replies; 29+ messages in thread
From: Christopher M. Miles @ 2023-05-15 15:56 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: emacs-orgmode

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


No objection

-- 

[ stardiviner ]
I try to make every word tell the meaning that I want to express without misunderstanding.

Blog: https://stardiviner.github.io/
IRC(libera.chat, freenode): stardiviner, Matrix: stardiviner
GPG: F09F650D7D674819892591401B5DF1C95AE89AC3

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

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

end of thread, other threads:[~2023-05-15 16:05 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-30 20:21 [PATCH] org-crypt-decrypt-entry: Apply initial visibility upon decryption Ihor Radchenko
2023-05-01  3:41 ` [SUGGESTION] " Christopher M. Miles
2023-05-01  7:50   ` Ihor Radchenko
2023-05-01 11:32     ` Christopher M. Miles
2023-05-01 11:46       ` Ihor Radchenko
2023-05-01 12:26         ` Christopher M. Miles
2023-05-01 12:38           ` Ihor Radchenko
2023-05-01 13:12             ` Christopher M. Miles
2023-05-01 13:38               ` Ihor Radchenko
2023-05-01 19:10                 ` Christopher M. Miles
2023-05-01 19:18                   ` Ihor Radchenko
     [not found]             ` <m2sfcgmbpo.fsf@numbchild>
2023-05-02  4:00               ` [EasyPG (epa)] Emacs can't save modified encrypted file Christopher M. Miles
2023-05-02 11:57                 ` Ihor Radchenko
2023-05-02 17:38                   ` Christopher M. Miles
2023-05-02 20:08                     ` Ihor Radchenko
2023-05-03 10:40                       ` Christopher M. Miles
2023-05-03 12:08                         ` Ihor Radchenko
2023-05-03 16:51                           ` Christopher M. Miles
2023-05-03 17:02                             ` Ihor Radchenko
2023-05-03 17:29                               ` [Uploaded Edebug video] " Christopher M. Miles
2023-05-03 19:08                                 ` Ihor Radchenko
2023-05-04  2:28                                   ` Christopher M. Miles
2023-05-04 17:28                                     ` Ihor Radchenko
2023-05-05  6:30                                       ` Christopher M. Miles
2023-05-05  8:36                                         ` Ihor Radchenko
2023-05-05 13:20                                           ` Christopher M. Miles
2023-05-05 15:29                                           ` Christopher M. Miles
2023-05-15 13:38 ` [PATCH] org-crypt-decrypt-entry: Apply initial visibility upon decryption Ihor Radchenko
2023-05-15 15:56 ` Christopher M. Miles

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.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).