emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Change in org-babel with indenting code blocks?
@ 2011-08-29 21:07 John Wiegley
  2011-08-30  6:40 ` Sebastien Vauban
  2011-08-30 20:25 ` Nicolas Goaziou
  0 siblings, 2 replies; 13+ messages in thread
From: John Wiegley @ 2011-08-29 21:07 UTC (permalink / raw)
  To: emacs-orgmode

I don't have any org-babel variables customized.  I have a code block like
this:

*** NOTE Assets:Receivable:CEG
    #+begin_src sh :results value :exports results
    ledger reg --inject=Expected '^income:ceg'
    ledger reg --sort date -b 2007 receivable:CEG
    #+end_src
    :PROPERTIES:
    :ID:       8BEF6C42-8B23-495B-9421-3810B58907A1
    :VISIBILITY: folded
    :CREATED:  [2010-06-18 Fri 07:37]
    :END:

When I put my cursor on the '*' in the heading and hit 'r', I was used to the
whole entry, including the code block, getting indented by one space.  Now
everything *but* the code block gets indented.

Is this new behavior?  How do I get back to the old behavior?  I don't want my
code blocks sticking to a fixed column.

Thanks,
  John

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Change in org-babel with indenting code blocks?
  2011-08-29 21:07 Change in org-babel with indenting code blocks? John Wiegley
@ 2011-08-30  6:40 ` Sebastien Vauban
  2011-08-30 20:25 ` Nicolas Goaziou
  1 sibling, 0 replies; 13+ messages in thread
From: Sebastien Vauban @ 2011-08-30  6:40 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hi John,

John Wiegley wrote:
> I don't have any org-babel variables customized.  I have a code block like
> this:
>
> *** NOTE Assets:Receivable:CEG
>     #+begin_src sh :results value :exports results
>     ledger reg --inject=Expected '^income:ceg'
>     ledger reg --sort date -b 2007 receivable:CEG
>     #+end_src
>     :PROPERTIES:
>     :ID:       8BEF6C42-8B23-495B-9421-3810B58907A1
>     :VISIBILITY: folded
>     :CREATED:  [2010-06-18 Fri 07:37]
>     :END:
>
> When I put my cursor on the '*' in the heading and hit 'r', I was used to
> the whole entry, including the code block, getting indented by one space.
> Now everything *but* the code block gets indented.
>
> Is this new behavior? How do I get back to the old behavior? I don't want my
> code blocks sticking to a fixed column.

Could it be due to the patch around "Extra space inserted in repeated tasks'
date line"?

See http://lists.gnu.org/archive/html/emacs-orgmode/2011-08/msg00634.html

Best regards,
  Seb

-- 
Sebastien Vauban

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Change in org-babel with indenting code blocks?
  2011-08-29 21:07 Change in org-babel with indenting code blocks? John Wiegley
  2011-08-30  6:40 ` Sebastien Vauban
@ 2011-08-30 20:25 ` Nicolas Goaziou
  2011-08-31  2:25   ` John Wiegley
  1 sibling, 1 reply; 13+ messages in thread
From: Nicolas Goaziou @ 2011-08-30 20:25 UTC (permalink / raw)
  To: John Wiegley; +Cc: emacs-orgmode

Hello,

John Wiegley <jwiegley@gmail.com> writes:

> I don't have any org-babel variables customized.  I have a code block like
> this:
>
> *** NOTE Assets:Receivable:CEG
>     #+begin_src sh :results value :exports results
>     ledger reg --inject=Expected '^income:ceg'
>     ledger reg --sort date -b 2007 receivable:CEG
>     #+end_src
>     :PROPERTIES:
>     :ID:       8BEF6C42-8B23-495B-9421-3810B58907A1
>     :VISIBILITY: folded
>     :CREATED:  [2010-06-18 Fri 07:37]
>     :END:

Actually this not Babel related.

Some functions, like `org-end-of-meta-data-and-drawers' and
`org-fixup-indentation', assume that all drawers (along with
time-stamps, etc.) live before any text in the headline.

So for now, a solution would be to move the block after the drawer.

> When I put my cursor on the '*' in the heading and hit 'r', I was used to the
> whole entry, including the code block, getting indented by one space.  Now
> everything *but* the code block gets indented.
>
> Is this new behavior?  How do I get back to the old behavior?  I don't want my
> code blocks sticking to a fixed column.

I haven't checked but I don't think it is new.


Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Change in org-babel with indenting code blocks?
  2011-08-30 20:25 ` Nicolas Goaziou
@ 2011-08-31  2:25   ` John Wiegley
  2011-08-31  7:38     ` Nicolas Goaziou
  0 siblings, 1 reply; 13+ messages in thread
From: John Wiegley @ 2011-08-31  2:25 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode

>>>>> Nicolas Goaziou <n.goaziou@gmail.com> writes:

