* fill-paragraph broken
@ 2013-07-08 20:53 Samuel Wales
2013-07-09 12:00 ` Nicolas Goaziou
0 siblings, 1 reply; 11+ messages in thread
From: Samuel Wales @ 2013-07-08 20:53 UTC (permalink / raw)
To: emacs-orgmode
M-q anywhere here fills all three paragraphs together:
# this is a paragraph. i want to fill it.
#
# this is too. and i commented the blank line because i am
# a badass.
# asdfasdf akjdn fkand sflkajnsd fklajns dfkjan dskfjna
# kdsfn
Samuel
--
The Kafka Pandemic: http://thekafkapandemic.blogspot.com
The disease DOES progress. MANY people have died from it. ANYBODY can get it.
Denmark: free Karina Hansen NOW.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: fill-paragraph broken
2013-07-08 20:53 fill-paragraph broken Samuel Wales
@ 2013-07-09 12:00 ` Nicolas Goaziou
2013-07-09 17:47 ` Samuel Wales
0 siblings, 1 reply; 11+ messages in thread
From: Nicolas Goaziou @ 2013-07-09 12:00 UTC (permalink / raw)
To: Samuel Wales; +Cc: emacs-orgmode
Hello,
Samuel Wales <samologist@gmail.com> writes:
> M-q anywhere here fills all three paragraphs together:
>
> # this is a paragraph. i want to fill it.
> #
> # this is too. and i commented the blank line because i am
> # a badass.
>
> # asdfasdf akjdn fkand sflkajnsd fklajns dfkjan dskfjna
> # kdsfn
This should be fixed. Thank you for reporting it.
Please note that Org will only see two comments here, as a commented
empty line isn't recognized as a separator (`comment-dwim' will not
comment them anyway).
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: fill-paragraph broken
2013-07-09 12:00 ` Nicolas Goaziou
@ 2013-07-09 17:47 ` Samuel Wales
2013-07-09 18:47 ` Samuel Wales
0 siblings, 1 reply; 11+ messages in thread
From: Samuel Wales @ 2013-07-09 17:47 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: emacs-orgmode
Thank you.
Please note:
===
comment-empty-lines is a variable defined in `newcomment.el.gz'.
Its value is t
Original value was nil
Documentation:
If nil, `comment-region' does not comment out empty lines.
If t, it always comments out empty lines.
If `eol' it only comments out empty lines if comments are
terminated by the end of line (i.e. `comment-end' is empty).
You can customize this variable.
===
--
The Kafka Pandemic: http://thekafkapandemic.blogspot.com
The disease DOES progress. MANY people have died from it. ANYBODY can get it.
Denmark: free Karina Hansen NOW.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: fill-paragraph broken
2013-07-09 17:47 ` Samuel Wales
@ 2013-07-09 18:47 ` Samuel Wales
2013-07-09 19:25 ` Nicolas Goaziou
0 siblings, 1 reply; 11+ messages in thread
From: Samuel Wales @ 2013-07-09 18:47 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: emacs-orgmode
I think Org should support this variable and not fill two commented
paragraphs with a commented empty line as if they were one.
When you fill in, for example, Emacs Lisp mode, each paragraph is
filled as a paragraph, without combining them.
I think there is benefit for the user in keeping things consistent
with other modes and supporting this Emacs variable.
On 7/9/13, Samuel Wales <samologist@gmail.com> wrote:
> Thank you.
>
> Please note:
>
> ===
> comment-empty-lines is a variable defined in `newcomment.el.gz'.
> Its value is t
> Original value was nil
>
> Documentation:
> If nil, `comment-region' does not comment out empty lines.
> If t, it always comments out empty lines.
> If `eol' it only comments out empty lines if comments are
> terminated by the end of line (i.e. `comment-end' is empty).
>
> You can customize this variable.
> ===
>
> --
> The Kafka Pandemic: http://thekafkapandemic.blogspot.com
>
> The disease DOES progress. MANY people have died from it. ANYBODY can get
> it.
>
> Denmark: free Karina Hansen NOW.
>
--
The Kafka Pandemic: http://thekafkapandemic.blogspot.com
The disease DOES progress. MANY people have died from it. ANYBODY can get it.
Denmark: free Karina Hansen NOW.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: fill-paragraph broken
2013-07-09 18:47 ` Samuel Wales
@ 2013-07-09 19:25 ` Nicolas Goaziou
2013-07-10 8:07 ` Samuel Wales
0 siblings, 1 reply; 11+ messages in thread
From: Nicolas Goaziou @ 2013-07-09 19:25 UTC (permalink / raw)
To: Samuel Wales; +Cc: emacs-orgmode
Hello,
Samuel Wales <samologist@gmail.com> writes:
> I think Org should support this variable and not fill two commented
> paragraphs with a commented empty line as if they were one.
I do not.
> When you fill in, for example, Emacs Lisp mode, each paragraph is
> filled as a paragraph, without combining them.
You're comparing apples and oranges. Emacs Lisp is a programming
language, i.e., derived from `prog-mode', whereas Org is about text,
i.e., ultimately derived from `text-mode'. Let's compare text modes with
text modes.
The only mode derived from `text-mode' with comments I can think of is
`rst-mode'. And it doesn't fill comments at all. We might do the same
for the sake of consistency...
> I think there is benefit for the user in keeping things consistent
> with other modes and supporting this Emacs variable.
Org doesn't support this variable. It doesn't even use "newcomment.el".
There is a simple reason for that: many functions in "newcomment.el"
assume comments may start anywhere on a line. This is not possible in
Org. "newcomment.el" is not meant for the `text-mode' family.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: fill-paragraph broken
2013-07-09 19:25 ` Nicolas Goaziou
@ 2013-07-10 8:07 ` Samuel Wales
2013-07-10 12:27 ` Nicolas Goaziou
0 siblings, 1 reply; 11+ messages in thread
From: Samuel Wales @ 2013-07-10 8:07 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: emacs-orgmode
You said to compare text modes with text modes. So let's talk about
text-mode itself? It works as I expect.
On 7/9/13, Nicolas Goaziou <n.goaziou@gmail.com> wrote:
> Hello,
>
> Samuel Wales <samologist@gmail.com> writes:
>
>> I think Org should support this variable and not fill two commented
>> paragraphs with a commented empty line as if they were one.
>
> I do not.
>
>> When you fill in, for example, Emacs Lisp mode, each paragraph is
>> filled as a paragraph, without combining them.
>
> You're comparing apples and oranges. Emacs Lisp is a programming
> language, i.e., derived from `prog-mode', whereas Org is about text,
> i.e., ultimately derived from `text-mode'. Let's compare text modes with
> text modes.
>
> The only mode derived from `text-mode' with comments I can think of is
> `rst-mode'. And it doesn't fill comments at all. We might do the same
> for the sake of consistency...
>
>> I think there is benefit for the user in keeping things consistent
>> with other modes and supporting this Emacs variable.
>
> Org doesn't support this variable. It doesn't even use "newcomment.el".
> There is a simple reason for that: many functions in "newcomment.el"
> assume comments may start anywhere on a line. This is not possible in
> Org. "newcomment.el" is not meant for the `text-mode' family.
>
>
> Regards,
>
> --
> Nicolas Goaziou
>
--
The Kafka Pandemic: http://thekafkapandemic.blogspot.com
The disease DOES progress. MANY people have died from it. ANYBODY can get it.
Denmark: free Karina Hansen NOW.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: fill-paragraph broken
2013-07-10 8:07 ` Samuel Wales
@ 2013-07-10 12:27 ` Nicolas Goaziou
2013-07-10 19:42 ` Samuel Wales
0 siblings, 1 reply; 11+ messages in thread
From: Nicolas Goaziou @ 2013-07-10 12:27 UTC (permalink / raw)
To: Samuel Wales; +Cc: emacs-orgmode
Hello,
Samuel Wales <samologist@gmail.com> writes:
> You said to compare text modes with text modes. So let's talk about
> text-mode itself? It works as I expect.
OK. I understand what you mean. I have pushed a patch that should mimic
usual comment behaviour in Org. Thanks.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: fill-paragraph broken
2013-07-10 12:27 ` Nicolas Goaziou
@ 2013-07-10 19:42 ` Samuel Wales
2013-07-11 7:11 ` Nicolas Goaziou
0 siblings, 1 reply; 11+ messages in thread
From: Samuel Wales @ 2013-07-10 19:42 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: emacs-orgmode
Thank you. I confirm that it works.
C-M-j in a comment also seems to work now. However, there is just one
small bug: at the end of a line, it inserts a # on the next line, in
the comment or outside of it depending on whether it is the last line.
On 7/10/13, Nicolas Goaziou <n.goaziou@gmail.com> wrote:
> Hello,
>
> Samuel Wales <samologist@gmail.com> writes:
>
>> You said to compare text modes with text modes. So let's talk about
>> text-mode itself? It works as I expect.
>
> OK. I understand what you mean. I have pushed a patch that should mimic
> usual comment behaviour in Org. Thanks.
>
>
> Regards,
>
> --
> Nicolas Goaziou
>
--
The Kafka Pandemic: http://thekafkapandemic.blogspot.com
The disease DOES progress. MANY people have died from it. ANYBODY can get it.
Denmark: free Karina Hansen NOW.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: fill-paragraph broken
2013-07-10 19:42 ` Samuel Wales
@ 2013-07-11 7:11 ` Nicolas Goaziou
2013-07-11 8:01 ` Samuel Wales
0 siblings, 1 reply; 11+ messages in thread
From: Nicolas Goaziou @ 2013-07-11 7:11 UTC (permalink / raw)
To: Samuel Wales; +Cc: emacs-orgmode
Hello,
Samuel Wales <samologist@gmail.com> writes:
> C-M-j in a comment also seems to work now.
I doubt it does.
> However, there is just one small bug: at the end of a line, it inserts
> a # on the next line, in the comment or outside of it depending on
> whether it is the last line.
"newcomment.el" doesn't provide any variable or hook to provide our own
function in this area.
A possible workaround would be to write our function anyway and bind it
to M-j in Org keymap. I'm not sure it's worth it.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: fill-paragraph broken
2013-07-11 7:11 ` Nicolas Goaziou
@ 2013-07-11 8:01 ` Samuel Wales
2013-07-11 8:19 ` Nicolas Goaziou
0 siblings, 1 reply; 11+ messages in thread
From: Samuel Wales @ 2013-07-11 8:01 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: emacs-orgmode
Is there a way to just get C-M-j to do what it does in other modes?
I almost never need Org-specific behavior for these things, actually.
--
The Kafka Pandemic: http://thekafkapandemic.blogspot.com
The disease DOES progress. MANY people have died from it. ANYBODY can get it.
Denmark: free Karina Hansen NOW.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: fill-paragraph broken
2013-07-11 8:01 ` Samuel Wales
@ 2013-07-11 8:19 ` Nicolas Goaziou
0 siblings, 0 replies; 11+ messages in thread
From: Nicolas Goaziou @ 2013-07-11 8:19 UTC (permalink / raw)
To: Samuel Wales; +Cc: emacs-orgmode
Samuel Wales <samologist@gmail.com> writes:
> Is there a way to just get C-M-j to do what it does in other modes?
Short answer: no.
Long answer: please read again this thread.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2013-07-11 8:19 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-08 20:53 fill-paragraph broken Samuel Wales
2013-07-09 12:00 ` Nicolas Goaziou
2013-07-09 17:47 ` Samuel Wales
2013-07-09 18:47 ` Samuel Wales
2013-07-09 19:25 ` Nicolas Goaziou
2013-07-10 8:07 ` Samuel Wales
2013-07-10 12:27 ` Nicolas Goaziou
2013-07-10 19:42 ` Samuel Wales
2013-07-11 7:11 ` Nicolas Goaziou
2013-07-11 8:01 ` Samuel Wales
2013-07-11 8:19 ` 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).