all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Karthik Chikmagalur <karthikchikmagalur@gmail.com>
To: emacs-orgmode@gnu.org
Subject: [BUG] Edge case for preview image alignment
Date: Thu, 09 Jan 2025 13:38:25 -0800	[thread overview]
Message-ID: <87ed1br7la.fsf@gmail.com> (raw)

Currently the value of `org-image-align' or of the `:align' attr_*
keyword is respected when previewing images in the following two
situations:

1. Image link in its own paragraph:

#+attr_org: :align center
[[file:/path/to/image.png]]

2. Image link at the end of a paragraph, on its own line:

Some text in a paragraph
#+attr_org: :align center
[[file:/path/to/image.png]]

OR

Some text in a paragraph
[[file:/path/to/image.png]]

But it is ignored when the 

3. image link is on its own line "inside" a paragraph:

Some text in a paragraph
#+attr_org: :align center
[[file:/path/to/image.png]]
followed by more text in the paragraph.

OR

Some text in a paragraph
[[file:/path/to/image.png]]
followed by more text in the paragraph.

-------

In contrast, the value of `org-image-max-width',
`org-image-actual-width' (and the attr_* :width attribute) are respected
in all three cases.

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.

Karthik


                 reply	other threads:[~2025-01-09 21:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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

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

  git send-email \
    --in-reply-to=87ed1br7la.fsf@gmail.com \
    --to=karthikchikmagalur@gmail.com \
    --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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.