> So for now, a solution would be to move the block after the drawer.

I prefer my PROPERTIES block to be last, so I need another solution.

> I haven't checked but I don't think it is new.

I've been shifting code-containing entries for many months now.  This only
just started happening.

Thanks, John

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Change in org-babel with indenting code blocks?
  2011-08-31  2:25   ` John Wiegley
@ 2011-08-31  7:38     ` Nicolas Goaziou
  2011-08-31  8:02       ` Nick Dokos
  0 siblings, 1 reply; 13+ messages in thread
From: Nicolas Goaziou @ 2011-08-31  7:38 UTC (permalink / raw)
  To: John Wiegley; +Cc: Bastien Guerry, emacs-orgmode

Hello,

John Wiegley <jwiegley@gmail.com> writes:

> I've been shifting code-containing entries for many months now.  This only
> just started happening.

You're right, this change (6b04bef) was introduced on 18th August, to
fix a bug that eludes me. Without that information, it's somewhat hard
to know how to fix it properly.

Let's wait for his author to come back.


Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Change in org-babel with indenting code blocks?
  2011-08-31  7:38     ` Nicolas Goaziou
@ 2011-08-31  8:02       ` Nick Dokos
  2011-08-31 15:57         ` John Wiegley
  2011-09-08 23:54         ` John Wiegley
  0 siblings, 2 replies; 13+ messages in thread
From: Nick Dokos @ 2011-08-31  8:02 UTC (permalink / raw)
  To: Nicolas Goaziou
  Cc: John Wiegley, nicholas.dokos, emacs-orgmode, Bastien Guerry

Nicolas Goaziou <n.goaziou@gmail.com> wrote:

> Hello,
> 
> John Wiegley <jwiegley@gmail.com> writes:
> 
> > I've been shifting code-containing entries for many months now.  This only
> > just started happening.
> 
> You're right, this change (6b04bef) was introduced on 18th August, to
> fix a bug that eludes me. Without that information, it's somewhat hard
> to know how to fix it properly.
> 

Perhaps Seb Vauban identified the bug correctly (earlier in this thread): he
pointed to the thread entitled "Extra space inserted in repeated task's
date line" - see

     http://thread.gmane.org/gmane.emacs.orgmode/45623

And while I'm at it, what is "r" bound to? In my case, it is
'org-self-insert-command: even after turning on org-indent-mode, "r"
self-inserts. What am I missing?

Thanks,
Nick

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Change in org-babel with indenting code blocks?
  2011-08-31  8:02       ` Nick Dokos
@ 2011-08-31 15:57         ` John Wiegley
  2011-08-31 16:32           ` Nick Dokos
  2011-09-08 23:54         ` John Wiegley
  1 sibling, 1 reply; 13+ messages in thread
From: John Wiegley @ 2011-08-31 15:57 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: Bastien Guerry, emacs-orgmode, Nicolas Goaziou

>>>>> Nick Dokos <nicholas.dokos@hp.com> writes:

> And while I'm at it, what is "r" bound to? In my case, it is
> 'org-self-insert-command: even after turning on org-indent-mode, "r"
> self-inserts. What am I missing?

It is a "speed key", which is bound only when point is on the '*' of a
headline.

John

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Change in org-babel with indenting code blocks?
  2011-08-31 15:57         ` John Wiegley
@ 2011-08-31 16:32           ` Nick Dokos
  0 siblings, 0 replies; 13+ messages in thread
From: Nick Dokos @ 2011-08-31 16:32 UTC (permalink / raw)
  To: John Wiegley
  Cc: Bastien Guerry, emacs-orgmode, Nicolas Goaziou, nicholas.dokos

John Wiegley <jwiegley@gmail.com> wrote:

> >>>>> Nick Dokos <nicholas.dokos@hp.com> writes:
> 
> > And while I'm at it, what is "r" bound to? In my case, it is
> > 'org-self-insert-command: even after turning on org-indent-mode, "r"
> > self-inserts. What am I missing?
> 
> It is a "speed key", which is bound only when point is on the '*' of a
> headline.
> 

OK - thanks!

Nick

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Change in org-babel with indenting code blocks?
  2011-08-31  8:02       ` Nick Dokos
  2011-08-31 15:57         ` John Wiegley
@ 2011-09-08 23:54         ` John Wiegley
  2011-09-09  0:01           ` John Wiegley
  1 sibling, 1 reply; 13+ messages in thread
From: John Wiegley @ 2011-09-08 23:54 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: Bastien Guerry, emacs-orgmode, Nicolas Goaziou

>>>>> Nick Dokos <nicholas.dokos@hp.com> writes:

> Perhaps Seb Vauban identified the bug correctly (earlier in this thread): he
> pointed to the thread entitled "Extra space inserted in repeated task's date
> line" - see

>      http://thread.gmane.org/gmane.emacs.orgmode/45623

In the current Org (updated today), this problem now affects *all* non-drawer
text in entries, including code blocks, lists, and log entries!  This is makes
entry shifting completely useless to me.  What do I need to revert to make it
work again?

Thanks,
  John

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Change in org-babel with indenting code blocks?
  2011-09-08 23:54         ` John Wiegley
