GNU bug report logs - #36187
27.0.50; M-x timer-list fails for functions with multi-line string representations

Previous Next

Package: emacs;

Reported by: Pip Cet <pipcet <at> gmail.com>

Date: Thu, 13 Jun 2019 07:18:02 UTC

Severity: normal

Tags: fixed

Found in version 27.0.50

Fixed in version 27.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 36187 in the body.
You can then email your comments to 36187 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#36187; Package emacs. (Thu, 13 Jun 2019 07:18:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Pip Cet <pipcet <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 13 Jun 2019 07:18:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Pip Cet <pipcet <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 27.0.50; M-x timer-list fails for functions with multi-line string
 representations
Date: Thu, 13 Jun 2019 07:17:17 +0000
[Message part 1 (text/plain, inline)]
The timer list fails to deal with functions that cl-prin1-to-string
represents in multiple lines, such as those containing newlines in
strings. (This happens for process sentinels, as well as for closures
with the right bound variables).

Evaluate in *scratch*:

(run-with-timer 0 1 (lambda () (message "tick\ntock")))

Then run M-x timer-list and attempt to cancel the new timer; doing so on
the first line of the representation fails, on the second line of the
representation the cancellation succeeds but leaves the timer list in a
broken state.

The attached one-liner patch fixes things.

* timer-list.el (list-timers): bind `print-escape-newlines' to avoid
  newlines in printed representation.
---
 lisp/emacs-lisp/timer-list.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/emacs-lisp/timer-list.el b/lisp/emacs-lisp/timer-list.el
index 55aa56b72e..adfc225022 100644
--- a/lisp/emacs-lisp/timer-list.el
+++ b/lisp/emacs-lisp/timer-list.el
@@ -59,7 +59,8 @@ list-timers
                           (format "%s" repeat))))
                       ;; Function.
                       (let ((cl-print-compiled 'static)
-                            (cl-print-compiled-button nil))
+                            (cl-print-compiled-button nil)
+                            (print-escape-newlines t))
                         (cl-prin1-to-string (aref timer 5)))))
       (put-text-property (line-beginning-position)
                          (1+ (line-beginning-position))
[0001-Escape-newlines-when-printing-functions-in-timer-lis.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36187; Package emacs. (Thu, 13 Jun 2019 12:12:02 GMT) Full text and rfc822 format available.

Message #8 received at 36187 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Pip Cet <pipcet <at> gmail.com>
Cc: 36187 <at> debbugs.gnu.org
Subject: Re: bug#36187: 27.0.50;
 M-x timer-list fails for functions with multi-line string
 representations
Date: Thu, 13 Jun 2019 14:11:17 +0200
Pip Cet <pipcet <at> gmail.com> writes:

> The attached one-liner patch fixes things.
>
> * timer-list.el (list-timers): bind `print-escape-newlines' to avoid
>   newlines in printed representation.

Thanks; applied to Emacs 27.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 13 Jun 2019 12:12:03 GMT) Full text and rfc822 format available.

bug marked as fixed in version 27.1, send any further explanations to 36187 <at> debbugs.gnu.org and Pip Cet <pipcet <at> gmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 13 Jun 2019 12:12:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 12 Jul 2019 11:24:09 GMT) Full text and rfc822 format available.

This bug report was last modified 6 years and 40 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.