emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* C-c C-c in src block interpret line as table
@ 2018-10-26  6:45 Garreau, Alexandre
  2018-10-26  9:29 ` Eric S Fraga
  2018-10-26  9:34 ` Nicolas Goaziou
  0 siblings, 2 replies; 5+ messages in thread
From: Garreau, Alexandre @ 2018-10-26  6:45 UTC (permalink / raw)
  To: emacs-org list

I tried to eval the following block, and my point was on the last line,
of course, but since it begins with a “|”, it was interpreted as a
table, and block was not evaled: I believe this is a bug.  Why would a
org table be inside a non-org source block? it’s not even inside a
comment!

#+BEGIN_SRC ocaml :results verbatim
  let rec premiers = 
    function [] -> []
           | (a,b) :: q -> a :: premiers q ;; |
#+END_SRC

Note the remaining “|” at the end of the last line was added by org, not
me, not part of source code.

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

* Re: C-c C-c in src block interpret line as table
  2018-10-26  6:45 C-c C-c in src block interpret line as table Garreau, Alexandre
@ 2018-10-26  9:29 ` Eric S Fraga
  2018-10-26 10:02   ` Garreau, Alexandre
  2018-10-26  9:34 ` Nicolas Goaziou
  1 sibling, 1 reply; 5+ messages in thread
From: Eric S Fraga @ 2018-10-26  9:29 UTC (permalink / raw)
  To: Garreau, Alexandre; +Cc: emacs-org list

On Friday, 26 Oct 2018 at 08:45, Garreau, Alexandre wrote:
> I tried to eval the following block, and my point was on the last line,
> of course, but since it begins with a “|”, it was interpreted as a
> table, and block was not evaled: I believe this is a bug.  Why would a
> org table be inside a non-org source block? it’s not even inside a
> comment!
>
> #+BEGIN_SRC ocaml :results verbatim
>   let rec premiers = 
>     function [] -> []
>            | (a,b) :: q -> a :: premiers q ;; |
> #+END_SRC

This may be a bug but how were you editing this code?  From org mode or
by editing the src block using C-c ' (org-edit-special)?  Code blocks
should generally be edited using the special edit mode which knows about
the language.

-- 
Eric S Fraga via Emacs 27.0.50, Org release_9.1.11-620-ga548e4

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

* Re: C-c C-c in src block interpret line as table
  2018-10-26  6:45 C-c C-c in src block interpret line as table Garreau, Alexandre
  2018-10-26  9:29 ` Eric S Fraga
@ 2018-10-26  9:34 ` Nicolas Goaziou
  2018-10-26  9:58   ` Garreau, Alexandre
  1 sibling, 1 reply; 5+ messages in thread
From: Nicolas Goaziou @ 2018-10-26  9:34 UTC (permalink / raw)
  To: Garreau, Alexandre; +Cc: emacs-org list

Hello,

"Garreau, Alexandre" <galex-713@galex-713.eu> writes:

> I tried to eval the following block, and my point was on the last line,
> of course, but since it begins with a “|”, it was interpreted as a
> table, and block was not evaled: I believe this is a bug.  Why would a
> org table be inside a non-org source block? it’s not even inside a
> comment!
>
> #+BEGIN_SRC ocaml :results verbatim
>   let rec premiers = 
>     function [] -> []
>            | (a,b) :: q -> a :: premiers q ;; |
> #+END_SRC
>
> Note the remaining “|” at the end of the last line was added by org, not
> me, not part of source code.

I cannot reproduce it.

Regards,

-- 
Nicolas Goaziou

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

* Re: C-c C-c in src block interpret line as table
  2018-10-26  9:34 ` Nicolas Goaziou
@ 2018-10-26  9:58   ` Garreau, Alexandre
  0 siblings, 0 replies; 5+ messages in thread
From: Garreau, Alexandre @ 2018-10-26  9:58 UTC (permalink / raw)
  To: emacs-org list

On 2018/10/26 at 11:34, Nicolas Goaziou wrote:
> "Garreau, Alexandre" <galex-713@galex-713.eu> writes:
>
>> I tried to eval the following block, and my point was on the last line,
>> of course, but since it begins with a “|”, it was interpreted as a
>> table, and block was not evaled: I believe this is a bug.  Why would a
>> org table be inside a non-org source block? it’s not even inside a
>> comment!
>>
>> #+BEGIN_SRC ocaml :results verbatim
>>   let rec premiers = 
>>     function [] -> []
>>            | (a,b) :: q -> a :: premiers q ;; |
>> #+END_SRC
>>
>> Note the remaining “|” at the end of the last line was added by org, not
>> me, not part of source code.
>
> I cannot reproduce it.

Never mind! orgtbl-mode was activated in org-mode, since org-mode is
based on text-mode and I was wanting it for all text-mode-based modes.
It seems to, in fact, not to very be integrated with org-mode, otherwise
it should have behaved like normal org tables (that is, not inside
source blocks).

Sorry for wasted time ^^'

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

* Re: C-c C-c in src block interpret line as table
  2018-10-26  9:29 ` Eric S Fraga
@ 2018-10-26 10:02   ` Garreau, Alexandre
  0 siblings, 0 replies; 5+ messages in thread
From: Garreau, Alexandre @ 2018-10-26 10:02 UTC (permalink / raw)
  To: emacs-org list

On 2018/10/26 at 10:29, Eric S Fraga wrote:
> On Friday, 26 Oct 2018 at 08:45, Garreau, Alexandre wrote:
>> I tried to eval the following block, and my point was on the last line,
>> of course, but since it begins with a “|”, it was interpreted as a
>> table, and block was not evaled: I believe this is a bug.  Why would a
>> org table be inside a non-org source block? it’s not even inside a
>> comment!
>>
>> #+BEGIN_SRC ocaml :results verbatim
>>   let rec premiers = 
>>     function [] -> []
>>            | (a,b) :: q -> a :: premiers q ;; |
>> #+END_SRC
>
> This may be a bug but how were you editing this code?  From org mode or
> by editing the src block using C-c ' (org-edit-special)?  Code blocks
> should generally be edited using the special edit mode which knows about
> the language.

I was doing from org-mode: I find want to see rest of the buffer while
writing (that’s why I’m using org-mode instead of just writing in a
plain file), and to have to type that keystrokes, again and again.  And
anyway there’s org-src-tab-acts-natively for that (though it’s often
unperfect but I’m not complaining until I had the time to figure out
why).

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

end of thread, other threads:[~2018-10-26 10:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-26  6:45 C-c C-c in src block interpret line as table Garreau, Alexandre
2018-10-26  9:29 ` Eric S Fraga
2018-10-26 10:02   ` Garreau, Alexandre
2018-10-26  9:34 ` Nicolas Goaziou
2018-10-26  9:58   ` Garreau, Alexandre

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