From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id CEJVFeF1b2fjYAEAe85BDQ:P1 (envelope-from ) for ; Sat, 28 Dec 2024 03:52:01 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id CEJVFeF1b2fjYAEAe85BDQ (envelope-from ) for ; Sat, 28 Dec 2024 04:52:01 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=hR8QR5ae; 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=1735357921; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=Z2KV+DfcV+mq4ef+rAvgI7+ENyNVw/gANWH5gz74cPY=; b=e8fEoaQ0sgyxIrme3Hl74Vfq9XiQJlI1V7YxJnOs/adxknBzhwaQKi0O0nXmI0HNkPtzFb YDMYlJw9dVR3EpnaaEhAGNcEhKndarewmnw7ds7Tmj6GgxmbiWRcEQlIwY1Ax/cFhOMSb7 WTFlDkypnKcWU7+1VfHWdJ14BRukKZXw5Muo/RK9WoUjJup/Lx1e5NSUaStDVdeUrnHizE inbOT3fPUOOQt69c8DBpMzAS3YnI92LLSAGemLez9S9PPPzhAXmaQlMDdAjYyQMttivHTu MKJxf9heNyecZMCSsUlRVbSAaMPSeXA2bN72ylEb+4RMrwDj+KM9AzDpCq0XnA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=hR8QR5ae; 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-Seal: i=1; s=key1; d=yhetil.org; t=1735357921; a=rsa-sha256; cv=none; b=VKnXweUnuzigziXVuH248GYGAKfNSnFLGveTQjC9vNXMV7JCgds0TETFWbyw7ywiVAKisI 1ZxAuoeXtc9CAM7sgACFnSSiygHEbrxc5GGHvM/4PFClYp+Yi5HvNfcS+IpOGIlm0488IH ebRsW+ak5Vo+74eFcbXWif20qTJE0qkVDjcBWpTmX63eB2bbtHfQUIc0oLC82zroU8wtp0 R/c0lUwZhvuFWN8ozRDXIu19QgGW4IkDF7Mm9ShQQPNgLaWw8MU8XgyfIs5K1XSdsTkrWZ 1mdahcOiwEhRGLFMnRmNJlSXHnwJMWkBK5ZWy/w+cxyvgzW0gvfkbtxiDyMHDA== 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 F1A5F7D9E2 for ; Sat, 28 Dec 2024 04:52:00 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tRNqv-000381-2o; Fri, 27 Dec 2024 22:51:01 -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 1tRNqs-00037m-MA for emacs-orgmode@gnu.org; Fri, 27 Dec 2024 22:50:58 -0500 Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tRNqr-0000Rm-0B for emacs-orgmode@gnu.org; Fri, 27 Dec 2024 22:50:58 -0500 Received: by mail-pl1-x634.google.com with SMTP id d9443c01a7336-21a1e6fd923so30574925ad.1 for ; Fri, 27 Dec 2024 19:50:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1735357853; x=1735962653; darn=gnu.org; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=Z2KV+DfcV+mq4ef+rAvgI7+ENyNVw/gANWH5gz74cPY=; b=hR8QR5aeyv0oVULx5vHw3Xd0ZVCFWF2Dmj/Tf17ll2uM+oD1s72wlPVP4a/m0/3xx7 udGuE+0VuAig63vcY4ndbgXSLolo7Ybo+GYlRAw+iBbbB2ofK7A+lsnmXjgvqmUz9jfD kFTuIYzBH++P3zH85Lyuyox0LWEBqrgJut8+3rIGSI6U5OV6ncSIeMV9kq/uyzXV1OKA U8O9dq/LeD+/wuuJuOaUy8vFQyDjqolr2/hErMETpT3E47qmE3c5VbwBeZZGQaGN+hxf wkF0PhiuS5RDfuuKCDv+70UW/SJmaE32/idF8LQoKm+pMjA0cmRKM0NGBUe09oIWs/KO zBCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735357853; x=1735962653; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Z2KV+DfcV+mq4ef+rAvgI7+ENyNVw/gANWH5gz74cPY=; b=h7IOtLgdm6SdI7swr2gDOZYlkN4rpVGiliLY9OXm8dSoIlRsGJRe+kyIPwb3BttWyw sUpkMzdSR+DSY8CokEUD9exFVvaZrg+UolAuOrKnFdWVXeDl1LONhMbb1YNBLsoyA8Fo Mu05R0+k3unOc3JpVeDXIxogq7dOOLUi9ZvPzlunMLhNDRJuQ9CmZYr+7ZRhNjw5+uvr 1HIHo5xcUi804w50TPEDfCHV3tqGkFzOoUzxN775xo2AmXworqd6aCDEaKD4nNzKoW8X rXwsb1MhqxA0YrHSAy55Fdh5JMtKoYK9hvNkr0L6yTP3QeRijLWNvnlvp+w4C8Zu+1SP D3Iw== X-Forwarded-Encrypted: i=1; AJvYcCUtVTyXxueHm7cQvWosty5KjeXGBl1vvBVFogDL5TUWtWvWylbq0LzPbUU+c2nthne3DSQ4S4oV8fy6kKso@gnu.org X-Gm-Message-State: AOJu0Yz6ymJKkNFZQxvyNrfNbJkRnR6QbyKTJSF7P1oQ0t4tPpA2Tlgq DQoMtfPKl3bKI3zEdznJgIfOWiEvywGnBkA2bYMBocG0awrGROcEuPOU9g== X-Gm-Gg: ASbGncsZkIiOYKzLbZpac0Opevw6lPHgWUIsyhJ40u2ET0TIApy0LCZj1FeAlwil2ar NKdUgKC5+UEv5JIMZu5B5hi4iA64fMTWspvWB+pTX3cUeJjsFSKtOdWHHi5Hhwie95mGHSUqMLY L240ygilM+Cyk78ZXBrItfWgz1z5BZO57W5VoAW/IYez8NZ/Kd6TsTNEK/CIJLfAeS55vmvIdHw IBe3FdX6Z/pVISUzElHgt3QWFMsa74THKfby8rJgfEhwONlIrlMr5zSo/GbRUN/1Umtog== X-Google-Smtp-Source: AGHT+IGwdNNGHfpKguUDDlRTx7ZEo5RC5KV8PzJUKIocFGLzFH5Xr0cEb2iwWLMJ6JB3r3cmYSMZSg== X-Received: by 2002:a17:902:ecca:b0:215:a18f:88a8 with SMTP id d9443c01a7336-219e6f38a1amr346035955ad.51.1735357853080; Fri, 27 Dec 2024 19:50:53 -0800 (PST) Received: from localhost ([2600:8802:5726:2500:492b:7589:5251:2859]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2f2ee26fdfdsm18561246a91.52.2024.12.27.19.50.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Dec 2024 19:50:52 -0800 (PST) From: Karthik Chikmagalur To: Ihor Radchenko Cc: =?utf-8?Q?Bj=C3=B6rn?= Bidar , emacs-orgmode@gnu.org Subject: Re: [BUG] org-link-preview-file emits image not supported in daemon [9.8-pre (release_9.7.10-127-g07dd3b @ /home/bidar/.local/etc/emacs/lib/org/lisp/)] In-Reply-To: <878qs159hr.fsf@localhost> References: <87frn6ihk5.fsf@thaodan.de> <87zflc1gh3.fsf@gmail.com> <6755ee4b.050a0220.72360.6df4SMTPIN_ADDED_BROKEN@mx.google.com> <871pyc2jbh.fsf@gmail.com> <87y10jfk9c.fsf@localhost> <87v7v6mfyf.fsf@gmail.com> <878qs159hr.fsf@localhost> Date: Fri, 27 Dec 2024 19:50:51 -0800 Message-ID: <87jzbkmpno.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2607:f8b0:4864:20::634; envelope-from=karthikchikmagalur@gmail.com; helo=mail-pl1-x634.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, SPF_PASS=-0.001 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-Scanner: mx11.migadu.com X-Migadu-Spam-Score: -6.47 X-Spam-Score: -6.47 X-Migadu-Queue-Id: F1A5F7D9E2 X-TUID: xkcELNKnkPmG --=-=-= Content-Type: text/plain >>> 1. As a minimum, we can remove that message and do nothing on >>> non-graphical displays. It will be consistent with earlier behavior. >> >> I will remove that message from org-link-preview-file. > > +1 Patch attached. Karthik --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-ol-No-message-when-previewing-images-in-non-graphica.patch >From 621396f4b5c46f109aaec5afcb0a983153d8a60a Mon Sep 17 00:00:00 2001 From: Karthik Chikmagalur Date: Fri, 27 Dec 2024 19:45:01 -0800 Subject: [PATCH] ol: No message when previewing images in non-graphical context * lisp/ol.el (org-link-preview-file): Don't message the user when attempting to preview links as images in an environment that doesn't support graphics. This includes the case when `org-link-preview' runs in the Emacs daemon with no frames open. --- lisp/ol.el | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lisp/ol.el b/lisp/ol.el index 9e2459cde..c21869fbc 100644 --- a/lisp/ol.el +++ b/lisp/ol.el @@ -2178,9 +2178,7 @@ (defun org-link-preview-file (ov path link) This is intended to be used as the `:preview' link property of file links, see `org-link-parameters'." - (if (not (display-graphic-p)) - (prog1 nil - (message "Your Emacs does not support displaying images!")) + (when (display-graphic-p) (require 'image) (when-let* ((file-full (expand-file-name path)) (file (substitute-in-file-name file-full)) -- 2.47.0 --=-=-=--