[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Possible bug: org-capture fails when emacs started as daemon
From: |
Stefan Monnier |
Subject: |
Re: Possible bug: org-capture fails when emacs started as daemon |
Date: |
Wed, 16 Aug 2023 11:00:21 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
> Stefan, any comments? You wrote the face-remap--copy-face stuff,
> AFAICT.
Not sure how I ended up with that code, which is fundamentally wrong:
`face-remap--copy-face` should take a face value but we pass it
elements of `face-remap-alist` which are not
facevalues but are cons cells (FACENAME . FACEVALUE) instead.
If we want to preserve the "careful" approach in the current code, then
the patch below should fix it.
If we want to make the code simpler, then we should throw away
`face-remap--copy-face` and use `copy-tree` instead.
Stefan
diff --git a/lisp/face-remap.el b/lisp/face-remap.el
index 3ec271b67a4..ae4e9853ad3 100644
--- a/lisp/face-remap.el
+++ b/lisp/face-remap.el
@@ -79,12 +79,13 @@ face-remap--copy-face
;; `add-face-text-property'.
(if (or (not (listp val)) (keywordp (car val)))
val
- (copy-sequence val)))
+ (mapcar #'face-remap--copy-face val)))
(defun face-attrs--make-indirect-safe ()
"Deep-copy the buffer's `face-remapping-alist' upon cloning the buffer."
(setq-local face-remapping-alist
- (mapcar #'face-remap--copy-face face-remapping-alist)))
+ (mapcar (lambda (x) (cons (car x) (face-remap--copy-face (cdr
x))))
+ face-remapping-alist)))
(add-hook 'clone-indirect-buffer-hook #'face-attrs--make-indirect-safe)
- Re: Possible bug: org-capture fails when emacs started as daemon, (continued)
- Re: Possible bug: org-capture fails when emacs started as daemon, Morgan Willcock, 2023/08/12
- Re: Possible bug: org-capture fails when emacs started as daemon, Ihor Radchenko, 2023/08/13
- Re: Possible bug: org-capture fails when emacs started as daemon, Iñigo Serna, 2023/08/13
- Re: Possible bug: org-capture fails when emacs started as daemon, Ihor Radchenko, 2023/08/13
- Re: Possible bug: org-capture fails when emacs started as daemon, Morgan Willcock, 2023/08/15
- Re: Possible bug: org-capture fails when emacs started as daemon, Ihor Radchenko, 2023/08/15
- Re: Possible bug: org-capture fails when emacs started as daemon, Eli Zaretskii, 2023/08/15
- Re: Possible bug: org-capture fails when emacs started as daemon, Iñigo Serna, 2023/08/16
- Re: Possible bug: org-capture fails when emacs started as daemon, Eli Zaretskii, 2023/08/16
- Re: Possible bug: org-capture fails when emacs started as daemon,
Stefan Monnier <=
- Re: Possible bug: org-capture fails when emacs started as daemon, Iñigo Serna, 2023/08/16
- Re: Possible bug: org-capture fails when emacs started as daemon, Eli Zaretskii, 2023/08/16
- Re: Possible bug: org-capture fails when emacs started as daemon, Stefan Monnier, 2023/08/16
- Re: Possible bug: org-capture fails when emacs started as daemon, Eli Zaretskii, 2023/08/17
- Re: Possible bug: org-capture fails when emacs started as daemon, Iñigo Serna, 2023/08/16