From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#30560: Better format for view-lossage Date: Tue, 20 Feb 2018 23:17:58 +0200 Organization: LINKOV.NET Message-ID: <871shfnywp.fsf@mail.linkov.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: blaine.gmane.org 1519162549 19498 195.159.176.226 (20 Feb 2018 21:35:49 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 20 Feb 2018 21:35:49 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) To: 30560@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Feb 20 22:35:45 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eoFZe-0004bV-UR for geb-bug-gnu-emacs@m.gmane.org; Tue, 20 Feb 2018 22:35:43 +0100 Original-Received: from localhost ([::1]:57885 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eoFbh-00042l-7m for geb-bug-gnu-emacs@m.gmane.org; Tue, 20 Feb 2018 16:37:49 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46258) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eoFb0-0003dF-A6 for bug-gnu-emacs@gnu.org; Tue, 20 Feb 2018 16:37:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eoFax-0000u7-5S for bug-gnu-emacs@gnu.org; Tue, 20 Feb 2018 16:37:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:45435) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eoFaw-0000tx-Vt for bug-gnu-emacs@gnu.org; Tue, 20 Feb 2018 16:37:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eoFaw-0003B5-QJ for bug-gnu-emacs@gnu.org; Tue, 20 Feb 2018 16:37:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 20 Feb 2018 21:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 30560 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.151916259012157 (code B ref -1); Tue, 20 Feb 2018 21:37:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 20 Feb 2018 21:36:30 +0000 Original-Received: from localhost ([127.0.0.1]:53330 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eoFaP-0003A0-Kv for submit@debbugs.gnu.org; Tue, 20 Feb 2018 16:36:29 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:55108) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eoFaO-00039i-L4 for submit@debbugs.gnu.org; Tue, 20 Feb 2018 16:36:28 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eoFaF-0000R2-Jj for submit@debbugs.gnu.org; Tue, 20 Feb 2018 16:36:23 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:48632) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eoFaF-0000Qs-GC for submit@debbugs.gnu.org; Tue, 20 Feb 2018 16:36:19 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46068) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eoFaE-0003TM-DY for bug-gnu-emacs@gnu.org; Tue, 20 Feb 2018 16:36:19 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eoFaD-0000Po-LR for bug-gnu-emacs@gnu.org; Tue, 20 Feb 2018 16:36:18 -0500 Original-Received: from sub3.mail.dreamhost.com ([69.163.253.7]:48529 helo=homiemail-a15.g.dreamhost.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eoFaD-0000PL-CW for bug-gnu-emacs@gnu.org; Tue, 20 Feb 2018 16:36:17 -0500 Original-Received: from homiemail-a15.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a15.g.dreamhost.com (Postfix) with ESMTP id 7BADD76C06E for ; Tue, 20 Feb 2018 13:36:16 -0800 (PST) Original-Received: from localhost.linkov.net (m91-129-98-215.cust.tele2.ee [91.129.98.215]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by homiemail-a15.g.dreamhost.com (Postfix) with ESMTPSA id D643676C069 for ; Tue, 20 Feb 2018 13:36:15 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:143518 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable It would much more useful in the output buffer of =E2=80=98C-h l=E2=80=99= (view-lossage) to use the same format as is used by =E2=80=98edit-last-kbd-macro=E2=80=99= . Then it will possible to just copy the lines from the buffer generated by =E2=80=98view-lossage=E2=80=99, yank them to the buffer =E2=80=9C*Edit= Macro*=E2=80=9D created by =E2=80=98edit-last-kbd-macro=E2=80=99, and save the macro by =E2=80=98C-c= C-c=E2=80=99. This is useful for such cases when the user forgets to start macro record= ing, 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: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=view-lossage.patch 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))))) --=-=-= Content-Type: text/plain PS: I'm not sure whether this feature should be documented somewhere. --=-=-=--