From: ricky saurav <ricky.saurav1996@gmail.com>
To: Bastien <bzg@gnu.org>
Cc: emacs-orgmode@gnu.org
Subject: Re: Bug: Symlink handling in org-babel-load-file
Date: Thu, 13 Feb 2020 23:46:58 +0530 [thread overview]
Message-ID: <CA+i1WRZWjCR8K0O_ZTxunKW-9hkJwyqX92vtLDvshHYXYpmC7g@mail.gmail.com> (raw)
In-Reply-To: <87h7zw0zwd.fsf@gnu.org>
[-- Attachment #1.1: Type: text/plain, Size: 738 bytes --]
Hey Bastien,
After this patch, org-mode loads the most updated config. A minor issue
that I have is that this patch creates config.el in my dotfiles directory,
instead of ~/.emacs.d/config.el ,since ~/.emacs.d/config.org is a symlink
to ~/dotfiles/config.org. The behaviour in org-9.1.5(emacs 26.3), was
resolution of symlinks for just fetching the file
attributes(file-modification-time). The below patch summarizes the changes
that would keep the current version in line with current version in emacs
release org-9.1.5(emacs 26.3).
Regards,
Saurav
On Wed, 12 Feb 2020 at 17:40, Bastien <bzg@gnu.org> wrote:
> Hi Ricky,
>
> thanks for reporting this.
>
> Can you try this patch and confirm it solves your issue?
>
>
> --
> Bastien
>
[-- Attachment #1.2: Type: text/html, Size: 1156 bytes --]
[-- Attachment #2: org-babel-load-file.patch --]
[-- Type: text/x-patch, Size: 875 bytes --]
diff --git a/lisp/org.el b/lisp/org.el
index 1a995cc40..239e3528f 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -218,12 +218,11 @@ and then loads the resulting file using `load-file'. With
optional prefix argument COMPILE, the tangled Emacs Lisp file is
byte-compiled before it is loaded."
(interactive "fFile to load: \nP")
- (let* ((file (file-truename file))
- (tangled-file (concat (file-name-sans-extension file) ".el")))
+ (let* ((tangled-file (concat (file-name-sans-extension file) ".el")))
;; Tangle only if the Org file is newer than the Elisp file.
(unless (org-file-newer-than-p
tangled-file
- (file-attribute-modification-time (file-attributes file)))
+ (file-attribute-modification-time (file-attributes (file-truename file))))
(org-babel-tangle-file file tangled-file "emacs-lisp\\|elisp"))
(if compile
(progn
next prev parent reply other threads:[~2020-02-13 18:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-30 21:22 Bug: Symlink handling in org-babel-load-file Ricky Saurav
2020-02-12 12:10 ` Bastien
2020-02-13 18:16 ` ricky saurav [this message]
2020-02-14 10:02 ` Bastien
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=CA+i1WRZWjCR8K0O_ZTxunKW-9hkJwyqX92vtLDvshHYXYpmC7g@mail.gmail.com \
--to=ricky.saurav1996@gmail.com \
--cc=bzg@gnu.org \
--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).