Add rcirc-when command

* doc/misc/rcirc.texi: Document rcirc-when.
* etc/NEWS: Document rcirc-when.
* lisp/net/rcirc.el (rcirc-when): Add command.
This commit is contained in:
Philip Kaludercic 2022-01-06 14:55:59 +01:00
parent daedbb2f5b
commit 0d46683202
3 changed files with 18 additions and 1 deletions

View file

@ -933,6 +933,11 @@ how to include the date in the time stamp:
(setq rcirc-time-format "%Y-%m-%d %H:%M ")
@end example
@findex rcirc-when
If you don't wish to use verbose time formatting all the time, you can
use the @code{rcirc-when} command to printing a complete timestamp for
the message at point.
@node Defining a new command
@section Defining a new command
@cindex defining commands

View file

@ -210,7 +210,7 @@ inserted.
+++
*** New command 'emoji-describe' (bound to 'C-x 8 e d').
This command will tell you the name of the Emoji at point. (This
nThis command will tell you the name of the Emoji at point. (This
command also works for non-Emoji characters.)
** Help
@ -259,6 +259,11 @@ For example, a 'display-buffer-alist' entry of
will make the body of the chosen window 40 columns wide. For the
height use 'window-height' in combination with 'body-lines'.
** Rcirc
+++
*** New command 'rcirc-when'.
** Tab Bars and Tab Lines
---

View file

@ -2047,6 +2047,13 @@ connection."
(run-hook-with-args 'rcirc-print-functions
process sender response target text)))))
(defun rcirc-when ()
"Print a message when the message at point was received."
(interactive)
(if-let (time (get-text-property (point) 'rcirc-time))
(message (format-time-string "%c" time))
(message "No time information at point.")))
(defun rcirc-generate-log-filename (process target)
"Return filename for log file based on PROCESS and TARGET."
(if target