* auto-fill bug
@ 2008-02-11 12:32 Adam Spiers
2008-02-11 20:01 ` Carsten Dominik
0 siblings, 1 reply; 6+ messages in thread
From: Adam Spiers @ 2008-02-11 12:32 UTC (permalink / raw)
To: org-mode mailing list
I just found some strange behaviour with auto-fill mode on:
--------- 8< --------- 8< --------- 8< --------- 8< --------- 8< ---------
#+TITLE: test title
* First heading
- Turn this into a long sentence to see the bug.
--------- 8< --------- 8< --------- 8< --------- 8< --------- 8< ---------
If you extend the sentence by adding only words and spaces, when it
wraps, indentation is broken and a # appears from nowhere:
--------- 8< --------- 8< --------- 8< --------- 8< --------- 8< ---------
#+TITLE: test title
* First heading
- Turn this into a long sentence to see the bug. Or you can start a
#new sentence; either way you get that strange #-prefixed outdentation.
--------- 8< --------- 8< --------- 8< --------- 8< --------- 8< ---------
The odd thing is that if there is nothing in the buffer after the
point when you start (not even a newline) then the bug vanishes.
Reproduced with a recent git clone claiming to be 5.20, and also with
5.17. Thanks!
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: auto-fill bug
2008-02-11 12:32 auto-fill bug Adam Spiers
@ 2008-02-11 20:01 ` Carsten Dominik
2008-02-11 23:16 ` Adam Spiers
0 siblings, 1 reply; 6+ messages in thread
From: Carsten Dominik @ 2008-02-11 20:01 UTC (permalink / raw)
To: Adam Spiers; +Cc: org-mode mailing list
[-- Attachment #1.1: Type: text/plain, Size: 1567 bytes --]
Probably you have set the value of comment-start to "#" somewhere in
your
customization? There is something wring with the line wrapping in
combination with this setting, I have not yet understood what. So for
now,
leave comment-start alone.
- Carsten
On Feb 11, 2008, at 1:32 PM, Adam Spiers wrote:
> I just found some strange behaviour with auto-fill mode on:
>
> --------- 8< --------- 8< --------- 8< --------- 8< --------- 8<
> ---------
> #+TITLE: test title
>
> * First heading
> - Turn this into a long sentence to see the bug.
>
> --------- 8< --------- 8< --------- 8< --------- 8< --------- 8<
> ---------
>
> If you extend the sentence by adding only words and spaces, when it
> wraps, indentation is broken and a # appears from nowhere:
>
> --------- 8< --------- 8< --------- 8< --------- 8< --------- 8<
> ---------
> #+TITLE: test title
>
> * First heading
> - Turn this into a long sentence to see the bug. Or you can start a
> #new sentence; either way you get that strange #-prefixed
> outdentation.
> --------- 8< --------- 8< --------- 8< --------- 8< --------- 8<
> ---------
>
> The odd thing is that if there is nothing in the buffer after the
> point when you start (not even a newline) then the bug vanishes.
>
> Reproduced with a recent git clone claiming to be 5.20, and also with
> 5.17. Thanks!
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[-- Attachment #1.2: Type: text/html, Size: 2048 bytes --]
[-- Attachment #2: Type: text/plain, Size: 204 bytes --]
_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: auto-fill bug
2008-02-11 20:01 ` Carsten Dominik
@ 2008-02-11 23:16 ` Adam Spiers
2008-03-19 0:32 ` Jonathan Moore
0 siblings, 1 reply; 6+ messages in thread
From: Adam Spiers @ 2008-02-11 23:16 UTC (permalink / raw)
To: org-mode mailing list
Carsten Dominik (dominik@science.uva.nl) wrote:
> Probably you have set the value of comment-start to "#" somewhere in
> your customization? There is something wring with the line wrapping
> in combination with this setting, I have not yet understood what.
> So for now, leave comment-start alone.
Actually it's set to "> ", which is even more puzzling ... :-/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: auto-fill bug
2008-02-11 23:16 ` Adam Spiers
@ 2008-03-19 0:32 ` Jonathan Moore
0 siblings, 0 replies; 6+ messages in thread
From: Jonathan Moore @ 2008-03-19 0:32 UTC (permalink / raw)
To: emacs-orgmode
Adam Spiers <orgmode <at> adamspiers.org> writes:
>
> Carsten Dominik (dominik <at> science.uva.nl) wrote:
> > Probably you have set the value of comment-start to "#" somewhere in
> > your customization? There is something wring with the line wrapping
> > in combination with this setting, I have not yet understood what.
> > So for now, leave comment-start alone.
>
> Actually it's set to "> ", which is even more puzzling ... :-/
>
You'll have problems if comment-start is set as a global variable in some other
mode. If so, edit the other mode to make it a local variable before setting it.
Otherwise org's auto-filling will try to work with the comment syntax, even if
you don't set comment-start in it (there is also a call to modify-syntax-entry)
Regards
Jon
^ permalink raw reply [flat|nested] 6+ messages in thread
* auto-fill bug
@ 2012-09-01 18:44 Samuel Wales
2012-09-01 20:05 ` Nicolas Goaziou
0 siblings, 1 reply; 6+ messages in thread
From: Samuel Wales @ 2012-09-01 18:44 UTC (permalink / raw)
To: emacs-orgmode
I expect "I can't reproduce this" but wanted to document it.
Often when I press SPC beyond fill-column, the new Org filling mechanism
inserts " " at bol. fill-paragraph works fine.
A buggy fill-prefix is returned by org-adaptive-fill-function on this line:
((looking-at "[ \t]*") (match-string 0))
That's all I know.
Samuel
--
The Kafka Pandemic: http://thekafkapandemic.blogspot.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: auto-fill bug
2012-09-01 18:44 Samuel Wales
@ 2012-09-01 20:05 ` Nicolas Goaziou
0 siblings, 0 replies; 6+ messages in thread
From: Nicolas Goaziou @ 2012-09-01 20:05 UTC (permalink / raw)
To: Samuel Wales; +Cc: emacs-orgmode
Hello,
Samuel Wales <samologist@gmail.com> writes:
> I expect "I can't reproduce this" but wanted to document it.
#+BEGIN_SRC emacs-lisp
(defun ngz-handle-bug-reports ()
(when (save-excursion (message-goto-to)
(beginning-of-line)
(looking-at ".*Samuel Wales"))
(insert "I can't reproduce this\n")
(message-send-and-exit)))
#+END_SRC
> Often when I press SPC beyond fill-column, the new Org filling mechanism
> inserts " " at bol. fill-paragraph works fine.
>
> A buggy fill-prefix is returned by org-adaptive-fill-function on this line:
>
> ((looking-at "[ \t]*") (match-string 0))
>
> That's all I know.
Indeed. This regexp is obviously wrong. I've pushed a fix. Hopefully, it
should solve the problem at hand. Pleas tell me if it doesn't.
Thank you for the report.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-09-01 20:09 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-11 12:32 auto-fill bug Adam Spiers
2008-02-11 20:01 ` Carsten Dominik
2008-02-11 23:16 ` Adam Spiers
2008-03-19 0:32 ` Jonathan Moore
-- strict thread matches above, loose matches on Subject: below --
2012-09-01 18:44 Samuel Wales
2012-09-01 20:05 ` Nicolas Goaziou
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).