* Is there some kind of verbatim environment for org?
@ 2008-10-09 11:08 Tassilo Horn
2008-10-09 13:33 ` Sebastian Rose
0 siblings, 1 reply; 13+ messages in thread
From: Tassilo Horn @ 2008-10-09 11:08 UTC (permalink / raw)
To: emacs-orgmode
Hi,
in an org file I want to insert some ascii art graphics. In the docs I
found the #+BEGIN_EXAMPLE construct, but that seems to take effect only
when exporting.
If I add my ascii graphic inside such a construct, I get a weired
font-locking [1], and TAB and M-q work as if it was normal text and
garble the graphic.
Is there a mechanism to insert some text verbatim which supresses any
indentation and font-locking (or uses some special face)?
My org version is 6.06b. That's the one that is in the current Emacs
CVS.
Bye and thanks for org!
Tassilo
__________
[1] http://www.tsdh.de/~heimdall/org.png
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Is there some kind of verbatim environment for org?
2008-10-09 11:08 Is there some kind of verbatim environment for org? Tassilo Horn
@ 2008-10-09 13:33 ` Sebastian Rose
2008-10-09 14:53 ` Tassilo Horn
0 siblings, 1 reply; 13+ messages in thread
From: Sebastian Rose @ 2008-10-09 13:33 UTC (permalink / raw)
To: emacs-orgmode Mailinglist
Hi Tassilo,
with a current version of Org-mode you may press
C-c '
to create such a region or edit an existing one. Not shure when this
feature made it into org. But 6.09 has this feature.
Hope that helps,
Sebastian
Tassilo Horn <tassilo@member.fsf.org> writes:
> Hi,
>
> in an org file I want to insert some ascii art graphics. In the docs I
> found the #+BEGIN_EXAMPLE construct, but that seems to take effect only
> when exporting.
>
> If I add my ascii graphic inside such a construct, I get a weired
> font-locking [1], and TAB and M-q work as if it was normal text and
> garble the graphic.
>
> Is there a mechanism to insert some text verbatim which supresses any
> indentation and font-locking (or uses some special face)?
>
> My org version is 6.06b. That's the one that is in the current Emacs
> CVS.
>
> Bye and thanks for org!
> Tassilo
> __________
> [1] http://www.tsdh.de/~heimdall/org.png
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
--
Sebastian Rose, EMMA STIL - mediendesign, Niemeyerstr.6, 30449 Hannover
Tel.: +49 (0)511 - 36 58 472
Fax: +49 (0)1805 - 233633 - 11044
mobil: +49 (0)173 - 83 93 417
Email: s.rose@emma-stil.de, sebastian_rose@gmx.de
Http: www.emma-stil.de
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Is there some kind of verbatim environment for org?
2008-10-09 13:33 ` Sebastian Rose
@ 2008-10-09 14:53 ` Tassilo Horn
2008-10-09 15:10 ` Eric Schulte
` (2 more replies)
0 siblings, 3 replies; 13+ messages in thread
From: Tassilo Horn @ 2008-10-09 14:53 UTC (permalink / raw)
To: emacs-orgmode
Sebastian Rose <sebastian_rose@gmx.de> writes:
Hi Sebastian,
> with a current version of Org-mode you may press C-c ' to create such
> a region or edit an existing one. Not shure when this feature made it
> into org. But 6.09 has this feature.
Here it is:
,----[ C-h k C-c ' ]
| C-c ' runs the command org-edit-special, which is an interactive compiled Lisp
| function in `org.el'.
|
| It is bound to C-c ', <menu-bar> <Org> <Editing> <Edit Source Example>,
| <menu-bar> <Tbl> <Calculate> <Edit Formulas>.
|
| (org-edit-special)
|
| Call a special editor for the stuff at point.
| When at a table, call the formula editor with `org-table-edit-formulas'.
| When at the first line of an src example, call `org-edit-src-code'.
| When in an #+include line, visit the include file. Otherwise call
| `ffap' to visit the file at point.
`----
I guess, that's what you mean. But at least in my version, that's no
too big improvement. Let's say I have this:
#+BEGIN_SRC artist
+-----+ (Abb. 23b)
ENABLE------------------| & |
+-----+ | |
| >=1 | +-----| |---RUN
| | | | |
X-----| |-----+ +-----+
Y-----| |
RUN---| |
+-----+
#+END_SRC
If I hit `C-c '' in that block, it'll open the graphic in artist mode.
That's great, but still the graphic is font-locked like in the
screenshot of my previous posting, because org thinks it's a table.
And TAB in the first line moves point one line up and messages "Should
not happen...". On other positions in the block, it indents like in
text-mode, and on even other positions it acts like in org tables (Jump
to the next "cell").
While I can live with TAB freaking out (Hey, `C-c '' switches to artist
mode. Yay!), the broken font-locking is disturbing me. Is it possible
to fontify everything in #+BEGIN...#+END blocks with some special face
which takes precedence over the usual org font-locking?
Bye,
Tassilo
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Re: Is there some kind of verbatim environment for org?
2008-10-09 14:53 ` Tassilo Horn
@ 2008-10-09 15:10 ` Eric Schulte
2008-10-09 15:41 ` Tassilo Horn
2008-10-09 15:51 ` Sebastian Rose
2008-10-09 16:35 ` Carsten Dominik
2 siblings, 1 reply; 13+ messages in thread
From: Eric Schulte @ 2008-10-09 15:10 UTC (permalink / raw)
To: Tassilo Horn; +Cc: emacs-orgmode
Tassilo Horn <tassilo@member.fsf.org> writes:
> While I can live with TAB freaking out (Hey, `C-c '' switches to artist
> mode. Yay!), the broken font-locking is disturbing me. Is it possible
> to fontify everything in #+BEGIN...#+END blocks with some special face
> which takes precedence over the usual org font-locking?
>
Are you aware of the other option for verbatim escapes? (every line
starts with a ":") I does do a minor font locking, and (I believe)
should fix your tab woes. Also, you can use C-c' in this area, and it
will take you to special edit buffer.
: +-----+ (Abb. 23b)
: ENABLE------------------| & |
: +-----+ | |
: | >=1 | +-----| |---RUN
: | | | | |
: X-----| |-----+ +-----+
: Y-----| |
: RUN---| |
: +-----+
Best -- Eric
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Re: Is there some kind of verbatim environment for org?
2008-10-09 15:10 ` Eric Schulte
@ 2008-10-09 15:41 ` Tassilo Horn
2008-10-09 16:21 ` Eric Schulte
0 siblings, 1 reply; 13+ messages in thread
From: Tassilo Horn @ 2008-10-09 15:41 UTC (permalink / raw)
To: Eric Schulte; +Cc: emacs-orgmode
"Eric Schulte" <schulte.eric@gmail.com> writes:
Hi Eric,
>> While I can live with TAB freaking out (Hey, `C-c '' switches to
>> artist mode. Yay!), the broken font-locking is disturbing me. Is it
>> possible to fontify everything in #+BEGIN...#+END blocks with some
>> special face which takes precedence over the usual org font-locking?
>
> Are you aware of the other option for verbatim escapes? (every line
> starts with a ":")
No, thanks for mentioning that.
> I does do a minor font locking,
Nice. That's `org-code' face. So why not use that face for things in
#+BEGIN...#+END blocks, too?
> and (I believe) should fix your tab woes.
No, but that's no problem if `C-c '' does the right thing.
> Also, you can use C-c' in this area, and it will take you to special
> edit buffer.
Here, it prompts me for a file. That's because `org-edit-special' calls
`ffap' if it doesn't know what to do. Is that different in your
version?
Anyway, I thinks the #+BEGIN_SRC constructs are better, because then the
correct mode is switched on automatically.
> : +-----+ (Abb. 23b)
> : ENABLE------------------| & |
> : +-----+ | |
> : | >=1 | +-----| |---RUN
> : | | | | |
> : X-----| |-----+ +-----+
> : Y-----| |
> : RUN---| |
> : +-----+
So in summary I think I would be completely happy if #+BEGIN_SRC
constructs (or maybe all #+BEGIN_FOO constructs) would fontify their
contents with the `org-code' face.
Bye,
Tassilo
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Re: Is there some kind of verbatim environment for org?
2008-10-09 14:53 ` Tassilo Horn
2008-10-09 15:10 ` Eric Schulte
@ 2008-10-09 15:51 ` Sebastian Rose
2008-10-09 16:35 ` Carsten Dominik
2 siblings, 0 replies; 13+ messages in thread
From: Sebastian Rose @ 2008-10-09 15:51 UTC (permalink / raw)
To: emacs-orgmode Mailinglist
Hi Tassilo,
is this true for regions created using C-c ' ???
There is no #+BEGIN_SRC then and it works perfectly fine here.
Just create the region using C-c '
artist-mode is on automatically in the indirect buffer for editing the
region.
Regards,
Sebastian
Tassilo Horn <tassilo@member.fsf.org> writes:
> Sebastian Rose <sebastian_rose@gmx.de> writes:
>
> Hi Sebastian,
>
>> with a current version of Org-mode you may press C-c ' to create such
>> a region or edit an existing one. Not shure when this feature made it
>> into org. But 6.09 has this feature.
>
> Here it is:
>
> ,----[ C-h k C-c ' ]
> | C-c ' runs the command org-edit-special, which is an interactive compiled Lisp
> | function in `org.el'.
> |
> | It is bound to C-c ', <menu-bar> <Org> <Editing> <Edit Source Example>,
> | <menu-bar> <Tbl> <Calculate> <Edit Formulas>.
> |
> | (org-edit-special)
> |
> | Call a special editor for the stuff at point.
> | When at a table, call the formula editor with `org-table-edit-formulas'.
> | When at the first line of an src example, call `org-edit-src-code'.
> | When in an #+include line, visit the include file. Otherwise call
> | `ffap' to visit the file at point.
> `----
>
> I guess, that's what you mean. But at least in my version, that's no
> too big improvement. Let's say I have this:
>
> #+BEGIN_SRC artist
> +-----+ (Abb. 23b)
> ENABLE------------------| & |
> +-----+ | |
> | >=1 | +-----| |---RUN
> | | | | |
> X-----| |-----+ +-----+
> Y-----| |
> RUN---| |
> +-----+
> #+END_SRC
>
> If I hit `C-c '' in that block, it'll open the graphic in artist mode.
> That's great, but still the graphic is font-locked like in the
> screenshot of my previous posting, because org thinks it's a table.
>
> And TAB in the first line moves point one line up and messages "Should
> not happen...". On other positions in the block, it indents like in
> text-mode, and on even other positions it acts like in org tables (Jump
> to the next "cell").
>
> While I can live with TAB freaking out (Hey, `C-c '' switches to artist
> mode. Yay!), the broken font-locking is disturbing me. Is it possible
> to fontify everything in #+BEGIN...#+END blocks with some special face
> which takes precedence over the usual org font-locking?
>
> Bye,
> Tassilo
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
--
Sebastian Rose, EMMA STIL - mediendesign, Niemeyerstr.6, 30449 Hannover
Tel.: +49 (0)511 - 36 58 472
Fax: +49 (0)1805 - 233633 - 11044
mobil: +49 (0)173 - 83 93 417
Email: s.rose@emma-stil.de, sebastian_rose@gmx.de
Http: www.emma-stil.de
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Re: Is there some kind of verbatim environment for org?
2008-10-09 15:41 ` Tassilo Horn
@ 2008-10-09 16:21 ` Eric Schulte
2008-10-09 19:22 ` Tassilo Horn
0 siblings, 1 reply; 13+ messages in thread
From: Eric Schulte @ 2008-10-09 16:21 UTC (permalink / raw)
To: Tassilo Horn; +Cc: emacs-orgmode
Tassilo Horn <tassilo@member.fsf.org> writes:
>> Also, you can use C-c' in this area, and it will take you to special
>> edit buffer.
>
> Here, it prompts me for a file. That's because `org-edit-special' calls
> `ffap' if it doesn't know what to do. Is that different in your
> version?
>
Yes, for me C-c' calls `org-edit-special', which ends up calling
`org-edit-fixed-width-region' which then opens an *Org Edit Picture*
buffer editing the graph in artist mode. I'm using the current version
of org from git.
Thanks -- Eric
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Re: Is there some kind of verbatim environment for org?
2008-10-09 14:53 ` Tassilo Horn
2008-10-09 15:10 ` Eric Schulte
2008-10-09 15:51 ` Sebastian Rose
@ 2008-10-09 16:35 ` Carsten Dominik
2008-10-09 19:19 ` Tassilo Horn
2 siblings, 1 reply; 13+ messages in thread
From: Carsten Dominik @ 2008-10-09 16:35 UTC (permalink / raw)
To: Tassilo Horn; +Cc: emacs-orgmode
On Oct 9, 2008, at 4:53 PM, Tassilo Horn wrote:
> I guess, that's what you mean. But at least in my version, that's no
> too big improvement. Let's say I have this:
>
> #+BEGIN_SRC artist
artist-mode is a minor mode, the BEGIN_SRC construct is meant for
major modes.
The right solution for drawings like this is, as many people pointed
out, a section of lines starting with ":".
- Carsten
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Re: Is there some kind of verbatim environment for org?
2008-10-09 16:35 ` Carsten Dominik
@ 2008-10-09 19:19 ` Tassilo Horn
0 siblings, 0 replies; 13+ messages in thread
From: Tassilo Horn @ 2008-10-09 19:19 UTC (permalink / raw)
To: Carsten Dominik; +Cc: emacs-orgmode
Carsten Dominik <dominik@uva.nl> writes:
Hi Carsten,
> On Oct 9, 2008, at 4:53 PM, Tassilo Horn wrote:
>> I guess, that's what you mean. But at least in my version, that's no
>> too big improvement. Let's say I have this:
>>
>> #+BEGIN_SRC artist
>
> artist-mode is a minor mode, the BEGIN_SRC construct is meant for
> major modes.
Ah, right. Artist-mode is indeed a minor mode, but as soon as you
toggle it on, the current major mode will be switched to picture-mode as
well. So "#+BEGIN_SRC artist" enables picture-mode with artist-mode as
minor mode, which works just beautiful.
> The right solution for drawings like this is, as many people pointed
> out, a section of lines starting with ":".
I still get some font-locking weirdnesses. Here's an example:
: +-----+ (Abb. 23a)
: ENABLE------------------| & |
: +-----+ | |
: | >=1 | +-----| |---RUN-+
: | | | | | |
: X-----| |-----+ +-----+ |
: Y-----| | |
: +---| | |
: | +-----+ |
: | |
: +-----------------------------------+
The empty char (the linebreak char) behind the last | in line 8 is
striked through, and everything in line 9 up to the second + is striked
through. The last line has the same problem.
I can reproduce that with:
1. Put the graphic into foo.org as posted above
2. emacs -Q
3. C-x C-f foo.org
Bye,
Tassilo
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Re: Is there some kind of verbatim environment for org?
2008-10-09 16:21 ` Eric Schulte
@ 2008-10-09 19:22 ` Tassilo Horn
2008-10-09 20:08 ` Eric Schulte
0 siblings, 1 reply; 13+ messages in thread
From: Tassilo Horn @ 2008-10-09 19:22 UTC (permalink / raw)
To: Eric Schulte; +Cc: emacs-orgmode
"Eric Schulte" <schulte.eric@gmail.com> writes:
Hi Eric,
>> Here, it prompts me for a file. That's because `org-edit-special'
>> calls `ffap' if it doesn't know what to do. Is that different in
>> your version?
>>
>
> Yes, for me C-c' calls `org-edit-special', which ends up calling
> `org-edit-fixed-width-region' which then opens an *Org Edit Picture*
> buffer editing the graph in artist mode. I'm using the current
> version of org from git.
Ah, thanks. Then I need to update to the git version, or will that be
synched to emacs trunk anytime soon?
Could you please check if you get the same font-lock gibberish as I do
with the graphic and reproduction recipe I posted as reply to Carsten a
minute ago?
Bye,
Tassilo
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Re: Is there some kind of verbatim environment for org?
2008-10-09 19:22 ` Tassilo Horn
@ 2008-10-09 20:08 ` Eric Schulte
2008-10-09 22:15 ` Sebastian Rose
2008-10-10 6:57 ` Tassilo Horn
0 siblings, 2 replies; 13+ messages in thread
From: Eric Schulte @ 2008-10-09 20:08 UTC (permalink / raw)
To: Tassilo Horn; +Cc: emacs-orgmode
Tassilo Horn <tassilo@member.fsf.org> writes:
> Ah, thanks. Then I need to update to the git version, or will that be
> synched to emacs trunk anytime soon?
>
I don't know how often it syncs with emacs trunk. My guess is that it's
not very frequently.
>
> Could you please check if you get the same font-lock gibberish as I do
> with the graphic and reproduction recipe I posted as reply to Carsten a
> minute ago?
>
I pasted the following into an org file, put the cursor in the middle
and hit C-c' and it worked perfectly for me. I assume that this is
because of our differences in org versions...
: +-----+ (Abb. 23a)
: ENABLE------------------| & |
: +-----+ | |
: | >=1 | +-----| |---RUN-+
: | | | | | |
: X-----| |-----+ +-----+ |
: Y-----| | |
: +---| | |
: | +-----+ |
: | |
: +-----------------------------------+
Best -- Eric
>
> Bye,
> Tassilo
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Re: Is there some kind of verbatim environment for org?
2008-10-09 20:08 ` Eric Schulte
@ 2008-10-09 22:15 ` Sebastian Rose
2008-10-10 6:57 ` Tassilo Horn
1 sibling, 0 replies; 13+ messages in thread
From: Sebastian Rose @ 2008-10-09 22:15 UTC (permalink / raw)
To: emacs-orgmode
Eric Schulte wrote:
> I pasted the following into an org file, put the cursor in the middle
> and hit C-c' and it worked perfectly for me. I assume that this is
> because of our differences in org versions...
Same here. Works perfect. I also tried 'emacs -Q' and it works. No font
wierdness.
> : +-----+ (Abb. 23a)
> : ENABLE------------------| & |
> : +-----+ | |
> : | >=1 | +-----| |---RUN-+
> : | | | | | |
> : X-----| |-----+ +-----+ |
> : Y-----| | |
> : +---| | |
> : | +-----+ |
> : | |
> : +-----------------------------------+
>
> Best -- Eric
>
>> Bye,
>> Tassilo
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Re: Is there some kind of verbatim environment for org?
2008-10-09 20:08 ` Eric Schulte
2008-10-09 22:15 ` Sebastian Rose
@ 2008-10-10 6:57 ` Tassilo Horn
1 sibling, 0 replies; 13+ messages in thread
From: Tassilo Horn @ 2008-10-10 6:57 UTC (permalink / raw)
To: Eric Schulte; +Cc: emacs-orgmode
"Eric Schulte" <schulte.eric@gmail.com> writes:
Hi Eric,
>> Could you please check if you get the same font-lock gibberish as I
>> do with the graphic and reproduction recipe I posted as reply to
>> Carsten a minute ago?
>>
>
> I pasted the following into an org file, put the cursor in the middle
> and hit C-c' and it worked perfectly for me. I assume that this is
> because of our differences in org versions...
Ok, then I'll get org from git.
Thank a lot for testing that for me.
Bye,
Tassilo
--
Richard Stallman spends his leasure time playing Duke Nukem Forever on
GNU Hurd.
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2008-10-10 6:57 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-09 11:08 Is there some kind of verbatim environment for org? Tassilo Horn
2008-10-09 13:33 ` Sebastian Rose
2008-10-09 14:53 ` Tassilo Horn
2008-10-09 15:10 ` Eric Schulte
2008-10-09 15:41 ` Tassilo Horn
2008-10-09 16:21 ` Eric Schulte
2008-10-09 19:22 ` Tassilo Horn
2008-10-09 20:08 ` Eric Schulte
2008-10-09 22:15 ` Sebastian Rose
2008-10-10 6:57 ` Tassilo Horn
2008-10-09 15:51 ` Sebastian Rose
2008-10-09 16:35 ` Carsten Dominik
2008-10-09 19:19 ` Tassilo Horn
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).