* directory from which attachments are taken
@ 2017-09-05 22:54 kevinbanjo
2017-09-06 8:26 ` Rasmus
0 siblings, 1 reply; 2+ messages in thread
From: kevinbanjo @ 2017-09-05 22:54 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 415 bytes --]
I'm downloading files into my "~/Downloads" directory and attaching them to
an org file in "~/Private/org" and every time it tries to look in the
latter for the attachment and I have to navigate back to the former. Is
there a setting where I can direct it where to initially look for the files
to attach or a setting where it will just keep the last place I attached a
file and just use that as the initial value?
[-- Attachment #2: Type: text/html, Size: 462 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: directory from which attachments are taken
2017-09-05 22:54 directory from which attachments are taken kevinbanjo
@ 2017-09-06 8:26 ` Rasmus
0 siblings, 0 replies; 2+ messages in thread
From: Rasmus @ 2017-09-06 8:26 UTC (permalink / raw)
To: emacs-orgmode
kevinbanjo <kevinbanjo@gmail.com> writes:
> I'm downloading files into my "~/Downloads" directory and attaching them to
> an org file in "~/Private/org" and every time it tries to look in the
> latter for the attachment and I have to navigate back to the former. Is
> there a setting where I can direct it where to initially look for the files
> to attach or a setting where it will just keep the last place I attached a
> file and just use that as the initial value?
You could probably do something like this, though I haven’t tested it
extensively.
(defun rasmus/org-attach (orig-fun &rest args)
"Change dir of the shell to buffer's `default-directory'."
(let ((default-directory "~/Downloads"))
(apply orig-fun args)))
(advice-add #'org-attach :around #'rasmus/org-attach)
--
Sådan en god dansk lagereddike kan man slet ikke bruge mere
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-09-06 8:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-05 22:54 directory from which attachments are taken kevinbanjo
2017-09-06 8:26 ` Rasmus
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).