Item descriptions get surrounded by wrong curly braces in LaTeX export

2020-02-17 Thread Joon Ro
Hi,

I noticed that in LaTeX export, descriptions in description lists are 
surrounded by {} instead of [] in LaTeX export, making them not correctly 
rendered.
For example, the following

- Description :: Item
- Description :: Item

gets exported as

\begin{description}
\item{Description} Item
\item{Description} Item
\end{description}

instead of

\begin{description}
\item[Description] Item
\item[Description] Item
\end{description}

and thus they are not correctly rendered in the PDF output.

I'm currently using Org mode version 9.3.6 (9.3.6-4-gdfa7a3-elpaplus @ 
c:/Users/joon/.emacs.d/elpa/org-plus-contrib-20200217/)





[O] Make org-agenda-switch-to to show all parent headings

2019-10-13 Thread Joon Ro
Hi,

When I right click on an agenda item to invoke org-agenda-switch-to, it shows 
only the specific heading for the item and its top-level heading, and 
in-between headings are not shown. Is there a way to change this behavior so it 
shows all parent headings of the item? Currently I often am confused which 
parent the right-clicked item belongs to. Please see below for a minimal 
example:


Current behavior:

* Top Heading
*** TODO Heading for the right-clicked item in the agenda


Desired behavior:

* Top Heading
** Second heading
*** TODO Heading for the right-clicked item in the agenda

Best Regards,
Joon



[O] Org mode 9.2 breaks org-edit-special on INCLUDE statement with :only-contents t

2019-02-06 Thread Joon Ro
Hi,

After upgrading to org 9.2, I found that C-c ' (org-edit-special) does not work 
on an INCLUDE statement if it has :only-contents t.

That is, I can normally visit the subtree with CUSTOM_ID theory in paper.org if 
I press C-c ' on the following:

#+INCLUDE: "./paper.org::#theory"

but pressing C-c ' on the following gives me this error: "org-open-file: No 
match for custom ID: theory" :only-contents t"

#+INCLUDE: "./paper.org::#theory" :only-contents t

Looks like parsing the statement was not working -- it seems it is capturing 
stuff after ".

Best Regards,
Joon


[O] org-babel-execute-src-block on +#CALL statement?

2019-01-12 Thread Joon Ro
Hi,

Eventually I would like to batch-run a src block in a command line. While 
investigating it, I found that org-babel-execute-src-block throws "Wrong type 
argument: consp, nil" error when I run it over a #+CALL statement. For example, 
I can run the test src block below but it fails when the cursor is on the 
#+CALL block.

#+NAME: test
#+BEGIN_SRC emacs-lisp
(message "Success")
#+END_SRC

#+RESULTS: test
: Success

#+CALL: test()


I was wondering if this is a bug, and if there is any way I can run #+CALL 
statement (preferably in the batch mode)?

Best,
Joon




Re: [O] org-open-link-from-string truncates file path at spaces

2018-04-29 Thread Joon Ro
Hi -

> Nicolas Goaziou  writes:

> The initial report is wrong anyway, because "file:test test.hmtl" is not
> a valid link syntax, i.e., plain links cannot contain spaces. It should
> be:
>
> (org-open-link-from-string "[[file:test test.hmtl]]")
>
> IMO, there is nothing to fix in the first place.

Thanks - (org-open-link-from-string "[[file:test test.html]]") works perfectly.

Best,
Joon



