emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] fix compat with emacs 25 due using temporary-file-directory
@ 2023-01-16  5:29 Tom Gillespie
  2023-01-16 13:44 ` Ihor Radchenko
  0 siblings, 1 reply; 3+ messages in thread
From: Tom Gillespie @ 2023-01-16  5:29 UTC (permalink / raw)
  To: emacs-orgmode

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

Small bugfix for emacs 25 compat. Best!
Tom

[-- Attachment #2: 0001-fix-compat-with-emacs-25-due-using-temporary-file-di.patch --]
[-- Type: text/x-patch, Size: 1006 bytes --]

From f04a44e5cc8143fc6cdbbc92b9d2afb76de4a459 Mon Sep 17 00:00:00 2001
From: Tom Gillespie <tgbugs@gmail.com>
Date: Mon, 16 Jan 2023 00:25:47 -0500
Subject: [PATCH] fix compat with emacs 25 due using temporary-file-directory
 function

* lisp/ob-core.el: org-babel-temporary-stable-directory use the symbol
version of temporary-file-directory since the function form is not
available on emacs 25.
---
 lisp/ob-core.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/ob-core.el b/lisp/ob-core.el
index 5d5edadd2..255a767bb 100644
--- a/lisp/ob-core.el
+++ b/lisp/ob-core.el
@@ -3276,7 +3276,7 @@ Emacs shutdown.")
       (while (or (not dir) (file-exists-p dir))
         (setq dir (expand-file-name
                    (format "babel-stable-%d" (random 1000))
-                   (temporary-file-directory))))
+                   temporary-file-directory)))
       (make-directory dir)
       dir))
   "Directory to hold temporary files created to execute code blocks.
-- 
2.38.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] fix compat with emacs 25 due using temporary-file-directory
  2023-01-16  5:29 [PATCH] fix compat with emacs 25 due using temporary-file-directory Tom Gillespie
@ 2023-01-16 13:44 ` Ihor Radchenko
  2023-01-20 14:13   ` Ihor Radchenko
  0 siblings, 1 reply; 3+ messages in thread
From: Ihor Radchenko @ 2023-01-16 13:44 UTC (permalink / raw)
  To: Tom Gillespie; +Cc: emacs-orgmode

Tom Gillespie <tgbugs@gmail.com> writes:

> Small bugfix for emacs 25 compat. Best!
>                     (format "babel-stable-%d" (random 1000))
> -                   (temporary-file-directory))))
> +                   temporary-file-directory)))

Thanks!

Note that Emacs 25 is no longer officially supported. AFAIR, some Org
components are already failing in Emacs 25.

However, the patch itself is reasonable because the return value of
`temporary-file-directory' depends on `default-directory' - something we
don't want to do for `defvar' statement.

Could you please re-submit the patch altering the commit message stating
the reason I stated? Also, Please quote Elisp symbols in the commit
message as we usually do. See
https://orgmode.org/worg/org-contribute.html#commit-messages

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] fix compat with emacs 25 due using temporary-file-directory
  2023-01-16 13:44 ` Ihor Radchenko
@ 2023-01-20 14:13   ` Ihor Radchenko
  0 siblings, 0 replies; 3+ messages in thread
From: Ihor Radchenko @ 2023-01-20 14:13 UTC (permalink / raw)
  To: Tom Gillespie; +Cc: emacs-orgmode

Ihor Radchenko <yantar92@posteo.net> writes:

> Could you please re-submit the patch altering the commit message stating
> the reason I stated? Also, Please quote Elisp symbols in the commit
> message as we usually do. See
> https://orgmode.org/worg/org-contribute.html#commit-messages

This is no longer needed as this exact line generated a bug reported in
https://list.orgmode.org/4579f9d7-af96-2818-e12d-546040157e28@gmail.com/T/#t

I removed the `temporary-file-directory' function call while fixing that
bug.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-01-20 14:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-16  5:29 [PATCH] fix compat with emacs 25 due using temporary-file-directory Tom Gillespie
2023-01-16 13:44 ` Ihor Radchenko
2023-01-20 14:13   ` Ihor Radchenko

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).