emacs-helm / helm-org

53 stars 9 forks source link

Don't restrict org outline path length #19

Open mosquito-magnet opened 3 years ago

mosquito-magnet commented 3 years ago

This tries to address two issues by removing restriction of outline path length to window width in helm-org-agenda-files-headings:

  1. Truncating the outline paths seems counterproductive.
  2. Bug: The org outline path candidates for helm-org-agenda-files-headings get truncated to the width of the previously active window, not the helm-window.

Reasoning for 1.: The leaf node is likely the most interesting part of the candidate, it shouldn't be cut off. In comparable scenarios like helm-find-files there is also no truncation.

Not truncating candidates will use the full helm window width, and users can use horizontal scrolling or wrapping (via helm-org-truncate-lines or helm-toggle-truncate-line) to inspect the full path if required.

Repro steps for 2.:

The reason seems to be that helm-window returns nil when helm-org--get-candidates-in-file is called, so the window-width call returns the width of the current window instead.

Behaviour seems similar to the now inaccessible issue 1294 in helm, if that is of any relevance. Still available currently via google webcache: https://webcache.googleusercontent.com/search?q=cache:BPTMko9B-8kJ:https://github.com/emacs-helm/helm/issues/1294