kevinbanjo <kevinba...@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


Reply via email to