Emacs: Prepend timestamps to messages.
This commit is contained in:
parent
ebbca748f6
commit
fa82276f7d
23
init.d/basics/misc.el
Normal file
23
init.d/basics/misc.el
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
;;; misc.el --- Basic things that do not fit any other category. -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
|
;; Time-stamp: <2020-01-01T03:42:07+0100>
|
||||||
|
|
||||||
|
;;; Commentary:
|
||||||
|
|
||||||
|
;;; Code:
|
||||||
|
|
||||||
|
(use-package emacs
|
||||||
|
:ensure nil
|
||||||
|
|
||||||
|
:config
|
||||||
|
(defun my/message-with-timestamp (old-func fmt-string &rest args)
|
||||||
|
"Prepend current timestamp to a message"
|
||||||
|
(apply old-func
|
||||||
|
(concat (format-time-string "[%FT%T%z] ") fmt-string)
|
||||||
|
args))
|
||||||
|
|
||||||
|
(advice-add 'message :around #'my/message-with-timestamp)
|
||||||
|
)
|
||||||
|
|
||||||
|
(provide 'basics/misc)
|
||||||
|
;;; misc.el ends here
|
3
init.el
3
init.el
|
@ -1,6 +1,6 @@
|
||||||
;;; init.el --- tastytea's Emacs init file. -*- lexical-binding: t; -*-
|
;;; init.el --- tastytea's Emacs init file. -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
;; Time-stamp: <2019-12-26T18:21:40+00:00>
|
;; Time-stamp: <2020-01-01T03:37:43+0100>
|
||||||
|
|
||||||
;;; Commentary:
|
;;; Commentary:
|
||||||
;; Requires at least Emacs 26. Most of it will probably work with Emacs 24 and
|
;; Requires at least Emacs 26. Most of it will probably work with Emacs 24 and
|
||||||
|
@ -27,6 +27,7 @@
|
||||||
(setq gc-cons-threshold (* 20 1024 1024))
|
(setq gc-cons-threshold (* 20 1024 1024))
|
||||||
(setq gc-cons-threshold (* 100 1024 1024)))
|
(setq gc-cons-threshold (* 100 1024 1024)))
|
||||||
|
|
||||||
|
(require 'basics/misc)
|
||||||
(require 'basics/input)
|
(require 'basics/input)
|
||||||
(require 'basics/buffers)
|
(require 'basics/buffers)
|
||||||
(require 'basics/appearance)
|
(require 'basics/appearance)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user