emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [BUG] cache file conflict? [9.7-pre (release_9.6.29-1441-gaa71fa @ /


From: Greg Minshall
Subject: Re: [BUG] cache file conflict? [9.7-pre (release_9.6.29-1441-gaa71fa @ /home/minshall/.emacs.d/straight/build/org/)]
Date: Thu, 30 May 2024 10:19:09 +0300

Ihor,

> May you try the attached alternative patch?

it's been a week that i've been running this patch without seeing the
error messages (that used to come up once or more per day).

so, it would seem to have corrected the issue.

thanks again for looking at this.

cheers, Greg

> From 793f7df996b3aade65a66d936e4bd761af154b26 Mon Sep 17 00:00:00 2001
> Message-ID: 
> <793f7df996b3aade65a66d936e4bd761af154b26.1716370593.git.yantar92@posteo.net>
> From: Ihor Radchenko <yantar92@posteo.net>
> Date: Fri, 17 May 2024 14:28:48 +0300
> Subject: [PATCH v2] lisp/org-persist.el: Ignore lock files when writing cache
> 
> * lisp/org-persist.el (org-persist--write-elisp-file): Ignore locks.
> 
> Reported-by: Greg Minshall <minshall@umich.edu>
> Link: https://orgmode.org/list/574109.1715751441@archlinux
> ---
>  lisp/org-persist.el | 15 +++++++++------
>  1 file changed, 9 insertions(+), 6 deletions(-)
> 
> diff --git a/lisp/org-persist.el b/lisp/org-persist.el
> index 0df345536..8a7461649 100644
> --- a/lisp/org-persist.el
> +++ b/lisp/org-persist.el
> @@ -476,12 +476,15 @@ (defun org-persist--write-elisp-file (file data 
> &optional no-circular pp)
>          (start-time (float-time)))
>      (unless (file-exists-p (file-name-directory file))
>        (make-directory (file-name-directory file) t))
> -    (with-temp-file file
> -      (insert ";;   -*- mode: lisp-data; -*-\n")
> -      (if pp
> -          (let ((pp-use-max-width nil)) ; Emacs bug#58687
> -            (pp data (current-buffer)))
> -        (prin1 data (current-buffer))))
> +    ;; Force writing even when the file happens to be opened by
> +    ;; another Emacs process.
> +    (cl-letf (((symbol-function #'ask-user-about-lock) #'always))
> +      (with-temp-file file
> +        (insert ";;   -*- mode: lisp-data; -*-\n")
> +        (if pp
> +            (let ((pp-use-max-width nil)) ; Emacs bug#58687
> +              (pp data (current-buffer)))
> +          (prin1 data (current-buffer)))))
>      (org-persist--display-time
>       (- (float-time) start-time)
>       "Writing to %S" file)))
> -- 
> 2.45.1



reply via email to

[Prev in Thread] Current Thread [Next in Thread]