@ 2011-09-09  0:01           ` John Wiegley
  2011-09-09  6:04             ` Bastien
  2011-09-09 17:49             ` Bastien
  0 siblings, 2 replies; 13+ messages in thread
From: John Wiegley @ 2011-09-09  0:01 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: Bastien Guerry, emacs-orgmode, Nicolas Goaziou

>>>>> John Wiegley <jwiegley@gmail.com> writes:

> In the current Org (updated today), this problem now affects *all*
> non-drawer text in entries, including code blocks, lists, and log entries!
> This is makes entry shifting completely useless to me.  What do I need to
> revert to make it work again?

Actually, it even worse: This affects all refiled blocks as well, resulting in
the indentation of the refiled entry being the same as the original level it
was captured in.  I just went through my entire Org file by eye and found a
huge number of indentation problems resulting from this bug.  Help!

John

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Change in org-babel with indenting code blocks?
  2011-09-09  0:01           ` John Wiegley
@ 2011-09-09  6:04             ` Bastien
  2011-09-09  6:17               ` John Wiegley
  2011-09-09 17:49             ` Bastien
  1 sibling, 1 reply; 13+ messages in thread
From: Bastien @ 2011-09-09  6:04 UTC (permalink / raw)
  To: John Wiegley; +Cc: emacs-orgmode, nicholas.dokos, Nicolas Goaziou

John Wiegley <jwiegley@gmail.com> writes:

>>>>>> John Wiegley <jwiegley@gmail.com> writes:
>
>> In the current Org (updated today), this problem now affects *all*
>> non-drawer text in entries, including code blocks, lists, and log entries!
>> This is makes entry shifting completely useless to me.  What do I need to
>> revert to make it work again?
>
> Actually, it even worse: This affects all refiled blocks as well, resulting in
> the indentation of the refiled entry being the same as the original level it
> was captured in.  I just went through my entire Org file by eye and found a
> huge number of indentation problems resulting from this bug.  Help!

I will fix this today.  Sorry this caused so much problems.

-- 
 Bastien

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Change in org-babel with indenting code blocks?
  2011-09-09  6:04             ` Bastien
@ 2011-09-09  6:17               ` John Wiegley
  0 siblings, 0 replies; 13+ messages in thread
From: John Wiegley @ 2011-09-09  6:17 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode, nicholas.dokos, Nicolas Goaziou

>>>>> Bastien  <bzg@altern.org> writes:

> I will fix this today.  Sorry this caused so much problems.

Thanks so much, Bastien, you're awesome.

John

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Change in org-babel with indenting code blocks?
  2011-09-09  0:01           ` John Wiegley
  2011-09-09  6:04             ` Bastien
@ 2011-09-09 17:49             ` Bastien
  1 sibling, 0 replies; 13+ messages in thread
From: Bastien @ 2011-09-09 17:49 UTC (permalink / raw)
  To: John Wiegley; +Cc: emacs-orgmode, nicholas.dokos, Nicolas Goaziou

Hi John,

John Wiegley <jwiegley@gmail.com> writes:

>>>>>> John Wiegley <jwiegley@gmail.com> writes:
>
>> In the current Org (updated today), this problem now affects *all*
>> non-drawer text in entries, including code blocks, lists, and log entries!
>> This is makes entry shifting completely useless to me.  What do I need to
>> revert to make it work again?
>
> Actually, it even worse: This affects all refiled blocks as well, resulting in
> the indentation of the refiled entry being the same as the original level it
> was captured in.  I just went through my entire Org file by eye and found a
> huge number of indentation problems resulting from this bug.  Help!

I couldn't fix this correctly, so I simply reverted commit 6b04bef for
now.  I will provide a better fix later.

Thanks,

-- 
 Bastien

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2011-09-09 17:48 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-29 21:07 Change in org-babel with indenting code blocks? John Wiegley
2011-08-30  6:40 ` Sebastien Vauban
2011-08-30 20:25 ` Nicolas Goaziou
2011-08-31  2:25   ` John Wiegley
2011-08-31  7:38     ` Nicolas Goaziou
2011-08-31  8:02       ` Nick Dokos
2011-08-31 15:57         ` John Wiegley
2011-08-31 16:32           ` Nick Dokos
2011-09-08 23:54         ` John Wiegley
2011-09-09  0:01           ` John Wiegley
2011-09-09  6:04             ` Bastien
2011-09-09  6:17               ` John Wiegley
2011-09-09 17:49             ` Bastien

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).