bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#44134: 28.0.50; epa-list-keys failing with ‘wrong type argument: int


From: Stephen Berman
Subject: bug#44134: 28.0.50; epa-list-keys failing with ‘wrong type argument: interger-or-marker-p, nil’
Date: Thu, 22 Oct 2020 10:49:27 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

On Thu, 22 Oct 2020 09:23:35 +0100 Colin Baxter <m43cap@yandex.com> wrote:

>>>>>> Pankaj Jangid <pankaj.jangid@codeisgreat.com> writes:
>
>     > Steps: 1. M-x epa-list-keys RET ⇒ (lists keys) 2. q 3. M-x
>     > epa-list-keys RET ⇒ Wrong type argument: interger-or-marker-p, nil
>
> Works for me using emacs-28.0.50 and emacs-27.1.

It works in emacs-27 but AFAICT it cannot work with emacs -Q from
master.  If you did use -Q with emacs-28, did you perhaps kill the
buffer is step 2 instead of typing `q'?

Here's a patch for master, but someone who knows epa.el well should
verify it:

diff --git a/lisp/epa.el b/lisp/epa.el
index 25e055c201..74a72ee6f8 100644
--- a/lisp/epa.el
+++ b/lisp/epa.el
@@ -360,8 +360,8 @@ epa--list-keys

     ;; Find the end of the documentation text at the start.
     ;; Set POINT to where it ends, or nil if ends at eob.
-    (unless (get-text-property point 'epa-list-keys)
-      (setq point (next-single-property-change point 'epa-list-keys)))
+    (unless (get-text-property point 'epa-key)
+      (setq point (next-single-property-change point 'epa-key)))

     ;; If caller specified documentation text for that, replace the old
     ;; documentation text (if any) with what was specified.
@@ -375,7 +375,7 @@ epa--list-keys
     ;; Now delete the key description text, if any.
     (when point
       (delete-region point
-                    (or (next-single-property-change point 'epa-list-keys)
+                    (or (next-single-property-change point 'epa-key)
                         (point-max)))
       (goto-char point))

Steve Berman

reply via email to

[Prev in Thread] Current Thread [Next in Thread]