The directory used for attachments to an entry is by default chosen
automatically, with a name derived from the entry ID to make sure it
is unique.
However, in some cases it may be better to assign a user-chosen
directory to and entry, to be used for attachments. This commits
implements this change. See the documentation changes for information
on how things work.
Thanks to Jason Jackson for pushing this part.
The second change made bu this commit is that it is now possible to
inherit the attachment directory from a parent, so that an entire
project subtree can use a single directory.
This patch defines a new minor mode, `org-remember-mode', which is
turned on when Org-mode is used to handle a remember buffer. This
provides a safe way to modify keybindings (in
`org-remember-mode-map'), without overwriting keys in `org-mode-map'.
Since Org put remember buffers into Org-mode, remember-mode-map will
be entirely ignored.
If you set the variable `org-completion-use-ido' to t, and if you have
ido-mode turned on, most instanced of completion in Org-mode will use
ido-complete.
Thanks to Samuel Wales and Eric Schulte for patches to this effect.
This patch introduces two new functions in org-attach.el,
`org-attach-expand', and `org-attach-expand-link'. Both take a file
name as an argument, assume that this file is an attachment of the
current entry, and return the full path to this file or a
"file:..." link to it, respectively.
With these functions, it becomes very easy to use link abbreviations
to create a new link type to attachments:
After
(setq org-link-abbrev-alist '(("att" . org-attach-expand-link)))
links like [[att:file.txt]] will work.
So far, Org used either `fit-window-to-buffer' or
`shrink-window-if-larger-than-buffer' without any further checks when
displaying one of its many help and selection buffers. This can cause
problems if the user has set up Emacs to split windows horizontally
rather than vertically, because the window being shrunken then may be
side-by-side with another window, and shrinking the height of one will
also change the other.
With this patch, shrinking a window always goes through the new
function `org-fit-window-to-buffer' which only acts if the current
window spans the whole width of the frame.
Furthermore, this function also helps with compatibility, because it
falls back to `shrink-window-if-larger-than-buffer' if
`fit-window-to-buffer' does not exist, as is the case on older version
of Emacs and XEmacs.