[O] [SOLVED] (was: join two or more tables)

2019-08-18 Thread Uwe Brauer



>>> "UB" == Uwe Brauer  writes:
   >> Hi

   >> I was googling this a bit, I found more complicated scenarios, but not
   >> how to join one or more tables.

   >> For example 

   >> #+begin_src 

   >> #+tblname: nut
   >> | type | Fiber | Sugar | Protein | Carb |
   >> |--+---+---+-+--|
   >> | eggplant |   2.5 |   3.2 | 0.8 |  8.6 |
   >> | tomatoe  |   0.6 |   2.1 | 0.8 |  3.4 |
   >> | onion|   1.3 |   4.4 | 1.3 |  9.0 |
   >> | egg  | 0 |  18.3 |31.9 | 18.3 |


   >> #+tblname: nut2
   >> | type | Fiber | Sugar | Protein | Carb |
   >> |--+---+---+-+--|
   >> | rice |   0.2 | 0 | 1.5 | 16.0 |
   >> | bread|   0.7 |   0.7 | 3.3 | 16.0 |
   >> | orange   |   3.1 |  11.9 | 1.3 | 17.6 |
   >> | banana   |   2.1 |   9.9 | 0.9 | 18.5 |
   >> | tofu |   0.7 |   0.5 | 6.6 |  1.4 |
   >> | nut  |   2.6 |   1.3 | 4.9 |  7.2 |
   >> | corn |   4.7 |   1.8 | 2.8 | 21.3 |
   >> #+end_src


   >> I want to generate a new table total-nuts, which is just a combination
   >> of the two tables, nuts and nuts2 


   >> Uwe Brauer 

Best solution found in 

https://emacs.stackexchange.com/questions/48508/merge-org-tables

** Solution 1
#+NAME: T1
| col1 | col2 |
|1 | 2|

#+NAME: T2
| col3 |
| 3|

