[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/)]

2024-07-31 Thread Sean Devlin
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/)




[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/)]

2024-07-31 Thread Sean Devlin
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/)



[BUG] Org-num-mode and org-column-mode conflict [9.7.11 (release_9.7.11 @ /private/var/folders/14/nlrmz7ln2pq2ysldc0g68c980000gn/T/AppTranslocation/16963ABB-6395-45CD-87FD-BE8DF8AA89EB/d/Emacs.app/C

2025-04-18 Thread Sean Devlin
Hi folks,

I’m using Org mode, and org-num-mode seems to interfere with
org-column-mode’s appearance.

Recipe:

1. emacs -Q
2. C-x b test RET
3. M-x org-mode RET
4. M-x org-num-mode RET
5. Insert the contents between the lines in the buffer:

==
:PROPERTIES:
:COLUMNS:  %ITEM %TODO %PRIORITY
:END:

* test heading

* another test heading

==

6. C-c C-x C-c

The heading numbers show up in the priority column of the column view. I
thought they would stay in the item field or maybe just vanish while the
column view is enabled.

Is this expected? I couldn’t find this caveat mentioned in the
documentation.

Thanks!

Sean

Emacs  : GNU Emacs 30.1 (build 1, aarch64-apple-darwin21.6.0, NS appkit-2113.65 
Version 12.7.6 (Build 21H1320))
of 2025-02-24
Package: Org mode version 9.7.11 (release_9.7.11 @ 
/private/var/folders/14/nlrmz7ln2pq2ysldc0g68c98gn/T/AppTranslocation/16963ABB-6395-45CD-87FD-BE8DF8AA89EB/d/Emacs.app/Contents/Resources/lisp/org/)

current state:
==
(setq
org-yank-image-file-name-function 'org-yank-image-autogen-filename
org-persist-before-write-hook '(org-element--cache-persist-before-write)
org-speed-command-hook '(org-speed-command-activate
  org-babel-speed-command-activate)
org-persist-after-read-hook '(org-element--cache-persist-after-read)
org-confirm-elisp-link-function 'yes-or-no-p
org-mode-hook '(#[0 "\300\301\302\303\304$\207"
   [add-hook change-major-mode-hook org-fold-show-all append
local]
   5]
 #[0 "\300\301\302\303\304$\207"
   [add-hook change-major-mode-hook org-babel-show-result-all
append local]
   5]
 org-babel-result-hide-spec org-babel-hide-all-hashes)
org-num-format-function 'org-num-default-format
org-confirm-shell-link-function 'yes-or-no-p
org-archive-hook '(org-attach-archive-delete-maybe)
org-metaup-hook '(org-babel-load-in-session-maybe)
org-occur-hook '(org-first-headline-recenter)
org-bibtex-headline-format-function 'org-bibtex-headline-format-default
org-link-parameters '(("attachment" :follow org-attach-follow :complete
org-attach-complete-link)
   ("id" :follow org-id-open :store
org-id-store-link-maybe)
   ("eww" :follow org-eww-open :store org-eww-store-link)
   ("rmail" :follow org-rmail-open :store
org-rmail-store-link)
   ("mhe" :follow org-mhe-open :store org-mhe-store-link)
   ("irc" :follow org-irc-visit :store org-irc-store-link
:export org-irc-export)
   ("info" :follow org-info-open :export org-info-export
:store org-info-store-link :insert-description
org-info-description-as-command)
   ("gnus" :follow org-gnus-open :store
org-gnus-store-link)
   ("docview" :follow org-docview-open :export
org-docview-export :store org-docview-store-link)
   ("bibtex" :follow org-bibtex-open :store
org-bibtex-store-link)
   ("bbdb" :follow org-bbdb-open :export org-bbdb-export
:complete org-bbdb-complete-link :store
org-bbdb-store-link)
   ("w3m" :store org-w3m-store-link)
   ("doi" :follow org-link-doi-open :export
org-link-doi-export)
   ("file+sys") ("file+emacs")
   ("shell" :follow org-link--open-shell)
   ("news" :follow
#[514 "\301\300\302%4Q%2\"\207"
  ["news" browse-url ":"] 6
  
("/private/var/folders/14/nlrmz7ln2pq2ysldc0g68c98gn/T/AppTranslocation/16963ABB-6395-45CD-87FD-BE8DF8AA89EB/d/Emacs.app/Contents/Resources/lisp/org/ol.elc"
 . 51215)
  ]
)
   ("mailto" :follow
#[514 "\301\300\302%4Q%2\"\207"
  ["mailto" browse-url ":"] 6
  
("/private/var/folders/14/nlrmz7ln2pq2ysldc0g68c98gn/T/AppTranslocation/16963ABB-6395-45CD-87FD-BE8DF8AA89EB/d/Emacs.app/Contents/Resources/lisp/org/ol.elc"
 . 51215)
  ]
)
   ("https" :follow
#[514 "\301\300\302%4Q%2\"\207"
  ["https" browse-url ":"] 6
  
("/private/var/folders/14/nlrmz7ln2pq2ysldc0g68c98gn/T/AppTranslocation/16963ABB-6395-45CD-87FD-BE8DF8AA89EB/d/Emacs.app/Contents/Resour