From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.devel Subject: Re: No NEWS entry for doc-view-mupdf-use-svg (Emacs 30.0.91 feedback) Date: Mon, 23 Sep 2024 16:51:28 +0200 Message-ID: <87msjyv2xb.fsf@gnu.org> References: <87cyky43fb.fsf@ice9.digital> <86setu5f85.fsf@gnu.org> <87zfo22jy4.fsf@ice9.digital> <86bk0h5sx9.fsf@gnu.org> <87ldzlgxvh.fsf@ice9.digital> <87msk0oqoq.fsf@gnu.org> <87plovmmox.fsf@ice9.digital> <8734lqzx64.fsf@gnu.org> <877cb2kbta.fsf@ledu-giraud.fr> <8634lqh9bt.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35045"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.12.6; emacs 31.0.50 Cc: Manuel Giraud , morgan@ice9.digital, emacs-devel@gnu.org, visuweshm@gmail.com To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Sep 23 16:52:30 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sskQP-0008yX-UC for ged-emacs-devel@m.gmane-mx.org; Mon, 23 Sep 2024 16:52:30 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sskPv-0006dt-N0; Mon, 23 Sep 2024 10:51:59 -0400 Original-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 1sskPt-0006d7-3W for emacs-devel@gnu.org; Mon, 23 Sep 2024 10:51:57 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sskPq-0006Vw-Qz; Mon, 23 Sep 2024 10:51:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=ziQWmoZQomQyK8SaPq4UVXvRB8nCU6kyG23v3V1NpDg=; b=kQkPmnvy6GlfItZJ+djN D5FssGPTI+PxCBC1HeeqWJA53/mNkz/TUnhOV8Mhbe37cGNWoeuvgJSc76ZHjOBtiMqauDXSFubdo nqKo4HTWAVu3KJb8LcZWuSNUVpo6nwJNtlDanRRh7FJjVAnfUrH27VufB56xJ5vOQLGyn3og5jyT0 CnDDaulWl6ss1wHp2d9am3LHcI2g6gisTnWkZP5WeqOKSHhe5ON3UJ7MG82wdJd8XaoNUx6dAswl8 tZbib3fEjHySsxnxlkUzkOh5QQErjr5sL3w3C1BKBGiVBJ9TF+lEtY0kcl6k3De56sbNRPFLhrnaz UmSqd5YtmN4NqQ==; X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrudelledgkeefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhephffvvefujghffgffkfggtgesthdtredttdertden ucfhrhhomhepvfgrshhsihhlohcujfhorhhnuceothhsughhsehgnhhurdhorhhgqeenuc ggtffrrghtthgvrhhnpeeluddvgeefuddvjeekfeetleegtefgveehhfeuffeuffeghefg ueefgfdvffegtdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehthhhorhhnodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdekieej feekjeekgedqieefhedvleekqdhtshguhheppehgnhhurdhorhhgsehfrghsthhmrghilh drfhhmpdhnsggprhgtphhtthhopeehpdhmohguvgepshhmthhpohhuthdprhgtphhtthho pehvihhsuhifvghshhhmsehgmhgrihhlrdgtohhmpdhrtghpthhtohepvghmrggtshdqug gvvhgvlhesghhnuhdrohhrghdprhgtphhtthhopehmohhrghgrnhesihgtvgelrdguihhg ihhtrghlpdhrtghpth X-ME-Proxy: Feedback-ID: ib2b94485:Fastmail In-Reply-To: <8634lqh9bt.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 23 Sep 2024 14:56:54 +0300") X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:323962 Archived-At: Eli Zaretskii writes: >> From: Manuel Giraud >> Cc: Morgan Willcock , emacs-devel@gnu.org, Eli >> Zaretskii , visuweshm@gmail.com >> Date: Mon, 23 Sep 2024 10:34:57 +0200 >> >> When I introduced doc-view-svg-face to inherit from the default face, I >> thought it was right for reading long papers to match the user's >> preference. Now, for invoices or other more complex documents, it may >> be better to default to "black on white". >> >> But I think we should explain that one could inherit from the default >> face to have its theme used into the doc-view-svg-face's docstring. > > Should we perhaps define suitable settings for this face in the themes > that come with Emacs? I think the problem is much more likely when using a dark theme, so those could define black foreground and white background for doc-view-svg-face. But since there are so many popular dark themes outside of emacs, I doubt that's a good idea. In the end, if the theming of the PDF/SVG gives suitable results depends on the PDF and we have no way to test if it does for the one at hand. So I'd rather apply something like that to the emacs-30 branch: --8<---------------cut here---------------start------------->8--- diff --git a/lisp/doc-view.el b/lisp/doc-view.el index 15352630d25..667b0e12986 100644 --- a/lisp/doc-view.el +++ b/lisp/doc-view.el @@ -238,10 +238,21 @@ doc-view-imenu-flatten :type 'boolean :version "29.1") -(defface doc-view-svg-face '((t :inherit default)) +(defface doc-view-svg-face '((t :inherit default + :background "white" + :foreground "black")) "Face used for SVG images. Only background and foreground colors are used. -See `doc-view-mupdf-use-svg'." +See `doc-view-mupdf-use-svg'. + +If foreground and background color are not specified explicitly and +therefore inherit from the `default' face, the default +foreground/background color values are passed to `create-image' when +preparing the SVG for display in the doc-view buffer. The effect is +that the current theme's foreground/background values are applied to the +SVG display. Note that this doesn't work for documents which are not +simply black-on-white where it can lead to unreadable documents due to +foreground and background color being equal or similar." :version "30.1") (make-obsolete 'doc-view-svg-background 'doc-view-svg-face "30.1") --8<---------------cut here---------------end--------------->8--- Plus a corresponding NEWS entry telling that unsetting the foreground/background of doc-view-svg-face will try to apply the current theme's fg/bg colors also for the display in doc-view (in case of mupdf+svg). Bye, Tassilo