Hi Not sure whether this is off topic, but it concerns orgalist-mode: When I use virtual-fill-mode together with orgalist-mode in mail buffers: When I turn virtual-auto-fill-mode off and auto-fill-mode on, the lists are nicely filled as: 1. The first item blab bladnka bladnfkand adnfkaj kjkajdkfj ablkadf kj kajldjf adfkjaksdfjl While with auto-fill-mode off and visual-auto-fill-mode on the are displayed as 1. The first item blab bladnka bladnfkand adnfkaj kjkajdkfj ablkadf kj kajldjf adfkjaksdfjl So the prefix is not taken into account. Anybody seeing this and knows a solution? regards Uwe Brauer
Hello,
Uwe Brauer <oub@mat.ucm.es> writes:
> Not sure whether this is off topic, but it concerns orgalist-mode:
>
> When I use virtual-fill-mode together with orgalist-mode in mail buffers: When I turn virtual-auto-fill-mode off and auto-fill-mode on, the lists are nicely filled as:
>
>
>
> 1. The first item blab bladnka bladnfkand adnfkaj kjkajdkfj ablkadf
> kj kajldjf adfkjaksdfjl
>
>
> While with auto-fill-mode off and visual-auto-fill-mode on the are displayed as
>
> 1. The first item blab bladnka bladnfkand adnfkaj kjkajdkfj ablkadf
> kj kajldjf adfkjaksdfjl
>
>
>
> So the prefix is not taken into account. Anybody seeing this and knows
> a solution?
Orgalist mode does not handle virtual indentation. Patches welcome,
however.
Regards,
--
Nicolas Goaziou
Uwe Brauer <oub@mat.ucm.es> writes:
> So the prefix is not taken into account. Anybody seeing this and knows a solution?
Not sure about orgalist-mode, but you may need to define custom
adaptive-fill-function. I use the following (though for org-mode itself):
(defun org-adaptive-fill-function ()
"Fill headlines to the beginning of headline in org."
(save-excursion
(cond
((org-at-heading-p)
(beginning-of-line)
(looking-at org-complex-heading-regexp)
(goto-char (or (match-beginning 4) (match-end 0))) ;; at headline
(make-string (current-column) ?\ ))
((org-at-item-p)
(beginning-of-line)
(looking-at org-list-full-item-re)
(goto-char (or (match-beginning 4) (match-end 3) (match-end 2) (match-end 1)))
(skip-chars-forward " \t")
(make-string (current-column) ?\ )))))
(add-hook! 'org-mode-hook (setq-local adaptive-fill-function #'org-adaptive-fill-function))
Best,
Ihor
[-- Attachment #1: Type: text/plain, Size: 585 bytes --] >>> "IR" == Ihor Radchenko <yantar92@gmail.com> writes: Hi Ihor > Uwe Brauer <oub@mat.ucm.es> writes: [Snip]... > (add-hook! 'org-mode-hook (setq-local adaptive-fill-function #'org-adaptive-fill-function)) Thanks that works. However, it does not work in an email buffer (using orgalist) even with (add-hook 'orgalist-mode-hook (setq-local adaptive-fill-function #'org-adaptive-fill-function)) (add-hook 'message-mode-hook (setq-local adaptive-fill-function #'org-adaptive-fill-function)) I wrote the author and opened an issue, no answer so far Uwe [-- Attachment #2: smime.p7s --] [-- Type: application/pkcs7-signature, Size: 5673 bytes --]