emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug: Tabbing error with asterisks [7.8.03]
@ 2012-03-23 21:34 Ken Williams
  2012-03-26 17:51 ` Bastien
  0 siblings, 1 reply; 4+ messages in thread
From: Ken Williams @ 2012-03-23 21:34 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org

I have the following document:

----------------------
#+TITLE: Test Doc
#+AUTHOR: Ken Williams

* Top header

Top paragraph.

#+begin_src R
library(testthat)

test_that("failures", {
  expect_that(6, equals(9))
  expect_that(6, equals(9))
  expect_that(6, equals(9))
  expect_that(6, equals(9))
  expect_that(6, equals(9))
})
#+end_src

#+results:
#+begin_example
 Error: Test failure in 'failures'
* 6 not equal to 9
Mean relative difference: 0.3333333
* 6 not equal to 9
Mean relative difference: 0.3333333
* 6 not equal to 9
Mean relative difference: 0.3333333
* 6 not equal to 9
Mean relative difference: 0.3333333
* 6 not equal to 9
Mean relative difference: 0.3333333
#+end_example
----------------------


When I put the point on the top headline and hit <tab>, it doesn't fold the complete section, it only folds up to the line "* 6 not equal to 9".  So something thinks that line is a header, even though it's within a "#+begin_example" section.

By contrast, the syntax coloring looks correct - the lines starting with '#' are red, and the lines inside the "#+begin_src" and "#+begin_example" sections are gray, as expected.


Emacs  : GNU Emacs 23.3.1 (i386-mingw-nt6.1.7600)
 of 2011-03-10 on 3249CTO
Package: Org-mode version 7.8.03

--
Ken Williams, Senior Research Scientist
WindLogics
http://windlogics.com


CONFIDENTIALITY NOTICE: This e-mail message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution of any kind is strictly prohibited. If you are not the intended recipient, please contact the sender via reply e-mail and destroy all copies of the original message. Thank you.

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

* Re: Bug: Tabbing error with asterisks [7.8.03]
  2012-03-23 21:34 Bug: Tabbing error with asterisks [7.8.03] Ken Williams
@ 2012-03-26 17:51 ` Bastien
  2012-03-27 21:59   ` Ken Williams
  0 siblings, 1 reply; 4+ messages in thread
From: Bastien @ 2012-03-26 17:51 UTC (permalink / raw)
  To: Ken Williams; +Cc: emacs-orgmode@gnu.org

Hi Ken,

Ken Williams <Ken.Williams@windlogics.com> writes:

> I have the following document:
>
> ----------------------
> #+TITLE: Test Doc
> #+AUTHOR: Ken Williams
>
> * Top header
>
> Top paragraph.
>
> #+begin_src R
> library(testthat)
>
> test_that("failures", {
>   expect_that(6, equals(9))
>   expect_that(6, equals(9))
>   expect_that(6, equals(9))
>   expect_that(6, equals(9))
>   expect_that(6, equals(9))
> })
> #+end_src
>
> #+results:
> #+begin_example
>  Error: Test failure in 'failures'
> * 6 not equal to 9
> Mean relative difference: 0.3333333
> * 6 not equal to 9
> Mean relative difference: 0.3333333
> * 6 not equal to 9
> Mean relative difference: 0.3333333
> * 6 not equal to 9
> Mean relative difference: 0.3333333
> * 6 not equal to 9
> Mean relative difference: 0.3333333
> #+end_example
> ----------------------
>
>
> When I put the point on the top headline and hit <tab>, it doesn't fold the
> complete section, it only folds up to the line "* 6 not equal to 9".  So
> something thinks that line is a header, even though it's within a
> "#+begin_example" section.

Hit C-c ' twice and you'll have commas inserted before the lines
starting with an asterisk.

See this footnote in the "Literal example" section of the manual:

,----
|    (4) Upon exit, lines starting with `*' or `#' will get a comma
| prepended, to keep them from being interpreted by Org as outline nodes
| or special comments.  These commas will be stripped for editing with
| `C-c '', and also for export.
`----

HTH,

-- 
 Bastien

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

* Re: Bug: Tabbing error with asterisks [7.8.03]
  2012-03-26 17:51 ` Bastien
@ 2012-03-27 21:59   ` Ken Williams
  2012-03-27 22:41     ` Bastien
  0 siblings, 1 reply; 4+ messages in thread
From: Ken Williams @ 2012-03-27 21:59 UTC (permalink / raw)
  To: emacs-orgmode

Bastien <bzg <at> gnu.org> writes:

> Hit C-c ' twice and you'll have commas inserted before the lines
> starting with an asterisk.
> 

That works as a workaround, as long as I remember to do it.  Is there a reason
not to automatically do this to the return value of doing "C-c C-c" on all
"#begin_src R" blocks?

Also, what if I need real commas in my literal stuff?  Any way to escape those?
 Just add one more comma, maybe?

 -Ken

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

* Re: Bug: Tabbing error with asterisks [7.8.03]
  2012-03-27 21:59   ` Ken Williams
@ 2012-03-27 22:41     ` Bastien
  0 siblings, 0 replies; 4+ messages in thread
From: Bastien @ 2012-03-27 22:41 UTC (permalink / raw)
  To: Ken Williams; +Cc: emacs-orgmode

Ken Williams <kenahoo@gmail.com> writes:

> Bastien <bzg <at> gnu.org> writes:
>
>> Hit C-c ' twice and you'll have commas inserted before the lines
>> starting with an asterisk.
>> 
>
> That works as a workaround, as long as I remember to do it.  Is there a reason
> not to automatically do this to the return value of doing "C-c C-c" on all
> "#begin_src R" blocks?

Not really.

But adding commas for the rare occasions where C-c C-c on a src block
will insert "*" at the beginning of lines will triggers questions from
users who don't read the manual (there are a few.)

Patch welcome.

> Also, what if I need real commas in my literal stuff?  Any way to
>  escape those?  Just add one more comma, maybe?

Let's handle this when we have a real use-case.

Best,

-- 
 Bastien

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

end of thread, other threads:[~2012-03-27 23:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-23 21:34 Bug: Tabbing error with asterisks [7.8.03] Ken Williams
2012-03-26 17:51 ` Bastien
2012-03-27 21:59   ` Ken Williams
2012-03-27 22:41     ` 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).