From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id ENeHMRTLr2agQgEAqHPOHw:P1 (envelope-from ) for ; Sun, 04 Aug 2024 18:40:20 +0000 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 ENeHMRTLr2agQgEAqHPOHw (envelope-from ) for ; Sun, 04 Aug 2024 20:40:20 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=FrAvalF7; 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=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1722796820; 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=YCHX6gvtDkQF9Bg49x9jQD0gTf/NcdD/sysx2JoYh+I=; b=n/gOmo3Uarz3HEXF/QM2DNy6yAFxUaGtmdd2Ef8rM6vQFTob3LHCLaqIUDUR40SlWeHlxW 3e+AwsxkfcNRJdbx39OfMxrWAjK2eJWSptkIp9WcNwf3yn6mKtNlLksUcAq4W2Bsbj4d4O 8vc7BhKW18Joz3BOFzkN98RJNr3G4/9JKvsGOUjF78Inbf471cd1Z7zhdKdfFCPlc2YhVN DL2YiFM3Pv4MY0e630svFPQ+oQo/UIKg6IvWak3vSuF4wvqJdYuzq1dtXQvL4hKjx6snjR eL/td4skZgEOZfShaQvRvXSLvOXso3oo7YU/DrAr+tizvymCIon+JuHBPXjeeg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=FrAvalF7; 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=posteo.net ARC-Seal: i=1; s=key1; d=yhetil.org; t=1722796820; a=rsa-sha256; cv=none; b=oUgdndNyAQxi9SyEsa8ZXPVeW8pXn43FZVVARHRz/xYbElg0BQXZ5jS4fZz9wTnTmW6gqi J50mv9v/MtoWI4jqGOzutYHZHQte/pDjnjjRwy33+H3ZORWcbP93I3QoxvsAtfydqPsh18 x88wJEofkEPtG2R0VZgfFaSyjCu4MivEnvno8VI1HnzEG6tvpoEzd2zw7RjylGmd8pBlAM qY0rBk2jk5ShGykvKKJbuHJtA9p6O4+B2KQ5QNg9plyZSOgIn1gS3UubTq9kOSFoFxFw4z H9XiUvh86ymRCEgDGPdjxiaVOy/5CvmGJTXGRwae/5pfCUc3YTWl7WAKvhDv6g== 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 9153573531 for ; Sun, 4 Aug 2024 20:40:20 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sag8p-0006qW-IY; Sun, 04 Aug 2024 14:39:43 -0400 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 1sag8U-0006ps-5e for emacs-orgmode@gnu.org; Sun, 04 Aug 2024 14:39:21 -0400 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sag8S-00062w-2X for emacs-orgmode@gnu.org; Sun, 04 Aug 2024 14:39:17 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 445BF240027 for ; Sun, 4 Aug 2024 20:39:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1722796753; bh=X6Xn0eoVC2UElDnqw+cWQ6eWHUDVyeTyXaJbomFcsI0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=FrAvalF7HciAAeDcp+hUEfdb6ut/PEdgQP+JYFR8I1xGKxj9gRzHJS8csp2IfYkXi nCL/fYaUlLdzochUKg+Qhf5k5TZoQ3kzPoqqTZyuJ8l9SQ9bNpfIAVXauPOImnHj9c pkOVafYvzoDYsQNR6HPuKwpLJj7mkImY0ZIC/yZMdW8Qe8S47Ly+ApUvI9vebycbJs e8kcRVkYHKyYgLzkjmAip4dsInDgEvVMS0uAbuT79dUYc3Ps/ASj1uj7SSpJ5oH2dX 1oAgrwWRvfMkxS9gP1/2U4jll6DMV9g7WkJdYYdV7U44OTgUkwHze0j8dRwqwHjLrt dHtjujfuTOXoQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4WcSym4Fkjz9rxG; Sun, 4 Aug 2024 20:39:12 +0200 (CEST) From: Ihor Radchenko To: Sean Devlin Cc: emacs-orgmode@gnu.org Subject: Re: [BUG] Org-image-max-width doesn't account for org-indent-mode [9.7.8 (9.7.8-7f2ce8 @ /tmp/bug/elpa/org-9.7.8/)] In-Reply-To: <6A2182FA-E074-4EC7-8950-DB4708F8D2AF@toadstyle.org> References: <6A2182FA-E074-4EC7-8950-DB4708F8D2AF@toadstyle.org> Date: Sun, 04 Aug 2024 18:40:28 +0000 Message-ID: <87a5hsdtcz.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, 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-Country: US X-Migadu-Flow: FLOW_IN X-Spam-Score: -9.65 X-Migadu-Queue-Id: 9153573531 X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -9.65 X-TUID: E3rBp5HLzRB6 Sean Devlin writes: > I've found a case where an inline image's maximum width is computed > incorrectly in Org 9.7.8. Here's a recipe: > > 1. Find an image wider than a default Emacs frame > 2. Create an Org file with these contents (between the lines): > ... > (add-to-list 'load-path "/path/to/org-9.7.8/") > (require 'org) > (setq org-image-max-width 'window) > (setq org-startup-indented t) > > 5. Open the file from step 2 > 6. C-c C-x C-v to toggle inline image display > > Observe that the images are cropped on the right in the amount of the > leading indentation added by org-indent-mode. If you scroll down, you > should see each successive image has a bit more cut off. (The first > image is displayed correctly, since it is not under a heading and has no > indentation.) Well. This is not a bug - the image width is still equal to window width. It is just that the image is shifted right. I assume that you expect the image width to be adjusted to indentation (dynamically?). However, I am not sure if it is such a good idea - what if indentation is too deep inside? Also, this width is not dynamically adjusted - it is computed once when you trigger image display, even for images outside the screen. Considering that org-indent is applying indentation lazily, only for the visible parts of the buffer, indentation for some images may simply be not known at the point when you ask Org to display them. So, what you probably want is some kind of new feature to compute image widths dynamically - I will not oppose such a feature, but it does not yet exist. Patches welcome! Not a bug. Canceled. (but we can continue discussion of the feature request) -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at