[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] directory from which attachments are taken

From: Rasmus
Subject: Re: [O] directory from which attachments are taken
Date: Wed, 06 Sep 2017 10:26:06 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

kevinbanjo <address@hidden> 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

(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

[Prev in Thread] Current Thread [Next in Thread]