* bug#30560: Better format for view-lossage
@ 2018-02-20 21:17 Juri Linkov
2018-02-22 21:59 ` Juri Linkov
0 siblings, 1 reply; 8+ messages in thread
From: Juri Linkov @ 2018-02-20 21:17 UTC (permalink / raw)
To: 30560
[-- Attachment #1: Type: text/plain, Size: 633 bytes --]
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:
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: view-lossage.patch --]
[-- Type: text/x-diff, Size: 1053 bytes --]
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)))))
[-- Attachment #3: Type: text/plain, Size: 71 bytes --]
PS: I'm not sure whether this feature should be documented somewhere.
^ permalink raw reply related [flat|nested] 8+ messages in thread
* bug#30560: Better format for view-lossage
2018-02-20 21:17 bug#30560: Better format for view-lossage Juri Linkov
@ 2018-02-22 21:59 ` Juri Linkov
2018-02-23 6:59 ` Eli Zaretskii
0 siblings, 1 reply; 8+ messages in thread
From: Juri Linkov @ 2018-02-22 21:59 UTC (permalink / raw)
To: 30560-done
> This patch is for master:
Pushed to master and closed.
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#30560: Better format for view-lossage
2018-02-22 21:59 ` Juri Linkov
@ 2018-02-23 6:59 ` Eli Zaretskii
2018-02-23 10:09 ` Robert Pluim
0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2018-02-23 6:59 UTC (permalink / raw)
To: Juri Linkov; +Cc: 30560
> From: Juri Linkov <juri@linkov.net>
> Date: Thu, 22 Feb 2018 23:59:42 +0200
>
> > This patch is for master:
>
> Pushed to master and closed.
Thanks, but please in the future leave more than just 2 days for
people to comment on the patches you propose.
IMO, this change needs to be mentioned in NEWS.
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#30560: Better format for view-lossage
2018-02-23 6:59 ` Eli Zaretskii
@ 2018-02-23 10:09 ` Robert Pluim
2018-02-23 10:20 ` martin rudalics
2018-02-23 13:55 ` Eli Zaretskii
0 siblings, 2 replies; 8+ messages in thread
From: Robert Pluim @ 2018-02-23 10:09 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 30560, Juri Linkov
[-- Attachment #1: Type: text/plain, Size: 443 bytes --]
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Juri Linkov <juri@linkov.net>
>> Date: Thu, 22 Feb 2018 23:59:42 +0200
>>
>> > This patch is for master:
>>
>> Pushed to master and closed.
>
> Thanks, but please in the future leave more than just 2 days for
> people to comment on the patches you propose.
>
> IMO, this change needs to be mentioned in NEWS.
Might I suggest the following as well? Does this need mentioning in
the info docs?
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Describe-view-lossage-changes-in-its-docstring.patch --]
[-- Type: text/x-diff, Size: 1845 bytes --]
From 45c4f1a42e1e47f79055545a3fcf5a7d117e1caf Mon Sep 17 00:00:00 2001
From: Robert Pluim <rpluim@gmail.com>
Date: Fri, 23 Feb 2018 11:01:23 +0100
Subject: [PATCH] Describe `view-lossage' changes in its docstring
* lisp/help.el (view-lossage): Mention that this now uses the same
format as `edit-last-kbd-macro'.
---
etc/NEWS | 11 ++++++-----
lisp/help.el | 3 ++-
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/etc/NEWS b/etc/NEWS
index dacaf023bb..3fa2670d60 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -167,11 +167,12 @@ directories in the destination.
** Help
-*** 'C-h l' (view-lossage) now displays last keystrokes and commands
-in the same format as the edit buffer of edit-last-kbd-macro.
-This makes possible to 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'.
+*** 'C-h l' (view-lossage) buffer format has changed.
+For convenience the lossage buffer now displays the last keystrokes
+and commands in the same format as the edit buffer of
+'edit-last-kbd-macro'. This makes it possible to copy the lines from
+the buffer generated by 'view-lossage' to the "*Edit Macro*" buffer
+created by 'edit-last-kbd-macro', and save the macro by 'C-c C-c'.
** Ibuffer
diff --git a/lisp/help.el b/lisp/help.el
index 9575f5b090..917c25e427 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -454,7 +454,8 @@ view-external-packages
(info "(efaq)Packages that do not come with Emacs"))
(defun view-lossage ()
- "Display last few input keystrokes and the commands run.
+ "Display last few input keystrokes and the commands run. For
+convenience this uses the same format as `edit-last-kbd-macro'.
To record all your input, use `open-dribble-file'."
(interactive)
--
2.16.1.72.g5be1f00a9
^ permalink raw reply related [flat|nested] 8+ messages in thread
* bug#30560: Better format for view-lossage
2018-02-23 10:09 ` Robert Pluim
@ 2018-02-23 10:20 ` martin rudalics
2018-02-23 11:08 ` Robert Pluim
2018-02-23 13:55 ` Eli Zaretskii
1 sibling, 1 reply; 8+ messages in thread
From: martin rudalics @ 2018-02-23 10:20 UTC (permalink / raw)
To: Robert Pluim, Eli Zaretskii; +Cc: 30560, Juri Linkov
> + "Display last few input keystrokes and the commands run. For
This wants the newline here ---------------------------------^
martin
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#30560: Better format for view-lossage
2018-02-23 10:20 ` martin rudalics
@ 2018-02-23 11:08 ` Robert Pluim
2018-02-24 11:17 ` Eli Zaretskii
0 siblings, 1 reply; 8+ messages in thread
From: Robert Pluim @ 2018-02-23 11:08 UTC (permalink / raw)
To: martin rudalics; +Cc: 30560, Juri Linkov
[-- Attachment #1: Type: text/plain, Size: 228 bytes --]
martin rudalics <rudalics@gmx.at> writes:
>> + "Display last few input keystrokes and the commands run. For
>
> This wants the newline here ---------------------------------^
Yes. I got it right for NEWS, and wrong here...
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Describe-view-lossage-changes-in-its-docstring.patch --]
[-- Type: text/x-diff, Size: 1728 bytes --]
From 81839472eb88d79b12a44148fd47c76b7c6e56ea Mon Sep 17 00:00:00 2001
From: Robert Pluim <rpluim@gmail.com>
Date: Fri, 23 Feb 2018 11:01:23 +0100
Subject: [PATCH] Describe `view-lossage' changes in its docstring
* lisp/help.el (view-lossage): Mention that this now uses the same
format as `edit-last-kbd-macro'.
---
etc/NEWS | 11 ++++++-----
lisp/help.el | 2 ++
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/etc/NEWS b/etc/NEWS
index dacaf023bb..3fa2670d60 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -167,11 +167,12 @@ directories in the destination.
** Help
-*** 'C-h l' (view-lossage) now displays last keystrokes and commands
-in the same format as the edit buffer of edit-last-kbd-macro.
-This makes possible to 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'.
+*** 'C-h l' (view-lossage) buffer format has changed.
+For convenience the lossage buffer now displays the last keystrokes
+and commands in the same format as the edit buffer of
+'edit-last-kbd-macro'. This makes it possible to copy the lines from
+the buffer generated by 'view-lossage' to the "*Edit Macro*" buffer
+created by 'edit-last-kbd-macro', and save the macro by 'C-c C-c'.
** Ibuffer
diff --git a/lisp/help.el b/lisp/help.el
index 9575f5b090..dcf1f32069 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -455,6 +455,8 @@ view-external-packages
(defun view-lossage ()
"Display last few input keystrokes and the commands run.
+For convenience this uses the same format as
+`edit-last-kbd-macro'.
To record all your input, use `open-dribble-file'."
(interactive)
--
2.16.1.72.g5be1f00a9
^ permalink raw reply related [flat|nested] 8+ messages in thread
* bug#30560: Better format for view-lossage
2018-02-23 10:09 ` Robert Pluim
2018-02-23 10:20 ` martin rudalics
@ 2018-02-23 13:55 ` Eli Zaretskii
1 sibling, 0 replies; 8+ messages in thread
From: Eli Zaretskii @ 2018-02-23 13:55 UTC (permalink / raw)
To: Robert Pluim; +Cc: 30560, juri
> From: Robert Pluim <rpluim@gmail.com>
> Cc: Juri Linkov <juri@linkov.net>, 30560@debbugs.gnu.org
> Date: Fri, 23 Feb 2018 11:09:52 +0100
>
> Might I suggest the following as well?
LGTM, thanks.
> Does this need mentioning in the info docs?
The format of the output of view-lossage is currently not mentioned in
the manuals, AFAICS. If it is self-explanatory enough, maybe we
should leave it that way (and mark the NEWS entry with "---").
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#30560: Better format for view-lossage
2018-02-23 11:08 ` Robert Pluim
@ 2018-02-24 11:17 ` Eli Zaretskii
0 siblings, 0 replies; 8+ messages in thread
From: Eli Zaretskii @ 2018-02-24 11:17 UTC (permalink / raw)
To: Robert Pluim; +Cc: 30560, juri
> From: Robert Pluim <rpluim@gmail.com>
> Cc: Eli Zaretskii <eliz@gnu.org>, 30560@debbugs.gnu.org, Juri Linkov <juri@linkov.net>
> Date: Fri, 23 Feb 2018 12:08:54 +0100
>
> >> + "Display last few input keystrokes and the commands run. For
> >
> > This wants the newline here ---------------------------------^
>
> Yes. I got it right for NEWS, and wrong here...
Thanks, pushed.
For the future, please include a log entry for NEWS as well, and
please cite the bug number in the log message.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2018-02-24 11:17 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-20 21:17 bug#30560: Better format for view-lossage Juri Linkov
2018-02-22 21:59 ` Juri Linkov
2018-02-23 6:59 ` Eli Zaretskii
2018-02-23 10:09 ` Robert Pluim
2018-02-23 10:20 ` martin rudalics
2018-02-23 11:08 ` Robert Pluim
2018-02-24 11:17 ` Eli Zaretskii
2018-02-23 13:55 ` Eli Zaretskii
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.