From: Antti Kaihola <akaihola@gmail.com>
To: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Can't close Emacs+org-mode if /tmp and /home on different partitions
Date: Thu, 2 Dec 2010 10:33:28 +0200 [thread overview]
Message-ID: <AANLkTin--Br6NESxz-o=NxaPoZczo9YTLJVYVYwTqe-=@mail.gmail.com> (raw)
I have /tmp on my root partition and a separate partition for /home.
When trying to close an Emacs session which is using org-mode, I get
this error:
move-file-to-trash: Non-regular file: Is a directory, /tmp/babel-XXXXXXX
(where XXXXXXX are random characters).
I tracked down the problem to org-babel-remove-temporary-directory
which ob.el adds to kill-emacs-hook. It tries to remove the temporary
directory using delete-directory, which in turn tries to move the
directory (by renaming) into trash, which is in my home directory.
Here's the debugger traceback:
Debugger entered--Lisp error: (file-error "Non-regular file" "Is a
directory" "/tmp/babel-4893rR1")
rename-file("/tmp/babel-4893rR1"
"/home/akaihola/.local/share/Trash/files/babel-4893rR1_4893HqQ")
move-file-to-trash("/tmp/babel-4893rR1")
delete-directory("/tmp/babel-4893rR1")
(progn (mapc (lambda ... ...) (directory-files
org-babel-temporary-directory ...
"^\\([^.]\\|\\.\\([^.]\\|\\..\\)\\).*")) (delete-directory
org-babel-temporary-directory))
(if (and (boundp ...) (file-exists-p org-babel-temporary-directory))
(progn (mapc ... ...) (delete-directory
org-babel-temporary-directory)))
(when (and (boundp ...) (file-exists-p
org-babel-temporary-directory)) (mapc (lambda ... ...)
(directory-files org-babel-temporary-directory ...
"^\\([^.]\\|\\.\\([^.]\\|\\..\\)\\).*")) (delete-directory
org-babel-temporary-directory))
org-babel-remove-temporary-directory()
eval((org-babel-remove-temporary-directory))
eval-last-sexp-1(nil)
eval-last-sexp(nil)
call-interactively(eval-last-sexp nil nil)
I added this to my ~/.emacs.d/init.el:
(custom-set-variables '(temporary-file-directory "/home/akaihola/tmp/"))
and closing Emacs works correctly again. However, since my init.el is
part of emacs-starter-kit which I update frequently, I'd prefer not to
modify that file. Unfortunately the customization hook
emacs-starter-kit provides (~/.emacs.d/custom.el) is loaded too late
to affect the temporary directory.
I'm running emacs-snapshot 1:20090909-1 in Ubuntu 10.10. Looks like
this is really an Emacs bug and is already fixed:
http://groups.google.com/group/gnu.emacs.bug/browse_thread/thread/0446b8684a8ef504
next reply other threads:[~2010-12-02 8:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-02 8:33 Antti Kaihola [this message]
2010-12-08 10:13 ` Can't close Emacs+org-mode if /tmp and /home on different partitions Dan Davison
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='AANLkTin--Br6NESxz-o=NxaPoZczo9YTLJVYVYwTqe-=@mail.gmail.com' \
--to=akaihola@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).