Explorar o código

org-align-tags: Fix tag alignment in inlinetasks

* lisp/org.el (org-align-tags): Re-use 'line-prefix text property when
`org-indent-mode' is enabled.  The old version partially copy-pasted
the org-indent code and missed the new changes in inlinetask
alignment.  The new approach should be robust against future
org-indent changes.

Fixes https://orgmode.org/list/25334.19025.107017.390781@gargle.gargle.HOWL
Ihor Radchenko %!s(int64=3) %!d(string=hai) anos
pai
achega
ccca8549a2
Modificáronse 1 ficheiros con 6 adicións e 2 borrados
  1. 6 2
      lisp/org.el

+ 6 - 2
lisp/org.el

@@ -11521,8 +11521,12 @@ visible part of the buffer."
   (let ((get-indent-column
 	 (lambda ()
 	   (let ((offset (if (bound-and-true-p org-indent-mode)
-			     (* (1- org-indent-indentation-per-level)
-				(1- (org-current-level)))
+                             (save-excursion
+                               (org-back-to-heading-or-point-min)
+                               (length
+                                (get-text-property
+                                 (line-end-position)
+                                 'line-prefix)))
 			   0)))
 	     (+ org-tags-column
 		(if (> org-tags-column 0) (- offset) offset))))))