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

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

[debbugs-tracker] bug#30560: closed (Better format for view-lossage)


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#30560: closed (Better format for view-lossage)
Date: Thu, 22 Feb 2018 22:01:02 +0000

Your message dated Thu, 22 Feb 2018 23:59:42 +0200
with message-id <address@hidden>
and subject line Re: bug#30560: Better format for view-lossage
has caused the debbugs.gnu.org bug report #30560,
regarding Better format for view-lossage
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
30560: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=30560
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: Better format for view-lossage Date: Tue, 20 Feb 2018 23:17:58 +0200 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu)
It would much more useful in the output buffer of ‘C-h l’ (view-lossage)
to use the same format as is used by ‘edit-last-kbd-macro’.

Then it will possible to just copy the lines from the buffer generated
by ‘view-lossage’, yank them to the buffer “*Edit Macro*” created by
‘edit-last-kbd-macro’, and save the macro by ‘C-c C-c’.

This is useful for such cases when the user forgets to start macro recording,
or wants to convert recent keystrokes to the macro without re-typing them,
or pick only some of recent keystrokes and compose a new macro
in different order.

This patch is for master:

diff --git a/lisp/help.el b/lisp/help.el
index 4899bc4..9575f5b 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -465,8 +465,8 @@ view-lossage
     (princ (mapconcat (lambda (key)
                        (cond
                         ((and (consp key) (null (car key)))
-                         (format "[%s]\n" (if (symbolp (cdr key)) (cdr key)
-                                          "anonymous-command")))
+                         (format ";; %s\n" (if (symbolp (cdr key)) (cdr key)
+                                             "anonymous-command")))
                         ((or (integerp key) (symbolp key) (listp key))
                          (single-key-description key))
                         (t
@@ -475,11 +475,11 @@ view-lossage
                      " "))
     (with-current-buffer standard-output
       (goto-char (point-min))
-      (while (not (eobp))
-       (move-to-column 50)
-       (unless (eolp)
-         (fill-region (line-beginning-position) (line-end-position)))
-       (forward-line 1))
+      (let ((comment-start ";; ")
+            (comment-column 24))
+        (while (not (eobp))
+          (comment-indent)
+         (forward-line 1)))
       ;; jidanni wants to see the last keystrokes immediately.
       (set-marker help-window-point-marker (point)))))
 
PS: I'm not sure whether this feature should be documented somewhere.

--- End Message ---
--- Begin Message --- Subject: Re: bug#30560: Better format for view-lossage Date: Thu, 22 Feb 2018 23:59:42 +0200 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu)
> This patch is for master:

Pushed to master and closed.


--- End Message ---

reply via email to

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