Subject: bug#47718: Fix epa-file-insert-file-contents substring error

From: juntaka <[email-masked]>
Date: Tue, 13 Apr 2021 00:27:04 +0000

> Doesn't that mean the problem is in your application code?

I think insert-file-contents should behave same regardless gpg file or not.

$ echo -n test > file
$ gpg -c file

elisp> (insert-file-contents "file" nil 0 4) ;; no error
elisp> (insert-file-contents "file" nil 0 5) ;; no error
elisp> (insert-file-contents "file.gpg" nil 0 4) ;; no error
elisp> (insert-file-contents "file.gpg" nil 0 5) ;; error

I had no chance to fix that on my side.

Best,

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Monday, April 12, 2021 10:23 PM, Eli Zaretskii <[email-masked]> wrote:

> > Date: Mon, 12 Apr 2021 12:57:28 +0000
> > From: juntaka [email-masked]
> > Cc: Lars Ingebrigtsen [email-masked], "[email-masked]" [email-masked]
> > In my use case, I'm writing an elisp to show the first line of each file on dired.
> > It does not need to visit and read entire file. So I just try to limit by (window-width).
> > But if Emacs try to decrypt GPG files, then I got such error.
>
> Doesn't that mean the problem is in your application code?