0

I have org-columns-default-format set to:

%TODO(State) %ITEM(Description) %CLOCKSUM(Clock) %Effort(Eff){:} %SCHEDULED %DEADLINE

When I go into column view and change my effort estimate, the table does a quick jump up and down. It looks like the header row at the very top is briefly disappearing, causing the scroll bar and the reset of the window content to jump up by one line, then back down.

The jump happens every time I change the effort, which is a bit annoying.

Is this normal?

2
  • Does it happen only with effort? What happens if you change something else? Can you provide a minimal Org mode file that one could use to reproduce the behavior?
    – NickD
    Feb 22, 2023 at 7:00
  • For me (and I bet everyone else too) this happens whenever you change the value of a property that is shown in column view.
    – orgtre
    Feb 22, 2023 at 10:11

1 Answer 1

0

This happens whenever you change the value of a property that is shown in column view. So yes, it is normal. It happens because the whole column view, including the header and all overlays, is updated whenever one of the values displayed changes. Besides being visually unpleasant this also takes a long time in larger buffers.

One can, however, change the edit value command to only update the row edited as follows:

(defun org-colviewx-edit-value (&optional key)
  "Edit property value, but update only current row."
  (interactive)
  (let* ((key (or key (get-char-property (point) 'org-columns-key)))
         (value (get-char-property (point) 'org-columns-value))
         (nval (string-trim (org-read-property-value key (point)))))
    (when (not (equal nval value))
      (org-entry-put (point) key nval)
      (org-colviewx-redo-row))))

(defun org-colviewx-redo-row ()
  "Construct the column display of the current row again."
  (interactive)
  (let ((inhibit-read-only t))
    ;; need to explicitly delete, otherwise value not always updated
    (mapc #'delete-overlay (overlays-in (line-beginning-position)
                                        (line-end-position)))
    (org-columns--display-here
     (save-excursion (org-columns--collect-values)))))

(org-defkey org-columns-map "e" #'org-colviewx-edit-value)

This is one of the extensions to column view that I have implemented in a package I am currently working on: org-colviewx.

One could also change other commands that modify values in a similar manner.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.