mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-12-31 11:13:59 +00:00
org.el (org-fill-paragraph-with-timestamp-nobreak-p): New function
* org.el (org-fill-paragraph-with-timestamp-nobreak-p): New function. (org-setup-filling): Use it to prevent breaking a timestamp when filling a paragraph. Thanks to William for requesting this.
This commit is contained in:
parent
1056fc3f60
commit
0b9e3b8a45
@ -20970,7 +20970,8 @@ hierarchy of headlines by UP levels before marking the subtree."
|
||||
(org-uniquify
|
||||
(append fill-nobreak-predicate
|
||||
'(org-fill-paragraph-separate-nobreak-p
|
||||
org-fill-line-break-nobreak-p)))))
|
||||
org-fill-line-break-nobreak-p
|
||||
org-fill-paragraph-with-timestamp-nobreak-p)))))
|
||||
(org-set-local 'fill-paragraph-function 'org-fill-paragraph)
|
||||
(org-set-local 'auto-fill-inhibit-regexp nil)
|
||||
(org-set-local 'adaptive-fill-function 'org-adaptive-fill-function)
|
||||
@ -20989,6 +20990,11 @@ hierarchy of headlines by UP levels before marking the subtree."
|
||||
(skip-chars-backward "\\\\")
|
||||
(looking-at "\\\\\\\\\\($\\|[^\\\\]\\)")))
|
||||
|
||||
(defun org-fill-paragraph-with-timestamp-nobreak-p ()
|
||||
"Non-nil when a line break at point would insert a new item."
|
||||
(and (org-at-timestamp-p t)
|
||||
(not (looking-at org-ts-regexp-both))))
|
||||
|
||||
(declare-function message-in-body-p "message" ())
|
||||
(defvar org-element--affiliated-re) ; From org-element.el
|
||||
(defvar orgtbl-line-start-regexp) ; From org-table.el
|
||||
|
Loading…
Reference in New Issue
Block a user