emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [BUG] org-colview tests fail in Emacs 29 because of wrong org-colview's assumptions about current-column [9.5.4 (release_9.5.4-626-g45f9d8.dirty @ /home/yantar92/.emacs.d/straight/build/org/)]
@ 2022-07-15  0:44 Ihor Radchenko
  2022-07-30  4:14 ` [PATCH] " Ihor Radchenko
  0 siblings, 1 reply; 3+ messages in thread
From: Ihor Radchenko @ 2022-07-15  0:44 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1686 bytes --]

Hi,

On Emacs 29, make test will fail on both bugfix and main:

5 unexpected results:
   FAILED  test-org-colview/columns-move-left
   FAILED  test-org-colview/columns-move-right
   FAILED  test-org-colview/columns-new
   FAILED  test-org-colview/columns-next-allowed-value
   FAILED  test-org-colview/columns-update

This happens since Emacs commit
4243747b1b8c3b7e3463822804b32e83febe2878:

;; Fix 'current-column' in the presence of display strings

;; * src/indent.c (check_display_width): Support calculation of width
;; of 'display' properties whose values are strings.  This fixes the
;; value returned by 'current-column' when display strings are
;; present between BOL and point.  (Bug#53795)

There is nothing wrong in this Emacs commit.
However, org-colview.el, and particularly

(nth (current-column) org-columns-current-fmt-compiled)
statements, e.g. in org-columns-update (also in other places)

rely on current-column ignoring overlays and display properties.

To see the issue interactively, one can use the following example
recipe:

1. Run Emacs 29 master loading the latest bugfix/main Org branch
2. Open the following file:

* H
:PROPERTIES:
:A: 1
:END:
** S
:PROPERTIES:
:A: 2
:END:

3. Put point at the beginning of the first heading
4. Run M-: (let ((org-columns-default-format "%A %A{min}")) (org-columns))
5. Run M-: (org-columns-update "A")
6. Observe (error "Invalid column specification format: nil") caused by
   org-columns-update trying to retrieve the column format using the
   sexp relying of (current-column).

Note that fixing this bug will probably require checking the logic of
org-colview - one may need to dive deeply into that code.

Best,
Ihor

[-- Attachment #2: Type: text/html, Size: 1956 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-08-06  5:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-15  0:44 [BUG] org-colview tests fail in Emacs 29 because of wrong org-colview's assumptions about current-column [9.5.4 (release_9.5.4-626-g45f9d8.dirty @ /home/yantar92/.emacs.d/straight/build/org/)] Ihor Radchenko
2022-07-30  4:14 ` [PATCH] " Ihor Radchenko
2022-08-06  5:43   ` Ihor Radchenko

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