---
*** New user option 'remember-diary-regexp'.
+---
+*** New user option 'remember-text-format-function'.
+
*** New function 'buffer-line-statistics'.
This function returns some statistics about the line lengths in a buffer.
:group 'remember
:version "27.1")
+(defcustom remember-text-format-function nil
+ "The function to format the remembered text.
+The function receives the remembered text as argument and should
+return the text to be remembered."
+ :type 'function
+ :group 'remember
+ :version "28.1")
+
(defun remember-append-to-file ()
"Remember, with description DESC, the given TEXT."
(let* ((text (buffer-string))
(desc (remember-buffer-desc))
- (remember-text (concat "\n" remember-leader-text
- (format-time-string remember-time-format)
- " (" desc ")\n\n" text
+ (remember-text (concat "\n"
+ (if remember-text-format-function
+ (funcall remember-text-format-function text)
+ (concat remember-leader-text
+ (format-time-string remember-time-format)
+ " (" desc ")\n\n" text))
(save-excursion (goto-char (point-max))
(if (bolp) nil "\n"))))
(buf (find-buffer-visiting remember-data-file)))