Re: [O] (org-insert-heading "hello")

2017-06-05 Thread John Kitchin
arg is for the prefix arg.You want this: (org-insert-heading) (insert "hello") John --- Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin

[O] (org-insert-heading "hello")

2017-06-05 Thread f . nikolakopoulos
(org-insert-heading "hello") emacs lisp function ignores argument and inserts blank heading. I think is a change of mode to add the argument but which command.

Re: [O] org-insert-heading

2014-11-16 Thread Nicolas Goaziou
Luke Crook l...@balooga.com writes: But I still don't think it works as it is meant to. Org creates a new list item in the folded heading if the last line is a list item. Otherwise org creates a new heading at the same level as the folded heading. So * TESTcursor here, then M-enter

Re: [O] org-insert-heading

2014-11-13 Thread Nicolas Goaziou
Hello, Luke Crook l...@balooga.com writes: Question concerning the behaviour of org-insert-heading; The manual states the following. If the command is used at the end of a folded subtree (i.e., behind the ellipses at the end of a headline), then a headline will be inserted after the end

Re: [O] org-insert-heading

2014-11-13 Thread Luke Crook
Nicolas Goaziou mail at nicolasgoaziou.fr writes: Point is /before/ the ellipses here. You need to move after them, e.g., using C-f or mess with `org-special-ctrl-a/e'. Regards, OK thanks. I understood behind the ellipses at the end of a headline as before the ellipses, not after.

Re: [O] org-insert-heading

2014-11-13 Thread Luke Crook
Luke Crook luke at balooga.com writes: * TEST... cursor here, then M-enter Doesn't do anything The above I cannot consistently reproduce. So ignore for now. Thanks.

[O] org-insert-heading

2014-11-11 Thread Luke Crook
Question concerning the behaviour of org-insert-heading; The manual states the following. If the command is used at the end of a folded subtree (i.e., behind the ellipses at the end of a headline), then a headline will be inserted after the end of the subtree. However at least in my

Re: [O] org-insert-heading

2014-11-11 Thread Luke Crook
Luke Crook luke at balooga.com writes: However at least in my installation (Emacs 34.3, org-mode 8.2.10), Emacs 24.3 obviously.

Re: [O] org-insert-heading

2013-11-15 Thread Bastien
Hi Carsten, Carsten Dominik carsten.domi...@gmail.com writes: I think it is dangerous to change the behavior in such a way that it will depend on the heading being folded or not. Definitely org-in-item-p should not depend on that. I am still debating with myself if org-insert-heading

Re: [O] org-insert-heading

2013-11-14 Thread Nicolas Goaziou
Hello, Bastien b...@gnu.org writes: Confirmed -- I quickly looked, it seems that `org-in-item-p' should do a better job when preceeded by invisible text. I need to rewrite this function. Anyway, I'm not sure what you mean in your last sentence because, as a low-level function, its results

Re: [O] org-insert-heading

2013-11-14 Thread Bastien
Hi Nicolas, Nicolas Goaziou n.goaz...@gmail.com writes: Confirmed -- I quickly looked, it seems that `org-in-item-p' should do a better job when preceeded by invisible text. I need to rewrite this function. Anyway, I'm not sure what you mean in your last sentence because, as a low-level

Re: [O] org-insert-heading

2013-11-14 Thread Carsten Dominik
On 14.11.2013, at 23:53, Bastien b...@gnu.org wrote: Hi Nicolas, Nicolas Goaziou n.goaz...@gmail.com writes: Confirmed -- I quickly looked, it seems that `org-in-item-p' should do a better job when preceeded by invisible text. I need to rewrite this function. Anyway, I'm not sure

Re: [O] org-insert-heading

2013-11-13 Thread Bastien
Hi Thomas, t...@tsdye.com (Thomas S. Dye) writes: With the following Org mode file, there is a dead space where org-insert-heading doesn't do anything. In the following example, if the point is on either of the empty lines marked [dead space] no heading is created. Is this behavior

Re: [O] org-insert-heading

2013-11-13 Thread Thomas S. Dye
Hi Bastien, Bastien b...@gnu.org writes: Hi Thomas, t...@tsdye.com (Thomas S. Dye) writes: With the following Org mode file, there is a dead space where org-insert-heading doesn't do anything. In the following example, if the point is on either of the empty lines marked [dead space] no

Re: [O] org-insert-heading

2013-11-13 Thread Bastien
Hi Thomas, t...@tsdye.com (Thomas S. Dye) writes: I looked more closely and found that the behavior I described happens when the folded material ends in a list. If I end the list by adding some regular text, then I get the expected behavior. Confirmed -- I quickly looked, it seems that

[O] org-insert-heading

2013-11-12 Thread Thomas S. Dye
Aloha all, With the following Org mode file, there is a dead space where org-insert-heading doesn't do anything. In the following example, if the point is on either of the empty lines marked [dead space] no heading is created. Is this behavior intended? * Folded heading ... [dead space] [dead

Re: [O] org-insert-heading rewritten from scratch

