From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id qI+AGvVYhWepaQAAqHPOHw:P1 (envelope-from ) for ; Mon, 13 Jan 2025 18:18:29 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id qI+AGvVYhWepaQAAqHPOHw (envelope-from ) for ; Mon, 13 Jan 2025 19:18:29 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b="mHONw7/M"; 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=1736792309; 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=eIm8U3Qw8mt+LzhGyOsab5sMVaXCL/3gChLyqxD0hko=; b=Et1mrJVsol92csexVksoIduDusD42rrHBCBJ982zu1s9XYbvqUYF4MAsEdevDu45/LoFV6 cM+tFO7chcsR+1YamzXtStZ8Diwr8vHPeUpkgLFR9LaE32bt/TH2ooVB8/SeBqM3JPME7N JoBNOGYv+CPhWJACtBG7TpbHAIdbm/6XM43SpPMui89GgWP7h/heppsezCCjQllguYYdif lmQBtH+TQ7qefm3kHcLvAaBidrbypXecgh1KYCcDzMWpFuDY0mfSeZoflBqctMNUSIl9Wy N+/4wgdWP1bHNK60xNI43FG1LucSnL+OsPiAd7wZVhLjtPbvywNJ3ZOgM7ScTw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b="mHONw7/M"; 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=1736792309; a=rsa-sha256; cv=none; b=aJx7b9tUrTGNsuHa0Cmb4fVCEjT8KuB4GSVKYbjVpg3haliqokW7xPxMO/pnFTIykLjk5u jmUIVD5+Orwy74nycTB3kiYBpoXSiSmYs6/9esgsIHNGkQGO6y46gOqBDDrOiMapQ5Lnf8 0U0J/qhjuIeX7YQ2hm0wqu91wN/QP1/xg5iHRKfw62dzYkn5lO7P0LjHnT94Wxgz/5+hLO kUBas56AsplNl9FlpKpYVzukbQDPF2ZDPSGJeU0NCMAP4Sl33pw8WUisMalosfCtJYeMl7 PD58IeJccVJ2h6bx3P1OMxT8aR6OfIeOeXy77v7Q8z9c6i4XMpjJncufRDJWcw== 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 3FAAF35FDE for ; Mon, 13 Jan 2025 19:18:29 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tXP0X-0004zt-S4; Mon, 13 Jan 2025 13:17:49 -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 1tXP0P-0004uo-KJ for emacs-orgmode@gnu.org; Mon, 13 Jan 2025 13:17:42 -0500 Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tXP0N-0004D7-A7 for emacs-orgmode@gnu.org; Mon, 13 Jan 2025 13:17:40 -0500 Received: by mail-pl1-x631.google.com with SMTP id d9443c01a7336-2163b0c09afso84237115ad.0 for ; Mon, 13 Jan 2025 10:17:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736792257; x=1737397057; 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=eIm8U3Qw8mt+LzhGyOsab5sMVaXCL/3gChLyqxD0hko=; b=mHONw7/M+G9OodpbgNYnOxCTLiHPjSHOQ/De59mPGRUIer93nEF3rgzH0C1nk7kYRJ 45ad3RN4kykmBSBXll2wRRmg7/OEmYuqVzvesuPNUNNCpsOAPaHmzB0ZFVLm/iP101hF qvaT5lLq+JJO4vi3ZTNwdOv32I3eaigz6Z+SIxHzPr6sF9qrqYtxh2gtkXSo/FVyJ98h iBMnqLTn4dCMHSfQhAWC7ute+iQTaZbfD/5OecTaWV4o3jcKgTFibVtjMxclbnl5UiTW BAr1j9Sw5o9DNRaUi0EdJ8oWcXJ3YvNOXYNEtgbLo7EFUl8V/FKvynOUemOzOnJr2tlC Dk4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736792257; x=1737397057; 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=eIm8U3Qw8mt+LzhGyOsab5sMVaXCL/3gChLyqxD0hko=; b=jtKs5EsWiKN2yZr2gVKc6R9ELGezbnEzJu7n6xJ3GpAazFi1nIKu+ZNOxbnQ3k2P6U pvwVdzLtrBJivOCHYhV+plxYXlMZ1cSr62aAjQlwarQcU5PZDWRA/DpiubKvLrNZqkCo 03cOMHip2vgDDNRiIoV3UTXCW1xwzNre046JZgD8ykQKKRZGVl39ZU55gGN81cLcJACu CJG5Ak/H/WQXuf0etqEL4BHQpz6/ezpMsJFIo58jInaN+2tv2Ag+oV9/NYCJXnF5eaZ+ 7Z7WX6gcNR/V+72fVmvD18A4nYo8GylEiweUD9yApBo+eHvDHmX+zLXZLa5DqlJVjTB3 065g== X-Gm-Message-State: AOJu0Yw2kHYHTp6fzVeQbCa17aXxf4Ml4D6lBhVI3o3sJjvnudWlj9/V hr+iHFP9u0f1Uqprf9t2K2+cv0s2fLTJw0SCZVkNmdNAqQCxg4ey X-Gm-Gg: ASbGncsWij9xAwrGd6T0Xa/fpuapb7OnwiK8yfe0jDpaoYvgMfXEHBsvvjdH88UqBHg OKBuYWw6As4GOHZnS6xKOgZ6GKoWmX+5Jf5Oxvie6Ng0igdwH+6xZ/4JzCSOKA9CjcuSJhtc26o pgB4XX8FqiJc7MMDaEWuGrEfyaWmDucbES2au2cj+sYij/Q5WZOuBekqoZs3MXxuQ98d381v6c3 VAw+PIhcZVWk4q6vGGFETZD68sVnHnA+i0K1Qf1uvKTEkPllGSeuzruEy5VlRphQKjoVg== X-Google-Smtp-Source: AGHT+IGKh9wR2JCtaCYfKPSIAuh82nGygLzriJNty47NRYfVtK4KJ32Acf86MDfCHC+ECae3+w81PQ== X-Received: by 2002:a17:902:ecce:b0:20b:8a71:b5c1 with SMTP id d9443c01a7336-21a83f339e6mr348679825ad.1.1736792257355; Mon, 13 Jan 2025 10:17:37 -0800 (PST) Received: from localhost ([2600:8802:5726:2500:5118:5db9:c3a8:b3b9]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-21a9f10f6d7sm57133365ad.52.2025.01.13.10.17.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jan 2025 10:17:36 -0800 (PST) From: Karthik Chikmagalur To: Ihor Radchenko Cc: emacs-orgmode@gnu.org Subject: Re: [BUG] Edge case for preview image alignment In-Reply-To: <8734hqebxs.fsf@localhost> References: <87ed1br7la.fsf@gmail.com> <8734hqebxs.fsf@localhost> Date: Mon, 13 Jan 2025 10:17:36 -0800 Message-ID: <87o70azigv.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::631; envelope-from=karthikchikmagalur@gmail.com; helo=mail-pl1-x631.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: mx12.migadu.com X-Migadu-Spam-Score: -2.52 X-Spam-Score: -2.52 X-Migadu-Queue-Id: 3FAAF35FDE X-TUID: 189LeuF+6+H+ >> Currently the value of `org-image-align' or of the `:align' attr_* >> keyword is respected when previewing images in the following two >> situations: >> >> [...] >> > > These two situations are the same - standalone image in a paragraph. > The second example is _two_ paragraphs. (affiliated keywords force-start > a new paragraph) Thanks for the clarification. > Sure. Because it works for both inline and standalone images, unlike > org-image-align: > > org-image-align is a customizable variable defined in ol.el. > ... > Documentation > How to align images previewed using org-link-preview-region. > > Only stand-alone image links are affected by this setting. These > are links without surrounding text. I'm aware that only standalone image links are supported -- my question was if we should change this behavior. >> Should we support image alignment in case 3? >> >> The only situation in which I can see this being undesirable is when you >> have hard-wrapped/filled lines and the image link coincidentally ends up >> on its own line. In this case it doesn't make sense for the image >> preview to respect `org-image-align'. There might be other syntactical >> reasons why supporting case 3 doesn't make sense, so I am asking here. > > Maybe. Or not. > > Alignment is intersecting its syntax with export. > But export will only align truly standalone images. > There will be no notion of "image in a line of its own in the middle of > paragraph" This is another factor I hadn't considered. > Also, what would you do if there are multiple images like that or when > the purpose of :align attribute is to align the whole paragraph? > > Consider something like > > # Align the whole paragraph > #+attr_html: :align center > Paragraph with inlined > [[file:image.png]] > image and > [[file:image2.png]] > another one. In this case no alignment rule would be applied to the image. I didn't realize that Some text in a paragraph, #+attr_org: :align center [[file:/path/to/file]] followed by more text is considered two paragraphs, and that the affiliated keyword applies to the second paragraph and not just the link at the start of the second paragraph. So my proposal isn't consistent. Please close this bug/issue. Karthik