From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Eli Zaretskii <eliz@gnu.org>
Cc: inigoserna@gmx.com, yantar92@posteo.net, morgan@ice9.digital,
emacs-devel@gnu.org
Subject: Re: Possible bug: org-capture fails when emacs started as daemon
Date: Wed, 16 Aug 2023 11:00:21 -0400 [thread overview]
Message-ID: <jwv7cpvjawt.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <83cyzn84nm.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 16 Aug 2023 17:04:29 +0300")
> 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)
next prev parent reply other threads:[~2023-08-16 15:00 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-12 12:14 Possible bug: org-capture fails when emacs started as daemon Iñigo Serna
2023-08-12 17:05 ` Morgan Willcock
2023-08-13 15:09 ` Iñigo Serna
2023-08-13 8:37 ` Ihor Radchenko
2023-08-13 15:29 ` Iñigo Serna
2023-08-13 15:38 ` Ihor Radchenko
2023-08-15 16:53 ` Morgan Willcock
2023-08-15 16:57 ` Ihor Radchenko
2023-08-15 18:57 ` Eli Zaretskii
2023-08-16 9:25 ` Iñigo Serna
2023-08-16 14:04 ` Eli Zaretskii
2023-08-16 14:59 ` Iñigo Serna
2023-08-16 15:00 ` Stefan Monnier [this message]
2023-08-16 15:44 ` Iñigo Serna
2023-08-16 17:04 ` Eli Zaretskii
2023-08-16 17:46 ` Stefan Monnier
2023-08-17 7:53 ` Eli Zaretskii
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.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwv7cpvjawt.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=inigoserna@gmx.com \
--cc=morgan@ice9.digital \
--cc=yantar92@posteo.net \
/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.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).