2013-09-12 Thread Carsten Dominik
Hi Michael, thanks for the patch - I think we will go with Nicolas' patch for fixing org-insert-heading. May I ask you to check if your tests still to the right thing, and resubmit the test patch? Many thanks in advance. - Carsten On 9.9.2013, at 22:37, Michael Brand

Re: [O] org-insert-heading rewritten from scratch

2013-09-12 Thread Michael Brand
Hi Carsten On Thu, Sep 12, 2013 at 10:20 PM, Carsten Dominik carsten.domi...@gmail.com wrote: thanks for the patch - I think we will go with Nicolas' patch for fixing org-insert-heading. May I ask you to check if your tests still to the right thing, and resubmit the test patch? Many

Re: [O] org-insert-heading rewritten from scratch

2013-09-12 Thread Carsten Dominik
Hi Michael, I have applied your testing patch, thank you! - Carsten On 12.9.2013, at 22:52, Michael Brand michael.ch.br...@gmail.com wrote: Hi Carsten On Thu, Sep 12, 2013 at 10:20 PM, Carsten Dominik carsten.domi...@gmail.com wrote: thanks for the patch - I think we will go with

Re: [O] org-insert-heading rewritten from scratch

2013-09-09 Thread Michael Brand
Hi Carsten On Thu, Aug 8, 2013 at 8:43 AM, Carsten Dominik carsten.domi...@gmail.com wrote: I have rewritten org-insert-heading, because it had become an unmaintainable beast. Please follow up in this thread if you find problems with the new implementation. Very likely there will be bugs,

Re: [O] org-insert-heading rewritten from scratch

2013-09-09 Thread Michael Brand
Hi Nicolas On Mon, Sep 9, 2013 at 9:10 PM, Nicolas Goaziou n.goaz...@gmail.com wrote: FWIW, I think the test belongs to test-org.el, not to test-org-list.el. Ok, I assume, then better also with more tests than only for list items. See the attached patches that replace the previous ones.

Re: [O] org-insert-heading rewritten from scratch

2013-09-09 Thread Nicolas Goaziou
Hello, Michael Brand michael.ch.br...@gmail.com writes: About the following different issue I don't care as much and only wanted to report: C-RET before any headline when within a drawer, or generally before any headline(?), could bark instead of changing to a headline leading to invalid Org

Re: [O] org-insert-heading rewritten from scratch

2013-09-07 Thread Nicolas Goaziou
Hello, There seem to be a bug when using M-RET at X in the following buffer: * H1 TextX Try it with different values for `org-blank-before-new-entry'. Regards, -- Nicolas Goaziou

Re: [O] org-insert-heading rewritten from scratch

2013-09-07 Thread Nicolas Goaziou
Nicolas Goaziou n.goaz...@gmail.com writes: There seem to be a bug when using M-RET at X in the following buffer: * H1 TextX Try it with different values for `org-blank-before-new-entry'. Well, please scratch that: I was on a dubious local branch. Sorry for the noise. Regards, --

Re: [O] org-insert-heading rewritten from scratch

2013-09-03 Thread Carsten Dominik
On Sep 3, 2013, at 3:16 PM, Nicolas Goaziou n.goaz...@gmail.com wrote: Hello, Carsten Dominik carsten.domi...@gmail.com writes: Moreover, AFAICT, there's no more difference between C-u M-RET, which meant create headline right here and M-RET. C-u means: Do not ask org-insert-item, just

Re: [O] org-insert-heading rewritten from scratch

2013-09-03 Thread Carsten Dominik
On Sep 3, 2013, at 3:25 PM, Carsten Dominik carsten.domi...@gmail.com wrote: On Sep 3, 2013, at 3:16 PM, Nicolas Goaziou n.goaz...@gmail.com wrote: Hello, Carsten Dominik carsten.domi...@gmail.com writes: Moreover, AFAICT, there's no more difference between C-u M-RET, which meant

Re: [O] org-insert-heading rewritten from scratch

2013-09-03 Thread Nicolas Goaziou
Carsten Dominik carsten.domi...@gmail.com writes: Hmmm, I thought you just asked me to implement exactly what you see, namely that M-RET will not remove empty lines above the cursor - only add them. Did I misunderstand? I think so. M-RET should not remove (or add) anything when it has no

Re: [O] org-insert-heading rewritten from scratch

2013-09-03 Thread Carsten Dominik
I am still not clear about this. In your earlier mail you made this example: Well same as above: I think it eats blank lines where it shouldn't. It the following cases: * H1 ** H2 H X and * H1 * H2 H X I don't think there's any reason for M-RET to eat

Re: [O] org-insert-heading rewritten from scratch

2013-09-03 Thread Nicolas Goaziou
Carsten Dominik carsten.domi...@gmail.com writes: I am still not clear about this. In your earlier mail you made this example: Well same as above: I think it eats blank lines where it shouldn't. It the following cases: * H1 ** H2 H X and * H1 * H2 H X

Re: [O] org-insert-heading rewritten from scratch

