[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[BUG] org-colview tests fail in Emacs 29 because of wrong org-colview's

From: Ihor Radchenko
Subject: [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/)]
Date: Fri, 15 Jul 2022 08:44:08 +0800


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

;; 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

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

* H
:A: 1
** S
:A: 2

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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]