From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:5f26::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id kGBDMOeonWWuGQAAkFu2QA (envelope-from ) for ; Tue, 09 Jan 2024 21:13:27 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id sG5IKueonWXS0QAAqHPOHw (envelope-from ) for ; Tue, 09 Jan 2024 21:13:27 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=FUsGSebc; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1704831206; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=yhcQHuXhd/651jUHokXYynmviDM0k7sIS7ekucrJDlk=; b=ZUfTgltyJlov48M4UkP20d22yF02AxIlp4qDtmKsN3XeHlPv3RvKOrW6N6ASyUTSgJDPwb fYd8H1b4yLmHfvooFo6tpZKVBMA2jjm9NwhqyTwY0d34BwbnS1RBQeZSTBOivNVpkC2/s5 PcL6++VOI7sNhiEOMldIt3ifJo3GnAm6gxjFg4R2OdqllFQQxAdMHpHuS1C3UI1PvmvZFA 41umuyOwH29pghMZVvUU5dQfzpF/3f4WQqMjv1kaeznT57RV10RrAeVQI+xcXvy3WS7tDf kJla/u+hOCBktGVVnAUmdb+EU6zqe1/7wAmWNKzJOJlC6+PBZ7wnXNoVB4whcw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1704831206; a=rsa-sha256; cv=none; b=qwc4fu7o+vSpQfvq+5f++cWZZYUViShb/B7Thrj5edGpaKAeutHDImYVjOw0dmamoiBt1M mmnjJv5uGCLoiocTBUL/UHmF4IYn2NrBum4rcY98ZeODIOTcBc37UzzvRtINMQBCwFEAFt AedcC/iM0YQLrJGze3J3dAANp15UyNCQ7lW1b4uIDUQ+U2HUXMSZ8LZk4vk9sNUpiIEs8o jl9xh8/UrXgcAupB9pdjcRwBfalVDUNJAyihh7b2hOm7A05p3Ac8domvk1DGTehIbfwoPa YOwgc/hBTr7qRopY+1yVH3cgDl/tSTbns/yzkVZZSk6cltrSFlZPMAQUmqxSWw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=FUsGSebc; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gmail.com Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id A74CA24B32 for ; Tue, 9 Jan 2024 21:13:26 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rNISe-0007UW-BY; Tue, 09 Jan 2024 15:12:32 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rNISV-0007T4-Mf for emacs-orgmode@gnu.org; Tue, 09 Jan 2024 15:12:26 -0500 Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rNISP-0001KJ-PN for emacs-orgmode@gnu.org; Tue, 09 Jan 2024 15:12:22 -0500 Received: by mail-pf1-x432.google.com with SMTP id d2e1a72fcca58-6d9c2db82b0so1671598b3a.1 for ; Tue, 09 Jan 2024 12:12:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704831136; x=1705435936; darn=gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=yhcQHuXhd/651jUHokXYynmviDM0k7sIS7ekucrJDlk=; b=FUsGSebcKW9Ry4CUr+nD5BZKuLnBO9vvqyuJ7S+f3pesM61qnIDAE7OaN+cm18MtZU r/1MlkJeD662hHYzb+MJ+61jyKSea2s306qmyGKnaWWR8ILo/pG2rSl6G0l4ACQVV6Pu idZhUoaY3bdb6UgGm8aJUkJ0UOZ7i9KynBpUepdwvjcaFf9SIkfEkW5eqe6x4BPcmJoW Cl5MT7fhazcZxhJ7O/Zn0dKzFe9LMgwxU3LbbpEY8/TPnL15k4V4kkl5apH8pFkVDeAS Prqy2rgH1wo2qhne0lPOEbbLL5RB5efDkZrfjYDCoQzL8/9VWV6ZY8CLEcvLxBUxjBFT FY7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704831136; x=1705435936; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yhcQHuXhd/651jUHokXYynmviDM0k7sIS7ekucrJDlk=; b=lkJSXaY1Sm8kcaYVhsPlVP1Wo8U/7SXXUKQB59Izo43QYQX+nGL66VHE1/9ZOuRF2x hDgLe3eXOKz6pIBAJIwH1c3AtVcsIwLA5jyncAlteslUY6VilngCVbfNwT5gw3hny0Xa D1iwWp4nWfJOMXxLuh/XrCCImUjGM9Gk0VFpA8zNP5nwXZwlb9aAq4Zkcsqo6pb5b/a6 ghNoJK/Qd9956O+pdIAj4vvznRk1X5bAblt5LnM3kCgpLC77XE53CzzXocAiTnKhAaIz vPPGYyXxj9dzISSDRafsZJlxYqy6zKcahnHM0zrH5V9AuKEODP3tj9MPgyQuGGzrBI+g /RXw== X-Gm-Message-State: AOJu0YxIEV6qZiLc0a4SHuKHZPj/iiy8FCFyavxV8ai9Efoftf9UBmVj HdzPbmgZEt18A267qI3rGIsY+0T63OqHc2g5tKpJHv5KbfE= X-Google-Smtp-Source: AGHT+IHPLdKObEs6p4TXroTvLD0VLSvyf2a1jPLSOM+7jqouyphotzwSXn3h/yuSd5WytXC3EQLK85SGhhEyfoFmfdk= X-Received: by 2002:a05:6a21:4994:b0:199:dd65:5d2e with SMTP id ax20-20020a056a21499400b00199dd655d2emr2083299pzc.25.1704831135623; Tue, 09 Jan 2024 12:12:15 -0800 (PST) MIME-Version: 1.0 References: <20230829060145.45738-3-roshan.shariff@gmail.com> <20230829171523.56558-2-roshan.shariff@gmail.com> <87wmsl38n1.fsf@tec.tecosaur.net> In-Reply-To: From: Roshan Shariff Date: Tue, 9 Jan 2024 13:12:04 -0700 Message-ID: Subject: Re: [PATCH v2] Fix background color of latex previews To: Timothy Cc: emacs-orgmode@gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::432; envelope-from=roshan.shariff@gmail.com; helo=mail-pf1-x432.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_TEMPERROR=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Queue-Id: A74CA24B32 X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -9.48 X-Spam-Score: -9.48 X-TUID: JeVvoDrYCmGk Hi Timothy, On Mon, 8 Jan 2024 at 03:24, Timothy wrote: > Thanks for this info and the patch! I've had a look at both, and I'm hope= ful that https://git.tecosaur.net/tec/org-mode/commit/3b3d48d3bf0 might sol= ve the problem? Do let me know what your think =F0=9F=99=82 Thanks for your prompt bugfix! I can confirm that it works beautifully on both Emacs 28 and 29. Looking at the code, I just had a small suggestion: diff --git a/lisp/org-latex-preview.el b/lisp/org-latex-preview.el index 144449e34..973eed47b 100644 --- a/lisp/org-latex-preview.el +++ b/lisp/org-latex-preview.el @@ -541,7 +541,7 @@ Faces in `org-latex-preview--ignored-faces' are ignored= ." (normalising-face (if (>=3D emacs-major-version 29) 'default '(:inherit default :extend t)))) (cond - ((consp face) + ((and (consp face) (not (keywordp (car face))) (listp (cdr face))) (nconc (cl-set-difference face org-latex-preview--ignored-faces) (list normalising-face))) ((and face (not (memq face org-latex-preview--ignored-faces))) (list face normalising-face)) The (not (keywordp (car face))) condition ensures that the face isn't a single anonymous face, i.e. a plist. The (listp (cdr face)) condition ensures that it's not just a cons like (foreground-color . color). In both cases, the face spec is not a list of faces, so it wouldn't be correct to append another face to the end. I'm not sure how commonly this can happen in practice, but it covers all the cases handled by merge_face_ref in xfaces.c. Regards, Roshan > All the best, > Timothy > > -- > Timothy (=E2=80=98tecosaur=E2=80=99/=E2=80=98TEC=E2=80=99), Org mode cont= ributor. > Learn more about Org mode at . > Support Org development at , > or support my work at .