[O] Visit the include file at point (C-c ') stopped working with user-error: No link found

2018-04-27 Thread Joon Ro
Hi -

With Org mode version 9.1.12 (9.1.12-elpaplus @ 
~/.emacs.d/elpa/org-plus-contrib-20180427/), whenever I do C-c ' on a 
#+INCLUDE: , I get user-error: No link found error. I thought at first the 
include was broken, but when I export the file it correctly works, so the 
visiting part is the problem it seems.

Best Regards,
Joon




[O] org-open-link-from-string truncates file path at spaces

2018-01-01 Thread Joon Ro
Hi,

With current org version (Org mode version 9.1.8 (9.1.8-elpaplus @ 
c:/Users/joon/.emacs.d/elpa/org-plus-contrib-20171228/)), 
org-open-link-from-string does not work with a path string if it includes a 
space. For example,

(org-open-link-from-string "file:test test.hmtl")

yields

user-error: No such file: c:/Users/joon/test

Best Regards,
Joon


[O] The error "Opening input file: No such file or directory" should show the source org file

2017-10-13 Thread Joon Ro
Hi,

I often see the error message: "Opening input file: No such file or directory" 
for one of the org files that has wrong file path for a #+SETUPFILE. It usually 
happens when I change the path of the setup file which is used by multiple org 
files.

However, currently it is hard to locate the file where the error is originated 
from. I think it would be great if the error message shows the location of the 
file as well.

Best Regards,
Joon



Re: [O] Export subtrees of level n

2017-09-03 Thread Joon Ro
> 2.  Write a function to look up the tree from point and export the first
> subtree with a certain property.
I thought about implementing the second approach. I have slides for
several talks in the same org file. Since I mostly need this
functionality when I'm developing slides, just going up from point until
reaching the desired heading is easy to implement.

If you can implement this, that would be great as I find myself doing this all 
the time as well. Currently what I do is make sure to export the right subtree 
first, and then start using "\C-u\C-c\C-e". I bind f5 to "\C-u\C-c\C-e" with 
the following in my init file:

(fset 'export-last-subtree
  "\C-u\C-c\C-e")

(eval-after-load "org"
  '(progn
 (define-key org-mode-map (kbd "") 'export-last-subtree)))







Re: [O] Questions about using macro replacement

2017-08-26 Thread Joon Ro
Answering without full knowledge!

Thank you so much for the reply - your reply gave me several ideas. I think Q1 
and Q3 are solved, but I still have no idea how to do Q2 or if it is possible.


Q1, I figured it out and started using it - the {{{n}}} macros are awesome!

2. I was wondering if it is possible use macro expansion for :EXPORT_FILE_NAME: 
property of a subtree?
Since macros can be set to expand to arbitrary elisp, I would think this 
*should* be possible.  I forget the syntax but something like:

#+MACRO: efn (eval (get-export-file-name))

#+BEGIN_SRC emacs-lisp
(defun get-export-file-name ()
 (org-element-property :export-file-name (org-element--current-element) ))
#+END_SRC

* some heading
:PROPERTIES
:EXPORT_FILE_NAME: test-me
:END:

will get you somewhat close.  I don't understand the org-element api very well 
though and it generally takes me a few tries to get this sort of thing right.


With this one, I was actually looking for using macros inside 
:EXPORT_FILE_NAME: property. Ultimately what I want to do is:

* some heading
:PROPERTIES:
:EXPORT_FILE_NAME: {{{n('class',1)}}} test-me
:END:

However, it did not work, as the file name became literal {{{n('class',1)}}} 
test-me.pdf.



3. Is it possible to create a file link which uses macro? I would like to 
create a link to the exported pdf file dynamically. For example, if the value 
of :EXPORT_FILE_NAME: is exported, how would I create a link which 
automatically link to exported.pdf?

I don't think a macro will do this for you since, if I understand correctly, 
macros are not aware of the export target.  So probably you would need some 
other mechanism to od this.

I figured it out using elisp link:

elisp:(org-open-link-from-string (concat "file:./" (org-entry-get nil 
"EXPORT_FILE_NAME") ".pdf"))

Best Regards,
Joon


[O] Questions about using macro replacement

2017-08-23 Thread Joon Ro
Hi,

I have several questions about macro replacement usage.

1. I saw people using {{{n}}} macros, which looks very useful, but I could not 
find it in current documentation about macro replacement 
(http://orgmode.org/manual/Macro-replacement.html). Is this only available in 
developmental version?

2. I was wondering if it is possible use macro expansion for :EXPORT_FILE_NAME: 
property of a subtree?

3. Is it possible to create a file link which uses macro? I would like to 
create a link to the exported pdf file dynamically. For example, if the value 
of :EXPORT_FILE_NAME: is exported, how would I create a link which 
automatically link to exported.pdf?

Any help would be greatly appreciated. Thank you!
Joon



Re: [O] Adding #+LATEX: \newpage before section header using org-export-before-parsing-hook

2017-02-11 Thread Joon Ro
I spoke too early - if I have two headings with :newpage: tag in a row, my 
current code below skips the second heading.

It seems (setq org-map-continue-from (outline-next-heading)) in my code is the 
problem .. any help will be appreciated!



(defun org/parse-headings-newpage (backend)
  ; add \newpage to headings with :newpage: tag
  (if (member backend '(latex))
  (org-map-entries
   (lambda ()
 (insert-string "#+LATEX: \\newpage\n")
 (if (outline-next-heading)
   (setq org-map-continue-from (outline-next-heading)))
 )
   "+newpage"))
)

(add-hook 'org-export-before-parsing-hook 'org/parse-headings-newpage)




From: Emacs-orgmode <emacs-orgmode-bounces+joon.ro=outlook@gnu.org> on 
behalf of Joon Ro <joon...@outlook.com>
Sent: Wednesday, February 8, 2017 8:58:40 PM
To: Nick Dokos; emacs-orgmode@gnu.org
Subject: Re: [O] Adding #+LATEX: \newpage before section header using 
org-export-before-parsing-hook


> So you'll have to manipulate org-map-continue-from appropriately.

Thanks a lot! Adding (setq org-map-continue-from (outline-next-heading)) after 
insert-string seemed to solve the problem.
(I added "newpage" to org-tags-exclude-from-inheritance, so the newpage does 
not get applied to subheadings)

(defun org/parse-headings-latex-newpage (backend)
  ; add \newpage to headings with :newpage: tag
  (if (member backend '(latex))
  (org-map-entries
   (lambda ()
 (progn
   (insert-string "#+LATEX: \\newpage\n")
   (setq org-map-continue-from (outline-next-heading))
   ))
   "+newpage"))
)

(add-hook 'org-export-before-parsing-hook 'org/parse-headings-latex-newpage)
(add-to-list 'org-tags-exclude-from-inheritance '"newpage")

Best,
Joon


Re: [O] Adding #+LATEX: \newpage before section header using org-export-before-parsing-hook

2017-02-08 Thread Joon Ro
> So you'll have to manipulate org-map-continue-from appropriately.

Thanks a lot! Adding (setq org-map-continue-from (outline-next-heading)) after 
insert-string seemed to solve the problem.
(I added "newpage" to org-tags-exclude-from-inheritance, so the newpage does 
not get applied to subheadings)

(defun org/parse-headings-latex-newpage (backend)
  ; add \newpage to headings with :newpage: tag
  (if (member backend '(latex))
  (org-map-entries
   (lambda ()
 (progn
   (insert-string "#+LATEX: \\newpage\n")
   (setq org-map-continue-from (outline-next-heading))
   ))
   "+newpage"))
)

(add-hook 'org-export-before-parsing-hook 'org/parse-headings-latex-newpage)
(add-to-list 'org-tags-exclude-from-inheritance '"newpage")

Best,
Joon


Re: [O] Adding #+LATEX: \newpage before section header using org-export-before-parsing-hook

2017-02-08 Thread Joon Ro
So far I have done:


(defun org/parse-headings (backend)
  (if (member backend '(latex))
  (org-map-entries
   (lambda ()
 (progn
   (insert-string "#+LATEX: \\newpage")
   ))
   "+newpage")
)
)

(add-hook 'org-export-before-parsing-hook 'org/parse-headings)

This puts #+LATEX: \\newpage before the subheading, but the problem is if I try 
to do (insert-string "#+LATEX: \\newpage"), exporting gets stuck with the 
message "org-babel-exp process txt at position 280541...". I suspect inserting 
a string messes up the position. How would I insert string with the newline 
character before a heading?

Best,
Joon




From: Thomas S. Dye <t...@tsdye.com>
Sent: Wednesday, February 8, 2017 2:48:47 PM
To: Joon Ro
Cc: emacs-orgmode@gnu.org
Subject: Re: [O] Adding #+LATEX: \newpage before section header using 
org-export-before-parsing-hook

Aloha Joon,

Joon Ro writes:

> Hi,
>
>
> In latex export, sometimes I want to make sure a section starts in a new page.
>
> It seems I should be able to add a hook to org-export-before-parsing-hook, so 
> if it sees a section with :newpage: tag (for example), it adds #+LATEX: 
> \newpage before the section header so I would get
>
>
> \newpage
>
> \section{Section Name}
>
> in the exported file.
>
> I have a couple of hooks already so in general I'm using the following code:
>
>   (org-map-entries
>(lambda ()
>  (progn
>
>))
>"+newpage")
>
> but I'm not sure how to add #+LATEX: \newpage before the section header - .
>
> Best Regards,
> Joon

I use this:

 Ignore headline and/or start newpage on export

#+name: ignoreheading-and-or-newpage-on-export
#+BEGIN_SRC emacs-lisp :results silent
  (defun tsd-ignore-headline-and-or-newpage (contents backend info)
"Ignore headlines with tag `ignoreheading' and/or start
  headline on LaTeX new page with tag `newpage'."
(cond ((and (org-export-derived-backend-p backend 'latex 'beamer)
(string-match "\\`.*newpage.*\n" (downcase contents))
(string-match "\\`.*ignoreheading.*\n" (downcase contents)))
   (replace-match "newpage" nil nil contents))
  ((and (org-export-derived-backend-p backend 'latex 'html 'ascii 
'beamer)
(string-match "\\`.*ignoreheading.*\n" (downcase contents)))
   (replace-match "" nil nil contents))
  ((and (org-export-derived-backend-p backend 'latex)
  (string-match "\\(\\`.*\\)newpage\\(.*\n\\)" (downcase 
contents)))
   (replace-match "newpage\\1\\2"  nil nil contents
  ;; add function to filter list
  ;; (add-to-list 'org-export-filter-headline-functions
  ;;  'tsd-ignore-headline-and-or-newpage)
#+END_SRC

hth,
Tom


--
Thomas S. Dye
http://www.tsdye.com


Re: [O] Adding #+LATEX: \newpage before section header using org-export-before-parsing-hook

2017-02-08 Thread Joon Ro
Hi,


(I'm sorry for a duplicated email - it was sent my a mistake)


In latex export, sometimes I want to make sure a section starts in a new page.

It seems I should be able to add a hook to org-export-before-parsing-hook, so 
if it sees a section with :newpage: tag (for example), it adds #+LATEX: 
\newpage before the section header so I would get


\newpage

\section{Section Name}

in the exported file.

I have a couple of hooks already so in general I'm using the following code:

  (org-map-entries
   (lambda ()
 (progn

   ))
   "+newpage")

but I'm not sure how to add #+LATEX: \newpage before the section header - any 
help would be greatly appreciated.

Best,
Joon



____
From: Joon Ro <joon...@outlook.com>
Sent: Wednesday, February 8, 2017 1:52:42 PM
To: emacs-orgmode@gnu.org
Subject: Adding #+LATEX: \newpage before section header using 
org-export-before-parsing-hook


Hi,


In latex export, sometimes I want to make sure a section starts in a new page.

It seems I should be able to add a hook to org-export-before-parsing-hook, so 
if it sees a section with :newpage: tag (for example), it adds #+LATEX: 
\newpage before the section header so I would get


\newpage

\section{Section Name}

in the exported file.

I have a couple of hooks already so in general I'm using the following code:

  (org-map-entries
   (lambda ()
 (progn

   ))
   "+newpage")

but I'm not sure how to add #+LATEX: \newpage before the section header - .

Best Regards,
Joon




[O] Adding #+LATEX: \newpage before section header using org-export-before-parsing-hook

2017-02-08 Thread Joon Ro
Hi,


In latex export, sometimes I want to make sure a section starts in a new page.

It seems I should be able to add a hook to org-export-before-parsing-hook, so 
if it sees a section with :newpage: tag (for example), it adds #+LATEX: 
\newpage before the section header so I would get


\newpage

\section{Section Name}

in the exported file.

I have a couple of hooks already so in general I'm using the following code:

  (org-map-entries
   (lambda ()
 (progn

   ))
   "+newpage")

but I'm not sure how to add #+LATEX: \newpage before the section header - .

Best Regards,
Joon




Re: [O] Release 9.0.4

2017-01-25 Thread Joon Ro

> Will this get syncd to the emacs repo ?

> The emacs master branch still has org 8.2.10.


You might want to add the org repo if you want to get the latest version of 
org. I have the following in my init.el file (org in addition to melpa):


(when (>= emacs-major-version 24)
  (require 'package)
  (package-initialize)
  (add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/;) t)
  (add-to-list 'package-archives '("org" . "http://orgmode.org/elpa/;) t)
  )








Re: [O] format-time-string for a time range

2017-01-11 Thread Joon Ro
I'm sorry I misspoke. With ("<%b %d (%a)>" . "<%b %d (%a) %I:%M%p>"), it 
correctly exports [2016-05-10 Tue 13:00-16:00] into May 10 (Tue) 01:00PM–May 10 
(Tue) 04:00PM.


However, is there any way to skip the second (the same) date and get May 10 
(Tue) 01:00PM–04:00PM instead?


Best,

Joon


From: Emacs-orgmode <emacs-orgmode-bounces+joon.ro=outlook@gnu.org> on 
behalf of Joon Ro <joon...@outlook.com>
Sent: Wednesday, January 11, 2017 4:43:28 PM
To: emacs-orgmode@gnu.org
Subject: [O] format-time-string for a time range


Hi,


I'm trying to specify org-time-stamp-custom-formats for a time range. For 
example,


[2016-05-10 Tue 13:00-16:00]


Is there any way to specify this? Currently I'm using ("<%b %d (%a)>" . "<%b %d 
(%a) %I:%M%p>"), which results in May 10 (Tue) 01:00PM.


I have not been able to find symbols for the end time for the range (in this 
example, 16:00).


Thank you,

Joon



[O] format-time-string for a time range

2017-01-11 Thread Joon Ro
Hi,


I'm trying to specify org-time-stamp-custom-formats for a time range. For 
example,


[2016-05-10 Tue 13:00-16:00]


Is there any way to specify this? Currently I'm using ("<%b %d (%a)>" . "<%b %d 
(%a) %I:%M%p>"), which results in May 10 (Tue) 01:00PM.


I have not been able to find symbols for the end time for the range (in this 
example, 16:00).


Thank you,

Joon



Re: [O] publishing subtrees

2017-01-09 Thread Joon Ro
> thank you, Joon, that is extremely helpful.  Do you have a publishing setup in
> which you use this function? It looks like it would have to be rewritten
> somewhat to accept the parameters (plist filename pub-dir); I am either too
> tired or twoo stupid (or both! ) figure it out quickly, so if you have it done
> already I would be very grateful to see it.


Unfortunately I don't have publishing setup. I usually export one subtree at a 
time manually and create a separate file, as I tend to tweak each class' 
contents before actual lecture day.


Best,

Joon



Re: [O] publishing subtrees

2017-01-08 Thread Joon Ro
> In my course repositories, I have all my lecture notes in one file, and all 
> my assignments in another.  So they have the form

>
> * Lecture 1
> ** Slide 1
> ** Slide 2
> * Lecture 2 ...
>
> * Assignment 1
> ** Description
> ** Rubric
> * Assignment 2...
>
> I'd like to have publishing functions that, say, export all first-level 
> headings to html with ox-reveal, and uploads those to a location on the web. 
> Or, alternatively, export them all to org in a remote location ,where they 
> can be viewed on github or using jeyll or something.
>
> Is anyone doing something like this already? Is it possible using hte 
> built-in publishing functions?

I do pretty much the same thing for my course contents. I think the following 
is relevant to what you want:

http://emacs.stackexchange.com/questions/2259/how-to-export-top-level-headings-of-org-mode-buffer-to-separate-files
[https://cdn.sstatic.net/Sites/emacs/img/apple-touch-i...@2.png?v=dbead6deb8b0]

elisp - How to export top-level headings of org-mode 
...
emacs.stackexchange.com
How can each top-level heading of an org-mode buffer be exported to a separate 
file named after the value of the corresponding CUSTOM_ID + (sanitized) title?



Best Regards,
Joon





[O] org-babel-tangle ignores noweb-ref property

2017-01-03 Thread Joon Ro
Hi,


When I use org 8.3.6, it works correctly, but when I use org 9.0.3, it seems 
org-babel-tangle ignores noweb-ref property. For example, using the example 
from http://orgmode.org/manual/noweb_002dref.html:


#+BEGIN_SRC sh :tangle yes :noweb yes :shebang #!/bin/sh
<>
  #+END_SRC
  * the mount point of the fullest disk
:PROPERTIES:
:noweb-ref: fullest-disk
:END:

  ** query all mounted disks
  #+BEGIN_SRC sh
df \
  #+END_SRC

  ** strip the header row
  #+BEGIN_SRC sh
|sed '1d' \
  #+END_SRC

  ** sort by the percent full
  #+BEGIN_SRC sh
|awk '{print $5 " " $6}'|sort -n |tail -1 \
  #+END_SRC

  ** extract the mount point
  #+BEGIN_SRC sh
|awk '{print $2}'
  #+END_SRC


When I do org-babel-tangle, the resulting file only has #!/bin/sh.


With 8.3.6, I get the following file correctly:


#!/bin/sh
  df \
  df \
  |sed '1d' \
  |awk '{print $5 " " $6}'|sort -n |tail -1 \
  |awk '{print $2}'


I set org-use-property-inheritance to ("noweb-ref") with

(add-to-list 'org-use-property-inheritance "noweb-ref"). Please let me know if 
I'm doing something wrong.


Best,

Joon







[O] pdflatex fails to write .log file when exporting a subtree with EXPORT_FILE_NAME containing a subdirectory

2016-11-03 Thread Joon Ro
Hi,


After upgrading to org-mode 9.0, I'm getting the same error described here: 
https://lists.gnu.org/archive/html/emacs-orgmode/2013-05/msg01312.html.

Basically LaTeX export stops with an error - pdflatex complains that it cannot 
write .log file, when I export a subtree with EXPORT_FILE_NAME containing a 
subdirectory.


Best,

Joon




Re: [O] v9.0 running babel blocks

2016-11-03 Thread Joon Ro
> From: John Kitchin  on behalf of John Kitchin 
> 
>
> huh.. it seems to have disappeared. I deleted the orgplus directory in
> my elpa directory and reinstalled it, and it seemed to go away.
>
> weird.


I can confirm that this worked for me as well - I removed both org and 
org-plus-contrib in my elpa directory just in case and reinstalled them, and 
now the code evaluation works. Thank you very much!

-Joon



Re: [O] v9.0 running babel blocks

2016-11-03 Thread Joon Ro
> I get this message on trying to run an elisp block.
>
> Evaluation of this emacs-lisp code-blockis disabled.
>
>
> There are two issues:
> 1. there is a missing space between block and is (and maybe code-block
> should not be hyphenated) in org-babel-check-evaluate
> 2. It used to work! If I run (org-babel-check-confirm-evaluate
> (org-babel-get-src-block-info)) in the code block, it returns t
>
>
> I am not sure what is causing it. Thoughts?

I'm having exactly the same issue after upgrading to 9.0.


In my case, the source code block has a name, and it says "Evaluation of this 
shell code-block (name) is disabled", so I guess the missing space issue 
happens when the code block does not have name.


Best,

Joon




Re: [O] Can one tangle only the current blocks under header ?

2016-08-02 Thread Joon Ro



> Joon: thx this is great. 
You're welcome. 
> one last question. suppose i have multiple code blocks under  header like 
> this:> >  main i3 conf>  :PROPERTIES:>  :ID:   
> f17b5518-2695-4484-a958-2fc7b8aa2479>  :tangle:   
> /home/zeltak/.i3/config>  :END:>> > > is there a way to issue a 
> tangle just for all below the header blocks?
Again if you read the help: 
When two universal prefix arguments, only tangle blocks for the tangle file 
of the block at point.
So if you give two universal prefix arguments and issue org-babel-tangle while 
you are at a code block with the tangle file /home/zeltak/.i3/config, it will 
only tangle code blocks with that particular code block. I think that is what 
you want. I'm sure you can modify the code I showed you to implement this.
Another way to do this is just `org-narrow-to-subtree` to narrow down to that 
subtree and and then just tangle the whole thing.
-Joon



On Sun, Jul 31, 2016 at 5:34 PM, Grant Rettke <g...@wisdomandwonder.com> wrote:
You can `:tangle no' on the source block to exclude it from tangling.



You can even tangle one source block to a different or as many files

as you like during tangling.

Sincerely,



Grant Rettke





On Sat, Jul 30, 2016 at 1:38 PM, Joon Ro <joon...@outlook.com> wrote:

> can one tangle only the current blocks under header or  can you only tangle

> the whole file?

> the issue is again for dotfiles managed by org that these files are not

> proper org babel languages and look like this:

>

> #+BEGIN_SRC conf :mkdirp yes :tangle ~/.config/mpv/mpv.conf

> softvol-max=600

> #+END_SRC

>

> the manual (http://orgmode.org/manual/Extracting-source-code.html) only

> shows how to tangle the whole file

>

> any ideas?

>

>

> If you read the help for org-babel-tangle:

>

> With one universal prefix argument, only tangle the block at point.

> When two universal prefix arguments, only tangle blocks for the

> tangle file of the block at point.

>

>

> So if you do c-u first before org-babel-tangle, it will only tangle the code

> block at point.

> I use this a lot so I have the following in my init file:

>

> (defun org-babel-tangle-block()

>   (interactive)

>   (let ((current-prefix-arg '(4)))

>  (call-interactively 'org-babel-tangle)))

>

> (eval-after-load "org"

>   '(progn

>  (define-key org-mode-map (kbd "C-c b") 'org-babel-tangle-block)))

>

>

> So I can just do C-c b and it will just tangle the code block at point.

>

> And I agree with you I with the manual

> (http://orgmode.org/manual/Extracting-source-code.html) has this

> information.

>

> Hope this helps,

> Joon

>



  

Re: [O] Can one tangle only the current blocks under header ?

2016-07-30 Thread Joon Ro



can one tangle only the current blocks under header or  can you only tangle the 
whole file?the issue is again for dotfiles managed by org that these files are 
not proper org babel languages and look like this:
#+BEGIN_SRC conf :mkdirp yes :tangle ~/.config/mpv/mpv.confsoftvol-max=600  
#+END_SRC
the manual (http://orgmode.org/manual/Extracting-source-code.html) only shows 
how to tangle the whole file
any ideas?
If you read the help for org-babel-tangle:
With one universal prefix argument, only tangle the block at point.When two 
universal prefix arguments, only tangle blocks for thetangle file of the block 
at point.
So if you do c-u first before org-babel-tangle, it will only tangle the code 
block at point.I use this a lot so I have the following in my init file:
(defun org-babel-tangle-block()  (interactive)  (let ((current-prefix-arg 
'(4))) (call-interactively 'org-babel-tangle)))
(eval-after-load "org"  '(progn (define-key org-mode-map (kbd "C-c b") 
'org-babel-tangle-block)))
So I can just do C-c b and it will just tangle the code block at point.
And I agree with you I with the manual 
(http://orgmode.org/manual/Extracting-source-code.html) has this information.
Hope this helps,Joon

  

Re: [O] Using property values in source code blocks

2016-07-16 Thread Joon Ro
> I do not see an easy way to do what you want only with tangle.
> 
> There are hooks you can define that might enable you to set things up. 
> Maybe you can use `org-babel-pre-tangle-hook' to collect the property 
> values and put them somewhere that `org-babel-post-tangle-hook' can get at 
> them and use them to modify the tangled results accordingly. Or maybe 
> `org-babel-post-tangle-hook' can do it by using methods like those in 
> `org-babel-detangle' to look back at the *.org file.
> 
> Another alternative is to write all of your code blocks so they will 
> execute to create the code you want as results and then tangle those 
> results. You would use :wrap like this:
> 
> --8<---cut here---start->8---
> 
> #+BEGIN_SRC shell :noweb yes :wrap "src shell :tangle ./tangle-test.sh"
> echo "echo " <>
> #+END_SRC
> 
> --8<---cut here---end--->8---
> 
> Execute the src block and then tangle the buffer.
> 
> In fact, if you go that route it might make more sense to write elisp 
> code blocks to find the prpoerty values and then format the results.
> 

I see - thank you so much for your help. It does look like I have to write some 
code to do this.
Since I'm not that familiar with elisp, I think I will write a Python code 
block which has the template as a multi-line string, and then just pass values 
as arguments to the source code block to generate the shell scripts.
Best,Joon

  

Re: [O] Using property values in source code blocks

2016-07-15 Thread Joon Ro


> 
> Example:
> 
> --8<---cut here---start->8---
> 
> * Top Heading
> 
> #+NAME: get-property
> #+BEGIN_SRC emacs-lisp :noweb yes :var prop="prop" :var pom=0
> (car (org-entry-get-multivalued-property pom prop))
> #+END_SRC
> 
> ** Subheading
> :PROPERTIES:
> :DUMMY: 100
> :END:
> 
> #+BEGIN_SRC shell :noweb yes
> echo <>
> #+END_SRC
> 
> #+RESULTS:
> : 100
> 
> --8<---cut here---end--->8---
> 

Hi Chuck,
Thank you so much. It definitely works when I evaluate the code block - but my 
ultimate goal is to tangle the source code (I want to generate bunch of script 
files with a template using property values), and when I tangle the code block 
it returns nil. For example:
* Top Heading#+NAME: get-property#+BEGIN_SRC emacs-lisp :noweb yes :var 
prop="prop" :var pom=0(car (org-entry-get-multivalued-property pom 
prop))#+END_SRC** Subheading:PROPERTIES::DUMMY: 100:END:#+BEGIN_SRC shell 
:noweb yes :tangle ./tangle-test.shecho 
<>#+END_SRC
When I evaluate the code block, I get : 100 results. However, when I tangle the 
block, the resulting tangle-test.sh has echo nil instead of echo 100. 
Am I doing something wrong? Thank you so much for your help.
-Joon



  

Re: [O] Using property values in source code blocks

2016-07-15 Thread Joon Ro

It seems org-property-values gets the property value for the buffer - it ends 
up getting the property value from the last subtree in the buffer. I solved 
this by using either (org-entry-get nil prop) or (car 
(org-entry-get-multivalued-property nil prop)) instead of (car 
(org-property-values prop)). 
I spoke too early - with (org-entry-get nil prop) I have to put the code block 
under the subtree I want to extract the property value from. Would it be 
possible to get the property value of the current subtree? For example, the 
following
* Top Heading#+NAME: get-property#+BEGIN_SRC emacs-lisp :noweb yes :var 
prop="prop"(car (org-entry-get-multivalued-property nil prop))#+END_SRC
** Subheading:PROPERTIES::DUMMY:100:END:
#+BEGIN_SRC shell :noweb yesecho <>#+END_SRC
yields nil. 
Best Regards,Joon

  

Re: [O] Using property values in source code blocks

2016-07-15 Thread Joon Ro
> --8<---cut here---end--->8---
> 
> * Subtree
> :PROPERTIES:
> :DUMMY: Value
> :END:
> 
> #+NAME: get-property
> #+BEGIN_SRC emacs-lisp :var prop="prop"
> (car (org-property-values prop))
> #+END_SRC
> 
> #+BEGIN_SRC shell :noweb yes
> 
> echo <>
> 
> #+END_SRC
> 
> #+RESULTS:
> : Value
> 
> --8<---cut here---end--->8---
> 

It seems org-property-values gets the property value for the buffer - it ends 
up getting the property value from the last subtree in the buffer. I solved 
this by using either (org-entry-get nil prop) or (car 
(org-entry-get-multivalued-property nil prop)) instead of (car 
(org-property-values prop)). 
Thanks again!-Joon

  

Re: [O] Using property values in source code blocks

2016-07-07 Thread Joon Ro


> Date: Thu, 7 Jul 2016 08:48:03 -0700
> From: ccbe...@ucsd.edu
> To: joon...@outlook.com
> Subject: Re: [O] Using property values in source code blocks
> CC: emacs-orgmode@gnu.org
> 
> On Wed, 6 Jul 2016, Joon Ro wrote:
> 
> >
> >
> >
> >> I have no idea what you are asking.
> >>
> 
> [snip]
> 
> > I'm sorry if my explanation was not clear, but the original example I 
> > provided shows exactly what I wanted to do:
> 
> And my response showed how to do it: you construct a src block with a 
> noweb reference that places the *results* of evaluating another src block 
> in the code (or comment). The src block in the named in the noweb 
> reference handles retrieving the property value, viz.
> 
> --8<---cut here---end--->8---
> 
> * Subtree
> :PROPERTIES:
> :DUMMY: Value
> :END:
> 
> #+NAME: get-property
> #+BEGIN_SRC emacs-lisp :var prop="prop"
> (car (org-property-values prop))
> #+END_SRC
> 
> #+BEGIN_SRC shell :noweb yes
> 
> echo <<get-property(prop="DUMMY")>>
> 
> #+END_SRC
> 
> #+RESULTS:
> : Value
> 
> --8<---cut here---end--->8---
> 
> 
> See
> 
>(info "(org) Noweb reference syntax")
> 
> 
> Chuck
> 

I see. I must have misunderstood that example. I will try that - thank you so 
much!

  

Re: [O] Using property values in source code blocks

2016-07-06 Thread Joon Ro



> I have no idea what you are asking.
> 
> > The reason is I have to put those values inside a comment, 
> > so I cannot pass them as variables.
> 
> So your original query about accessing property values from src blocks was 
> not what you wanted?
> 
> Examples of what one is trying to do - even if they do not work exactly as 
> intended - are often more helpful than verbal explanations of what one 
> would like to do.
> 
> Chuck
> 

I'm sorry if my explanation was not clear, but the original example I provided 
shows exactly what I wanted to do:
* Subtree:PROPERTIES::DUMMY: VALUE:END:#+BEGIN_SRC{{DUMMY}} <- something like 
this?#+END_SRC
Basically, I want to replace {{DUMMY}} with VALUE, without passing it as a 
variable. So just like <> replacement, but with a property value instead 
of a code block. I get the feeling that this is not possible, but I wanted to 
ask just in case. 
Best,Joon


  

Re: [O] Using property values in source code blocks

2016-07-06 Thread Joon Ro

> Yes. `org-property-values' does the trick
> 
> 
> * Subtree
> :PROPERTIES:
> :DUMMY: Value
> :END:
> 
> #+BEGIN_SRC shell :var dumdum=(car (org-property-values "DUMMY"))
> echo $dumdum
> #+END_SRC
> 
> #+RESULTS:
> : Value
> 
> #+NAME: get-property
> #+BEGIN_SRC emacs-lisp :var prop="prop"
> (org-property-values prop)
> #+END_SRC
> 
> #+BEGIN_SRC emacs-lisp :noweb yes
> (quote
> <>
> )
> #+END_SRC
> 
> #+RESULTS:
> | Value |
> 
> HTH,
> 
> Chuck
> 

Thank you so much for the reply - this would be very useful. Would there be, 
however, a way to directly replace some place holder inside a source code 
block? The reason is I have to put those values inside a comment, so I cannot 
pass them as variables.
Best,Joon 

[O] Using property values in source code blocks

2016-07-05 Thread Joon Ro
Hi,
I'm aware of passing variables through header arguments, and also inserting 
another source code block using the noweb syntax. 
I was wondering, however, would it be possible to directly input values of 
properties inside source code blocks? For example,
* Subtree:PROPERTIES::DUMMY: Value:END:
#+BEGIN_SRC
{{DUMMY}} <- something like this?
#+END_SRC
Thank you so much,Joon

[O] Using property macro with argument (or subtree-specific macro)

2016-03-19 Thread Joon Ro
Hi,
Is there any way to use argument with property macro? For example,
* test:PROPERTIES::HIDDEN: @@latex:\iffalse $1 \fi@@:END:
{{{property(HIDDEN(string))}}}
I don't think currently it is possible, but it would be great if this is 
possible, or we can have subtree-specific macro replacement.
Thank you,Joon

  

Re: [O] Remove notes blocks from latex export

2016-01-03 Thread Joon Ro
> A simple derived exporter?  Or (on the LaTeX side) the comment package?
> 

Thank you. I managed to achieve this with the following code:
(defun my/latex-remove-NOTES-blocks (text backend info)  "Filter special blocks 
from latex export."  (when (eq backend 'latex) (if (string/starts-with text 
"\\begin{NOTES}") "")))
(eval-after-load 'ox '(add-to-list   
'org-export-filter-special-block-functions   
'my/latex-remove-NOTES-blocks))

This was the first emacs-lisp code that I wrote with knowing what I was doing. 
:)
Best,Joon 

[O] Remove notes blocks from latex export

2016-01-01 Thread Joon Ro
Hi,
org-reveal uses notes blocks (#+BEGIN_NOTES) for speaker notes, and I want to 
remove those blocks when I export those slides to latex for handouts.For src 
blocks it can be done easily with org-export-filter-src-block-functions - is 
there any way to do this with generic blocks? 
Thank you and happy new year!Joon 

Re: [O] :minlevel for columnview dynamic block

2015-11-18 Thread Joon Ro
> 
> Fixed. Thank you.
> 

Thank you so much for the quick fix! It now works perfectly.
Best,Joon 

Re: [O] :minlevel for columnview dynamic block

2015-11-16 Thread Joon Ro
> http://orgmode.org/worg/org-faq.html#ecm
I found that skip-empty-rows works correctly only if ITEM is in the COLUMNS 
property. Here is an ECM :). As you can see, when ITEM is not included in 
COLUMNS property, it generates an empty line for the parent heading.

* Columnview with ITEM in columns:PROPERTIES::COLUMNS:  %ITEM %Variable:END:- 
This correctly skips the parent headline because ITEM is one of the 
columns#+BEGIN: columnview :hlines 1 :id local :maxlevel 2 :skip-empty-rows t| 
ITEM| Variable ||-+--|| ** Subheading 1 |   
 1 || ** Subheading 2 |2 |#+END** Subheading 1:PROPERTIES::Name:
 Subheading 1:Variable: 1:END:** Subheading 2:PROPERTIES::Name: Subheading 
2:Variable: 2:END:* Columnview without ITEM in columns:PROPERTIES::COLUMNS:  
%Name %Variable:END:- When ITEM is not in columns, columnview generates one 
empty line on the top:#+BEGIN: columnview :hlines 1 :id local :maxlevel 2 
:skip-empty-rows t| Name | Variable ||--+--||   
   |  || Subheading 1 |1 || Subheading 2 |2 
|#+END** Subheading 1:PROPERTIES::Name: Subheading 1:Variable: 1:END:** 
Subheading 2:PROPERTIES::Name: Subheading 2:Variable: 2:END:
  

Re: [O] :minlevel for columnview dynamic block

2015-11-15 Thread Joon Ro
> 
> Could you provide an ECM? Thank you.
> 

I'm sorry, what is an ECM? 
-Joon 

Re: [O] :minlevel for columnview dynamic block

2015-11-14 Thread Joon Ro

> 
> Could you provide an ECM? Thank you.
> 

I'm sorry, what is an ECM?
  

[O] :minlevel for columnview dynamic block

2015-11-13 Thread Joon Ro
Hi,
I use columnview a lot with :id option to generate a table from sub-headlines 
of the tree that has an :ID: property. The issue is that even with 
:skip-empty-rows t option, the generated table always have one empty line on 
the top, for the headline for the tree itself.
It would be great to have something like a :minlevel option so I can exclude 
the tree headline.
Best,Joon 

Re: [O] Favorite way of syncing?

2015-09-11 Thread Joon Ro
I use Unison for settings like dotfiles, since with unison you don't have to 
put files into a specific folder or use symlinks. I miss versioning of Dropbox, 
but it is okay since settings do not change that frequently. I just back up 
everything every day.
I use AeroFS for sensitive data and Dropbox for other things.
Best,Joon

> From: torys.ander...@gmail.com
> To: emacs-orgmode@gnu.org
> Date: Fri, 11 Sep 2015 09:25:19 -0600
> Subject: Re: [O] Favorite way of syncing?
> 
> At the moment I'm using a self-hosted OwnCloud to do syncing; it's 
> super easy (takes care of itself), but sometimes conflicts are a 
> problem (particularly when I forget to save my buffers before 
> leaving work); if you notice it, though, it provides a conflict 
> version (and has automatic versioning a la Dropbox). 
> 
> Eric Abrahamsen  writes:
> 
> > jorge.alfaro-muri...@yale.edu (Jorge A. Alfaro-Murillo) writes:
> >
> >> Tobias Frischholz writes:
> >>
> >>> I was wondering what is your favorite way of syncing your org 
> >>> files
> >>> and everything. 
> >> [...] 
> >>> I’ve also read about org-sync and magit (git is an option for 
> >>> me).
> >>> And now I’m starting the get confused.
> >>
> >> magit is just the emacs mode for git, if you don't have it and 
> >> use git
> >> you should really install it. But it does not sync anything you 
> >> still
> >> have to M-x magit  F F and M-x magit  P P, for 
> >> pull and
> >> push.
> >>
> >> I have several computers and synchronize my org files with 
> >> git. I
> >> think it is the best option because I do not have to worry 
> >> about the
> >> sync not working (for example when I do not have a connection) 
> >> and
> >> conflicts in the files.
> >
> > I do this, too. I don't think Magit helps much, in fact I'd be 
> > better
> > off writing functions for `emacs-startup-hook' and 
> > `kill-emacs-hook'
> > that do my pushes and pulls for me.
> >
> > But for now, I just try to remember to commit and push before I 
> > leave a
> > machine.
> >
> > This way, you also really learn to appreciate using "git fetch" 
> > and "git
> > status", rather than doing a blind "git pull".
> >
> > Eric
> >
> >
> >
> 
> -- 
> Tory S. Anderson
> Computational Cognitive Narratologist
> http://toryanderson.com
> 
  

[O] subtreep option in export stopped working propery

2015-09-06 Thread Joon Ro
Hi,
I have been using a link containing elisp:(org-beamer-export-to-pdf nil t) to 
export the subtree as a beamer pdf. It used to work well, but after a certain 
update a couple of months ago (I'm using 8.3beta and I regularly update it), it 
stopped working properly. For example, when I click on the following Beamer 
link:
* Export Test:PROPERTIES: :EXPORT_FILE_NAME: ./Test:EXPORT_TITLE: Export 
Test:EXPORT_SUBTREE: [[elisp:(org-beamer-export-to-pdf%20nil%20t)][Beamer]] 
:END:
Subtree Contents.

I get a tex file with one page with properties written on it.
Again, I used to use this link to generate subtree-only beamer pdf. Also, 
exporting manually (C-c C-e C-s l P) works well as well.
Best,Joon 

Re: [O] subtreep option in export stopped working propery

2015-09-05 Thread Joon Ro


> From: m...@nicolasgoaziou.fr
> 
> I cannot reproduce it. Did you (require 'ox-beamer)? You might also try
> latest Org.
> 

Thank you for the reply. I added require 'ox-beamer to my init file but it did 
not make any difference. I'm using the lastest Org (8.3beta).
Again, my org file is
* Export Test:PROPERTIES: :EXPORT_FILE_NAME: ./Test:EXPORT_TITLE: Export 
Test:EXPORT_SUBTREE: [[elisp:(org-beamer-export-to-pdf%20nil%20t)][Beamer]] 
:END:
Test Contents.

and the tex file I got from clicking on the Beamer link is:

% Created 2015-09-05 Sat 
12:31\documentclass[presentation]{beamer}\usepackage[utf8]{inputenc}\usepackage[T1]{fontenc}\usepackage{fixltx2e}\usepackage{graphicx}\usepackage{grffile}\usepackage{longtable}\usepackage{wrapfig}\usepackage{rotating}\usepackage[normalem]{ulem}\usepackage{amsmath}\usepackage{textcomp}\usepackage{amssymb}\usepackage{capt-of}\usepackage{hyperref}\usetheme{default}\date{\today}\title{Export
 Test}\hypersetup{ pdfauthor={}, pdftitle={Export Test}, pdfkeywords={}, 
pdfsubject={}, pdfcreator={Emacs 24.5.1 (Org mode 8.3beta)},  
pdflang={English}}\begin{document}
\maketitle\begin{frame}{Outline}\tableofcontents\end{frame}
:PROPERTIES: :EXPORT\(_{\text{FILE}}_{\text{NAME}}\): 
./Test:EXPORT\(_{\text{TITLE}}\): Export Test:EXPORT\(_{\text{SUBTREE}}\): 
[[elisp:(org-beamer-export-to-pdf\%20nil\%20t)][Bea\end{document}

You cannot reproduce this? I wonder what is the culprit then. Again, when I 
manually do this by C-c C-e C-s l P, I get the correct tex file.
Best,Joon

  

Re: [O] subtreep option in export stopped working propery

2015-09-05 Thread Joon Ro
I figured it out - the culprit was Evil mode. For some reason, if I click on 
the link in the normal state, the problem happens, while in emacs state it 
works.Thanks.

-JoonFrom: joon...@outlook.com
To: m...@nicolasgoaziou.fr
CC: emacs-orgmode@gnu.org
Subject: RE: [O] subtreep option in export stopped working propery
Date: Sat, 5 Sep 2015 12:55:08 -0700




I got rid of my init file and it exported correctly, so I guess there is 
something in my init file which was causing this - I will figure it out. Thank 
you so much.

From: joon...@outlook.com
To: m...@nicolasgoaziou.fr
Date: Sat, 5 Sep 2015 12:34:24 -0700
CC: emacs-orgmode@gnu.org
Subject: Re: [O] subtreep option in export stopped working propery






> From: m...@nicolasgoaziou.fr
> 
> I cannot reproduce it. Did you (require 'ox-beamer)? You might also try
> latest Org.
> 

Thank you for the reply. I added require 'ox-beamer to my init file but it did 
not make any difference. I'm using the lastest Org (8.3beta).
Again, my org file is
* Export Test:PROPERTIES: :EXPORT_FILE_NAME: ./Test:EXPORT_TITLE: Export 
Test:EXPORT_SUBTREE: [[elisp:(org-beamer-export-to-pdf%20nil%20t)][Beamer]] 
:END:
Test Contents.

and the tex file I got from clicking on the Beamer link is:

% Created 2015-09-05 Sat 
12:31\documentclass[presentation]{beamer}\usepackage[utf8]{inputenc}\usepackage[T1]{fontenc}\usepackage{fixltx2e}\usepackage{graphicx}\usepackage{grffile}\usepackage{longtable}\usepackage{wrapfig}\usepackage{rotating}\usepackage[normalem]{ulem}\usepackage{amsmath}\usepackage{textcomp}\usepackage{amssymb}\usepackage{capt-of}\usepackage{hyperref}\usetheme{default}\date{\today}\title{Export
 Test}\hypersetup{ pdfauthor={}, pdftitle={Export Test}, pdfkeywords={}, 
pdfsubject={}, pdfcreator={Emacs 24.5.1 (Org mode 8.3beta)},  
pdflang={English}}\begin{document}
\maketitle\begin{frame}{Outline}\tableofcontents\end{frame}
:PROPERTIES: :EXPORT\(_{\text{FILE}}_{\text{NAME}}\): 
./Test:EXPORT\(_{\text{TITLE}}\): Export Test:EXPORT\(_{\text{SUBTREE}}\): 
[[elisp:(org-beamer-export-to-pdf\%20nil\%20t)][Bea\end{document}

You cannot reproduce this? I wonder what is the culprit then. Again, when I 
manually do this by C-c C-e C-s l P, I get the correct tex file.
Best,Joon


  

Re: [O] subtreep option in export stopped working propery

2015-09-05 Thread Joon Ro
I got rid of my init file and it exported correctly, so I guess there is 
something in my init file which was causing this - I will figure it out. Thank 
you so much.From: joon...@outlook.com
To: m...@nicolasgoaziou.fr
Date: Sat, 5 Sep 2015 12:34:24 -0700
CC: emacs-orgmode@gnu.org
Subject: Re: [O] subtreep option in export stopped working propery






> From: m...@nicolasgoaziou.fr
> 
> I cannot reproduce it. Did you (require 'ox-beamer)? You might also try
> latest Org.
> 

Thank you for the reply. I added require 'ox-beamer to my init file but it did 
not make any difference. I'm using the lastest Org (8.3beta).
Again, my org file is
* Export Test:PROPERTIES: :EXPORT_FILE_NAME: ./Test:EXPORT_TITLE: Export 
Test:EXPORT_SUBTREE: [[elisp:(org-beamer-export-to-pdf%20nil%20t)][Beamer]] 
:END:
Test Contents.

and the tex file I got from clicking on the Beamer link is:

% Created 2015-09-05 Sat 
12:31\documentclass[presentation]{beamer}\usepackage[utf8]{inputenc}\usepackage[T1]{fontenc}\usepackage{fixltx2e}\usepackage{graphicx}\usepackage{grffile}\usepackage{longtable}\usepackage{wrapfig}\usepackage{rotating}\usepackage[normalem]{ulem}\usepackage{amsmath}\usepackage{textcomp}\usepackage{amssymb}\usepackage{capt-of}\usepackage{hyperref}\usetheme{default}\date{\today}\title{Export
 Test}\hypersetup{ pdfauthor={}, pdftitle={Export Test}, pdfkeywords={}, 
pdfsubject={}, pdfcreator={Emacs 24.5.1 (Org mode 8.3beta)},  
pdflang={English}}\begin{document}
\maketitle\begin{frame}{Outline}\tableofcontents\end{frame}
:PROPERTIES: :EXPORT\(_{\text{FILE}}_{\text{NAME}}\): 
./Test:EXPORT\(_{\text{TITLE}}\): Export Test:EXPORT\(_{\text{SUBTREE}}\): 
[[elisp:(org-beamer-export-to-pdf\%20nil\%20t)][Bea\end{document}

You cannot reproduce this? I wonder what is the culprit then. Again, when I 
manually do this by C-c C-e C-s l P, I get the correct tex file.
Best,Joon


  

[O] subtreep option in export stopped working propery

2015-09-04 Thread Joon Ro
Hi,
I have been using a link containing elisp:(org-beamer-export-to-pdf nil t) to 
export the subtree as a beamer pdf. It used to work well, but after a certain 
update a couple of months ago (I'm using 8.3beta and I regularly update it), it 
stopped working properly. For example, when I click on the following Beamer 
link:
* Export Test:PROPERTIES: :EXPORT_FILE_NAME: ./Test:EXPORT_TITLE: Export 
Test:EXPORT_SUBTREE: [[elisp:(org-beamer-export-to-pdf%20nil%20t)][Beamer]] 
:END:
Subtree Contents.

I get a tex file with one page with properties written on it.
Again, I used to use this link to generate subtree-only beamer pdf. Also, 
exporting manually (C-c C-e C-s l P) works well as well.
Best,Joon

  

Re: [O] Tangling #+Results block?

2015-06-22 Thread Joon Ro
I found the following thread, and tried to follow it, but it did not work:
https://lists.gnu.org/archive/html/emacs-orgmode/2010-11/msg00390.html
From: joon...@outlook.com
To: emacs-orgmode@gnu.org
Date: Sun, 21 Jun 2015 21:40:17 -0700
Subject: [O] Tangling #+Results block?




Is it possible to tangle #+RESULTS: block? For example,
#+BEGIN_SRC rst :tangle ./test.txt :noweb yesTangle_Test#+END_SRC
#+BEGIN_SRC python :exports results :results output rawprint(Printed 
Results)#+END_SRC
#+RESULTS: Printed Results
And I want to tangle #+RESULTS: part, not the actual Python source code, so the 
tangled test.txt file has the following:
Printed Results
Best,Joon


  

Re: [O] Tangling #+Results block?

2015-06-22 Thread Joon Ro
 
 See:
 
 http://orgmode.org/manual/Noweb-reference-syntax.html#Noweb-reference-syntax
 

I have read that documentation several times - I cannot believe I missed that. 
Thank you very much.   

[O] Tangling #+Results block?

2015-06-21 Thread Joon Ro
Is it possible to tangle #+RESULTS: block? For example,
#+BEGIN_SRC rst :tangle ./test.txt :noweb yesTangle_Test#+END_SRC
#+BEGIN_SRC python :exports results :results output rawprint(Printed 
Results)#+END_SRC
#+RESULTS: Printed Results
And I want to tangle #+RESULTS: part, not the actual Python source code, so the 
tangled test.txt file has the following:
Printed Results
Best,Joon

  

[O] Column formats for columnview dynamic block

2015-06-18 Thread Joon Ro
Hi,
I use columnview dynamic block to generate a table so I can export it.However, 
it does not obey the #+COLUMNS: settings that I have in the org file.Is there 
any way to make it obey the settings? I'm exporting the table for LaTeX and I 
want to control the number of digits that it shows. 
Cheers,Joon   

Re: [O] Column formats for columnview dynamic block

2015-06-18 Thread Joon Ro
 I solved this with providing 'printf' format specifiers 
(http://orgmode.org/org.html#Formula-syntax-for-Calc). I wasn't aware of the 
the formatting capability - awesome.From: joon...@outlook.com
To: emacs-orgmode@gnu.org
Date: Thu, 18 Jun 2015 15:27:33 -0700
Subject: [O] Column formats for columnview dynamic block




Hi,
I use columnview dynamic block to generate a table so I can export it.However, 
it does not obey the #+COLUMNS: settings that I have in the org file.Is there 
any way to make it obey the settings? I'm exporting the table for LaTeX and I 
want to control the number of digits that it shows. 
Cheers,Joon 
  

[O] Hiding stars for Item column from columnview

2015-05-31 Thread Joon Ro
Hi,
I'm using the great columnview feature a lot to generate dynamic tables. When I 
use %Item column, the generated table shows the stars in front of each 
heading.I used to not include Item in columns, and added additional property 
for the name for each heading to avoid this.
However, I need to use :skip-empty-rows t to skip headings without any 
properties corresponding to the columns, and it depends on using Item column. 
Is there a way to not show stars for Item column in columnview tables? 
Best,Joon
  

Re: [O] Subtree-specific variables

2015-05-10 Thread Joon Ro
  * Subtree root
  :PROPERTIES:
  :EXPORT_Variable: Test  :END: 
  {{{Variable}}}
  Would something like this be possible?
  Best,Joon
 
 It is:
 
   {{{property(EXPORT_Variable)}}}
 

Thank you so much! This will be very useful. 
One related question - I'm including another subtree (I'm using 8.3beta) using
   #+INCLUDE: playground.org::*Contents :only-contents t
but it seems I cannot access the property of the parent heading inside the 
included subtree. (Using {{{property(EXPORT_Variable)}}} to access the parent 
property). Is this not possible?
Thank you so much,Joon
  

Re: [O] Subtree-specific variables

2015-05-10 Thread Joon Ro
Oh, I forgot to turn on org-use-property-inheritance. Now it works in the 
included subtree as well. Thank you so much!From: joon...@outlook.com
To: m...@nicolasgoaziou.fr
CC: emacs-orgmode@gnu.org
Subject: RE: Subtree-specific variables
Date: Sun, 10 May 2015 12:01:23 -0500




  * Subtree root
  :PROPERTIES:
  :EXPORT_Variable: Test  :END: 
  {{{Variable}}}
  Would something like this be possible?
  Best,Joon
 
 It is:
 
   {{{property(EXPORT_Variable)}}}
 

Thank you so much! This will be very useful. 
One related question - I'm including another subtree (I'm using 8.3beta) using
   #+INCLUDE: playground.org::*Contents :only-contents t
but it seems I cannot access the property of the parent heading inside the 
included subtree. (Using {{{property(EXPORT_Variable)}}} to access the parent 
property). Is this not possible?
Thank you so much,Joon

  

Re: [O] Subtree-specific variables

2015-05-09 Thread Joon Ro
 
 Usually, you get subtree specific variables with node properties,
 appending EXPORT_ to them, e.g.
 
   * Subtree root
   :PROPERTIES:
   :EXPORT_AUTHOR: Not me
   :END:
 
  I have been using #+MACRO: but it seems it is a buffer-wide thing.
 
 The suggestion above doesn't apply to MACRO keyword, mainly because
 properties' values are only one line long.
 

Thank you for the reply. I'm aware of EXPORT_ stuff, but I'm actually looking 
for something like this:
* Subtree root
:PROPERTIES:
:EXPORT_Variable: Test:END: 
{{{Variable}}}
Would something like this be possible?
Best,Joon
  

[O] Subtree-specific variables

2015-05-08 Thread Joon Ro
Hi,
I was wondering if there is a way to have subtree-specific variables?
I have been using #+MACRO: but it seems it is a buffer-wide thing.
For example, it would be great if I can use a property value in org-mode bodies.
Best,Joon 

Re: [O] ox-latex export code block results without \texttt

2015-05-01 Thread Joon Ro
I'm sorry, :results latex solved my problem. :)From: joon...@outlook.com
To: emacs-orgmode@gnu.org
Date: Fri, 1 May 2015 17:34:34 -0500
Subject: [O] ox-latex export code block results without \texttt




Hi,
When I export a org file with an inline code like Two plus two equals 
src_python{return(2+2)} to latex, it is exported as Two plus two equals 
\texttt{4}. Is there any way to suppress \texttt and have it exported as a 
common text? Usually I would want the verbatim font, but in this particular 
case I want to combine some texts with a result of a calculation automatically.
Best,Joon

  

[O] ox-latex export code block results without \texttt

2015-05-01 Thread Joon Ro
Hi,
When I export a org file with an inline code like Two plus two equals 
src_python{return(2+2)} to latex, it is exported as Two plus two equals 
\texttt{4}. Is there any way to suppress \texttt and have it exported as a 
common text? Usually I would want the verbatim font, but in this particular 
case I want to combine some texts with a result of a calculation automatically.
Best,Joon
  

Re: [O] Using macros in properties

2015-04-30 Thread Joon Ro
 From: m...@nicolasgoaziou.fr
 
 Actually, this is now possible in development version. Truth is no match
 against Time.
 

Indeed! Thank you so much for letting me know (I just saw your reply). In fact 
I'm using the dev version and it seems to be working well. Thank you.
-Joon
  

Re: [O] export fails with byte-code: Before first headline at position ...

2015-04-26 Thread Joon Ro
Apparently it was caused by the following custom function for 
org-export-before-parsing-hook that I had to remove the subtree with 
beameronly tag:
(defun as/delete-ignored-heading (backend)
(unless (equal backend 'beamer)
  ; remove subtree with beameronly tag
  (org-map-entries
   (lambda ()
 (progn
   (org-narrow-to-subtree)
   (org-cut-subtree)
   )
 )
   +beameronly 'tree)
  )
)
(setq org-export-before-parsing-hook '(as/delete-ignored-heading))


What I did wrong to cause this error? It worked for sum subtrees but not for 
others.
From: joon...@outlook.com
To: emacs-orgmode@gnu.org
Date: Sun, 26 Apr 2015 14:35:53 -0500
Subject: [O] export fails with byte-code: Before first headline at position
...




Hi,
When I try to export my org files I'm getting this error. For example:
byte-code: Before first headline at position 1 in buffer Blog.org2
I could not find any way to fix this - any help will be very appreciated.
Thank you,Joon

  

[O] export fails with byte-code: Before first headline at position ...

2015-04-26 Thread Joon Ro
Hi,
When I try to export my org files I'm getting this error. For example:
byte-code: Before first headline at position 1 in buffer Blog.org2
I could not find any way to fix this - any help will be very appreciated.
Thank you,Joon
  

[O] Beamer export: heading tags rendered as \textsc{}

2015-04-21 Thread Joon Ro
Hi,
I just found that beamer export is rendering heading tags with \textsc. For 
example, it looks like this in the latex file:
\section{Section Name\hfill{}\textsc{tagname}}
Which makes them show up in the navigation bar in beamer slides.Please let me 
know if I can turn this off - I'm using org 8.3beta.
Thank you!Joon

  

Re: [O] Using macros in properties

2015-04-04 Thread Joon Ro
 From: m...@nicolasgoaziou.fr
 
 This is not possible.
 

Thanks for letting me know. :)
-Joon
  

Re: [O] INCLUDE heading

2015-04-01 Thread Joon Ro
Rob Richmond robbyr at gmail.com writes:

 
 
 Hi all,
 I use org-mode to write both papers and slides. The code to generate tables 
and figures is placed in source blocks. Most of the time I use the same 
tables in my slides as in my papers, but a lot of preprocessing code is 
needed to generate the tables. I'd like to put the generation of these tables 
in its own org-mode file and just be able to include certain headings in the 
paper or slide document. For example, I would have an org-mode document 
called mytables.org:
     * Heading 1
     ** Regressions
     #+BEGIN_SRC R
     cat(hello world)
     #+END_SRC R
     * Heading 2
 
 And another document mypaper.org:
     * Section 1
     #+INCLUDE: mytables.org :heading Heading 1/Regressions
     * Section 2
 The content from below the ** Regression headline in mytables.org would be 
included on export in mypaper.org. It would also be great to be able to 
follow the INCLUDE to the file with C-c '. Org provides some facilities for 
these includes, but does not allow for headings ( 
http://orgmode.org/manual/Include-files.html ). Obviously org does not have 
the :heading parameter, but any suggestions for a solution to make this work 
are greatly appreciated. It looks like org-export-expand-include-keyword is 
doing a lot of the magic of including the files, but I'm not sure where to go 
from there.
 

I would love to have this feature (include only a subtree from another org 
file) as well.




Re: [O] INCLUDE heading

2015-04-01 Thread Joon Ro
 From: ras...@gmx.us
 Date: Wed, 1 Apr 2015 21:42:43 +0200
 Subject: Re: [O] INCLUDE heading
 
 Joon Ro joon...@outlook.com writes:
 
  I would love to have this feature (include only a subtree from another org 
  file) as well.
 
 You can do this in Org v8.3.
 

Thanks - I'm glad to hear that - in fact I just installed 8.3beta yesterday so 
I'm good to go. I couldn't find  the relevant documentation though - could you 
please refer me to it? 
-Joon