2013-09-03 Thread Carsten Dominik
On Sep 3, 2013, at 3:58 PM, Nicolas Goaziou n.goaz...@gmail.com wrote: Carsten Dominik carsten.domi...@gmail.com writes: I am still not clear about this. In your earlier mail you made this example: Well same as above: I think it eats blank lines where it shouldn't. It the following

Re: [O] org-insert-heading rewritten from scratch

2013-09-03 Thread Nicolas Goaziou
Carsten Dominik carsten.domi...@gmail.com writes: Yes. But you agree that the *result* should be the same, i.e. that there will be an empty line before the newly inserted headline. I think/hope we do agree now. We do. Regards, -- Nicolas Goaziou

Re: [O] org-insert-heading rewritten from scratch

2013-09-01 Thread Carsten Dominik
Hi Nicolas, On 31.8.2013, at 16:34, Nicolas Goaziou n.goaz...@gmail.com wrote: Hello, Carsten Dominik carsten.domi...@gmail.com writes: On 8.8.2013, at 09:41, Eric Abrahamsen e...@ericabrahamsen.net wrote: Carsten Dominik carsten.domi...@gmail.com writes: Hi, I have rewritten

Re: [O] org-insert-heading rewritten from scratch

2013-09-01 Thread Nicolas Goaziou
Hello, Carsten Dominik carsten.domi...@gmail.com writes: On 31.8.2013, at 16:34, Nicolas Goaziou n.goaz...@gmail.com wrote: Not really a bug, but I find some behaviour surprising: when at a the beginning of a regular text line, there is no way to create a headline just above it. In the

Re: [O] org-insert-heading rewritten from scratch

2013-09-01 Thread Carsten Dominik
Hi Nioclas, thank you for the feedback. On 1.9.2013, at 10:19, Nicolas Goaziou n.goaz...@gmail.com wrote: Hello, Carsten Dominik carsten.domi...@gmail.com writes: On 31.8.2013, at 16:34, Nicolas Goaziou n.goaz...@gmail.com wrote: Not really a bug, but I find some behaviour surprising:

Re: [O] org-insert-heading rewritten from scratch

2013-09-01 Thread Nicolas Goaziou
Carsten Dominik carsten.domi...@gmail.com writes: Please take another look. There is no new commit in maint or master. Regards, -- Nicolas Goaziou

Re: [O] org-insert-heading rewritten from scratch

2013-08-31 Thread Carsten Dominik
On 8.8.2013, at 09:41, Eric Abrahamsen e...@ericabrahamsen.net wrote: Carsten Dominik carsten.domi...@gmail.com writes: Hi, I have rewritten org-insert-heading, because it had become an unmaintainable beast. Please follow up in this thread if you find problems with the new

Re: [O] org-insert-heading rewritten from scratch

2013-08-31 Thread Nicolas Goaziou
Hello, Carsten Dominik carsten.domi...@gmail.com writes: On 8.8.2013, at 09:41, Eric Abrahamsen e...@ericabrahamsen.net wrote: Carsten Dominik carsten.domi...@gmail.com writes: Hi, I have rewritten org-insert-heading, because it had become an unmaintainable beast. Please follow up in

Re: [O] org-insert-heading rewritten from scratch

2013-08-31 Thread Eric Abrahamsen
Carsten Dominik carsten.domi...@gmail.com writes: On 8.8.2013, at 09:41, Eric Abrahamsen e...@ericabrahamsen.net wrote: Carsten Dominik carsten.domi...@gmail.com writes: Hi, I have rewritten org-insert-heading, because it had become an unmaintainable beast. Please follow up in this

Re: [O] org-insert-heading rewritten from scratch

2013-08-31 Thread Samuel Wales
I've found four, but they are minor. In capture, you can create a blank line with m-ret at the top.Repeated invocation creates invalid headlines. There is no c-ret way to create a headline above the first child. M-ret is slow. On 8/31/13, Carsten Dominik carsten.domi...@gmail.com wrote: I

Re: [O] org-insert-heading rewritten from scratch

2013-08-31 Thread Samuel Wales
Clarification: it is no more slow than the original and it fixes bugs. Just answering your question about whether there are any bugs. -- The Kafka Pandemic: http://thekafkapandemic.blogspot.com The disease DOES progress. MANY people have died from it. ANYBODY can get it. Denmark: free

[O] org-insert-heading rewritten from scratch

2013-08-08 Thread Carsten Dominik
Hi, I have rewritten org-insert-heading, because it had become an unmaintainable beast. Please follow up in this thread if you find problems with the new implementation. Very likely there will be bugs, but now I am at least confident they can be fixed. - Carsten

Re: [O] org-insert-heading rewritten from scratch

2013-08-08 Thread Eric Abrahamsen
Carsten Dominik carsten.domi...@gmail.com writes: Hi, I have rewritten org-insert-heading, because it had become an unmaintainable beast. Please follow up in this thread if you find problems with the new implementation. Very likely there will be bugs, but now I am at least confident they