From: Matt Price <moptop99@gmail.com>
To: Org Mode <emacs-orgmode@gnu.org>
Subject: Re: two basic elisp questions
Date: Fri, 22 Jul 2016 12:13:06 -0400 [thread overview]
Message-ID: <CAN_Dec9TsLU_NCTrFM2un9p8Mo9ri1pkq18pzsBCRzgCJTqs1Q@mail.gmail.com> (raw)
In-Reply-To: <CAN_Dec87yipA6ps_pb9mqAFSx_a2yyomEExdf6O=hPwxoUxAWA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1037 bytes --]
On Fri, Jul 22, 2016 at 11:38 AM, Matt Price <moptop99@gmail.com> wrote:
>
> (2) Is it possible to set the default value for interactive file selection
> to something OTHER than the currect directory of the current buffer?
> Something like:
>
> (let
> ((base-dir "./Assignment1/"))
> (org-attach--attach))
>
> I'd like to set different base directories when attaching files to
> subtrees of different first-level trees in a buffer. I guess I would set
> the value for the base directory with a property.
>
OK, I made some progress on this:
(let ((default-directory (concat default-directory "Assignment1/") ))
(call-interactively 'org-attach-attach))
However, I'd like to do something like:
(let
((parent-basedir nil))
(save-excursion
(outline-up-heading)
(setq parent-basedir (org-get-entry "BASEDIR")))
(let
((default-directory (concat default-directory parent-basedir) ))
(call-interactively 'org-attach-attach )))
But there are errors I don't understand in this code. Any hints? Thanks
again!
[-- Attachment #2: Type: text/html, Size: 1620 bytes --]
next prev parent reply other threads:[~2016-07-22 16:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-22 15:38 two basic elisp questions Matt Price
2016-07-22 16:13 ` Matt Price [this message]
2016-07-22 17:54 ` Michael Welle
2016-07-23 2:27 ` Matt Price
2016-07-23 5:24 ` Michael Welle
2016-07-29 14:15 ` Matt Price
2016-07-22 17:27 ` Michael Welle
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAN_Dec9TsLU_NCTrFM2un9p8Mo9ri1pkq18pzsBCRzgCJTqs1Q@mail.gmail.com \
--to=moptop99@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).