#+BEGIN_SRC emacs-lisp :var t1=T1 t2=T2
(cl-mapcar #'append t1 t2)
#+END_SRC

#+RESULTS:
| col1 | col2 | col3 |
|1 |2 |3 |

** Solution 2

#+NAME: T3
| col1 | col2 |
|   11 |   12 |
|   21 |   22 |
|   31 |   32 |

#+NAME: T4
| col3 |
|   13 |
|   12 |

#+BEGIN_SRC emacs-lisp :var t1=T3 t2=T4 :colnames no
(cl-mapcar #'append t1 t2)
#+END_SRC

#+RESULTS:
| col1 | col2 | col3 |
|   11 |   12 |   13 |
|   21 |   22 |   12 |



** Solution 3

#+NAME: TA
| col1 | col2 |
|--+--|
|1 |2 |

#+NAME: TB
| col3 |
|--|
|3 |

#+BEGIN_SRC emacs-lisp :var t1=TA t2=TB :colnames no
(insert-at 1 (cl-mapcar #'append t1 t2) 'hline)
#+END_SRC

#+RESULTS:
| col1 | col2 | col3 |
|--+--+--|
|1 |2 |3 |


#+begin_src elisp :noexport

(defun insert-at (n list element)
  "Insert ELEMENT into LIST at position N.
I.e., (eq ELEMENT (nth N (insert-at N LIST ELEMENT)))."
  (if (eq n 0)
  (cons element list)
(let ((link (nthcdr (1- n) list)))
  (setcdr link (cons element (cdr link
list))
#+end_src





[O] [SOLVED] (was: tab error: user-error: Invalid row descriptor ‘I293’)

2019-06-12 Thread Uwe Brauer
>>> "UB" == Uwe Brauer  writes:

> Hi 

> When I run C-u C-u C-c C-c

> In obtain the error mentioned above. I checked that row, everything
> seems fine. How can I debugg this?

Found the error, sorry for the noise indeed I put @I293 and not @293.


smime.p7s
Description: S/MIME cryptographic signature


[O] [SOLVED] (was: how to pass parameters to latex environment when exporting)

2019-06-01 Thread Uwe Brauer
>>> "UB" == Uwe Brauer  writes:

>>> "UB" == Uwe Brauer  writes:
> [Snip]...

>> But I would like to have 
>> \begin{solution}[5cm]

>> How can I pass that parameter when exporting? Thanks 

> According to 
> https://emacs.stackexchange.com/questions/34751/org-mode-latex-environment-in-drawer

> #+ATTR_LATEX: options: [Here]{There}{That}

> #+begin_fancyquote 
> Something witty!
> #+end_fancyquote

> Should work, it does not work for me

The following  works

#+ATTR_LATEX: :options [2in]




Re: [O] [solved] How remove time from date-time stamp

2019-04-09 Thread Fraga, Eric
On Tuesday,  9 Apr 2019 at 09:22, Detlef Steuer wrote:
> Well, of course it's all text. But 5 times often is not enough,
> cause there are start and end times.
>
> Nevertheless that hint gave me the right direction:

Great.  I find that hint quite useful for me and have to keep reminding
myself.  The fancier org gets, the easier it is to forget this such
fundamental aspect which distinguishes it from most other tools.
-- 
Eric S Fraga via Emacs 27.0.50, Org release_9.2.2-290-g300f15


Re: [O] [solved] How remove time from date-time stamp

2019-04-09 Thread Detlef Steuer
Am Tue, 9 Apr 2019 05:27:50 +
schrieb "Fraga, Eric" :

> On Monday,  8 Apr 2019 at 23:56, Thomas Plass wrote:
> > However, if you want to directly change timestamps in the buffer
> > they live (not: an agenda view), then S-right/left/up/down can call
> > a hook function that does what you're trying to achieve.  
> 
> Or simply C-d (or DEL or BS) 5 times?  "It's all text."
> 

Well, of course it's all text. But 5 times often is not enough,
cause there are start and end times.

Nevertheless that hint gave me the right direction:

In the agenda hit return on an entry.
C-c . opens the interface to alter the timestamp.
C-a C-k (or C-0 C-k) deletes the time part.
Done! Easy enough.

Thank you!

If there were a solution without leaving agenda view, that would be
another big improvement (for me).

Detlef

-- 
The biggest difference between time and space is that you can’t reuse
time. (Merrick Furst)




[O] [SOLVED] Re: void function definition of org-dynamic-block-define

2019-02-27 Thread stardiviner


I suddenly come up with one package 
"[[https://github.com/stardiviner/kiwix.el][kiwix.el]]"; I recently enabled. It 
caused
this issue which Org is not fully loaded.

-- 
[ stardiviner ]
   I try to make every word tell the meaning what I want to express.

   Blog: https://stardiviner.github.io/
   IRC(freenode): stardiviner, Matrix: stardiviner
   GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
  



[O] [SOLVED] Re: How to set Org to export to PDF with image background or color?

2019-02-22 Thread stardiviner


I found solution with LaTeX packages "background" and "graphics".

Here is an example:

   #+begin_src latex :mkdirp yes :tangle 
"data/code/background_test_graphics.tex"
   \documentclass{article}

   \usepackage{graphicx}
   \graphicspath{ {./images/} }

   \usepackage{background}
   \usepackage{lipsum}

   \begin{document}

   \SetBgContents{\includegraphics[width=.3\linewidth]{last-sun}}
   \SetBgPosition{current page.north}

   \pagestyle{empty}

   \title{Test LaTeX export to PDF with background}
   \lipsum[1-10]

   % \newpage\SetBgContents{} % clear background settings.

   \lipsum[1-30]
   \end{document}
   #+end_src


stardiviner  writes:

> I'm writing a simple resume with Org Mode, and exporting to PDF. I want
> to add an image or color as background for every page of resume PDF
> file. Does anyone knows how to do that?
>
> Or have some template for this?
>
> Thanks in advance. Thanks.


-- 
[ stardiviner ]
   I try to make every word tell the meaning what I want to express.

   Blog: https://stardiviner.github.io/
   IRC(freenode): stardiviner, Matrix: stardiviner
   GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
  



[O] [SOLVED] Re: How to pass shell command result to :post source-block?

2019-01-18 Thread stardiviner
I solved my own problem.

Here is the complete code:

#+NAME: ansi-escape-filter
#+begin_src emacs-lisp :var data=""
(with-temp-buffer
  (insert data)
  (ansi-color-apply-on-region (point-min) (point-max))
  (buffer-substring-no-properties (point-min) (point-max)))
#+end_src

#+begin_src sh :dir /sudo:: :post ansi-escape-filter(data=*this*) :results 
output
sudo tree /var/spool/postfix/
#+end_src

#+RESULTS[<2019-01-19 11:12:30> b3add6b3fce7b13d8c63ef78d92b311cc919d300]:
#+begin_example
/var/spool/postfix/
├── active
├── bounce
├── corrupt
├── defer
│   ├── 6
│   ├── 8
│   ├── A
│   ├── B
│   │   └── BDD0D201C2A
│   ├── D
│   └── F
├── deferred
│   ├── 6
│   ├── 8
│   ├── A
│   ├── B
│   ├── D
│   └── F
├── flush
├── hold
├── incoming
├── maildrop
├── pid
│   ├── master.pid
│   ├── unix.bounce
│   ├── unix.cleanup
│   ├── unix.defer
│   ├── unix.showq
│   └── unix.smtp
├── private
│   ├── anvil
│   ├── bounce
│   ├── defer
│   ├── discard
│   ├── error
│   ├── lmtp
│   ├── local
│   ├── proxymap
│   ├── proxywrite
│   ├── relay
│   ├── retry
│   ├── rewrite
│   ├── scache
│   ├── smtp
│   ├── tlsmgr
│   ├── trace
│   ├── verify
│   └── virtual
├── public
│   ├── cleanup
│   ├── flush
│   ├── pickup
│   ├── qmgr
│   └── showq
├── saved
└── trace

26 directories, 30 files
#+end_example


-- 
[ stardiviner ]
   I try to make every word tell the meaning what I want to express.

   Blog: https://stardiviner.github.io/
   IRC(freenode): stardiviner, Matrix: stardiviner
   GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
  


[O] [SOLVED] Re: recently header argument :file does not respect :dir anymore

2019-01-15 Thread stardiviner


This is solved, I found this problem is on package "ob-async" can't
handled the :dir correctly. And it's fixed in latest ob-async now.

-- 
[ stardiviner ]
   I try to make every word tell the meaning what I want to express.

   Blog: https://stardiviner.github.io/
   IRC(freenode): stardiviner, Matrix: stardiviner
   GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
  



[O] [SOLVED] How about Org Mode invalid link handling strategy for exporting?

2019-01-03 Thread stardiviner


I have not found that option. Thanks.

I checked the org-manual.org now, it's mentioned.

-- 
[ stardiviner ]
   I try to make every word tell the meaning what I want to express.

   Blog: https://stardiviner.github.io/
   IRC(freenode): stardiviner, Matrix: stardiviner
   GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
  



Re: [O] [SOLVED] org-20181210 seems to break Column View

2018-12-13 Thread Akater
Thanks anyway.

My bad, it was due to poly-org package which I had installed
recently. It broke undo in org buffers too.


signature.asc
Description: PGP signature


Re: [O] [SOLVED]

2018-11-29 Thread Nick Dokos
Uwe Brauer  writes:

 "Berry," == Berry, Charles  writes:
>
>> I cannot reproduce your export issue with org 9.1.14.
>> You need to provide more details.
>
> Sorry for the noise. I just realised that a very very long time ago I
> installed a function  remove-src-blk-export, which, uhh, removes source
> blocks. 
>
> I removed that function and everything works as expected.

I was going to ask who produced that unfamiliar-looking "%% [removed
source block]" :-) Glad you figured it out.

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




[O] [SOLVED] (was: org babel: %% [removed source block])

2018-11-29 Thread Uwe Brauer
>>> "Berry," == Berry, Charles  writes:

   > I cannot reproduce your export issue with org 9.1.14.
   > You need to provide more details.

Sorry for the noise. I just realised that a very very long time ago I
installed a function  remove-src-blk-export, which, uhh, removes source
blocks. 

I removed that function and everything works as expected.


smime.p7s
Description: S/MIME cryptographic signature


[O] [SOLVED] Re: coderef does not provide file path for org-insert-link when not in original buffre

2018-11-05 Thread stardiviner


Thanks, Nicolas.

-- 
[ stardiviner ]
   I try to make every word tell the meaning what I want to express.

   Blog: https://stardiviner.github.io/
   IRC(freenode): stardiviner, Matrix: stardiviner
   GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
  



[O] [SOLVED] Re: dynamic block :block thismonth seems not correct

2018-11-04 Thread stardiviner


This is because my today limited scope in :block thismonth.

-- 
[ stardiviner ]
   I try to make every word tell the meaning what I want to express.

   Blog: https://stardiviner.github.io/
   IRC(freenode): stardiviner, Matrix: stardiviner
   GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
  



Re: [O] [solved] target file of capture template does not save

2018-08-02 Thread tom
On Thu, Aug 2, 2018 at 8:13 AM tom  wrote:

> You guys are so skillful and awesome you helped me without saying a word!
>
> After looking around at
>
> https://emacs.stackexchange.com/questions/477/how-do-i-automatically-save-org-mode-buffers
>
> I just added a third hook,
> (add-hook 'org-capture-mode-hook 'org-save-all-org-buffers)
>
> I'll mark this solved. Org rocks, I don't rock.
>
>
> On Wed, Aug 1, 2018 at 8:41 AM tom  wrote:
>
>> Me again. Let me try to provide a bit more info. I'm using xdotool to
>> call "emacsclient -c -e '(org-capture)'". In my init.el, I have both
>>
>> (add-hook 'org-capture-mode-hook 'make-frame)
>> and
>> (add-hook 'org-capture-mode-hook 'delete-frame)
>>
>> my capture template writes to, say, "beans.org."
>>
>> I swoop in with the mouse, choose the template, finish, and the capture
>> frame goes away. perfect. I don't open or ever see beans.org. But when I
>> do visit the file, it is sitting there unsaved. How can I have it
>> automatically save for me? Modify the org-capture-mode hook? If that's the
>> case, may I have some help with the modification? Or am I missing something
>> else?
>>
>> Thanks.
>>
>> On Fri, Jul 27, 2018 at 7:42 PM tom  wrote:
>>
>>> Hey guys, I have a capture template set up pretty much the way I want
>>> it,  but the file it writes to does not save afterwards. It's a table line
>>> template with some prompts, :prepend, :table-line-position, and
>>> :kill-buffer.
>>>
>>> Why doesn't the file save? Is it supposed to?
>>> thanks
>>>
>>


[O] [SOLVED] Re: Unifty orgalist and org list behavior.

2018-07-15 Thread Uwe Brauer
Hi,
sorry you are right. I set plain list item to always and also changed
org-list-allow-alphabetical, so everything works as expected

On Sun, Jul 15, 2018 at 12:06 PM Nicolas Goaziou 
wrote:

> Hello,
>
> Uwe Brauer  writes:
>
> > I enjoy pretty much orgalist, which behaves slightly differently form
> > vanilla org mode lists.
> >
> > So could vanilla org mode list also include
> >
> >1. An equivalent toorgalist-separated-items
>
> See `org-blank-before-new-entry'.
>
> >2. Make org-cycle-list-bullet more similar to
> >   orgalist-cycle-bullet: especially I liked
> >   ‘-’  ->  ‘+’  ->  ‘1.’  ->  ‘a.’
> >
> >   Over org vanillas
> >
> >   ‘-’  ->  ‘+’  ->  ‘*’  ->  ‘1.’  ->  ‘1)’
> >   or is there a variable in org mode to customize the cylcling and
> >   I did not find it?
>
> See `org-list-allow-alphabetical' and
> `org-plain-list-ordered-item-terminator'.
>
> Unfortunately, you cannot remove "*" bullet from vanilla Org.
>
> Regards,
>
> --
> Nicolas Goaziou
>


[O] [SOLVED, really] (was: export to odt, eqnarray and align are not supported)

2018-06-15 Thread Uwe Brauer
>>> "Eric" == Eric S Fraga  writes:

   > On Friday, 15 Jun 2018 at 10:52, Uwe Brauer wrote:
   >> Both a set to nil, but even if I try dvipng via 
   >> 
   >> #+OPTIONS: tex:dvipng
   >> 
   >> Or   #+OPTIONS: tex:imagemagick

   > Data point:

   > Both work for me.  The dvipng output looks better, however.  The mathml
   > doesn't work (for me) for the second case with the align environment.

   >> The math, even equations are inserted verbatim, that is really odd.
   >> The minibuffer tells me that the png are generated and indeed there are,
   >> but they are not inserted in the odt file using as  org-export-dispatch
   >> and then chosing odt.

   > Strange.  Cannot help.  Sorry.

Ok I found the culprit, I debugged ox-odt.el
it is the following function 


(defun org-odt-format-headline-default-function
 (let* ((style (format "OrgPriority-%s" priority))
 ^ this is the problem.

The new code has 

  (let* ((style (format "OrgPriority-%c" priority))

And this solves the eqnarray problem. Good, uff relived. Now I can go
home ;-)


smime.p7s
Description: S/MIME cryptographic signature


[O] [SOLVED] (was: orgtbl in latex files: array with \hline)

2018-06-15 Thread Uwe Brauer
>>> "Uwe" == Uwe Brauer  writes:

   > Hi

   > I would like to generate the following array environment with orgtbl.

   > \begin{equation*}
   > % BEGIN RECEIVE ORGTBL laplace
   > \begin{array}{|c|c|}
   >  f(x) & \mathcal{L} \left\{ f(x) \right\} =F(s) \\ \hline
   > \end{array}
   > % END RECEIVE ORGTBL laplace
   > \begin{comment}

   > #+ORGTBL: SEND laplace orgtbl-to-latex :latex-default-table-mode math 
:environment array
   > | f(x)| \mathcal{L} \left\{ f(x) \right\} =F(s)
|

   > \end{comment}
   > \end{equation*}


   > How can I achieve {|c|c|} and \hline when translating the table to
   > latex?

I think I asked something similar a while ago and the correct answer
seems to be:


\begin{equation}
  \label{eq:myarray:1}
\begin{array}{l|l|}
% BEGIN RECEIVE ORGTBL test
17 & 8\\ \hline
% END RECEIVE ORGTBL test
\end{array}
\end{equation}

\begin{comment}
#+ORGTBL: SEND test orgtbl-to-latex  :lend " \\hline" :environment array 
:splice t
| 17 | 8 |
\end{comment}



smime.p7s
Description: S/MIME cryptographic signature


[O] [SOLVED?] (was: how to compare strings of two columns for huge tables)

2018-06-13 Thread Uwe Brauer
>>> "Uwe" == Uwe Brauer  writes:

   > Hi

   > I have tables (several hundred rows) like this


   > | 03217428 |  3217428 |   |
   > | 71310606 | 71310606 |   |
   > | 05944371 |  5944371 |   |
   > | 70086251 | 70086251 |   |
   > | 50325182 | 50325182 |   |
   > | 04559101 |  4559101 |   |
   > | 51005420 | 51005420 |   |
   > | 51141846 | 51141846 |   |
   > | 05448640 |  5448640 |   |
   > | 06602597 |  6602597 |   |

   > #+TBLFM: $3=if("$1" == "$2", string("OK"))

   > So I would like to add a new column, which would return OK, if the
   > strings of each row of the to columns coincide. I tried 

   > #+TBLFM: $3=if("$1" == "$2", string("OK"))

   > But it did not work. I googled and looked up the manual, no help.

   > It seems a common problem for spreadsheet so I presume there must be an
   > solution but I am unable to find it and would appreciate any help.

   > Thanks 

   > Uwe Brauer


The following seems to work 

|   03217428 |3217428 | NO |
|   71310606 |   71310606 | OK |
|   05944371 |5944371 | NO |
|   70086251 |   70086251 | OK |
|   50325182 |   50325182 | OK |
|   04559101 |4559101 | NO |
|   51005420 |   51005420 | OK |
|   51141846 |   51141846 | OK |
|   05448640 |5448640 | NO |
|   06602597 |6602597 | NO |
|  8 |  9 | NO |
| Hallo This | Hallo This | OK |
#+TBLFM: $3=if("$1" == "$2", OK, string("NO"))



smime.p7s
Description: S/MIME cryptographic signature


[O] [solved] (was: orgalist-mode seems not to work in GNU emacs 27 (master))

2018-05-07 Thread Uwe Brauer
>>> "Uwe" == Uwe Brauer  writes:

   > Hi

   > I just downloaded the package and turn orgalist minor mode on in my
   > message buffer. I try to insert a list as described

Forget my mail. I restarted emacs and everything is as expected. Sorry
for the noise.


smime.p7s
Description: S/MIME cryptographic signature


Re: [O] [SOLVED] org-attach provide org-store-link like link for org-insert-link

2018-05-05 Thread tumashu










At 2018-05-05 13:14:10, "stardiviner"  wrote:
>
>stardiviner  writes:
>
>> I used a lot with org-attach to insert files like images, small PDF
>> files, and audio. Every time I attached one file, I have to manually
>> link to that attachment file.
>>
>> Can org-attach provide link directly after finished attaching? So user
>> can press [C-c C-l] (org-insert-link) directly.
>
>After check out org-attach.el source code. I found option
>`org-attach-store-link-p`. This is what I want.

A very good tip, thanks!
>
>--
>[ stardiviner ] don't need to convince with trends.
>   Blog: https://stardiviner.github.io/
>   IRC(freenode): stardiviner
>   GPG: F09F650D7D674819892591401B5DF1C95AE89AC3


Re: [O] [SOLVED] org-attach provide org-store-link like link for org-insert-link

2018-05-04 Thread stardiviner

stardiviner  writes:

> I used a lot with org-attach to insert files like images, small PDF
> files, and audio. Every time I attached one file, I have to manually
> link to that attachment file.
>
> Can org-attach provide link directly after finished attaching? So user
> can press [C-c C-l] (org-insert-link) directly.

After check out org-attach.el source code. I found option
`org-attach-store-link-p`. This is what I want.

--
[ stardiviner ] don't need to convince with trends.
   Blog: https://stardiviner.github.io/
   IRC(freenode): stardiviner
   GPG: F09F650D7D674819892591401B5DF1C95AE89AC3



Re: [O] [SOLVED] How to use xml src block as data input?

2018-05-01 Thread stardiviner
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

This is great. Thanks John.

- -- 
[ stardiviner ] don't need to convince with trends.
   Blog: https://stardiviner.github.io/
   IRC(freenode): stardiviner
   GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
  
-BEGIN PGP SIGNATURE-

iQEzBAEBCAAdFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAlroZzkACgkQG13xyVro
msO8kQf+OhzChdi9GRrjKEJOQNod2Gg9g86eGBu5w97ZOHgj/MkOzu2jd3AMxKDN
mt6LKXmcJCDEzKIO36xiiypdckwfU98zAZGrpLFbUlYZ3wdLT/HY1XWXkOHGiQvk
h6rxi7jWdkKw4/tSMZ/Mh70bJ803Y2jZ5JnKx4hwVlgBfoettgWfRf6h91Zg/VcU
QDrIMG5aYcgoMA0GwWtOWeYuYIkq18/Elg6gQhSg+vIe0s0U/4qoArlIFL0AoZcF
qwBZ1hBukWOf1gHvvI8rjbqQ4BOFFjDSbPS6/C+NMZL7oDkbpErH5JAaZTsYYH5e
QBLsOjao+bG1d+7TtZzD92kAsWN5Kg==
=/XVs
-END PGP SIGNATURE-



[O] [SOLVED] (was: problems with tables using https://orgmode.org/worg/org-tutorials/org-lookups.html)

2018-05-01 Thread Uwe Brauer
>>> "Nicolas" == Nicolas Goaziou  writes:

   > Hello,
   > Uwe Brauer  writes:


   > It definitely works here.

Sorry by bad, I did not eval the lisp command in-interval!

Now everything works as expected. Thanks!


smime.p7s
Description: S/MIME cryptographic signature


Re: [O] [SOLVED] How to use xml src block as data input?

2018-04-30 Thread John Kitchin
all things in emacs are elisp...

You can use this function:

#+BEGIN_SRC emacs-lisp
(defun get-xml (name)
  (save-excursion
(org-babel-goto-named-src-block name)
(org-element-property :value (org-element-context
#+END_SRC

#+RESULTS:
: get-xml

like this in a python (or other general lang) block to get the xml as a
string that you parse in the language:

#+BEGIN_SRC python :var data=(get-xml "xml-example")
import xml.etree.ElementTree as ET
root = ET.fromstring(data)
for child in root:
print(child.tag, child.attrib)
#+END_SRC

#+RESULTS:
: to {}
: from {}
: heading {}
: body {}

I don't know about noweb.

John

---
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu


On Mon, Apr 30, 2018 at 8:36 PM, stardiviner  wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
>
> Thanks, John and Simonyi. This is a solution on Elisp. Not general way.
> But as a intermedia step, really workable. I chose this method.
>
> BTW, is it possible to archived with noweb reference <> ?
> Like
>
> #+begin_src python :var data=<>
> ...
> #+end_src
>
> - --
> [ stardiviner ] don't need to convince with trends.
>Blog: https://stardiviner.github.io/
>IRC(freenode): stardiviner
>GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
>
> -BEGIN PGP SIGNATURE-
>
> iQEzBAEBCAAdFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAlrn4LYACgkQG13xyVro
> msP8ywf/VaaQkpFcV16/2NDRODkC+iNN6TCp1MRJjYL9qkppa/A8vRGPZSxIG5Sd
> d2TEGx+mqRS0EANM/mhJwAIlM5U9SpycBfzasvU7R+Cn9CiehZCnJKA0dBaZiu+q
> vPBifqEqOzY873XsaRS2Xty6W4NSrh8aL6hEWxiDJSafjaCxI2FvApg2JnPi6HoC
> /sy9eSuIYvG8vCRow9y8E/GFcWE5EXoB/d/mdcEmGz80sB39Tjp4PGvLMyglROMa
> sR+8QkUTQAtDP4uEAF7biHAGE2PcELpZVLjzWm0GfZkCdJF9tH8KrEXaorB+hyHn
> MWxzlZ/gSNcsROF7DHVaZgCMMiiXuw==
> =fImh
> -END PGP SIGNATURE-
>


Re: [O] [SOLVED] How to use xml src block as data input?

2018-04-30 Thread stardiviner
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Thanks, John and Simonyi. This is a solution on Elisp. Not general way.
But as a intermedia step, really workable. I chose this method.

BTW, is it possible to archived with noweb reference <> ?
Like

#+begin_src python :var data=<>
...
#+end_src

- -- 
[ stardiviner ] don't need to convince with trends.
   Blog: https://stardiviner.github.io/
   IRC(freenode): stardiviner
   GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
  
-BEGIN PGP SIGNATURE-

iQEzBAEBCAAdFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAlrn4LYACgkQG13xyVro
msP8ywf/VaaQkpFcV16/2NDRODkC+iNN6TCp1MRJjYL9qkppa/A8vRGPZSxIG5Sd
d2TEGx+mqRS0EANM/mhJwAIlM5U9SpycBfzasvU7R+Cn9CiehZCnJKA0dBaZiu+q
vPBifqEqOzY873XsaRS2Xty6W4NSrh8aL6hEWxiDJSafjaCxI2FvApg2JnPi6HoC
/sy9eSuIYvG8vCRow9y8E/GFcWE5EXoB/d/mdcEmGz80sB39Tjp4PGvLMyglROMa
sR+8QkUTQAtDP4uEAF7biHAGE2PcELpZVLjzWm0GfZkCdJF9tH8KrEXaorB+hyHn
MWxzlZ/gSNcsROF7DHVaZgCMMiiXuw==
=fImh
-END PGP SIGNATURE-



[O] [SOLVED] Re: Let org table support move region selected fields

2018-04-29 Thread stardiviner
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256


> They are, but within "special" commands -- see this in org.el:
>
> (org-defkey org-mode-map (kbd "C-c C-x C-w") #'org-cut-special)
> (org-defkey org-mode-map (kbd "C-c C-x M-w") #'org-copy-special)
> (org-defkey org-mode-map (kbd "C-c C-x C-y") #'org-paste-special)

I see, thanks Bastien

- -- 
[ stardiviner ] don't need to convince with trends.
   Blog: https://stardiviner.github.io/
   IRC(freenode): stardiviner
   GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
  
-BEGIN PGP SIGNATURE-

iQEzBAEBCAAdFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAlrl12UACgkQG13xyVro
msMj5gf+OIkQRlaVeyJNUkgn5mCTIodz0JrVEhHAYL05f0cvbxRzhkM+0HNZPZnY
ZxbhOkJ5KpCUXm+4eb+mnbYs5p1CW3Rq0jhXfXO8p7/NZQgKKmXDUDefpvdGYizO
yZp55acP8hP7MggJ/Oy3O3zsWQ7BviG7JHxOx+TQlkMGfS/6CtkcH7wNuhJV0VM5
1vRFXU7L3puPznTB+w1pxGb6E/GWhMuhAfnaCkaxLHAW9Adoh1ov4NDbpghqpL2S
i2AzrlYM4HWtaPbUs2k4ppCerruSbEgir6f8NjQFeRleGU3trqbcl9kYu1cA/8yw
gECCLcaAyVENyFPcreg5JKEGMXVMMQ==
=Yttn
-END PGP SIGNATURE-



[O] [SOLVED :padline no] (was: org-babel-trangle, proble when loop is interrupted by documentation)

2018-04-21 Thread Uwe Brauer
>>> "Uwe" == Uwe Brauer  writes:

   >> Hello,
   >> Uwe Brauer  writes:


   >> I guess you have to set `org-src-preserve-indentation' globally, or use
   >> "-i" flag for the block, which is locally equivalent.

I think I found it:

* A test example

#+BEGIN_SRC matlab :tangle test.m :padline no
function [ll x]=mitest(A0,x0)
% initialization 
format long
epsi=1.e-3;
nit=0;
nmaxit=200;
Delta=10;
A=A0;
while Delta>epsi & nit

[O] [SOLVED aggregate] (was: send the content of one column of a table to another table)

2018-04-10 Thread Uwe Brauer
>>> "Uwe" == Uwe Brauer  writes:

   > Hi
   > I want to do something simple, just sending (pushing) a column of 
   > one table to another column of another table. I know about 
   > orgtbl-join but I can't get it to work, besides I don't need all 
   > its sophistication.

Hi

It seems that the following does what I want.


#+begin_example



#+NAME: original
| Day   | Color | Level | Quantity |
|---+---+---+--|
| Monday| Red   |30 |   11 |
| Monday| Blue  |25 |3 |
| Tuesday   | Red   |51 |   12 |
| Tuesday   | Red   |45 |   15 |
| Tuesday   | Blue  |33 |   18 |
| Wednesday | Red   |27 |   23 |
| Wednesday | Blue  |12 |   16 |
| Wednesday | Blue  |15 |   15 |
| Thursday  | Red   |39 |   24 |
| Thursday  | Red   |41 |   29 |
| Thursday  | Red   |49 |   30 |
| Friday| Blue  | 7 |5 |
| Friday| Blue  | 6 |8 |
| Friday| Blue  |11 |9 |


#+BEGIN: aggregate :table original :cols "Day Color"
| Day   | Color |
|---+---|
| Monday| Red   |
| Monday| Blue  |
| Tuesday   | Red   |
| Tuesday   | Blue  |
| Wednesday | Red   |
| Wednesday | Blue  |
| Thursday  | Red   |
| Friday| Blue  |
#+END
#+end_example





[O] [SOLVED] Re: How to combine Lisp style and Calc style Table Formula together?

2018-04-09 Thread stardiviner
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256


Thierry Banel  writes:

> Try this:
> $2=$1;%1.1e
>

Thanks, this is really great.

- -- 
[ stardiviner ] don't need to convince with trends.
   Blog: https://stardiviner.github.io/
   IRC(freenode): stardiviner
   GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
  
-BEGIN PGP SIGNATURE-

iQEzBAEBCAAdFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAlrMBt8ACgkQG13xyVro
msPjqwf/Xh1KCCGHOUeNVcZuxHyVDOXNpdQJc5CQxfhlhU5Tvbw+fMKOFyONpjqW
kQxl5cIIpiK2ApQCGI1HKh64iZtFH2A1yJfuLfsUq5lGNn6StaaJ+2R3fEsU3xcZ
3ktrEAAA1MsgGmK7idrrBoP6zYFzXCCcZvC5zPJBTzGeu4i/BRt61Kss56n7aMda
PJM8S3Zu9imUzejmS8jnW9PNDu9JuGOnoOnzBDwdlxTSWD7CPDY1TzCxPmCmK2Uk
AzjaH6a3K294T25Jv8TFcY2pHXKtOgdwAQSMOzntrtj4Epk5eZ54dlOdj6hhiLDw
m00QC4ojvInuP2r0p6v7MtnsHw2AjQ==
=tP9F
-END PGP SIGNATURE-



Re: [O] [SOLVED]

2018-04-04 Thread Uwe Brauer



   > To answer my own question

   > | / | / | |   | /   |
   > |   | Name  | Res | Letra | Obs |
   > |---+---+-+---+-|
   > |   | Smith |   0 |   | |
   > |   | Jones | 1.4 |   | |
   > |   | Bond  | 5.6 | * | |

   > All columns starting with / are ignored when exporting. Sorry for the
   > noise and the double posting.


That is not entirely correct. Someone (I forgot who it was, sorry)
provided me with the following hack


(add-hook 'org-export-before-processing-hook
   'f-ox-filter-table-column-del)


(defun f-ox-filter-table-column-del (back-end)
   "Delete the columns $2 to $> marked as \"/\" on a row with \"/\" in $1.
 If you want a non-empty column $1 to be deleted make it $2 by
 inserting an empty column before or rearrange column order in
 some other way. Make sure \"/\" is in $1 again after that."
   (while (re-search-forward
   "^[ \t]*| +/ +|\\(.*?|\\)?? +\\(/\\) +|" nil t)
 (goto-char (match-beginning 2))
 (org-table-delete-column)
 (beginning-of-line)))


That is very useful and I wonder why there is nothing in org vanilla
(but then it might and I did not find it.)




[O] [SOLVED] (was: export table to html, don't display certain columns)

2018-04-04 Thread Uwe Brauer
>>> "Uwe" == Uwe Brauer  writes:

   > Hi
   > I know that in radio tables I can skip columns like this

   > % END RECEIVE ORGTBL firmas \begin{comment} #+ORGTBL: SEND firmas
   > orgtbl-to-latex  :skipcols (1) :lend " \\hline" :environment
   > supertabular 

To answer my own question

| / | / | |   | /   |
|   | Name  | Res | Letra | Obs |
|---+---+-+---+-|
|   | Smith |   0 |   | |
|   | Jones | 1.4 |   | |
|   | Bond  | 5.6 | * | |

All columns starting with / are ignored when exporting. Sorry for the
noise and the double posting.

Uwe Brauer 




[O] [SOLVED] let org-git-link.el suport Magit related buffers

2018-03-27 Thread stardiviner

Thanks for your suggestion. This is great.


On 03/27/2018 02:04 PM, Daniel Kraus wrote:

Hi!

stardiviner  writes:


I hope can combine Org-mode links with Magit through `org-git-link.el`.
[...]
Is there anyone want to or can implement this?

There is https://github.com/magit/orgit

Cheers,
   Daniel




Re: [O] [SOLVED]

2018-03-09 Thread Thorsten Jolitz
Uwe Brauer  writes:

>> Uwe Brauer  writes:
>
>> When I do M-# # writing this mail I see:
>> ,
>> | [ *unsent followup to Uwe Brauer on gmane.emacs.orgmode* ] Exit
>> | with M-#
>> | (Meta-Key and #)
>> | * --text follows this line--
>> | Uwe Brauer  writes: ...[]
>> `
>
>
> I found the culprit
>
> (setq message-yank-prefix "   > ")
>
> No idea why I had this, but may be it is ages there. Just moving it out
> my init files and everything worked as expected. Thanks

Ok, good ... ;-)

-- 
cheers,
Thorsten




[O] [SOLVED] (was: how do you compose mails in Gnus with org-mode)

2018-03-09 Thread Uwe Brauer

   > Uwe Brauer  writes:

   > When I do M-# # writing this mail I see:
   > ,
   > | [ *unsent followup to Uwe Brauer on gmane.emacs.orgmode* ] Exit with M-#
   > | (Meta-Key and #)
   > | * --text follows this line--
   > | Uwe Brauer  writes: ...[]
   > `


I found the culprit

(setq message-yank-prefix "   > ")

No idea why I had this, but may be it is ages there. Just moving it out
my init files and everything worked as expected. Thanks

Uwe 




[O] [SOLVED] Re: How to get a list of all TODO keywords from defined variable `org-todo-keywords`?

2018-01-04 Thread numbch...@gmail.com
This works great. Thanks.

[stardiviner] GPG key ID: 47C32433
IRC(freeenode): stardiviner Twitter:  @numbchild
Key fingerprint = 9BAA 92BC CDDD B9EF 3B36  CB99 B8C4 B8E5 47C3 2433
Blog: http://stardiviner.github.io/

On Thu, Jan 4, 2018 at 10:23 AM, Adam Porter  wrote:

> This might do:
>
> (completing-read "Todo keyword: " org-todo-keywords-for-agenda nil t)
>
>
>


[O] [SOLVED] Re: babel header argument :var is not expanded when tangling

2017-12-28 Thread stardiviner

   tangles to

   (let ((x (quote "hi")))
   (message x))


This is what I want. Problem solved.

On 12/28/2017 09:20 AM, Grant Rettke wrote:

They work differently. Try this example:

#+BEGIN_SRC emacs-lisp :var x="hi"
(message x)
#+END_SRC

tangles to

(let ((x (quote "hi")))
(message x))

but this

#+NAME: x
#+BEGIN_SRC emacs-lisp
"hi"
#+END_SRC

#+BEGIN_SRC emacs-lisp
(message «x»)
#+END_SRC

tangles to this

(message "hi"


Sincerely,

Grant Rettke

On Mon, Dec 25, 2017 at 6:45 AM, numbch...@gmail.com 
 > wrote:



I see. I will use noweb style for now.
But should tangle expand :var variables when tangling? I think
this is the correct behaviour.

[stardiviner]     GPG key ID: 47C32433
IRC(freeenode): stardiviner Twitter:  @numbchild
Key fingerprint = 9BAA 92BC CDDD B9EF 3B36  CB99 B8C4 B8E5 47C3 2433
Blog: http://stardiviner.github.io/

On Sun, Dec 24, 2017 at 11:40 PM, Grant Rettke
mailto:g...@wisdomandwonder.com>> wrote:

> Here is a quick test:
>
> * Test tangle will auto expand and substitute :var
>
> #+begin_src js :tangle kk.js
> console.log("hello, world!");
> #+end_src
>
> #+begin_src js :var name="chris" :tangle require-kk.js
> // require("kk.js");
> console.log("Hi, ", name);
> #+end_src
>
> #+RESULTS:
> : Hi,  chris
>
> #+NAME: check whether tangle expand and substitute :var
> #+begin_src shell
> cat require-kk.js
> #+end_src
>
> #+RESULTS: check whether tangle expand and substitute :var
> : var name="chris";
> : console.log("Hi, ", name);
>
> The upper result should be: ~console.log("Hi, ", "chris");~.

Here are your two source blocks. They each do literate
programming,
one with Variable style and the other with Noweb style. When you
evaluate them you get an identical result. When you tangle
them you
get two different pieces of code, that generate the same
result. You
can peek at what the tangled code will look like by calling
org-babel-expand-src-block inside the source block. That is how it
will look in the tangled file. I think that want Noweb style.

When I use the Variable approach like this

#+begin_src js :var name="chris" :tangle kk.js
console.log("Hi, ", name);
#+end_src

I get this in the tangled output file

var name="chris";
console.log("Hi, ", name);

When I use the the Noweb approach like this

#+NAME: name
#+BEGIN_SRC emacs-lisp
chris
#+END_SRC

#+NAME:
org_gcr_2017-12-23_mara_3D887FDD-163D-4BE1-80E8-464BF29DABEA
#+BEGIN_SRC js :tangle noweb-kk.js :comments no
console.log("Hi, ", "«name»");
#+END_SRC

I get this in the tangled  output file

console.log("Hi, ", "chris");

WDYT?







Re: [O] Solved: Bug: org-encrypt-entry fails [9.1.2 (9.1.2-elpa @ /Users/dmm/.emacs.d/elpa/org-20171004/)]

2017-10-15 Thread David Maslen
Fair enough. When I get some time I’ll find out how to send this through as a 
Wishlist bug. Thank you for the direction.

> On 15 Oct 2017, at 7:37 pm, Nicolas Goaziou  wrote:
> 
> Hello,
> 
> David Maslen  writes:
> 
>> I’m sorry I don’t know how to implement, or provide a patch, but I checked 
>> *messages* for a clue to what was going wrong.
>> I now think this isn’t an org issue, but the epa functions worked, and the 
>> org-encrypt (which I read uses epg) failed silently, so I reported here.
>> 
>> If the *messages* said something like “prompting for passphrase”, I’d
>> have realised earlier that was not occurring.
> 
> Org Crypt never directly prompts for a passphrase. `epg-encrypt-string'
> does. So I think this message should be sent from EPG library instead.
> 
> Regards,
> 
> -- 
> Nicolas Goaziou




Re: [O] Solved: Bug: org-encrypt-entry fails [9.1.2 (9.1.2-elpa @ /Users/dmm/.emacs.d/elpa/org-20171004/)]

2017-10-15 Thread Nicolas Goaziou
Hello,

David Maslen  writes:

> I’m sorry I don’t know how to implement, or provide a patch, but I checked 
> *messages* for a clue to what was going wrong.
> I now think this isn’t an org issue, but the epa functions worked, and the 
> org-encrypt (which I read uses epg) failed silently, so I reported here.
>
> If the *messages* said something like “prompting for passphrase”, I’d
> have realised earlier that was not occurring.

Org Crypt never directly prompts for a passphrase. `epg-encrypt-string'
does. So I think this message should be sent from EPG library instead.

Regards,

-- 
Nicolas Goaziou



Re: [O] Solved: Bug: org-encrypt-entry fails [9.1.2 (9.1.2-elpa @ /Users/dmm/.emacs.d/elpa/org-20171004/)]

2017-10-14 Thread David Maslen
I’m sorry I don’t know how to implement, or provide a patch, but I checked 
*messages* for a clue to what was going wrong.
I now think this isn’t an org issue, but the epa functions worked, and the 
org-encrypt (which I read uses epg) failed silently, so I reported here.

If the *messages* said something like “prompting for passphrase”, I’d have 
realised earlier that was not occurring.



> On 14 Oct 2017, at 7:33 pm, Nicolas Goaziou  wrote:
> 
> Hello,
> 
> David Maslen  writes:
> 
>> Problem was that in graphical mode I saw no password prompt. Failed without 
>> a useful failure message.
>> Perhaps org-crypt could be improved to catch this situation?
> 
> What would you suggest?
> 
> Regards,
> 
> -- 
> Nicolas Goaziou




Re: [O] Solved: Bug: org-encrypt-entry fails [9.1.2 (9.1.2-elpa @ /Users/dmm/.emacs.d/elpa/org-20171004/)]

2017-10-14 Thread Nicolas Goaziou
Hello,

David Maslen  writes:

> Problem was that in graphical mode I saw no password prompt. Failed without a 
> useful failure message.
> Perhaps org-crypt could be improved to catch this situation?

What would you suggest?

Regards,

-- 
Nicolas Goaziou



[O] Solved: Bug: org-encrypt-entry fails [9.1.2 (9.1.2-elpa @ /Users/dmm/.emacs.d/elpa/org-20171004/)]

2017-10-13 Thread David Maslen
Solved. 
Problem was that in graphical mode I saw no password prompt. Failed without a 
useful failure message.
Perhaps org-crypt could be improved to catch this situation?

Starting emacs in a terminal worked, as the password prompt was in the 
originating terminal window.
On a Mac, I tended to start emacs from the dock, so no terminal.

Solution was to follow the instruction in pinentry. 
I then added (pinenty-start) to my .emacs init file.
No org-encrypt-entry prompts for a password in the minibuffer.


pinentry is a built-in package.

 Status: Built-In.
Version: 0.1
Summary: GnuPG Pinentry server implementation
Other versions: 0.1 (gnu).


This package allows GnuPG passphrase to be prompted through the
minibuffer instead of graphical dialog.

To use, add "allow-emacs-pinentry" to "~/.gnupg/gpg-agent.conf",
reload the configuration with "gpgconf --reload gpg-agent", and
start the server with M-x pinentry-start.



> On 14 Oct 2017, at 3:33 am, Nicolas Goaziou  wrote:
> 
> Hello,
> 
> David Maslen  writes:
> 
>> In the example below the words “test this” are not replaced by encrypted
>> text.
>> My previous experience is that the entire contents of a org subheading
>> structure marked with the :crypt: tag would be encrypted/decrypted by the
>> related org function.
> 
> I cannot reproduce it. The text is properly replaced by encrypted text
> here.
> 
> Regards,
> 
> -- 
> Nicolas Goaziou0x80A93738




[O] [SOLVED] (was: exporting org to latex, execute matlab before exporting)

2017-08-03 Thread Uwe Brauer
>>> "Uwe" == Uwe Brauer  writes:


   > Which is what I want. When I convert the org file to latex I am again
   > asked to execute the src block, which I don't want since it is already
   > executed. How can I avoid this question, without deleting the src block.
   > This is important if I have a lot of blocks which I already have
   > executed, and want to export the file without denying is executing every
   > time I am asked.

To answer my own question put

# -*- org-export-babel-evaluate: nil -*-

At the beginning of the file.




[O] [SOLVED] Re: Mouse-over on bibliographic citation

2017-06-22 Thread Sharon Kimble
John Kitchin  writes:

> Can you add this to your org-file, run it and tell me what the output is:
>
> #+BEGIN_SRC emacs-lisp
> (org-ref-find-bibliography)
> #+END_SRC
>
> Also run M-x org-ref to see what bibliography org-ref thinks it is
> using in that file. There were some recent changes to
> (org-ref-find-bibliography) that might be causing this problem.

--8<---cut here---start->8---
Bibliography
No bibliographystyle found.
Using these bibtex files: (/home/boudiccas/research/hair17/hair17.bib 
/home/boudiccas/research/age-and-trans/cancer/cancer.bib)
--8<---cut here---end--->8---

>
> Do you have a bibliography link in the file you are working in?
>

This is in a file called hair17.org and this is its bibliography
install -

--8<---cut here---start->8---
#+latex_header: 
\usepackage[backend=biber,style=authoryear,doi=true,hyperref=true,backref=true,backrefstyle=two,date=year,maxcitenames=3]{biblatex}
#+LATEX_HEADER: \addbibresource{/home/boudiccas/research/hair17/hair17.bib}
--8<---cut here---end--->8---

Right, I've sorted the problem out. Somehow I had various things that I
was building the pdf with, meaning #+latex_header:, which included a
reference to 'cancer.bib'. I thought that it was commented out, but when
I deleted all comments out latex_headers I've found that it is only
referencing hair17.bib as shown in this output.

--8<---cut here---start->8---
Bibliography
No bibliographystyle found.
Using these bibtex files: (/home/boudiccas/research/hair17/hair17.bib)
--8<---cut here---end--->8---

Sorry for all the hassle and noise that I've caused.

Sorry
Sharon.

>
> Sharon Kimble writes:
>
>> John Kitchin  writes:
>>
>>> this is a bug in the current org-mode 9.0.8. You have to revert it to org 
>>> 9.0.7 for now. It has been fixed, but I am not sure when it will show up.
>>
>> Thanks for this John.
>>
>> I can confirm that with today's release of 'org-mode plus contribs' the
>> desired over effect has returned, but with a caveat - its showing the
>> wrong bibliographic entry! I have this in my config file -
>>
>> --8<---cut here---start->8---
>> #+begin_src emacs-lisp
>> (require 'org-ref)
>> (setq reftex-default-bibliography '("~/research/death/death.bib"))
>>
>> ;; see org-ref for use of these variables
>> (setq org-ref-bibliography-notes "~/research/notes.org"
>>   org-ref-default-bibliography '("~/research/death/death.bib")
>>   org-ref-pdf-directory "~/research/death/pdfs")
>>
>> (setq bibtex-completion-bibliography "~/research/death/death.bib"
>>   bibtex-completion-library-path "~/research/death/pdfs"
>>   bibtex-completion-notes-path "~/research/death/helm-bibtex-notes")
>> #+end_src
>> [2016-09-20 Tue 04:15]
>> [2017-01-17 Tue 11:34]
>> --8<---cut here---end--->8---
>>
>> Going back to '(cite:0072)' the mouse-over now shows 'NHS, , /Ovarian
>> cancer/ (2015).', which is the reference in 'death.bib'!
>>
>> I'm using the exact same code-block as pre-the updated org-mode, and
>> I've restarted emacs, so I'm not sure what ought to be changed, if
>> anything, but I'm unhappy with what its now showing as its not correct.
>>
>> Do I need to revamp my code-block, and if so, how please?
>>
>> Thanks
>> Sharon.
>>
>>>
>>> On Wed, Jun 21, 2017 at 5:50 PM, Sharon Kimble  
>>> wrote:
>>>
>>> I've got this strange problem and I'm not sure when it started, possibly
>>> when this new computer was first put to use last Friday afternoon with a
>>> fresh install of Debian 9, or maybe before then, I'm not sure.
>>>
>>> Anyway, whenever I mouse-over a bibliographic citation in an org-mode
>>> document, it used to say for (cite:0072) '\Hair loss, 2015,
>>> http://www.regrowth.com/hair-loss-articles/ \' but now just shows
>>> 'LINK:cite:0072'.
>>>
>>> I am using 'org-ref' which is up to date, as is org-mode, and both from
>>> ELPA.
>>>
>>> This is what my bibliography item actually is -
>>>
>>> --8<---cut here---start->8---
>>> @Online{0072,
>>>  Title  = {Hair loss},
>>>  Author = {regrowth},
>>>  Url   = {http://www.regrowth.com/hair-loss-articles/},
>>>  Year  = {2015}
>>> }
>>> --8<---cut here---end--->8---
>>>
>>> So how can I regain my previous mouse-over abilities please?
>>>
>>> Thanks
>>> Sharon.
>>> --
>>> A taste of linux = http://www.sharons.org.uk
>>> TGmeds = http://www.tgmeds.org.uk
>>> DrugFacts = https://www.drugfacts.org.uk
>>> Debian 9.0, fluxbox 1.3.5-2, emacs 25.1.1, org-mode 9.0.7
>>>
>
>
> --
> Professor John Kitchin
> Doherty Hall A207F
> Department of Chemical Engineering
> Carnegie 

Re: [O] [Solved] Gnuplot and Windows

2017-04-19 Thread Bala Ramadurai
Thanks Jon for your help.
  I finally managed to solve this by explicitly mentioning the path in the
gnuplot-program as C:\Program Files (x86)\gnuplot\bin\gnuplot.exe

However, gnuplot hangs and does nothing after that though.

Thanks again
Bala

--

Message: 30
Date: Tue, 18 Apr 2017 10:17:28 -0400
From: Jonathan Leech-Pepin 
To: Org Mode Mailing List 
Subject: Re: [O] Gnuplot and Windows
Message-ID:

Content-Type: text/plain; charset="utf-8"

On 18 April 2017 at 09:26, Eric S Fraga  wrote:

> On Tuesday, 18 Apr 2017 at 10:09, Bala Ramadurai wrote:
> > Thanks Eric for your reply.
> >
> > Yes, I installed gnuplot, gnuplot-mode and gnuplot.el. Still, I get
> > this error. I fooled around with changing the variable gnuplot-program
> > to windows notation of the PATH. I added gnuplot.exe to the $PATH
> > variable as well.
>

Bala,

Does `(executable-find "gnuplot")` return the path to the executable?  If
not it might not be properly set in Windows (and/or Emacs was not restarted
with the updated environment variables).


> > Still no luck
>
> Well, hopefully others can help.  I do not use MS Windows and no nothing
> about it.
>
> --
> : Eric S Fraga (0xFFFCF67D), Emacs 26.0.50, Org release_9.0.5-444-g998576
>

Regards,
Jon
-- 
http://balaramadurai.net


[O] SOLVED (was: workflow, matlab+latex in org file)

2017-03-10 Thread Uwe Brauer
>>> "Uwe" == Uwe Brauer  writes:

>>> "John" == John Kitchin  writes:
>> I get the right wrapper around the results block in the org-file. I did
>> have to add :exports results
>> to the header to get it to export though.

> Thanks ok the whole message you sent me I can now copy into a org file
> and export it to latex, very nice.

> However I just realized that I don't understand the logic of what you
> sent to me. So it looks like

Sorry my fault, when I had to modify your function, I made a mistake I
understand your code, I think.




[O] [SOLVED] Re: exclude_tags stoppped working at 9.0.5 release?

2017-02-17 Thread Leslie Watter
Hi,

On Fri, Feb 17, 2017 at 2:32 PM, Nick Dokos  wrote:

> Leslie Watter  writes:
>
> > Hi Folks,
> >
> > I've tried org-lint on the files of these pastebin:
> >
> > http://pastebin.com/p7D3Qwd6
> >
> > which are the same files but with tags on headlines, and it returned
> nothing to me, but again, I still
> > have
> > headings with :gabarito: exported to latex.
>
> The org-lint comment was a sideline: as Nicolas said, the problem is
> that empty headlines with tags are ambiguous: the following
>
> ***  :foo:
>
> is interpreted as a headline ":foo:" with no tag, not as an empty
> headline with tag :foo: - the workaround is not to have empty
> headlines:
>
> *** baz  :foo:
>


Thanks ! This works as expected !

Thanks a lot!


Cheers,

LEslie


[O] SOLVED - Re: linking to headings with a unique ID exported to latex/PDF

2017-02-03 Thread Sharon Kimble
Sharon Kimble  writes:

> I'm writing a document which is exported to latex and then built into a
> PDF where I might have 'Alcohol', just as an example, mentioned several
> times in different level headings. Currently I'm using org links like
> this [[*Alcohol][Alcohol]] but that only allows me to link to one
> heading only.
>
> I've tried using links like this
> [[id:542d0880-c0fd-46d5-b75d-4cc6f5fa99cc][Alcohol]] and under the
> heading that I'm linking to it says -
>
> *** Alcohol
> :PROPERTIES:
> :ID: 542d0880-c0fd-46d5-b75d-4cc6f5fa99cc  
> :END:
>
> But when exported it does not work.
>
> So, how can I link to specific headings, preferably with a unique ID
> please?

Nothing that I tried worked, yes, I was using 'org-id', but it was still
failing, so I set about building a MWE.

And then I found the problem - the latex package called 'titlesec' when
used with org-mode to latex is incompatible with org-mode and stops
org-id from working. Comment it out and org-id works perfectly again.
What 'titlesec' does is compress the space around each header, so its a
latex problem not an org-mode problem, so I shall look for a latex
solution to compressing the header spaces.

Thanks for all the suggestions and ideas to solve the problem.

Sharon.
-- 
A taste of linux = http://www.sharons.org.uk
TGmeds = http://www.tgmeds.org.uk
Debian 8.6, fluxbox 1.3.5-2, emacs 25.1.1.1


signature.asc
Description: PGP signature


[O] SOLVED - Re: word-spaces in header of a captured item, but how?

2016-08-20 Thread Sharon Kimble
Nicolas Goaziou  writes:

> Sharon Kimble  writes:
>
>> However when I try other capture templates I get this -
>>
>> Wrote /home/boudiccas/.emacs.d/org/scratch.org
>> (void-variable *) in me/eval-region-and-kill-mark [2 times]
>>
>> Which shows this from my init file -
>>
>> (use-package selected
>>   :defines selected-keymap
>>   :bind
>>   (:map selected-keymap
>> ("C-c C-c" . me/eval-region-and-kill-mark)
>> ("" . me/indent-rigidly-left-and-keep-mark)
>> ("" . me/indent-rigidly-right-and-keep-mark)
>> ("<" . mc/mark-previous-like-this)
>> (">" . mc/mark-next-like-this)
>> ("C-b b" . me/browse-url-and-kill-mark)
>> ("C-c c" . capitalize-region)
>> ("C-c l" . downcase-region)
>> ("C-c u" . upcase-region)
>> ("C-f f" . fill-region)
>> ("C-g" . selected-off)
>> ("C-s r" . reverse-region)
>> ("C-s s" . sort-lines)
>> ("C-s w" . me/sort-words))
>>   :init (selected-global-mode))
>>
>> (defun me/eval-region-and-kill-mark (beg end)
>>   "Execute the region as Lisp code.
>>  Call `eval-region' and kill mark. Move back to the beginning of the region."
>>   (interactive "r")
>>   (eval-region beg end)
>>   (setq deactivate-mark t)
>>   (goto-char beg))
>>
>> But I don't know how to correct it, nor if its related to my lack of
>> wordspaces.
>
> I don't know "selected" package and I cannot understand why you need to
> bind `me/eval-region-and-kill-mark' to C-c C-c.
>
> In any case, it is probably not related to Org you to your
> configuration.
>

Sorted it! I deleted several packages - selected, ido-springboard,
ido-completing-read+, ido-vertical-mode, ido-yes-or-no, and
ido-ubiquitous - and I suspect that the last one was causing the
problem.

Thanks
Sharon.
-- 
A taste of linux = http://www.sharons.org.uk
TGmeds = http://www.tgmeds.org.uk
Debian 8.4, fluxbox 1.3.7, emacs 25.1.1


signature.asc
Description: PGP signature


[O] [SOLVED] Re: problems with auto-capitalise

2016-04-30 Thread Sharon Kimble
Milan Zamazal  writes:

> Do you use desktop.el?  I experienced similar problems with it.  I don't
> remember the details but I've got the following in my Emacs
> configuration that probably serves as my workaround of the problem:
>
>   (add-to-list 'desktop-minor-mode-handlers
>'(auto-capitalize . (lambda (desktop-buffer-locals) 
> (auto-capitalize-mode 1


Thanks Milan, this works extremely well and completely solves the
problem.

Thanks
Sharon.
-- 
A taste of linux = http://www.sharons.org.uk
TGmeds = http://www.tgmeds.org.uk
Debian 8.4, fluxbox 1.3.7, emacs 25.0.93


signature.asc
Description: PGP signature


[O] SOLVED (was: temporary org-capture-templates)

2016-03-14 Thread Uwe Brauer
>>> "Uwe" == Uwe Brauer  writes:

   > Hi

   > I would like to one entry for the org-capture-templates
   > which will prompt for the file I want to save the capture.

   > So I tried 

   > (setq org-capture-templates
   > '(
   > ("G" "Generic" table-line (file+headline (read-string "Name of file: " 
"Generic")
   > "|%f| %U|%A|" :prepend t

My bad forgot )

So this works nicely
 (setq org-capture-templates
 '(
("G" "Generic" table-line (file+headline (expand-file-name (read-string "Name 
of file: ")) "Generic")
 "|%f| %U|%A|" :prepend t))




[O] [solved] (was: orgtbl in latex files, problem)

2015-12-10 Thread Uwe Brauer
>>> "Uwe" == Uwe Brauer  writes:

> Hello
> I swear that usually worked in my latex files.
> Situation:


Sorry the problem was caused by these lines in my init file:

 (add-hook
  'orgtbl-mode-hook
  (lambda ()
(org-defkey orgtbl-mode-map "\C-c\C-c"
(orgtbl-make-binding 'org-ctrl-c-ctrl-c 1002 "\C-c\C-c"

After I removed them, everyting was normal again.




Re: [O] SOLVED: LaTeX equation align in orgmode?

2015-10-14 Thread Eric S Fraga
On Wednesday, 14 Oct 2015 at 16:18, Rasmus wrote:
> This is triggered if (org-format-latex-mathml-available-p) returns nil.
> Go through each step of this function (in org.el).  My guess is that
> latexmlmath is not in your PATH, at least according to Emacs...

Got it!  org-latex-to-mathml-convert-command is one of those variables
that has to be either set globally (which I don't want) or I have to use
#+bind:.  Setting it locally is no good!

Works very well now!

Thanks for all the help,
eric

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.2, Org release_8.3.2-161-gd2ac25



Re: [O] SOLVED: LaTeX equation align in orgmode?

2015-10-14 Thread Rasmus
Eric S Fraga  writes:

> On Wednesday, 14 Oct 2015 at 14:58, Rasmus wrote:
>> Eric S Fraga  writes:
>>
>
>>> I don't believe the default is to export to mathml.  At least, for me,
>>> this doesn't happen.
>>
>> For me, when I eval the following from emacs -q I get odt.
>>
>> (require 'ox-odt)
>> (setq org-latex-to-mathml-convert-command
>>   "latexmlmath \"%i\" --presentationmathml=%o")
>>
>> E.g. export: \(x\).
>
> I get:
>
> ,
> | LaTeX to MathML converter not available.
> | Formatting LaTeX using verbatim
> `

This is triggered if (org-format-latex-mathml-available-p) returns nil.
Go through each step of this function (in org.el).  My guess is that
latexmlmath is not in your PATH, at least according to Emacs...

-- 
Together we will make the possible totay impossible!



Re: [O] SOLVED: LaTeX equation align in orgmode?

2015-10-14 Thread Eric S Fraga
On Wednesday, 14 Oct 2015 at 14:58, Rasmus wrote:
> Eric S Fraga  writes:
>
>> I don't believe the default is to export to mathml.  At least, for me,
>> this doesn't happen.
>
> For me, when I eval the following from emacs -q I get odt.
>
> (require 'ox-odt)
> (setq org-latex-to-mathml-convert-command
>   "latexmlmath \"%i\" --presentationmathml=%o")
>
> E.g. export: \(x\).

I get:

,
| LaTeX to MathML converter not available.
| Formatting LaTeX using verbatim
`

I do not get:

> Run from emacs -q and check your *messages*.  You should see something
> like this in the buffer:
>
>  Formatting LaTeX using mathml
>  Creating MathML snippet 1...
>  Wrote /tmp/ltxmathml-in5102GLn
>  Running latexmlmath "\(x\)" --presentationmathml=ltxmathml-out5102TVt
>  Using vacuous schema
>  Wrote
> /tmp/ltxmathml/test-formula-27f4fea30995c43e0894e19929353bf9fa8957cb.mathml
>  Embedding
> /tmp/ltxmathml/test-formula-27f4fea30995c43e0894e19929353bf9fa8957cbm.

I am using org from git, fairly recent version.

There must be some other configuration setting, maybe something outside
org that enables latexml to work?

thanks,
eric

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.2, Org release_8.3.2-161-gd2ac25



Re: [O] SOLVED: LaTeX equation align in orgmode?

2015-10-14 Thread Rasmus
Eric S Fraga  writes:

> I don't believe the default is to export to mathml.  At least, for me,
> this doesn't happen.

For me, when I eval the following from emacs -q I get odt.

(require 'ox-odt)
(setq org-latex-to-mathml-convert-command
  "latexmlmath \"%i\" --presentationmathml=%o")

E.g. export: \(x\).

> But, to be brutally honest, I'm more than a little confused about what
> is possible or not in ODT export.  I don't use it often, mostly because
> almost all of my documents have some maths in LaTeX form, but there are
> indeed cases where it would be nice to have the capability of exporting
> maths to ODT.

It’s getting better.  I exported a large document recently, and Nicolas
fixed a lot of bugs.

> Setting the variable mentioned above doesn't work for me either.  I had
> to install the latexml package (on Ubuntu) to have the command available
> but I don't know where to get the jar file that may be needed
> (cf. org-latex-to-mathml-jar-file).

None.  At least two methods are supported: latexmlmath and some .jar file,
perhaps mathtoweb.jar or something like that?

> Any help in this regard would be welcome.  Searching the mailing list
> doesn't bring up anything useful.

Run from emacs -q and check your *messages*.  You should see something
like this in the buffer:

 Formatting LaTeX using mathml
 Creating MathML snippet 1...
 Wrote /tmp/ltxmathml-in5102GLn
 Running latexmlmath "\(x\)" --presentationmathml=ltxmathml-out5102TVt
 Using vacuous schema
 Wrote 
/tmp/ltxmathml/test-formula-27f4fea30995c43e0894e19929353bf9fa8957cb.mathml
 Embedding 
/tmp/ltxmathml/test-formula-27f4fea30995c43e0894e19929353bf9fa8957cbm.

Rasmus

-- 
Spil noget med Slayer!



Re: [O] SOLVED: LaTeX equation align in orgmode?

2015-10-14 Thread Eric S Fraga
On Monday, 12 Oct 2015 at 09:34, Rasmus wrote:

[...]

> I haven't followed the thread, but ox-odt should export to mathml by
> default.  I use this to produce mathml:
>
> (setq org-latex-to-mathml-convert-command
> "latexmlmath \"%i\" --presentationmathml=%o")
>
> Rasmus

Hi Rasmus,

thanks for the above.

I don't believe the default is to export to mathml.  At least, for me,
this doesn't happen.  But, to be brutally honest, I'm more than a little
confused about what is possible or not in ODT export.  I don't use it
often, mostly because almost all of my documents have some maths in
LaTeX form, but there are indeed cases where it would be nice to have
the capability of exporting maths to ODT.

Setting the variable mentioned above doesn't work for me either.  I had
to install the latexml package (on Ubuntu) to have the command available
but I don't know where to get the jar file that may be needed
(cf. org-latex-to-mathml-jar-file).  Any help in this regard would be
welcome.  Searching the mailing list doesn't bring up anything useful.

Thanks,
eric

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.2, Org release_8.3.2-161-gd2ac25



Re: [O] SOLVED: LaTeX equation align in orgmode?

2015-10-12 Thread Rasmus
Eric S Fraga  writes:

> On Monday, 12 Oct 2015 at 08:49, Enzo Chi wrote:
>
> [...]
>
>> Thanks Eric, that solved the preview issue. But when export it to ODT
>> file, the image is still as bad as the one I post before. (Export to PDF
>> is fine). 
>
> One step forward at least...  with respect to ODT export, I'm not best
> placed to answer this.  Maybe somebody else can chime in?  My equations
> come out fine when I export to ODT but I don't have anything customised
> that I can see.  Maybe check the org-odt- variables?

I haven't followed the thread, but ox-odt should export to mathml by
default.  I use this to produce mathml:

(setq org-latex-to-mathml-convert-command
"latexmlmath \"%i\" --presentationmathml=%o")

Rasmus

-- 
Governments should be afraid of their people




Re: [O] SOLVED: LaTeX equation align in orgmode?

2015-10-12 Thread Eric S Fraga
On Monday, 12 Oct 2015 at 08:49, Enzo Chi wrote:

[...]

> Thanks Eric, that solved the preview issue. But when export it to ODT
> file, the image is still as bad as the one I post before. (Export to PDF
> is fine). 

One step forward at least...  with respect to ODT export, I'm not best
placed to answer this.  Maybe somebody else can chime in?  My equations
come out fine when I export to ODT but I don't have anything customised
that I can see.  Maybe check the org-odt- variables?

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.5.1, Org release_8.3beta-1229-ge900eb



Re: [O] SOLVED: LaTeX equation align in orgmode?

2015-10-11 Thread Enzo Chi
Eric S Fraga  writes:

> On Friday,  9 Oct 2015 at 09:25, Enzo Chi wrote:
>> I tried that "\begin{align}...\end{align}" code with "C-c C-x C-l", it
>>  generate a very back quality image like this:
>
> What settings do you have for image creation in org?  What is
> org-latex-create-formula-image-program?  
>
> For instance, I have the following settings:
>
> #+begin_src emacs-lisp :results none
>   (setq org-format-latex-options '(:foreground "white" :background "black" 
> :scale 3 :html-foreground "Black" :html-background "Transparent" :html-scale 
> 1.0 :matchers ("begin" "$1" "$" "$$" "\\(" "\\["))
> org-latex-create-formula-image-program 'imagemagick
> )
> #+end_src
>
> and I get something along these lines:
>
>
>
>
> You'll probably not want to change the foreground and background colours
> if you have a light background emacs theme.
>
> The quality of the image may also be a function of your LaTeX default
> packages and fonts.

Thanks Eric, that solved the preview issue. But when export it to ODT
file, the image is still as bad as the one I post before. (Export to PDF
is fine). 




Re: [O] SOLVED: LaTeX equation align in orgmode?

2015-10-09 Thread Eric S Fraga
On Friday,  9 Oct 2015 at 09:25, Enzo Chi wrote:
> I tried that "\begin{align}...\end{align}" code with "C-c C-x C-l", it
>   generate a very back quality image like this:

What settings do you have for image creation in org?  What is
org-latex-create-formula-image-program?  

For instance, I have the following settings:

#+begin_src emacs-lisp :results none
  (setq org-format-latex-options '(:foreground "white" :background "black" 
:scale 3 :html-foreground "Black" :html-background "Transparent" :html-scale 
1.0 :matchers ("begin" "$1" "$" "$$" "\\(" "\\["))
org-latex-create-formula-image-program 'imagemagick
)
#+end_src

and I get something along these lines:


You'll probably not want to change the foreground and background colours
if you have a light background emacs theme.

The quality of the image may also be a function of your LaTeX default
packages and fonts.

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.2, Org release_8.3.2-161-gd2ac25


Re: [O] SOLVED: LaTeX equation align in orgmode?

2015-10-08 Thread Enzo Chi
I tried that "\begin{align}...\end{align}" code with "C-c C-x C-l", it
generate a very back quality image like this:



Re: [O] SOLVED: LaTeX equation align in orgmode?

2015-09-30 Thread Andreas Leha
Rainer M Krug  writes:
> Eric S Fraga  writes:
>
>> On Monday, 28 Sep 2015 at 21:10, Rainer M Krug wrote:
>>> Hi
>>>
>>> I would need in a document several equations which are aligned as in 
>>> http://tex.stackexchange.com/a/167908/6941
>>
>> I use align all the time.
>>
>>> How can I use the following latex formula in orgmode?
>>>
>>> \begin{proof} The proof is a follows: 
>>> \begin{align}
>>> (x+y)^3&=(x+y)(x+y)^2\\
>>>&=(x+y)(x^2+2xy+y^2)\\
>>>&=x^3+3x^2y+3xy^3+x^3.\qedhere
>>> \end{align}
>>> \end{proof}
>>
>> Where is proof defined? You may need to add specific packages to
>> org-latex-packages-alist.
>
> The proof and the ".\qedhere"
>
> Stupid typos.
>
>>
>> In any case, I find that it is safer generally to enclose all LaTeX
>> fragments in a LaTeX block: #+begin_latex ... #+end_latex.
>
> Good idea - but then the preview does not work anymore?
>

see http://orgmode.org/worg/org-hacks.html#orgheadline91

Best,
Andreas




[O] SOLVED: LaTeX equation align in orgmode?

2015-09-29 Thread Rainer M Krug
Eric S Fraga  writes:

> On Monday, 28 Sep 2015 at 21:10, Rainer M Krug wrote:
>> Hi
>>
>> I would need in a document several equations which are aligned as in 
>> http://tex.stackexchange.com/a/167908/6941
>
> I use align all the time.
>
>> How can I use the following latex formula in orgmode?
>>
>> \begin{proof} The proof is a follows: 
>> \begin{align}
>> (x+y)^3&=(x+y)(x+y)^2\\
>>&=(x+y)(x^2+2xy+y^2)\\
>>&=x^3+3x^2y+3xy^3+x^3.\qedhere
>> \end{align}
>> \end{proof}
>
> Where is proof defined? You may need to add specific packages to
> org-latex-packages-alist.

The proof and the ".\qedhere"

Stupid typos.

>
> In any case, I find that it is safer generally to enclose all LaTeX
> fragments in a LaTeX block: #+begin_latex ... #+end_latex.

Good idea - but then the preview does not work anymore?

Sorry for the noise and thanks,

Rainer

-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax :   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug

PGP: 0x0F52F982


signature.asc
Description: PGP signature


[O] Solved: [ ] Checkboxes or count of completed TODOs in subtree?

2015-09-24 Thread Rainer M Krug
Suvayu Ali  writes:

> On Thu, Sep 24, 2015 at 10:41:19AM +0200, Rainer M Krug wrote:
>> 
>> I would like to be able to use something like checkboxes in a tree of
>> headers.
>> 
>> I understand that checkboxes only work in simple lists, i.e. not on
>> headers and trees of headers.
>> 
>> But I would like to see in my document (an ongoing analysis, of which
>> certain parts in each subtree are completed and others still need to
>> be done) which subtree contains how many TODO subheaders, effectively as
>> I can do with simple lists and checkboxes.
>> 
>> But as this is the basis for a paper, I want to keep the headers and not
>> use simple lists.
>> 
>> Is this possible? Is there a way to see how many active TODOs are still
>> under each header?
>
> You can use statistics cookies for TODO states on the parent headline.

Thanks - perfect. Exactly what I was looking for.


Cheers,

Rainer

>
>   * Parent [1/3]
>   
>   ** TODO Section 1
>   
>   ** WInP Section 2
>   
>   ** DONE Section 3
>
> Hope this helps,

-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax :   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug

PGP: 0x0F52F982


signature.asc
Description: PGP signature


[O] SOLVED: Error when tangling subtree - but works for whole document

2015-09-04 Thread Rainer M Krug
The problem is that tangling in an indirect buffer does not work.

I'll post another email concerning this.

Thanks,

Rainer

Rainer M Krug  writes:

> Hi
>
> I get an error #(wrong-type-argument stringp nil)# when I tangle a
> subtree, but tangling the whole document works.
>
> ,
> | GNU Emacs 24.5.1 (x86_64-apple-darwin14.5.0, Carbon Version 157
> | AppKit 1348.17) of 2015-08-28 on Rainers-MacBook-Pro.local
> | Org-mode version 8.3.1 (release_8.3.1-166-g5bfdfc @ 
> /Users/rainerkrug/.emacs.d/org-mode/lisp/)
> `
>
> The backtrace is below
>
> Let me know if you need any further info
>
> Thanks,
>
> Rainer
>

[snip: Long Backtrace (11 lines)]

-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax :   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug

PGP: 0x0F52F982


signature.asc
Description: PGP signature


[O] SOLVED: Emacs crashes after upade of org (maybe unrelated)

2015-08-24 Thread Rainer M Krug
I re-installed emacs-mac with homebrew from source and it works now.

Cheers,

Rainer

Rainer M Krug  writes:

> My emacs crashed today several times already on me - never happened
> before. And if I say crash, I mean crash: emacs gone.
>
> Below the info I get from the OS (OS X, Yosemite).
>
> It always happened when editing a code block in org.
>
> ,
> | GNU Emacs 24.5.1 (x86_64-apple-darwin14.4.0, Carbon Version 157
> AppKit 1348.17) of 2015-07-20 on Rainers-MacBook-Pro.local
> | Org-mode version 8.3.1 (release_8.3.1-166-g5bfdfc @ 
> /Users/rainerkrug/.emacs.d/org-mode/lisp/)
> `
>
> Any suggestions on how I can debug this? Traceback from emacs?
>
> Thanks,
>
> Rainer
>
>
> ,
> | Process:   Emacs [45776]
> | Path:  
> /usr/local/Cellar/emacs-mac/emacs-24.5-z-mac-5.9/Emacs.app/Contents/MacOS/Emacs
> | Identifier:org.gnu.Emacs
> | Version:   24.5 (1.1)
> | Code Type: X86-64 (Native)
> | Parent Process:??? [1]
> | Responsible:   Emacs [45776]
> | User ID:   501
> | 
> | Date/Time: 2015-08-24 12:57:25.666 +0200
> | OS Version:Mac OS X 10.10.5 (14F27)
> | Report Version:11
> | Anonymous UUID:9CCBACF6-B42B-0DCE-94E2-6BD9C09609E5
> | 
> | Sleep/Wake UUID:   9E550E67-B83D-46C4-820D-00E46234AF90
> | 
> | Time Awake Since Boot: 31000 seconds
> | Time Since Wake:   15000 seconds
> | 
> | Crashed Thread:0  Dispatch queue: com.apple.main-thread
> | 
> | Exception Type:EXC_BAD_ACCESS (SIGSEGV)
> | Exception Codes:   KERN_INVALID_ADDRESS at 0x00a0
> | 
> | VM Regions Near 0xa0:
> | --> 
> | __TEXT 0001-0001001fe000 [ 2040K] r-x/rwx SM=COW
> /usr/local/Cellar/emacs-mac/emacs-24.5-z-mac-5.9/Emacs.app/Contents/MacOS/Emacs
> | 
> | Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
> | 0   libsystem_kernel.dylib  0x7fff95a27c82 __kill + 10
> | 1   org.gnu.Emacs   0x0001000c3455 handle_fatal_signal 
> + 14
> | 2   org.gnu.Emacs   0x0001000c28f3 
> deliver_fatal_thread_signal + 114
> | 3   libsystem_platform.dylib0x7fff8b3b1f1a _sigtramp + 26
> | 4   ??? 0x000100f19200 0 + 4310798848
> | 5   org.gnu.Emacs   0x000100040859 fill_glyph_string + 
> 233
> | 6   org.gnu.Emacs   0x000100036a2e draw_glyphs + 1039
> | 7   org.gnu.Emacs   0x0001000365b5 x_write_glyphs + 166
> | 8   org.gnu.Emacs   0x0001f8ce update_window_line + 
> 624
> | 9   org.gnu.Emacs   0x0001a893 update_window + 497
> | 10  org.gnu.Emacs   0x0001bda5 update_window_tree + 
> 119
> | 11  org.gnu.Emacs   0x0001a53f update_frame + 239
> | 12  org.gnu.Emacs   0x0001000286ed redisplay_internal + 
> 5212
> | 13  org.gnu.Emacs   0x00010002a1d8 
> redisplay_preserve_echo_area + 32
> | 14  org.gnu.Emacs   0x0001d5fb Fredisplay + 159
> | 15  org.gnu.Emacs   0x000100117d55 Ffuncall + 991
> | 16  org.gnu.Emacs   0x00010014a8ae exec_byte_code + 2147
> | 17  org.gnu.Emacs   0x000100117bc9 Ffuncall + 595
> | 18  org.gnu.Emacs   0x00010014a8ae exec_byte_code + 2147
> | 19  org.gnu.Emacs   0x0001001187da funcall_lambda + 750
> | 20  org.gnu.Emacs   0x000100117bc9 Ffuncall + 595
> | 21  org.gnu.Emacs   0x00010014a8ae exec_byte_code + 2147
> | 22  org.gnu.Emacs   0x000100114c0b eval_sub + 1688
> | 23  org.gnu.Emacs   0x00010011646f 
> internal_lisp_condition_case + 543
> | 24  org.gnu.Emacs   0x00010014b6d9 exec_byte_code + 5774
> | 25  org.gnu.Emacs   0x0001001187da funcall_lambda + 750
> | 26  org.gnu.Emacs   0x000100117bc9 Ffuncall + 595
> | 27  org.gnu.Emacs   0x0001001181eb call0 + 26
> | 28  org.gnu.Emacs   0x0001001166a6 
> internal_condition_case + 251
> | 29  org.gnu.Emacs   0x0001000ada15 
> safe_run_hook_funcall + 83
> | 30  org.gnu.Emacs   0x00010011808b run_hook_with_args + 
> 353
> | 31  org.gnu.Emacs   0x0001000aacc7 safe_run_hooks + 76
> | 32  org.gnu.Emacs   0x0001000ab1f3 
> __command_loop_1_block_invoke + 1299
> | 33  org.gnu.Emacs   0x0001001958a6 mac_autorelease_loop 
> + 46
> | 34  org.gnu.Emacs   0x0001000aac3c command_loop_1 + 556
> | 35  org.gnu.Emacs   0x0001001166a6 
> internal_condition_case + 251
> | 36  org.gnu.Emacs   0x0001001958a6 mac_autorelease_loop 
> + 46
> | 37  org.gnu.Emacs   0x000

[O] SOLVED (was: Re: how to quote slashes in org-protocol string?)

2015-08-16 Thread Gregor Zattler
Dear org-mode users and developers,
* Gregor Zattler  [16. Aug. 2015]:
> how do I quote slashes ("/") in TITLE or BODY in org-protocol
> string?

Answer: urlencode them as explained in
https://en.wikipedia.org/wiki/Percent-encoding

>  emacsclient org-protocol:/capture:/x/URL/TITLE/BODY
> 
> I capture emails from mutt (mail user agent) to org-mode via mutt
> macros and bash scripts.  Now I get errors in Emacs „Greedy
> org-protocol handler.  Killing client.“ because TITLE (the
> Subject of the email) contains slashes.
> 
> I tried to quote the slashes with slashes but this chops of part
> of the TITLE.

A function to do so in bash can be found at:
http://stackoverflow.com/questions/296536/how-to-urlencode-data-for-curl-command


Ciao, Gregor
-- 
 -... --- .-. . -.. ..--.. ...-.-



[O] [SOLVED] (was: [Q] Remove empty drawers ?)

2015-04-08 Thread Xavier Maillard

Xavier Maillard  writes:

> In fact, the fix has consisted in adding one empty PROPERTY block per
> heading element (I don't know why though). Now I am looking for a way
> to delete all of them :/
>
> How would you do that ?

Org-mode comes with the function `org-remove-empty-drawer-at', so
removing empty :PROPERTIES: becomes trivial

M-:

#+BEGIN_SRC
(with-current-buffer "monsysteme.org"
  (goto-char (point-min))
  (while (re-search-forward ":PROPERTIES:" nil t)
(save-excursion (org-remove-empty-drawer-at (match-beginning 0)
#+END_SRC

There is probably something better to do it (replacing
`with-current-buffer' comes to mind for example), but it works.

Regards
-- Xavier.



[O] [SOLVED] (was: how to change floating point rep in the spreadsheet)

2014-09-14 Thread Uwe Brauer
>> "Uwe" == Uwe Brauer  writes:

   > When I have a table with the following calculation



   > (7/6)*(B&+C&+D&+E&);%0f

Sorry I forgot the "."

(7/6)*(B&+C&+D&+E&);%.1f

That works as expected. Sorry for the noise 

Uwe Brauer 




Re: [O] SOLVED: source code block language 'makefile' and listings package

2014-07-11 Thread Rainer M Krug


Envoyé de mon iPhone

> Le 8 juil. 2014 à 14:40, Nick Dokos  a écrit :
> 
> Rainer M Krug  writes:
> 
>> Much simpler then that: I simply changed the variable
>> org-latex-listings-langs to include makefile:
>> 
>> ,
>> | (setq org-latex-listings-langs 
>> |   '((emacs-lisp "Lisp") 
>> | (lisp "Lisp")
> ... 
>> | (sql "SQL")
>> | (sqlite "sql")
>> | (makefile "make")))
>> `
>> 
>> Works perfectly.
>> 
>> Now if I just could figure out on how I can simply *add* the makefile to
>> the list without defining it completely new..
> 
> Two methods:
> 
> this one is pretty much generic lisp:
> 
> --8<---cut here---start->8---
> (setq org-latex-listings-langs
>  (append org-latex-listings-langs '((makefile "make"
> --8<---cut here---end--->8---
> 
> A slightly simpler, more idiomatic emacs-lisp way:
> 
> --8<---cut here---start->8---
> (add-to-list 'org-latex-listings-langs '(makefile "make"))
> --8<---cut here---end--->8---
> 

Thanks - learned something more. 

Cheers,

Rainer 

> -- 
> Nick
> 
> 


Re: [O] SOLVED: source code block language 'makefile' and listings package

2014-07-10 Thread Nick Dokos
Rainer M Krug  writes:

> Much simpler then that: I simply changed the variable
> org-latex-listings-langs to include makefile:
>
> ,
> | (setq org-latex-listings-langs 
> |   '((emacs-lisp "Lisp") 
> | (lisp "Lisp") 
... 
> | (sql "SQL")
> | (sqlite "sql")
> | (makefile "make")))
> `
>
> Works perfectly.
>
> Now if I just could figure out on how I can simply *add* the makefile to
> the list without defining it completely new..
>

Two methods:

this one is pretty much generic lisp:

--8<---cut here---start->8---
(setq org-latex-listings-langs
  (append org-latex-listings-langs '((makefile "make"
--8<---cut here---end--->8---

A slightly simpler, more idiomatic emacs-lisp way:

--8<---cut here---start->8---
(add-to-list 'org-latex-listings-langs '(makefile "make"))
--8<---cut here---end--->8---

-- 
Nick




Re: [O] SOLVED: source code block language 'makefile' and listings package

2014-07-10 Thread Thorsten Jolitz
Rainer M Krug  writes:

> Now if I just could figure out on how I can simply *add* the makefile to
> the list without defining it completely new..

Maybe

,[ C-h f add-to-list RET ]
| add-to-list is a compiled Lisp function in `subr.el'.
| 
| (add-to-list LIST-VAR ELEMENT &optional APPEND COMPARE-FN)
| 
| Add ELEMENT to the value of LIST-VAR if it isn't there yet.
| The test for presence of ELEMENT is done with `equal',
| or with COMPARE-FN if that's non-nil.
| If ELEMENT is added, it is added at the beginning of the list,
| unless the optional argument APPEND is non-nil, in which case
| ELEMENT is added at the end.
| 
| The return value is the new value of LIST-VAR.
| 
| If you want to use `add-to-list' on a variable that is not defined
| until a certain package is loaded, you should put the call to `add-to-list'
| into a hook function that will be run only after loading the package.
| `eval-after-load' provides one way to do this.  In some cases
| other hooks, such as major mode hooks, can do the job.
| 
| [back]
`

?

-- 
cheers,
Thorsten




Re: [O] SOLVED: source code block language 'makefile' and listings package

2014-07-09 Thread Rainer M Krug
Nick Dokos  writes:

> Rainer M Krug  writes:
>
>
>> Much simpler then that: I simply changed the variable
>> org-latex-listings-langs to include makefile:
>>
>> ,
>> | (setq org-latex-listings-langs 
>> |   '((emacs-lisp "Lisp") 
> ...
>> | (makefile "make")))
>> `
>>
>> Works perfectly.
>>
>> Now if I just could figure out on how I can simply *add* the makefile to
>> the list without defining it completely new..
>>
>
> (setq org-latex-listings-langs
>   (append org-latex-listings-langs '((makefile "make"

Perfect - thanks.

I would actually suggest to add this to the default of the variable
definition.

Will submit a patch later today.

Thanks,

Rainer

-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax :   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug

PGP: 0x0F52F982


pgpHOJOujzKFw.pgp
Description: PGP signature


Re: [O] SOLVED: source code block language 'makefile' and listings package

2014-07-08 Thread Thomas S. Dye
Aloha Rainer,

Rainer M Krug  writes:

>> You can configure the listings package with the commands
>> \lstnewenvironment and \lstset.  There is a worked example here:
>>
>> http://orgmode.org/worg/org-tutorials/org-latex-export.html#sec-12-4
>
> Much simpler then that: I simply changed the variable
> org-latex-listings-langs to include makefile:
>
> ,
> | (setq org-latex-listings-langs 
> |   '((emacs-lisp "Lisp") 
> | (lisp "Lisp") 
> | (clojure "Lisp") 
> | (c "C") 
> | (cc "C++") 
> | (fortran "fortran") 
> | (perl "Perl") 
> | (cperl "Perl")
> | (python "Python")
> | (ruby "Ruby")
> | (html "HTML")
> | (xml "XML")
> | (tex "TeX")
> | (latex "[LaTeX]TeX")
> | (shell-script "bash")
> | (gnuplot "Gnuplot")
> | (ocaml "Caml")
> | (caml "Caml")
> | (sql "SQL")
> | (sqlite "sql")
> | (makefile "make")))
> `
>
> Works perfectly.

Nice!

All the best,
Tom

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



Re: [O] SOLVED: source code block language 'makefile' and listings package

2014-07-08 Thread Nick Dokos
Rainer M Krug  writes:


> Much simpler then that: I simply changed the variable
> org-latex-listings-langs to include makefile:
>
> ,
> | (setq org-latex-listings-langs 
> |   '((emacs-lisp "Lisp") 
...
> | (makefile "make")))
> `
>
> Works perfectly.
>
> Now if I just could figure out on how I can simply *add* the makefile to
> the list without defining it completely new..
>

(setq org-latex-listings-langs
  (append org-latex-listings-langs '((makefile "make"

-- 
Nick




[O] SOLVED: source code block language 'makefile' and listings package

2014-07-08 Thread Rainer M Krug
t...@tsdye.com (Thomas S. Dye) writes:

> Aloha Rainer,
>
> Rainer M Krug  writes:
>
>> Hi
>>
>> I used the source block language 'makefile'
>>
>> #+begin_src R makefile
>> ...
>> #+end_src
>>
>> and now I would like top export this block to html. I am using the
>> listings package for this, and it supports the syntax, but the
>> language is called 'make', while org uses 'makefile'
>>
>> Is there a way of telling the tex exporter to export 'makefile' blocks
>> as language 'make', or can I easily tell listings that the language
>> 'makefile' is equal to 'make'?
>
> You can configure the listings package with the commands
> \lstnewenvironment and \lstset.  There is a worked example here:
>
> http://orgmode.org/worg/org-tutorials/org-latex-export.html#sec-12-4

Much simpler then that: I simply changed the variable
org-latex-listings-langs to include makefile:

,
| (setq org-latex-listings-langs 
|   '((emacs-lisp "Lisp") 
| (lisp "Lisp") 
| (clojure "Lisp") 
| (c "C") 
| (cc "C++") 
| (fortran "fortran") 
| (perl "Perl") 
| (cperl "Perl")
| (python "Python")
| (ruby "Ruby")
| (html "HTML")
| (xml "XML")
| (tex "TeX")
| (latex "[LaTeX]TeX")
| (shell-script "bash")
| (gnuplot "Gnuplot")
| (ocaml "Caml")
| (caml "Caml")
| (sql "SQL")
| (sqlite "sql")
| (makefile "make")))
`

Works perfectly.

Now if I just could figure out on how I can simply *add* the makefile to
the list without defining it completely new..

Cheers,

Rainer

>
> hth,
> Tom

-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax :   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug

PGP: 0x0F52F982


pgpz7kD4n3vJn.pgp
Description: PGP signature


[O] solved: "org-mode fontification error" with newest git

2014-05-16 Thread Rainer M Krug
Sorry for the noise - working.

Was caused by inconsistent compilation of org and ess.

Cheers,

Rainer

Rainer M Krug  writes:

> Hi
>
> I get an "org-mode fontification error" for R when using the newest org
> From git.
>
> I have set
>
>   (setq org-src-fontify-natively t)
>
> Unfortunately, I do not manage to get a backtrace.
>
> Cheers,
>
> Rainer

-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax :   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug

PGP: 0x0F52F982


pgpHTXkUgcxJq.pgp
Description: PGP signature


[O] [SOLVED] Re: TODOs in the agenda?

2014-03-29 Thread Sharon Kimble
Sharon Kimble  writes:

> I have a document called 'organiser.org' which is mainly comprised of various
> TODOs under various projects, and various NEXT under birthdays and hospital
> appointments. These TODOs can be up to 4 levels in depth, and with one level 1
> TODO as the project header. How can all of these TODOs be included in the 
> agenda
> please?
>
> Here is one example - 
>
> ,
> | * Jobs to do [53%] [8/15]
> | ** TODO eat breakfast
> `
>
> and another -
>
> ,
> | ** Gnus setup [5/6] [83%]
> | *** DONE set up gnus for localhost email
> | CLOSED: [2014-03-25 Tue 16:57]
> | *** DONE set up gnus for gmail
> | CLOSED: [2014-03-25 Tue 16:57]
> | *** TODO get bbdb working with gnus
> `
>
> And the whole document is like that, several projects with loads of TODOs
> within them, but how do I get them all showing in the agenda please?
>
Sorted, just C-s each one and schedule the task, then it shows in the
agenda. Doh!

Sharon.
-- 
A taste of linux = http://www.sharons.org.uk
my git repo = https://bitbucket.org/boudiccas/dots
TGmeds = http://www.tgmeds.org.uk
Debian testing, Fluxbox 1.3.5, emacs 24.3.1


pgp5ANgPCvhOZ.pgp
Description: PGP signature


[O] SOLVED: [babel] disable :session for a code block?

2014-02-24 Thread Rainer M Krug
Andreas Leha  writes:

> Rainer M Krug  writes:
>
>> Hi
>>
>> I would like to save all in org defined variables into an R data
>> file. In general this works fine with the following code block:
>>
>>
>> #+begin_src R :session null :results output
>> dir.create("./data/", showWarnings=FALSE)
>> save.image("./data/orgData.rda")
>> #+end_src
>>
>> but, as I have defined a file wide session for R via 
>>
>> #+PROPERTY: session *R_MOBILIS*
>>
>> I have to create a new session for this, which is not that nice: when I
>> remove a variable in org, it is still in the R environment and will
>> therefore be saved. Therefore my question:
>>
>> what can I provide to the :session header, so that no session is used?
>> In other words: how can I run a single code block out-of-session when
>> all other are running in a session?
>>
>> Thanks,
>>
>> Rainer
>
>
> This should be
>  :session none

Perfect - thanks a lot

Rainer

>
> Regards,
> Andreas
>
>
>

-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax :   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug


pgpkRGq89jtLD.pgp
Description: PGP signature


[O] [SOLVED] Re: Feature Request: Let Org-mode tasks (subtasks) complete percent state more *accurate*.

2013-07-10 Thread chris
Excerpts from [ Eric S Fraga ]  On [2013-07-10 09:51:59 +0100]:

> chris  writes:
> 
> [...] on how org counts completed tasks
> 
> > I hope Org-mode can improve this.
> 
> Well, this is a matter of interpretation.  Org is counting how many of
> the main tasks are complete.  Sub-tasks are not at the same level.  I
> prefer how org does it now.
> 
> In any case, check out
> 
> ,[ C-h v org-hierarchical-todo-statistics RET ]
> | org-hierarchical-todo-statistics is a variable defined in `org.el'.
> | Its value is nil
> | Original value was t
> | 
> | Documentation:
> | Non-nil means TODO statistics covers just direct children.
> | When nil, all entries in the subtree are considered.
> | This has only an effect if `org-provide-todo-statistics' is set.
> | To set this to nil for only a single subtree, use a COOKIE_DATA
> | property and include the word "recursive" into the value.
> | 
> | You can customize this variable.
> `

This is really great. Thanks.
> 
> which will probably cover what you want.
> -- 
> : Eric S Fraga (0xFFFCF67D), Emacs 24.3.50.1, Org 
> release_8.0.5-322-gd5c11e.dirty
> 

-- 
E M A C S
s e l o h
c t t n i
p a   t f
a r t
e o
  l

[ stardiviner ] ^^&^^ {I hate all of you !  Leave me alone}
IRC(freenode): stardiviner \\ Twitter:  @numbchild \\
GnuPG Key fingerprint
>>> 9BAA 92BC CDDD B9EF 3B36  CB99 B8C4 B8E5 47C3 2433


signature.asc
Description: Digital signature


[O] SOLVED: Automatically adding local variables to tangled file

2013-06-10 Thread Rainer M Krug

Eric Schulte  writes:

[snip (41 lines)]

>>> He added the following to his config file to test the approach:
>>> 
>>> ,
>>> |  (defvar org-babel-tangled-file nil
>>> |  "If non-nill, current file was tangled with org-babel-tangle")
>>> |(put 'org-babel-tangled-file 'safe-local-variable 'booleanp)
>>> |
>>> |(defun org-babel-mark-file-as-tangled ()
>>> |  (add-file-local-variable 'org-babel-tangled-file t)
>>> |  (basic-save-buffer))
>>> | 
>>> |(add-hook 'org-babel-post-tangle-hook 'org-babel-mark-file-as-tangled)
>>> `
>>> 

[snip (5 lines)]


I tried the above approach, but I was struggling with setting up the
rules in the function definition which files should get the local
variables and which not.

I ended up with the following:

,
| (defvar org-babel-tangled-file nil
|   "If non-nill, current file was tangled with org-babel-tangle")
| (put 'org-babel-tangled-file 'safe-local-variable 'booleanp)
| 
| (defun org-babel-mark-file-as-tangled ()
|   
|   (when  (string-match "[.]R" (buffer-file-name))
|   (add-file-local-variable 'org-babel-tangled-file t)
| (add-file-local-variable 'buffer-read-only t)
| ;; (add-file-local-variable 'eval: (auto-revert-mode))
| (basic-save-buffer)))
| 
| (add-hook 'org-babel-post-tangle-hook 'org-babel-mark-file-as-tangled)
`

Thanks everybody for their help,

Rainer



>

-- 
Rainer M. Krug

email: RMKruggmailcom


pgpueI_WtlIe2.pgp
Description: PGP signature


[O] SOLVED: LaTeX source block problems

2013-01-28 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

I solved it bu using the examples on
http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-LaTeX.html 
especially the tkz example.

So it looks no as follow:


* The gantt chart
#+header: :fit yes :noweb yes :headers '("\\usepackage{pgfgantt}")
#+BEGIN_SRC latex :exports results :file timeline.pdf
  \begin {ganttchart} [hgrid=true, %
 vgrid={ *{11}{blue, dotted}, *1{red} } %
 ]{36}
\gantttitlelist {1,...,3}{12} \\
\gantttitlelist
{1,2,3,4,5,6,7,8,9,10,11,12,1,2,3,4,5,6,7,8,9,10,11,12,1,2,3,4,5,6,7,8,9,10,11,12}{1}
 \\
  %%%
\ganttgroup [inline, group label inline anchor/.style=above right, group 
label shape
anchor=left] {Modelling}{1}{36} \\
  \end {ganttchart}
#+END_SRC


and C-c in latex gives me:

#+RESULTS:
#+BEGIN_LaTeX
[[file:timeline.pdf]]
#+END_LaTeX

Thanks,

Rainer




On 28/01/13 14:30, Rainer M Krug wrote:
> On 28/01/13 14:10, John Hendy wrote:
> 
>> On Jan 28, 2013 2:50 AM, "Rainer M Krug" > > 
>> wrote:
>>> 
>> On 25/01/13 18:35, Thomas S. Dye wrote:
>>> Hi Rainer,
> 
>>> Rainer M Krug mailto:r.m.k...@gmail.com>> writes:
> 
 - C-c c results in "org-babel-execute-src-block: No org-babel-execute 
 function for
 LaTeX!"
> 
>>> Do you have something like this in .emacs?
> 
>>> (org-babel-do-load-languages 'org-babel-load-languages '((latex . t)))
> 
>> I have
> 
>> (require 'ob-latex)
> 
> 
>>> This is the old style. Could you try re-defining your Babel setup according 
>>> to the current
>>>  manual/Worg instructions to see if that helps?
> 
> Ok - I have changed it, but still the same.
> 
> Rainer
> 
> 
>>> John
> 
>> which I remember reading somewhere is equivalent.
> 
>> I also only have (require 'ob-R)
> 
>> to enable language execution and R works.
> 
>> Rainer
> 
> 
>>> hth, Tom
> 
> 
>>> 
> 
> 
> 
> 

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJRBod6AAoJENvXNx4PUvmCJBgH/3i6vVVz1KmUCDDYz/ybuphR
mflp67kaaxzUs2yIacTruG2jP/5UpuaAUYN/Y88UwvWjANHb+B/B2QSFNwwaWcjN
+oco756zMmtfDlARQm/ZlIgpJSl522d5lufnGPCy0mtIHfFFfbdVmDyYmiRp56kO
aCEtJ6+7Gy1AYaAQAJHCmnnPIaBdSxWltifCMe+pEkVG5ZnMhMGv3iFCpF2kLikP
2s/gcDGIfzF0Ez1TI+Rj/n8c0+tSKsu0x69+kRmAR/0ksV+EC+D0lUZljwzSzvp9
ZPvMjxiVAjN3k5XwKjERzyM372/wL+1eLZT/of5ktYg7NoprxsYFrtrLiypKC20=
=bV2F
-END PGP SIGNATURE-



[O] solved (Re: BUG ? [new HTML exporter] subtree: newline and slash)

2012-11-07 Thread Giovanni Ridolfi
Da: Nicolas Goaziou 
inviato: Martedì 6 Novembre 2012 18:20

Giovanni Ridolfi  writes:

>> did you try to replicate the bug?  
> Yes, sir.


Thank you very much for having fixed it 

some time ago and, please,
accept my apology for having overreacted
yesterday evening,  without double checking.


I would have sworn I had installed the latest version
BUT I was wrong.

I really loaded the a99402fac, that is a version more or less 

the 6th of november.
I got confused: too much org-tar.gz in my directory :-(


Today I installed the *real* last but one Org-mode version 7.9.2 (854ddf6
and the bug is gone.


Again sorry for the noise,

Giovanni



[O] [Solved] Re: Taskjuggler and installation

2012-06-12 Thread Simon Thum

Hi,

just wanted to say it was indeed emacs picking up an ages-old 
org-install.el.


Thanks,

Simon


On 06/06/2012 01:46 AM, Nick Dokos wrote:

Simon Thum  wrote:


Hi all,

I am using org-mode's taskjuggler export on two machines (win7 standard
emacs 23.3/linux emacs 23.4.2) with 99% identical configuartion. Except
for one funny thing:



What org-version? Do you byte-compile the code on both platforms?


Taskjuggler export raises an undefined function on windows. Yes, I do
require 'org-install, org-mode from identical sources (git-sync'ed).
Linux is fine.



What function?


I am fixing this by adding a require 'org-taskjuggler, but that can't
really be it. Any advice how to track this down?



M-x toggle-debug-on-error RET

and look at the backtrace to see what the call chain looks like.  A
missing autoload perhaps? Why exactly 23.3 on windows and 23.4.2 on
linux behave differently is a mystery, at least for now.

Nick








Re: [O] Solved

2012-01-28 Thread Nick Dokos
Bastien  wrote:

> Hi Uwe,
> 
> Uwe Brauer  writes:
> 
> > So there are two small changes necessary to make 
> > org-preview-latex-fragment work in Xemacs. One is the above
> > change, the other 
> >
> >
> > (font-height (face-font 'default))
> >   instead of 
> > (font-height (get-face-font 'default))
> >
> > I can send a patch against 7.8.03
> 
> Please do so -- but please make sure the patch adapts current code
> to XEmacs without suppressing any feature for GNU Emacs.
> 
> Thanks in advance!
> 

... and bonus points if you also fix the problems described in

http://thread.gmane.org/gmane.emacs.orgmode/50584

:-)

Nick




Re: [O] Solved

2012-01-28 Thread Bastien
Hi Uwe,

Uwe Brauer  writes:

> So there are two small changes necessary to make 
> org-preview-latex-fragment work in Xemacs. One is the above
> change, the other 
>
>
> (font-height (face-font 'default))
>   instead of 
> (font-height (get-face-font 'default))
>
> I can send a patch against 7.8.03

Please do so -- but please make sure the patch adapts current code
to XEmacs without suppressing any feature for GNU Emacs.

Thanks in advance!

-- 
 Bastien



[O] Solved (was: Xemacs: org-preview-latex-fragment, png not readable.)

2012-01-28 Thread Uwe Brauer
>> On Sat, 28 Jan 2012 21:20:48 +0100, Uwe Brauer  wrote:



   > Which does not work for Xemacs. Thanks to Julian Bradfield,
   > the solution seems to be:

   > (defun org-dvipng-color (attr)
   >   "Return an rgb color specification for dvipng."
   >   (apply 'format "rgb %s %s %s"
   > (mapcar 'org-normalize-color
   >  (color-rgb-components
   >  (face-property 'default (intern (substring (symbol-name attr) 1)))


   > However the png which were generated where to small to be
   > readable. I attach one at the end of the message.

The issue are the options 
in 


call-process "dvipng" nil nil nil

After trying out different configurations, I found out that
the option 
"-D" dpi

Does not work well with Xemacs.


So 
  (call-process "dvipng" nil nil nil
"-fg" fg "-bg" bg
;;  "-D" dpi
;;  "-x" scale "-y" scale
"-T" "tight"
"-o" pngfile
dvifile)
is ok, however the back and foreground setting as generated
by org-dvipng-color, even with Julian Bradfield's patch do
not produce very nice results. In my Xemacs setting it is better to
comment them out.

So there are two small changes necessary to make 
org-preview-latex-fragment work in Xemacs. One is the above
change, the other 


(font-height (face-font 'default))
  instead of 
(font-height (get-face-font 'default))

I can send a patch against 7.8.03

Uwe Brauer 




[O] SOLVED Re: using first heading as in batch export to html

2012-01-25 Thread Detlef Steuer
On Tue, 24 Jan 2012 14:39:55 +0100
Detlef Steuer  wrote:

> If I batch export a test.org looking like this
> 
> -- test.org 
> * heading1
>   some text
> 
> 
> to html I get a test as result.
> 
> If I open the file and do C-c @ on the first heading the
> result contains heading1 
> 
> How do I achieve the latter in batch export?

May be it was as obvious as it can get to anybody who has emacs-fu ...
To help others who have none, just like me, here is a solution:

To do automatically, what I did by hand before ,I wrote my first ever
elisp "program": 

org-export-with-h1-as-title.el

(goto-line 3)  ;; I know my document. It's always line 3
(org-mark-subtree) ;; C-c @
(org-export-as-html-batch) ;; C-c C-e h but as batch


and  invoke emacs in my Makefile as
emacs --batch \
  -eval "(add-to-list 'load-path \"${HOME}/GIT/org-mode/lisp/\")"\
  --load ${HOME}/GIT/org-mode/lisp/org.el \
  --visit steuer.org \
  -l ./org-export-with-h1-as-title.el

Yeah. Works. Nice!

Still think the first headline should be chosen as title automatically
according to the manual?! 

Detlef

> 
> Btw: Reading the manual I get the impression the latter is what should
> happen anyway? 
> 
> http://orgmode.org/manual/Document-title.html#Document-title
> says
> --
> Document title
> 
> The title of the exported document is taken from the special line
> 
>  #+TITLE: This is the title of the document
> 
> If this line does not exist, the title is derived from the first
> non-empty, non-comment line in the buffer. If no such line exists, or
> if you have turned off exporting of the text before the first headline
> (see below), the title will be the file name without extension.
> 
> If you are exporting only a subtree by marking is as the region, the
> heading of the subtree will become the title of the document. If the
> subtree has a property EXPORT_TITLE, that will take precedence. 
> 
> 
> So, no TITLE here, first non-empty line is 
> * heading1 , nothing was prevented from being exported. 
> I would expect heading1 as title from reading this.
> 
> thx
> Detlef
> 
> 
> 





Re: [O] [solved] Re: Org-class: recurring appointments not being displayed

2012-01-07 Thread Carsten Dominik

On 7.1.2012, at 02:59, knubee wrote:

>> * Class 7:00pm-9:00pm
>>   <%% (org-class 2011 1 10 2011 4 10 2 8)>
> 
> Just figured out the problem. I was using 2011 and looking for the results in 
> agenda for 2012 (now). Classic "start of a new year" mistake. Doh! 

:)  That is pretty funny!  I missed it as well

Happy new year!


[O] [solved] Re: Org-class: recurring appointments not being displayed

2012-01-06 Thread knubee
> * Class 7:00pm-9:00pm
><%% (org-class 2011 1 10 2011 4 10 2 8)>

Just figured out the problem. I was using 2011 and looking for the results in 
agenda for 2012 (now). Classic "start of a new year" mistake. Doh! 




Re: [O] SOLVED problems with mathjax CDN and HTML export

2011-11-09 Thread Giovanni Ridolfi
Christian Moe  writes:

Hi, Christian,

thank you for cheching again well *MY* mistake
was setting the option: 

:EXPORT_OPTIONS:  H:3 num:nil toc:nil \n:t @:t ::t |:t ^:t f:nil *:t
 tags:nil TeX:t LaTeX:nil
^^
Consequently the LaTeX fragments are "converted" in  HTML format e.g.:

 u(α) = δα =  {\left(
 \left[\frac{-(Δ L+c)}{L0⋅  [...]

Why not, since I set this option? :-(

Sorry for the noise and thank you again for your time,

Giovanni



Re: [O] [SOLVED] Bug: :tags: in title [7.7 f8168144a]

2011-11-07 Thread Giovanni Ridolfi
suvayu ali  writes:

Hi suvayu
>
> Since you CC'd me, did my patch to org-exp.el introduce this
> behaviour?
I thought so

> Anyway, I can't reproduce this. I see "mathjax test" as the title,
> which is expected behaviour.

uh???  I cannot reproduce as well !!

I don't know what happened, but I saw it twice ?-/

Let's consider it as solved.

Thank you for checking,

Giovanni



[O] [SOLVED] Re: Problems with Org Mobile

2011-10-27 Thread Giovanni Ridolfi

Forwarding to the list.

Renger van Nieuwkoop  writes:

> Thanks Giovanni
> There it was set to an old, non-existing directory.
> Now it works