Subject: bug#13567: 24.1; New remember back-end for storing data in multiple files

From: Bastien <[email-masked]>
Date: Sun, 14 Apr 2013 09:06:35 +0200

Hi,

Reuben Thomas <[email-masked]> writes:

> I prefer to store my ideas in individual files rather than one big file;
> a simplified version of remember-store-in-mailbox achieves this:
>
> ;; Remember support for storing remember data in individual files.
> (defcustom remember-directory "~/remember"
>   "The directory in which to store remember data as files."
>   :type 'file
>   :group 'remember)

Better use remember-data-directory since there is remember-data-file?

> (defcustom remember-directory-file-name-format "%Y-%m-%d_%T-%z"
>   "The file in which to store unprocessed data."
>   :type 'file
>   :group 'remember)

The docstring needs an update.

> (defcustom remember-handler-functions '(remember-append-to-file)
>   "Functions run to process remember data.
> Each function is called with the current buffer narrowed to what the
> user wants remembered.
> If any function returns non-nil, the data is assumed to have been
> recorded somewhere by that function. "
>   :type 'hook
>   :options '(remember-store-in-mailbox
>              remember-append-to-file
>              remember-store-in-files
>              remember-diary-extract-entries
>              org-remember-handler)
>   :group 'remember)
>
> (defun remember-store-in-files ()
>   "Store remember data in a file in the directory `remember-directory',
> in a file named by `remember-directory-file-name-format' fed through
> `format-time-string'."

The first line of the docstring should be a sentence.
You can use M-x checkdoc RET to catch those docstring errors.

>   (let ((moment (format-time-string remember-directory-file-name-format (current-time)))
>         (text (buffer-string)))
>     (with-temp-buffer
>       (insert text)
>       (write-file (convert-standard-filename
>                    (format "%s/%s" remember-directory moment))))))
>
> If you can use this code, I've already signed an Emacs copyright
> waiver.

Looks okay to me -- can you provide the change as a patch against
current remember.el?

Thanks,

-- 
 Bastien