GNU bug report logs -
#54443
29.0.50; decipher.el: (wrong-type-argument bufferp nil) when calling decipher-digram-list (and others)
Previous Next
Reported by: Simon Pugnet <simon <at> polaris64.net>
Date: Fri, 18 Mar 2022 07:38:02 UTC
Severity: normal
Found in version 29.0.50
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> Date: Fri, 18 Mar 2022 07:37:44 +0000
> From: Simon Pugnet <simon <at> polaris64.net>
>
> I recently found out about the decipher package, but when trying it I
> get the following error: -
>
> Debugger entered--Lisp error: (wrong-type-argument bufferp nil)
> decipher-stats-buffer(t)
> decipher-analyze-buffer()
> decipher-analyze()
> decipher-digram-list()
> funcall-interactively(decipher-digram-list)
> command-execute(decipher-digram-list)
>
> To reproduce: -
>
> 1. emacs -Q
> 2. M-x decipher
> 3. Press D to call decipher-digram-list
Thanks. Does the patch below give good results?
diff --git a/lisp/play/decipher.el b/lisp/play/decipher.el
index ae44ecd..aeb4726 100644
--- a/lisp/play/decipher.el
+++ b/lisp/play/decipher.el
@@ -983,13 +983,14 @@ decipher-stats-buffer
decipher-stats-buffer)
;; Create a new buffer if requested:
(create
- (let ((stats-name (concat "*" (buffer-name) "*")))
+ (let* ((stats-name (concat "*" (buffer-name) "*"))
+ (buf (get-buffer stats-name)))
(setq decipher-stats-buffer
- (if (eq 'decipher-stats-mode
- (buffer-local-value 'major-mode
- (get-buffer stats-name)))
- ;; We just lost track of the statistics buffer:
- (get-buffer stats-name)
+ (if (and (bufferp buf)
+ (eq 'decipher-stats-mode
+ (buffer-local-value 'major-mode buf)))
+ buf
+ ;; We just lost track of the statistics buffer:
(generate-new-buffer stats-name))))
(with-current-buffer decipher-stats-buffer
(decipher-stats-mode))
This bug report was last modified 3 years and 100 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.