* PATCH: prevent filling of #+ lines
@ 2009-09-05 14:44 Dan Davison
0 siblings, 0 replies; only message in thread
From: Dan Davison @ 2009-09-05 14:44 UTC (permalink / raw
To: emacs org-mode mailing list
This patch prevents fill-paragraph from acting on lines that start
with #+ (optionally preceded by spaces or tabs).
For example, at the moment if you have
#+HTML: some html here
Long line of normal text here and it goes on and on and on and on and on and on and on
And then issue fill-paragraph (M-q) on the "Long line of normal text..." line, I
end up with
#+HTML: some html here Long line of normal text here and it goes on
and on and on and on and on and on and on
With this patch I get
#+HTML: some html here
Long line of normal text here and it goes on and on and on and on and
on and on and on
Same problem for paragraphs below source code blocks, etc.
Dan
--8<---------------cut here---------------start------------->8---
diff --git a/lisp/org.el b/lisp/org.el
index 87b044b..e943fa5 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -16312,7 +16312,7 @@ which make use of the date at the cursor."
;; text in a line directly attached to a headline would otherwise
;; fill the headline as well.
(org-set-local 'comment-start-skip "^#+[ \t]*")
- (org-set-local 'paragraph-separate "\f\\|\\*+ \\|[ ]*$\\|[ \t]*[:|]")
+ (org-set-local 'paragraph-separate "\f\\|\\*+ \\|[ ]*$\\|[ \t]*[:|]\\|[ \t]*#\\+")
;; The paragraph starter includes hand-formatted lists.
(org-set-local
'paragraph-start
@@ -16320,6 +16320,7 @@ which make use of the date at the cursor."
"\f" "\\|"
"[ ]*$" "\\|"
"\\*+ " "\\|"
+ "[ \t]*#\\+" "\\|"
"[ \t]*\\([-+*][ \t]+\\|[0-9]+[.)][ \t]+\\)" "\\|"
"[ \t]*[:|]" "\\|"
"\\$\\$" "\\|"
--8<---------------cut here---------------end--------------->8---
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2009-09-05 14:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-05 14:44 PATCH: prevent filling of #+ lines Dan Davison
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.