emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Sean Devlin <spd@toadstyle.org>
To: emacs-orgmode@gnu.org
Subject: [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/)]
Date: Mon, 29 Jul 2024 15:41:23 -0400	[thread overview]
Message-ID: <AF4F1E26-CFD8-4964-B4A0-423C68ADB32E@toadstyle.org> (raw)
In-Reply-To: 6A2182FA-E074-4EC7-8950-DB4708F8D2AF@toadstyle.org

Hi folks,

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):

==================================================
[[file:/path/to/wide/image.png]]

* heading 1

[[file:/path/to/wide/image.png]]

** heading 2

[[file:/path/to/wide/image.png]]

*** heading 3

[[file:/path/to/wide/image.png]]
==================================================

3. emacs -Q
4. Evaluate these forms:

(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.)

Thanks!

Emacs  : GNU Emacs 29.4 (build 1, aarch64-apple-darwin21.6.0, NS appkit-2113.60 Version 12.6.6 (Build 21G646))
of 2024-07-24
Package: Org mode version 9.7.8 (9.7.8-7f2ce8 @ /path/to/org-9.7.8/)



  reply	other threads:[~2024-07-31 12:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-26 17:52 [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/)] Sean Devlin
2024-07-29 19:41 ` Sean Devlin [this message]
2024-08-01 18:47 ` Martin Edström
2024-08-04 18:40 ` Ihor Radchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AF4F1E26-CFD8-4964-B4A0-423C68ADB32E@toadstyle.org \
    --to=spd@toadstyle.org \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).