emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Alen Alex Ninan <alenishere@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Help with assigning org-attach-id-dir using directory local variables
Date: Sat, 11 Jun 2022 06:14:17 +0530	[thread overview]
Message-ID: <587be554-906c-5370-2cf2-f08b14fa58ff@gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1871 bytes --]

Hi All,

I use org-attach to copy and attach images in my org-mode notes. I would 
like to assign org-attach-id-dir using directory local variable. Please 
find the statements I use in directory local file to define my org-roam 
directory and org-attach-id-dir below for reference.


Directory local configuration:

((nil . ((eval . (setq-local
                   org-roam-directory (expand-file-name 
(locate-dominating-file
default-directory ".dir-locals.el"))))
          (eval . (setq-local
                   org-roam-db-location (expand-file-name "org-roam.db"
org-roam-directory)))
          (eval . (setq-local
                   org-attach-id-dir (expand-file-name "attachments"
org-roam-directory)))
          )))


My Emacs and Org-mode configuration:

Org: 9.6

Emacs: 28.1 (Doom Emacs)


The org-mode file opened from this directory respects the attachment 
location defined in directory local variable when display of inline 
images during start-up is disabled. Org mode displays the attachments 
once the org file is open, and I toggle display of inline image. The 
same files throw an error when I open the file with inline images 
enabled at startup.

1. Have I made an error in how I define the directory local file?

2. If I have not made and error, Is it possible to define the attachment 
directory in directory local variable and have org mode respect the 
location when display of inline images are enabled during startup?

3. If I did make an error, do you have any recommendation on how I can 
resolve this?

I am new to Emacs, and I am not good at Emacs Lisp currently. It's 
something I am trying to learn. Any suggestions or recommendation would 
help. I am open to testing this out in stock Emacs if that's something 
that will help.


Thanks & Regards,

Alen Alex



[-- Attachment #2: Type: text/html, Size: 3113 bytes --]

             reply	other threads:[~2022-06-11  0:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-11  0:44 Alen Alex Ninan [this message]
2022-06-11 11:56 ` [PATCH] Re: Help with assigning org-attach-id-dir using directory local variables Ihor Radchenko
2022-07-31 10:25   ` Ihor Radchenko
2022-08-05 11:55     ` Ihor Radchenko

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=587be554-906c-5370-2cf2-f08b14fa58ff@gmail.com \
    --to=alenishere@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).