emacs-diffs
[Top][All Lists]
Advanced

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

master 0d46683202: Add rcirc-when command


From: Philip Kaludercic
Subject: master 0d46683202: Add rcirc-when command
Date: Thu, 6 Jan 2022 08:56:32 -0500 (EST)

branch: master
commit 0d46683202e2bf4d7ae88efa0fc65ddd26a5e5fd
Author: Philip Kaludercic <philipk@posteo.net>
Commit: Philip Kaludercic <philipk@posteo.net>

    Add rcirc-when command
    
    * doc/misc/rcirc.texi: Document rcirc-when.
    * etc/NEWS: Document rcirc-when.
    * lisp/net/rcirc.el (rcirc-when): Add command.
---
 doc/misc/rcirc.texi | 5 +++++
 etc/NEWS            | 7 ++++++-
 lisp/net/rcirc.el   | 7 +++++++
 3 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/doc/misc/rcirc.texi b/doc/misc/rcirc.texi
index f13ecc7d28..6217781e2b 100644
--- a/doc/misc/rcirc.texi
+++ b/doc/misc/rcirc.texi
@@ -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
diff --git a/etc/NEWS b/etc/NEWS
index 9c892b285d..463c39315d 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -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
 
 ---
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el
index 62e6281e03..dda72a2a7f 100644
--- a/lisp/net/rcirc.el
+++ b/lisp/net/rcirc.el
@@ -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



reply via email to

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