all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Request to add support for escaping comments in org blocks
@ 2016-05-03 19:22 Kaushal Modi
  2016-05-03 23:23 ` Charles C. Berry
  0 siblings, 1 reply; 3+ messages in thread
From: Kaushal Modi @ 2016-05-03 19:22 UTC (permalink / raw)
  To: emacs-org list

[-- Attachment #1: Type: text/plain, Size: 1013 bytes --]

Hi,

I would like to add the Local Variables comment block to my org file (for
documentation purpose) without affecting the actual local variable values
in that buffer.

Here is a minimum working example:

#+BEGIN_SRC org
,#+STARTUP: align
,* COMMENT Local Variables
,# Local Variables:
,# fill-column: 90
,# End:
#+END_SRC

The problem with above is that the commas before the comments are seen in
the export too.

The ASCII export looks like this:

,----
| #+STARTUP: align
| * COMMENT Local Variables
| ,# Local Variables:
| ,# fill-column: 80
| ,# End:
`----

If I instead have

#+BEGIN_SRC org
,#+STARTUP: align
,* COMMENT Local Variables
# Local Variables:
# fill-column: 80
# End:
#+END_SRC

the export looks fine (below) .. but then that corrupts the local variables
in that buffer.

,----
| #+STARTUP: align
| * COMMENT Local Variables
| # Local Variables:
| # fill-column: 80
| # End:
`----

Can we please add support for comma escaped comments in source blocks?

Thanks.

Kaushal
-- 

-- 
Kaushal Modi

[-- Attachment #2: Type: text/html, Size: 1839 bytes --]

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

* Re: Request to add support for escaping comments in org blocks
  2016-05-03 19:22 Request to add support for escaping comments in org blocks Kaushal Modi
@ 2016-05-03 23:23 ` Charles C. Berry
  2016-05-04  3:44   ` Kaushal Modi
  0 siblings, 1 reply; 3+ messages in thread
From: Charles C. Berry @ 2016-05-03 23:23 UTC (permalink / raw)
  To: Kaushal Modi; +Cc: emacs-org list

On Tue, 3 May 2016, Kaushal Modi wrote:

> Hi,
>
> I would like to add the Local Variables comment block to my org file (for
> documentation purpose) without affecting the actual local variable values
> in that buffer.
>
> Here is a minimum working example:
>
> #+BEGIN_SRC org
> ,#+STARTUP: align
> ,* COMMENT Local Variables
> ,# Local Variables:
> ,# fill-column: 90
> ,# End:
> #+END_SRC


Try this:

#+BEGIN_SRC org :exports results :results replace :wrap example
,#+STARTUP: align
,* COMMENT Local Variables
,# Local Variables:
,# fill-column: 90
,# End:
#+END_SRC

and be sure to (require 'ob-org)

HTH,

Chuck

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

* Re: Request to add support for escaping comments in org blocks
  2016-05-03 23:23 ` Charles C. Berry
@ 2016-05-04  3:44   ` Kaushal Modi
  0 siblings, 0 replies; 3+ messages in thread
From: Kaushal Modi @ 2016-05-04  3:44 UTC (permalink / raw)
  To: Charles C. Berry; +Cc: emacs-org list

[-- Attachment #1: Type: text/plain, Size: 299 bytes --]

>
> Try this:
>
> #+BEGIN_SRC org :exports results :results replace :wrap example
> ,#+STARTUP: align
> ,* COMMENT Local Variables
> ,# Local Variables:
> ,# fill-column: 90
> ,# End:
> #+END_SRC
>
> and be sure to (require 'ob-org)
>
> HTH,
>

That definitely helped. Thanks!
-- 

-- 
Kaushal Modi

[-- Attachment #2: Type: text/html, Size: 578 bytes --]

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

end of thread, other threads:[~2016-05-04  3:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-03 19:22 Request to add support for escaping comments in org blocks Kaushal Modi
2016-05-03 23:23 ` Charles C. Berry
2016-05-04  3:44   ` Kaushal Modi

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.