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 http://kitchingroup.cheme

Re: [O] org-insert-heading

2014-11-16 Thread Nicolas Goaziou
Luke Crook 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 > > * TEST > - skfjdskjfs > > gives the follo

Re: [O] org-insert-heading

2014-11-13 Thread Luke Crook
Luke Crook balooga.com> writes: > > * TEST... > > > Doesn't do anything > The above I cannot consistently reproduce. So ignore for now. Thanks.

Re: [O] org-insert-heading

2014-11-13 Thread Luke Crook
Nicolas Goaziou 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 Nicolas Goaziou
Hello, Luke Crook 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 of the

Re: [O] org-insert-heading

2014-11-11 Thread Luke Crook
Luke Crook 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 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 > should. Maybe only in i

Re: [O] org-insert-heading

2013-11-14 Thread Carsten Dominik
On 14.11.2013, at 23:53, Bastien wrote: > Hi Nicolas, > > Nicolas Goaziou 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 i

Re: [O] org-insert-heading

2013-11-14 Thread Bastien
Hi Nicolas, Nicolas Goaziou 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, it

Re: [O] org-insert-heading

2013-11-14 Thread Nicolas Goaziou
Hello, Bastien 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 shouldn't be

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

Re: [O] org-insert-heading

2013-11-13 Thread Thomas S. Dye
Hi Bastien, Bastien 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 headi

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 in

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 wrote: > Hi Carsten > > On Thu, Sep 12, 2013 at 10:20 PM, Carsten Dominik > wrote: >> thanks for the patch - I think we will go with Nicolas' patch for fixing >> org-insert-heading. Ma

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 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 thanks in advance. Yes, m

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 wrote: > Hi Nicolas >

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

2013-09-09 Thread Nicolas Goaziou
Hello, Michael Brand 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 syntax within a drawer

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 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. Michael From 66f6d15234bd

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 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, but now I am at least

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

2013-09-07 Thread Nicolas Goaziou
Nicolas Goaziou 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, -- Nicolas Goazi

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-03 Thread Nicolas Goaziou
Carsten Dominik 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-03 Thread Carsten Dominik
On Sep 3, 2013, at 3:58 PM, Nicolas Goaziou wrote: > Carsten Dominik 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 >

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

2013-09-03 Thread Nicolas Goaziou
Carsten Dominik 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 >> >>

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 rea

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

2013-09-03 Thread Nicolas Goaziou
Carsten Dominik 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 information whatsoever ab

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

2013-09-03 Thread Carsten Dominik
On Sep 3, 2013, at 3:25 PM, Carsten Dominik wrote: > > On Sep 3, 2013, at 3:16 PM, Nicolas Goaziou wrote: > >> Hello, >> >> Carsten Dominik writes: >> Moreover, AFAICT, there's no more difference between C-u M-RET, which meant "create headline right here" and M-RET. >>> >>> C-u

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

2013-09-03 Thread Carsten Dominik
On Sep 3, 2013, at 3:16 PM, Nicolas Goaziou wrote: > Hello, > > Carsten Dominik 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 go ahead and insert a headin

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

2013-09-03 Thread Nicolas Goaziou
Hello, Carsten Dominik 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 go ahead and insert a heading. > That is supposed to be the only difference. Point taken. I th

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

2013-09-01 Thread Nicolas Goaziou
Carsten Dominik 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-09-01 Thread Carsten Dominik
Hi Nioclas, thank you for the feedback. On 1.9.2013, at 10:19, Nicolas Goaziou wrote: > Hello, > > Carsten Dominik writes: > >> On 31.8.2013, at 16:34, Nicolas Goaziou wrote: > >>> Not really a bug, but I find some behaviour surprising: when at a the >>> beginning of a regular text line, t

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

2013-09-01 Thread Nicolas Goaziou
Hello, Carsten Dominik writes: > On 31.8.2013, at 16:34, Nicolas Goaziou 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 following example: >> >> XCursor is at "

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

2013-08-31 Thread Carsten Dominik
Hi Nicolas, On 31.8.2013, at 16:34, Nicolas Goaziou wrote: > Hello, > > Carsten Dominik writes: > >> On 8.8.2013, at 09:41, Eric Abrahamsen wrote: >> >>> Carsten Dominik writes: >>> Hi, I have rewritten org-insert-heading, because it had become an unmaintainable beas

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 Karina

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 wrote: > I take it none have been found

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

2013-08-31 Thread Eric Abrahamsen
Carsten Dominik writes: > On 8.8.2013, at 09:41, Eric Abrahamsen wrote: > >> Carsten Dominik 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 >>> implement

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

2013-08-31 Thread Nicolas Goaziou
Hello, Carsten Dominik writes: > On 8.8.2013, at 09:41, Eric Abrahamsen wrote: > >> Carsten Dominik 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 >>> i

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

2013-08-31 Thread Carsten Dominik
On 8.8.2013, at 09:41, Eric Abrahamsen wrote: > Carsten Dominik 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

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

2013-08-08 Thread Eric Abrahamsen
Carsten Dominik 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 can be > fixed. >