[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: virtual-fill mode in mail buffers, with orgalist-mode, prefix is not
From: |
Ihor Radchenko |
Subject: |
Re: virtual-fill mode in mail buffers, with orgalist-mode, prefix is not considered when virtual-fill is on |
Date: |
Mon, 09 Aug 2021 17:01:54 +0800 |
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
- Re: virtual-fill mode in mail buffers, with orgalist-mode, prefix is not considered when virtual-fill is on,
Ihor Radchenko <=