* virtual-fill mode in mail buffers, with orgalist-mode, prefix is not considered when virtual-fill is on
@ 2021-07-20 17:00 Uwe Brauer
2021-07-27 20:05 ` Nicolas Goaziou
2021-08-09 9:01 ` Ihor Radchenko
0 siblings, 2 replies; 4+ messages in thread
From: Uwe Brauer @ 2021-07-20 17:00 UTC (permalink / raw)
To: emacs-orgmode
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: virtual-fill mode in mail buffers, with orgalist-mode, prefix is not considered when virtual-fill is on
2021-07-20 17:00 virtual-fill mode in mail buffers, with orgalist-mode, prefix is not considered when virtual-fill is on Uwe Brauer
@ 2021-07-27 20:05 ` Nicolas Goaziou
2021-08-09 9:01 ` Ihor Radchenko
1 sibling, 0 replies; 4+ messages in thread
From: Nicolas Goaziou @ 2021-07-27 20:05 UTC (permalink / raw)
To: emacs-orgmode
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: virtual-fill mode in mail buffers, with orgalist-mode, prefix is not considered when virtual-fill is on
2021-07-20 17:00 virtual-fill mode in mail buffers, with orgalist-mode, prefix is not considered when virtual-fill is on Uwe Brauer
2021-07-27 20:05 ` Nicolas Goaziou
@ 2021-08-09 9:01 ` Ihor Radchenko
2021-08-10 6:30 ` Uwe Brauer
1 sibling, 1 reply; 4+ messages in thread
From: Ihor Radchenko @ 2021-08-09 9:01 UTC (permalink / raw)
To: Uwe Brauer; +Cc: emacs-orgmode
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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-08-10 6:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-20 17:00 virtual-fill mode in mail buffers, with orgalist-mode, prefix is not considered when virtual-fill is on Uwe Brauer
2021-07-27 20:05 ` Nicolas Goaziou
2021-08-09 9:01 ` Ihor Radchenko
2021-08-10 6:30 ` Uwe Brauer
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).