* contrib/lisp/org-annotate-file.el (org-annotate-file): New customization
group.
(org-annotate-file-storage-file org-annotate-file-add-search
org-annotate-file-always-open): Convert `defvar' symbols to `defcustom' using the new group.
* contrib/lisp/org-annotate-file.el (org-annotate-file,
org-annotate-file-show-section): Provide autoloads for the functions
intended for use from outside the script.
TINYCHANGE
* contrib/lisp/org-annotate-file.el (org-annotate-file,
org-annotate-file-show-section): Return the annotation buffer from
`org-annotate-file-show-section` so that the user can decide how to
display it.
When adding an annotation using org-file-annotate, the buffer would
always be opened in the current window. By not making the buffer
current and instead returning it from `org-annotate-file-show-section`
the user can control how to display it.
For instance, it can be opened in a popup window using popwin:
(popwin:display-buffer-1 (org-annotate-file-show-section storage-file)
:default-config-keywords '(:position :bottom))
The function `org-annotate-file` will still work as before and open
the buffer in the current window.
* contrib/lisp/org-annotate-file.el (org-annotate-file,
org-annotate-file-show-storage-section): Permit a used to control
where to store the annotation when using
`org-annotate-file-show-section`.
By making the storage file a parameter the user can create their own
custom implementations of org-annotate-file and decide where to store
the annotation.
Personally I'm trying to use org-annotate-file to do code reviews and
I have set up my Emacs to write annotations into a file at the current
project root. This makes it easier for me to email my comments to
whoever wrote the code I just reviewed as I can now keep multiple
reviews separate.
Additionally, replace one
(or (org-mode-p) (derived-mode-p 'org-mode))
with
(derived-mode-p 'org-mode)
cause that is reflexive anyway (returns true, if the current mode is
org-mode).
Delete one check testing for org-mode or org derived mode
Also remove blank lines before the ";;; org*el ends here" declarations.
Having a "Version" header forced us to update every file when releasing a
new version of Org; it also forced us to update every file when merging Org
with Emacs trunk, thus cluttering the diffs between the previously merged
version and the new one with useless information.
Glenn Morris suggested this in emacs-devel:
http://lists.gnu.org/archive/html/emacs-devel/2011-08/msg00322.html