[Orgmode] Howto define formula for table regions

2010-09-21 Thread Torsten Wagner
Hi,

I am just playing around with the table function of org-mode.
I tried to create a little table to track the financial status of a
project. I thought it would be nice to distinguish between entries which
really had billed the account already and entries which will bill the
account in the future. This would allow me to track and compare the
current amount of my project account and in addition makes sure I will
not overdraw my account by missing an outstanding transaction.

Thus, initially my idea was to create a table like this:

|-+--+---+++--|
| nr. | date | title | number | amount |  sum |
|-+--+---+++--|
|   1 |  | inital fund   |  1 |   1000 | 1000 |
|   2 |  | 1. payment to crew|  3 |   -150 | -450 |
|   3 |  | 1. order  |  1 |-50 |  -50 |
|   4 |  |   |||  |
|-+--+---+++--|
| |  | balance on account|||  500 |
|-+--+---+++--|
|   1 |  | outstanding order |  1 |   -100 | -100 |
|   2 |  | 2. payment to crew|  3 |   -100 | -300 |
|-+--+---+++--|
| |  | balance - outstanding |||  100 |
|-+--+---+++--|

Now I would like to add formulas for:
1. Increasing the number of the first column ("Nr."), (entry in the FAQ,
I know), whenever I add a new row. However do this for two blocks and
leave row 6 and the last row empty.
2. Place the multiplication of "number" with "amount" in the sum column
3. Add the total sums of the two blocks in row 6 and the last row
(taking into account that the table will grow over time)

I know about column formulas and field formulas but I did not find a way
to do something like "for each field in column X between row a and row b
calculate ..."

I thought I could use the hline notation to encapsulate a undefined
amount of rows in between, however this doesn't work since every formula
does only refer to one field or to an entire column.

What I am looking for is something like:

$...@ii+1..$6@III-1 = $...@0 * $...@0

or in text:

for each field in column 6 starting with the first row below the second
hline and end with row above the third hline multiply the column 4 and
column 5 of the current row.

Is there any other way to achieve this?
Or does this make much enough sense to implement it ;)
I guess there might be a lisp-way but I think a more intuitive way for
non-lisper might be useful.

As a kind of extrafor the very org-mode pros on this list
If I fill dates into the date column, a mechanism which moves
automatically (in the same way as I refresh calculation of formulas),
the rows from the second block into the first block when the date passed
would be some nice gadget


Best regards

Torsten

CC. The manual says, the very first hline will not be counted for the
hline referencing notation. However, as far as I can see it does count
in both formulas and by indicating it with C-} (Org-mode version
6.36trans (release_6.36.437.g05b7e))

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] [PATCH] Change C-' behaviour on #+TBLFM: line

2010-11-19 Thread Torsten Wagner
Hi,

Short description:

I recently started to use tables in org-mode. Having the pointer inside
the the table and pressing C-c' I can enter the formula buffer.
However, placing the pointer on the #+TBLFM: line C-c' results in "Find
file or URL:".

If even more people believe this is confusing, I would suggest to switch
the behaviour. C-c' on a #+TBLFM: line should open up the formular buffer.

Longer Explanation:

For small changes of the formula I often edit the #+TBLFM: line
directly. If things went more complex or get messed, I press C-c' to
enter the formula buffer. However, at this time my pointer is located at
the #+TBLFM: line.

The associated call function for C-c' is:

org-edit-special

This function calls

org-table-edit-formulas

in case the point is located inside the table and

ffap aka find-file-at-point

in all other cases (omitting the cases for source code and include lines
here for simplicity)

Thus pressing C-c' at #+TBLFM ends up with the request for a file or a URL.

In my opinion org-edit-special needs another case to look out for
#+TBLFM or resp. combine this with the case to call
`org-table-edit-formulas'.

Please find below a patch for that.

---patchbegin

diff --git a/lisp/org.el b/lisp/org.el
index 023e019..a7e4d33 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -17259,7 +17259,9 @@ When in an #+include line, visit the include
file.  Otherwise call
((org-edit-fixed-width-region))
((org-at-table.el-p)
 (org-edit-src-code))
-   ((org-at-table-p)
+   ((or (org-at-table-p) (save-excursion
+  (beginning-of-line 1)
+  (looking-at "[ \t]*#\\+TBLFM")))
 (call-interactively 'org-table-edit-formulas))
(t (call-interactively 'ffap

---patchend-

This is my very first public org-mode patch and my very first hack in
vital org-mode elisp code. Thus, don't laugh or blame to much :)

Best regards
Torsten

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Better ways to address fields in tables

2010-11-24 Thread Torsten Wagner
Hi,
I was wondering whether it might be possible to address table fields, which 
float due to adding and deletion of rows, more easily and thought about two 
possible ways.
The way I know (are there more ways?)

| | A | B|
|-+---+---|
| | a | 1 |
| | b | 1 |
|-+---+---|
| | s | 2 |
|^|   | f |
|-+---+---|
many many more rows

To calculate the sum s of all rows between a and b even if there will be more 
or less any time later I, use
f = vsum(@i...@ii-1)

Rather verbose for a simple sum.
Might it be possible to adress the target fields relativ to horizonal lines?
@II = vsum(@i...@ii-1)
This would make it independend of the number of rows in the block and there 
would be no need to assign a name to the field.

On the other hand, I often use a description beside the actual field like the 
"s" in the above example and in reality it might be something like "sum of all 
foo". Now I have to assign a name for the variable (above simply "f") or e.g., 
sum_foo. I am ending up having two descriptions for the same field, a human 
readable and an arithmetical.
Marking the first one (the one contains "s") in a special way could indicate to 
use it as a variablename for another field.

| A | B|
|---+---|
| a | 1 |
| b | 1 |
|---+---|
| s\> | 2 |
 
Whereas \> indicates: Use this string as the variable name for the field to the 
right. Similar, there could be \< \^ \v to assign the string to the field to 
the left, above or below. This method would be redundant to the original method 
for fields above and below but less verbose. Kind of shortcut.

Greetings
Torsten
 

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] should the mail list be splitted resp. sub-tagged ?

2010-12-17 Thread Torsten Wagner

Dear all,
since I subscribed to the maillist, the traffic increased enormously. 
This is very nice, however, recently I got difficulties to filter throw 
all the post searching for relevant topics for me. The babel project is 
using already a [babel] tag, and other tags floating around 
([PATCH],[OT],[Bug]). Thinking of tags, I wonder why we use [Orgmode] 
since all mails coming from emacs-orgmode(a)gnu.org which is a strong 
indicator already.


In general I guess a good mail client is capable to sort mails based on 
this tags or mail address. I just wonder whether there is an official 
list of tags on a prominent place like worg, or if especially the devs 
would like a separate emacs-orgmode-dev maillist.
If you believe a "How to post on the orgmode mailing list"-article in 
worg helps I would be willing to start with one.


Best regards

Torsten



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] should the mail list be splitted resp. sub-tagged ?

2010-12-18 Thread Torsten Wagner
Thanks for all the answers and discussions.
To summarise:
I guess nobody is interest to split the list. At least no dev mentioned a
need.
Tags are good but might need some guidance to use a certain set and possibly
shorten them wherever possible.
The issue with to long tag list is not only a problem for people with large
fonts. Many of us start to read mails on our smartphones where space is
limited as well.
Using [Orgmode] as a tag on the orgmode list is an arguable point. Maybe the
someone higher in the queue like to make a decision to shorten it to [Org].
I would like to start to write something in worg and then we might see how
useful it is.

Best regards
Torsten
___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Status google calendar sync

2011-01-21 Thread Torsten Wagner

Hi all,

Since I use my Android-based phone on a daily basis (after all it is a 
mobile phone), I got tempted to use more and more the google calendar. I 
know about mobileorg and all this. However, the calendar is so highly 
integrated with many applications on the phone that is is often just a 
click away to add a new appointment.


I know some people managed to get a kind of sync running between 
org-mode and google calendar. I would really like to know how this works 
out for them and maybe create a stimulus to write something (I would 
play the beta-tester) on worg.


Ideally, I want to have a no-brainer. I create a new appointment in 
org-mode and a keypress away it should be synced with the google 
calendar. Alternatively, an automatic sync every hour or so would be nice.


On the other side, I wish I could add an appointment on my mobile phone 
and it ends up automatically with the next sync as an appointment in a 
special heading in the org-file (like org-remember, does). From this 
point, I could move it to other locations if I feel so.


I would love to hear how far people got with an approach like describe 
above.


My major concern is, as long as it is not automatized in the most 
easiest possible way, I would, for one or the other reason, skip 
synchronisation and by time things become diverted and messy to sync.


All the best

Totti



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] org-babel: Meta-LaTeX-Python-Environment

2009-10-25 Thread Torsten Wagner
Hi,

I started working on an little latex-package to allow the execution of python 
code in LaTeX a while ago. It stopped at some point and now it is on my 
pending project lists for a while already.

When I read about org-babel I saw a lot of similarities. I like to start again 
on the basis of org-babel and trying to accomplish the following idea.

Within a LaTeX-file (org-file) I like to use python snippets to perform 
calculus 
and other tasks which are otherwise extremely difficult or time consuming to 
perform directly in LaTeX. E.g. on-the-fly-generation of graphs or calculus of 
statistical values (e.g., (very simple) the mean value of n numbers). 

I guess org-mode together with org-babel can do most of this already. I played 
around with it and it is very nice, many thanks to the developers. However, I 
found the following point which I wasn't able to figure out yet.

1. Hiding of the source code blocks for export
I like to export the results of the source code block to LaTeX only. However, 
I tried different options all resulting in embedding the source-code itself 
inside the final LaTeX file. I guess this is more due to the org-export 
function 
rather then org-babel

2. Inline source code blocks
I guess this was discussed once already. Instead of a verbose source code 
block a single short command to elaborate a python variable or a one line 
calculus would be nice e.g., "#:session_name a#" to replace this command by 
the results of variable a of the session session_name during the export to 
LaTeX.

I like to combine this with a little python module specialised in creating 
proper LaTeX export for all kind of python data types.
E.g.  tab_export([1,2,3,4,5]) could generate the string "1 & 2 & 3 & 4 & 5 \\"

The idea is to use this as a form of reproducible research allowing the data 
evaluation together with the textual and graphical representation. 
Furthermore, I would like to use org as a publication system with meta-
description capabilities. This would allow to commentary what someone is doing 
"between the lines". By this one could merge somehow the lab-book, data 
analysis and the final paper into one org-file (or org-project) and keep always 
all infos and data close together

Something like (pseudo code):

/-/

12.03.2148: Scotty
I'm going to create a better warp drive system: 
...
First measurements should show the better efficiency. The old set-up is moved 
to 
the lab downstairs  the old measurement files back-up is at 
First lets load the values and calculate the performance:

#+srcname: measurement 
#+begin_src python 
data=load(measurement.csv)
perf = calculate_performance(data.values)
#+end_src

This was the final measurement performed with the new set-up. It shows already 
the nice improvements... 
Just some infos of the measurement
Measurement date: #:measurement data.date#
Measurement parameter: #:measurement data.param1#

13.3.2148: Scotty
Spoke told me it could be better by performing a new warp-core calibration... 
However, I could write the abstract already:

#+srcname: paper_for_star_fleet_physics_journal
#+begin_src LaTeX 
\begin{abstract}
 the new set-up shows a $#:measurement perf#,/%$ better perfomance then 
the old warp drive...
\end{abstract}
#+end_src

13.04.2148: Scotty
Finally I applied the calibration as Spoke said but results are not better. 
Results can be found here _link_ but will not be published yet... lost one 
month... will kick some Vulcans ass ...
Let's continuous with the graphs I need for figure 4...
...
...
...

//

I hope this gives an idea of what I like to do. :)

Export should allow selections like "export all" (including comment texts and 
source code blocks), "export without source code blocks" and "export results 
only". The last one would produce the native LaTeX code ready for submission. 
This would allow to process the file with any standard LaTeX environment.

I know there is the tangle function. However, it would require a LaTeX-source 
block for org-babel. Creating one would result in the problem that I have to 
replace spaceholders within the LaTeX-code blocks  with the results of python-
blocks (as shown in the example). 

It would be nice to hear if someone is doing something similar or if somebody 
has some ideas how to accomplish this with org-mode and org-babel

Best regards,

Torsten


CC. Sorry for the long mail

 





___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] org-babel: Meta-LaTeX-Python-Environment

2009-10-27 Thread Torsten Wagner
Ups,
sorry that happens if you are working normally with  emacs and compose a
message in a online editor (gmail). My fingers hit some emacs shortcuts
without my brain was telling them ;) ... and fired up the unfinished mail.

Anyhow I hope it is somehow clear what I like to do

Thus, just the greetings where missing

Thanks for help and reading

Torsten
___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] org-babel: Meta-LaTeX-Python-Environment

2009-10-27 Thread Torsten Wagner
>
>
> Perhaps this will do what you want?  When I run org-babel-tangle on the
> following org file, and then LaTeX the output, the resulting pdf file
> says: A bit of LATEX code, with the result: 6
>
> * Test org
> #+begin_src python
>   x = 6
>   f = open('python_results.tex', 'w')
>   f.write(str(x))
>   f.close()
> #+end_src
>
> #+resname:
> : None
>
> #+begin_src latex :tangle test_arg_passing
> \documentclass{article}
> \begin{document}
>   A bit of \LaTeX code, with the result: \input{python_results}
> \end{document}
> #+end_src
>
> HTH,
> Tom
>
> Hi Tom
Thanks for sharing this idea. Actually my first (org-babel free) attempt was
working like that. However, it becomes fast difficult and complex. On the
other hand it solves nicely the problem with the code evaluation in another
source block. I just wonder if there is a more comfortable method rather
then creating a file.

Thanks again for sharing

Torsten
___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] [Announce:] org-git-link

2009-10-28 Thread Torsten Wagner
Dear Reimar,

why I feel like I have Birthday today ;)

Thanks will try it as soon as possible

Greetings
Torsten


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [babel][Orgmode] org-babel: Meta-LaTeX-Python-Environment

2009-10-28 Thread Torsten Wagner
Hi Dan,
thanks for helping me to realize my idea.

Actually, I do not know whether it is not working or it is not working as I 
expect:
I used the following simple example:

--8<--cut here--start--->8---
* Simple Test of org-babel
#+srcname: test()
#+begin_src python  :results latex
  a = 1
  b = 2
  c = a+b
  "This is a Test: if a =" + str(a) + " and b = " + str(b) + " then a + b = " 
+ str(c) + " right ?!" 
#+end_src

#+resname: test
#+BEGIN_LaTeX
This is a Test: if a =1 and b = 2 then a + b = 3 right ?!
#+END_LaTeX
--8<--cut here--end--->8---

As you can see, the result is wrapped now in LaTeX source code blocks.
However, if I export the file by
M-x org-export l
the resulting LaTeX file still contains the source code itself (the part in the 
verbatim environment.
What I was looking for was something _without_ the source code just the 
result.

Getting export-result (trimmed to relevant part):
...
\section{Simple Test of org-babel}
\label{sec-1}
\begin{verbatim}
a = 1
b = 2
c = a+b
"This is a Test: if a =" + str(a) + " and b = " + str(b) + " then a + b = " + 
str(c) + " right ?!"
\end{verbatim}
This is a Test: if a =1 and b = 2 then a + b = 3 right ?!
...

Wished export-result (trimmed to relevant part):
...
\usepackage{color}
\definecolor{gray}{gray}{0.95}
...
\section{Simple Test of org-babel}
\label{sec-1}
\colorbox{gray}{
This is a Test: if a =1 and b = 2 then a + b = 3 right ?!
}
...

As you can see, I like to indicate the source block results resp. the LaTeX 
source code blocks in a way which indicate clearly that they belong to the 
"official" output. E.g. by adding a slight gray background.

As mentioned before, I like to have mainly three ways of export 
1. Export everything
2. Export everything except the source codes itself
3. Export a particular LaTeX source code session (e.g. by using the tangle 
function)

Nevertheless, I will try the other very good ideas in this thread. Maybe this 
works for me already.

Best regards and thanks again 

Torsten


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] [babel] demonstration mode-switching between code blocks

2009-11-03 Thread Torsten Wagner
Hi everybody,

Abstract: This is a very quick (and I assume very dirty) hack, how to switch 
between org-mode and any other mode which you like to use in the source code 
blocks. It is far from being addable to org-babel yet but might be a good 
starting point.


Problem: If I use source code blocks together with org-mode and org-babel, I 
miss sometimes the nice features of the original language mode in emacs. 
E.g. In python-mode there is syntax-highlighting for python (obviously). In 
org-mode the python syntax is simply unicolor which results (for me) in error 
prone usage same for proper line indentation (which is critical in python).  
Furthermore, switching frequently between org-mode and python code, key-
bindings which got used by both modes (e.g. the famous C-c C-c) are typed very 
quickly within the wrong mode... which might lead to "funny" results on both 
sites. Try to think in python (including python-mode) and use org-mode 
keybindings or vice versa... ;)

I know I could (and I do) open an explicit buffer with the right mode by C-c `. 
However, esp. for debugging and tweaking of the code blocks I like to have at 
least syntax-highlighting and proper indention and don't want to switch forth 
and back between buffers continuously.


Solution: I found on emacs-wiki the minor-mode two-mode-mode.el [1] from David 
N. Welton. I was able to modify it with a minimum to allow switching between 
org-mode and python-mode. However, other (multiple) modes should be possible 
as well.

I had to change the configuration into the following:

(defvar default-mode (list "org-mode" 'org-mode))
(defvar second-modes (list
 (list "python" "#+begin_src python" "#+end_src" 'python-mode))

Making two-mode-mode.el required in emacs init or even hook it to any 
automatic load method, after I load an org-file in emacs I can start two-mode-
mode.el (if not loaded automatically).

Moving the pointer to within a python block will switch from org-mode to 
python-mode. Leaving the python source code block will allow to switch back to 
org-mode automatically.
Placing the pointer on the #+srcname: line still allow C-c C-c and C-` to 
evaluate the source code block within org-mode.


Issues: Org-mode file *need* to use the startup variable  'showeverything' 
otherwise the switching between the modes results in a permanent folding 
between into the overview. Resulting that if you "tab" on a header it opens up 
and close directly.
e.g. add 
#+STARTUP: showeverything 
to the head of the org-file.

If you set the pointer with the mouse the mode-switch does not work. You have 
to move the pointer once inside the code block

It seems that sometimes there is a very long freeze state... don't know 
whether this is due to my recent system changes or due to the new minor-mode 


Result: It seems to work so fare not to bad for a quick hack. The code-base of 
the  two-mode-mode.el is very minimalistic and I believe it would be very 
quickly integrated resp. reimplemented within org-babel. I believe it is a 
worth idea even just for the proper syntax-highlighting and the correct 
indentation for the particular programming language.

Best regards,

Torsten

[1] http://www.welton.it/freesoftware/files/two-mode-mode.el
 


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] MobileOrg 1.0 for iPhone/iPod Touch now available

2009-11-03 Thread Torsten Wagner
Hi

Looks like fantastic work, congratulations!  Thank heavens I finally
> got Ubuntu/emacs/orgmode/git running natively on my Android phone,
> otherwise I'd be green with envy ;-)
>

That means you run a full emacs23 together with org-mode on your phone :o

 oh thanks now I'm be green with envy :P 

Any docs, how-tos, screencasts, screenshots, notes, tips and tricks ?

Regards,

Torsten

To be not OT: Where should someone start to learn about the interaction
between org-mode and the mobile app...
___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] [babel] demonstration mode-switching between code blocks

2009-11-04 Thread Torsten Wagner
Hi Adam,

Thanks for sharing.  Just for reference, there are few major modes out
> there implementing this kind of approach:
>
>  http://www.emacswiki.org/emacs/MultipleModes
>
> For example I have used mmm-mode to good effect in the past, to
> auto-switch between HTML and Perl:
>
>  http://mmm-mode.sourceforge.net/
>
>
Thanks for sharing the alternatives. The  proposed solution has the charm to
use only a minor mode which consist of less then 100 lines of lisp-code. I
thought if it is of general interest, it might be easy adoptable within
org-babel. I would prefer to use org-mode as major mode.

Best regards

Torsten
___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode][babel]: Some feedback after the first week usage

2009-11-05 Thread Torsten Wagner
Hi Tom

> Would something like run-code-blocks (below) do what you want?  I put  
> a source block like this at the top of my org-babel file, where I can  
> find it quickly.
> 
> #+srcrname: run-code-blocks
> #+begin_src python :noweb
> <>
> <>
> #+end_src
> 
> #+srcname: block-1
> #+begin_src python
> a = 1
> a
> #+end_src
> 
> #+srcname: block-2
> #+begin_src python
> b = 1
> b
> #+end_src

Actually, that is a very nice and smart idea :)
It could be something like a Makefile allowing me to switch on and off 
different 
blocks (e.g., for debugging if there is an error somewhere), switch between 
different blocks (e.g. real data from file and test data set) or even modify 
temporarily variables in between 

For example I could write:

#+srcrname: run-code-blocks
#+begin_src python :noweb
 # <> # choose between real data
 <> # and test data 
 # wondering whether it would work with negative values
 a = -1 
 <>
#+end_src

#+srcname: block-1
#+begin_src python
a = open("foo.txt","r")
a
#+end_src

#+srcname: block-test
#+begin_src python
a = 1
a
#+end_src

#+srcname: block-2
#+begin_src python
b = 1
b
#+end_src

Nice, will try it and many thanks for sharing

Greetings

Torsten


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode][babel] noweb does not work (as expected)

2009-11-08 Thread Torsten Wagner
Hi everyone,

I tried to use the noweb-syntax to tangle all the pieces of source code blocks 
together as proposed by Tom.

However, for some reasons it does not work. 
I notice there are two different syntax for noweb. One propsed on worg and the 
other in examples here in the mailing list. Which one will be correct ? or are 
both correct but with different purpose ?

I used the latest git-version and even tried the branch noweb-evaluate

What I used was a source code block at the end of my org-file like:
All other blocks are defined above.

#+srcname: makefile()
#+begin_src python :tangle simulate_ofdm :exports none
  <>
  <>
  <>
  <>
  <>
#+end_src
#+resname: makefile

However
the tangled file results only in 

#!/usr/bin/env python
# generated by org-babel-tangle
# [[file:~/test_noweb.org::*Result][makefile]]

# makefile ends here

An execution of block shows nothing on the *Shell output* buffer
It seems somehow I missunderstand which part of a block will replace a 
<>  variable. I thouht it will be replaced by the complete source block 
content during tangle. 

Any ideas ?

Thanks,

Torsten


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode][babel] noweb does not work (as expected)

2009-11-08 Thread Torsten Wagner
Hi Dan, 

thanks for trying helping me out
actually your example works for me after switching back to git-babel master 
branch.
However, my file does still not work and I can not see a difference between 
your 
and mine file.

I will try to minimize it now to the point where it either works or still 
fails and post it here. 
Could you please tell me which of the branches in the babel-git includes the 
best working version for noweb usage.
I got a bit confused with all this branches.
Maybe I do something wrong during the installation from git. I actually only 
run standard make; make install; 
and I set a symlink of the contrib folder into my .emacs.d from where emacs 
will find the babel files. Actually I'm wondering why the contribs are not 
copied by make into the elisp-path.

Furthermore, I noticed that babel-git uses a complete org-mode branch for the 
development of org-babel. Is this to keep org-mode freezed and to control 
merging with the main org-mode developments? 
I once read about git submodules [1]. Maybe this is interesting for org-babel.
 
Thanks again for help

Torsten

[1] http://book.git-scm.com/5_submodules.html


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode][babel] noweb does not work (as expected)

2009-11-08 Thread Torsten Wagner
Hi Tom,

If I try to use the noweb way, I always got error messages which tells me that 
org-babel can not read the result correctly

> 
> #+srcname: r-load-libraries
> #+begin_src R
>library(RMySQL)
>library(reshape)
>library(xtable)
> #+end_src


As I see you do not use any special header here which means results is set to 
value, right? However, there is no special return line to org-babel either. In 
my understanding and according to my error messages  library(xtable) would be 
evaluated as the result of this block...

However this results in error messages at least for python.

Which org-babel version due you use (which branch)?

Maybe you or someone else can bring some more light into this :results topic.
I somehow miss the option :results none to avoid any results which should be 
useful if the source code block is just a piece of a bigger arrangement. For 
literate programming and RR it might be essential to spread blocks over the 
file which will be tangled together (by tangle or a noweb block). However not 
all need provide a result but just need to run in the same session. Maybe just 
the last block of such an arrangement will come up with a result suitable for 
org-babel.
 
Actually I prefer the idea of :noweb instead of tangle, which seems to me more 
flexible and faster.

Just need to get it running

Thanks 

Torsten


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode][babel] noweb does not work (as expected)

2009-11-09 Thread Torsten Wagner

> Hi Torsten,
Hi Tom,
 
> It's not clear to me what outcome you desire.  Tangling should result  
> in a source file that can serve as input to a compiler or  
> interpreter.  The combination of :noweb and :session lets you write  
> literate programs that are sent directly to an interpreter, which  
> presumably creates some useful output along the way (my example makes  
> some graphs after a lot of data reshaping), but might be used just to  
> set up an environment in the interpreter, which then can be  
> manipulated directly in the session buffer.

Actually I'm looking for a way to execute several of my source code buffers in 
a comfortable and semiautomatic way to do exactly what you described. Joggling 
around with my measurement data... bend badly statistics until it fit to my 
world ;) and finally create a plot, table or even a single number. The blocks 
should be aware of each other (same session) and I like to have a single local 
place to control the order in which the source code blocks are executed and be 
able to tweak around with some variables or add quickly.
Thus, this sound really like :noweb and :session will do this.

However, sometimes I would prefer to see the code all tangled together in one 
chunk. This might be esp. interesting for several purposes.
a) Give the pure code to someone else,
b) Make a somehow stand-alone-version without org-babel e.g. to execute it 
over and over again on another org-babel free machine,
c) Debugging and bug searching might be easier since you can clearly see the 
interfaces between the source code blocks without to much org-mode in between.

I guess at the moment I could create two blocks ... one :noweb, :nosession for 
the interactive work on the project and one with :tangle which put all this 
together into a single file. I never tried :tangle and :noweb together. 
Actually, they should not conflict so fare. However, at the worg-page all 
options are given as mutual exclusive. 

I will give at a trial... as soon as I make my file working under both methods.

Best regards,

Torsten


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode][babel] noweb does not work (as expected)

2009-11-09 Thread Torsten Wagner
Hi Dan
> Important: The only version of org-babel that's intended for users is
> the version in current org-mode. I.e. the current master branch of
> Carsten's org-mode repository. The other repository (the babel repo) is
> for development only. Any stable improvements in there are rapidly
> merged into Carsten's repo.

O.k. thanks for the clarification. I started using babel-git since in an older 
thread someone refereed that the functionality is no in a branch of babel-git. 
I did not know that you merge quickly with Carstens org-mode git.

Depending on the speed of merging, you might like to use tags in babel-git 
signaling at which commit you merged org-babel back to org-mode. Then people 
can quickly run a git diff to see if the particular change they are looking for 
is already in merged to org-mode or not. 

> I think the main point is that the current set up means that org-mode
> and org-babel share a common history of commits. My current idea of git
> submodules is that I would include something as a submodule when it is a
> module that gets used by multiple different projects...

As far as I understand git submodules (but I never get in real use to them 
yet) they can be considered as a part of a project which keeps it own history. 
If that is right it might be perfect for org-mode and org-babel. You can 
develop on top of the org-mode git and does not cluttering the history of org-
mode git.
However, as far as I read there are some potential flaws which, if used wrong, 
can create some serious problems. 

Many thanks for helping me so fare

Torsten


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode][babel] (solved) noweb does not work (as expected)

2009-11-09 Thread Torsten Wagner
Hi,

finally I found the problem. As Dan mentioned there is a difference for 
<>
<>
<>

For some reason I was sticking with block1() and override it over and over 
again. No it seems to work go into the right direction. Python still seems not 
to like the code if its created by :noweb. However :tangle code seems to run 
fine.

I will try to sort this out now.

By the way, :noweb and :tangle seems to work nicely together which gives the 
freedom to go one or the other way to execute the source code blocks

During fiddling around the last day, I found some quirks and "nice to have" 
requests. Should I simply post them on the list ?

Thanks again for helping me

Torsten



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] [babel] Executing sh-code

2009-11-27 Thread Torsten Wagner
Hi Sébastien,

I just tried quickly. I use org-babel with python, up to now never with shell 
scripting.

> 
> --8<---cut here---start->8---
> * Prerequisites
> 
> #+begin_src sh :session ecm
> cd ~/Personal
> #+end_src
> --8<---cut here---end--->8---


This works for me (I changed the folder name). There is a error line in my 
message buffer
--8<---cut here---start->8---
executing Shell source code block
~/babel 
save-current-buffer: Wrong type argument: char-or-string-p, nil
--8<---cut here---end->8---


but the relevent part runs ok. My shell buffer depict to the new folder after 
execution.


--8<---cut here---start->8---
tors...@gaijin ~ % 
cd ~/babel
echo 'org_babel_sh_eoe'
tors...@gaijin ~ % cd ~/babel
tors...@gaijin ~/babel (git)-[master] %
--8<---cut here---end->8---


I used the same init like you

> What am I doing wrong?  Or have I set something wrong (or missing) in my
> .emacs file?
> 
> --8<---cut here---start->8---
> (require 'org-babel-init)
> 
> ;; activate a subset of languages
> (require 'org-babel-R)
> (require 'org-babel-sh)
> 
> ;; make pre-built helper functions available
> (org-babel-load-library-of-babel)
> --8<---cut here---end--->8---

However I didn't use the (org-babel-load-library-of-babel) function.

Which version of org-mode di you use ? org-babel is young and change still 
heavily. I guess you have to use the latest git-version of org-mode.
Furthermore, does the shell iteself (M-x shell) work in emacs as desired ?

Sorry not a big help at least a pointer that it should work...

Bye

Torsten


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Org-mode tricks for team management

2009-12-03 Thread Torsten Wagner
Hi Juan,

> 
> http://juanreyero.com/article/emacs/org-teams.html
> 

This solution is very nice. I would encourage you to pack it into an own 
contrib for org-mode. Maybe even trying to merge it into org-mode itself.

Please also consider to check out how this could be worked together with org-
mobile. As far as I understood you are going to have beside the normal agenda 
views a place and person sensitive agenda. This makes even more sens on mobile 
devices. 

#+ dream-mode on
All those smart-phones have GPS now. It would be incredible awesome if the GPS 
location could be used to define the place automatically :) Even send alarm 
messages... (This idea was discussed at the OpenMoko-Community (position-
sensitive alarm)
#+ dream-mode off

Best regards,

Totti



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: [babel] Executing sh-code

2009-12-06 Thread Torsten Wagner
Hi,

> Hi Eric,
> 
> Sébastien Vauban wrote:
> > "Eric Schulte" wrote:
> >>
> >> [...] The following works for me without any hang.
> >> The only difference I can see between our setups is a matching prompt
> >> regexp.
> >
> > That was it. Fixing my PS1 prompt to be like yours (temporarily keeping 
your
> > regexp from the comint-prompt) *did* solve the problem.
> 
> Testing that a bit further, I notice that:
> 
> - my Bash prompt must be uncolored for the output to be catchable by
>   Org-babel;
> 
> - ls can be colored, but control characters are then passed "as is" to
>   Org-babel, so better not doing it.


As I said before, the example worked fine for me...
I like to add that I use a very very colorful prompt but using zsh instead of 
bash
Maybe this is somehow interesting for bug-fixing.


Best regards

Torsten


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Org needs your vote

2009-12-07 Thread Torsten Wagner
> http://lifehacker.com/5419988/five-best-outlining-tools
Even the description of org-mode in this poll is simply wrong its not 
command line  ITS PLAIN TEXT !!!
That means even the author of the poll had not any idea of what he is writing 
about...
What did he do? Goggled "org program" and took the first 5 hits ?!

This is pretty worseless...


However, I vote ;)

Greetings
Torsten




> 
> 
> 
> ___
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
> 


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] RFC: Syntax for page numbers in file: links?

2010-01-06 Thread Torsten Wagner
Hi,

during following this thread I noticed one "problem" with the page and line-
number concept

>   - file:~/some-file.txt::23some-file.txt, line 23

A txt-file may have no clear page boarders. Thus only a line number might make 
sens

>   - file:~/document.pdf:4   document.pdf, page 4

A PDF may have only pages and maybe (I do not know at the moment) there is a 
way to address bookmarks and toc entries and even line numbers

>   - file:~/document.odf:3::5document.odf, page 3, line 5

A odf can have both line numbers and page numbers as well as chapters-, 
paragraphs- etc. markers.

Thus, it depends heavily on the kind of document and on the ability of the 
external reader. 
I would suggest to make sure, if no page number but a line number is given, 
this line number should be dealt as absolute value (starting from the very 
first line). If a page number and a line number is given, the line number is 
relative to the given page. Furthermore, there should be something to deal 
with wrong inputs. E.g. given page number for file-types which does not have 
defined pages (like txt, source code, etc.). 

Nice would be the possibility to refer to TOC, paragraphs and other markers 
since they would keep valid even if later versions of the file change the 
position and make page and line number invalid.

Just my thoughts

Torsten




> 
> ___
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
> 


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: Update ispell-dictionary to text language

2010-01-15 Thread Torsten Wagner
Hi Seb,
Hi Carsten,

I guess it depends highly on the definition. I can see Sebastien's points. It 
is somewhat strange to have a header-row "language" which does not have 
anything to do with the way how org-mode (resp. emacs) handels the org-buffer.
And the danger to use two different places + the confusion of two slightly 
different styles may confuse esp. newbies like me.

However, on the other side, it is said that C-c C-e t "insert the *export* 
option template". Which strongly refer to export features.

I guess it would be more clear if there is a #+EXPORT_LANGUAGE tag.
But to change this now is stupid as well. 

So not right sure what to do. 
Maybe leave it to people and offer a flag to say in the org config something 
like 
export_language is equal to ispell_language (maybe working both directions) 

Just two newbie-cents

Totti



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] org-babel: Managing a bibtex database

2010-01-21 Thread Torsten Wagner
Hi Taru,

I was thinking of something similar but (even if I like org-babel a lot) not 
based on org-babel. I think a own mode ala org-bibtex would be nice. However, 
the ideas might be joinable.

My idea would be to have somethink like the org-mode link-feature. However, 
instead of asking for the link and a describtion text, I like to give the 
bibtex-key only. Somewhere in the Header I like to define the bibtex style and 
as soon as I finish this kind of link, it would be formated *direclty* 
according to the bibtex-style. Removing one of the square brackets should show 
the single bibtex entry for possible modifications. Closing the link again will 
reformat the descriptive text accordingly. 

By this way I would be able to maintain the database in org-mode with addional 
notes and information which are not interesting for the database records.

Just an idea..


Totti


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] org-babel: Managing a bibtex database

2010-01-22 Thread Torsten Wagner
Hi again,

I just rethought my idea. I think even if there is no full automatic link 
function, it would be nice to see bibtex as a org-babel mode.

My worse case scenario is as follow:
Someone ask me to send the reference X or a bunch of references Y to someone 
in plain-text (mostly they like to copy them over in MS-word). 

The actual procedure:
For the moment, I have to write a "fake" LaTeX document, and force bibtex to 
place all the given bibtex-keys into the references list of this document even 
if not really refered to it in the text. I guess I could also copy all the 
bibtex entires of the desired references in a singel bib-file and run bibtex 
manualy. But I'm doubt whether this is really faster. After that I need to 
copy the results from the PDF or PS file to plain text email. Wrong line breaks 
and format loose are the results.

The org-mode babel approach would be:
I would prefer two ways in a bibtex-babel set-up. 
1. Take the bibtex-entires from a given database (bib-file) according to the 
given bibtex-keys inside the source code block. Process them by the given 
bibtex-style and place the result in the result section of org-babel.

2. Add full bibtex entries directly to the source code block and process them 
according to the given bibtex style. Place the result in the result section of 
org-babel.


The idea to extend the link function of org-mode by linking to a bibtex-
database might be the next step.

Best regards

Torsten


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] How to combine the analogue (Moleskine) world with digital (org-mode) world ?

2010-01-24 Thread Torsten Wagner
Dear all,

I really tried hard over the last year to use org-mode as much as
possible. It was already mentioned that, due to the incredible
org-mode features, this becomes fast more a religious rather then a
working task. Thus, my work flow changed more and more to a org-mode
flow. And now they even start this babel thing ;)

I'm very very happy with this.

However, not all my work is just in front of a computer. And the world
is until know still analogue with sometimes even more analogue
colleagues ;). Often I get some appointments or something I like to
write down "on the way", at the bus, during the coffee-break, etc. I
can make some notes on a piece of scratch papers and try to add them
later to my org-mode system. But you know... no paper... no pen...
lost the scratch paper... no time to transfer it to the PC etc. For
many reasons this does not work well for me.
I tried to a portable version of emacs+org-mode on my PDA. This works
well, since it is a clamshell keyboard based PDA (Sharp Zaurus). For
me this is still a bit ineffective compared to a paper and pen
solution since it would require to sync home- , work-place and the PDA
constantly (e.g., by using git). However, my PDA is not on-line most
of the time, due to the lack of wireless access points. And murphys
law always make sure it run out of juice whenever I need it really
badly...

Thus, today I bought one of these moleskine paper organizers (no
advertisement, all other organizers would be nice as well). I hope to
have it always with me and to use it in all this cases where I do not
have access to org-mode ( I'm still waiting that someone comes up with
a org-mode-brain interface).

My question is now. What would be the best way to combine the
moleskine and org-mode ? Does someone have experience  with a paper
based and digital mixture system? One of my ideas was to print out the
weekly or monthly agenda as small as possible and just attach it to
the molenskine (it has a little card holder at the back). This would
allow me to check what is in my org-mode agenda. However, I would
still have two independent systems.

What I'am looking for is a smart way to keep both in sync and that
without big hassle. It has to be something which does the job quite
quick thus I will do it directly e.g., every morning before starting
work... instead of pushing and pushing it away from me. Thought maybe
I simply mark the entries in the paper version whether I added them to
org-mode already or not and create a tag in org-mode for the vice
versa reason.

Any ideas and experience would be welcome.

Best Greetings

Torsten


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] How to combine the analogue (Moleskine) world with digital (org-mode) world ?

2010-01-24 Thread Torsten Wagner
Hi Ray,


> I am a "heavy note taker" and also running org-mode and paper. Paper has
> advantages mostly when thinking slowly and may be more reflective. Computer
> has its advantages when it comes to organizing stuff.

Unfortunately, I'm not this heavy note taker guy... I always thought ... ahh I 
can remember it later... 
However, either I'm aging or things becomes more complex... whatever, I get 
more and more problems to keep things in my mind.
The problem is that both methods have so many advantages. Ideally I would like 
to see a tiny slim e-ink based organizer with keyboard purley optimized to run 
org-mode and a battery life time of at least 2 weeks.
Something like this...
http://www.kingjim.co.jp/pomera/index.html (it has no e-ink and does run an 
unkown OS)

> A last note on what I was to find out: Don't try to be too sharp - a little
> chaos left is kind of a little salt for the soup ... :-)

Yeah I notice to make the last 5% of yourself and your sourounding acting 
organized in your prefered way cost 95% of the time you like to spend on 
organisation... thus, it is a waste of time...

Thanks for sharing your opinion.

Totti




___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: How to combine the analogue (Moleskine) world with digital (org-mode) world ?

2010-01-24 Thread Torsten Wagner
> In my view, the effort it takes to maintain such a mixed system might be
> too high. And it becomes worse when you need to exchange information
> between the two subsystems. Unfortunately I can't see an easy solution
> to this. I probably will get an iphone (or any capable portable device)
> that can run a full-featured gtd system and sync with other devices (pc,
> maybe some gtd websites etc.), ie I will go for an all-digital solution.
> I used to have a 1st gen iphone and I used the voice recording and
> camera to collect items. I have found these two features valuable ;)

I tried now for some time a pure digital way. However, at least for me that 
fails for two many reasons. 
Thus, I'm looking to strike a balance between both ways trying to grep the 
best from both sides.
Please let me add that in my personal opinion a iphone is not really a big 
help. A device without keyboard is a real pain for note-taking. I tried it 
with a keyboard based PDA. But even the simple task 
to move it out of my bag, 
switch it on, 
move to the right buffer (I even used emacs + org-mode natively),
add the note, 
switch it off, 
and put it back in the bag,
was something which prevents me to use the PDA for smaller note taking tasks. 

I guess a keyboard free system which requires you to carefully type letter for 
letter on a silkscreen is even a more worse note-taking stopper.
However, this is only my opinion 

Thanks for sharing your thoughts

Best regards

Torsten


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: How to combine the analogue (Moleskine) world with digital (org-mode) world ?

2010-01-24 Thread Torsten Wagner

> I have a similar experience to you.   I run org-mode on my office
> computer and home computer and synchronise the files via USB drive
> and Python backup script.

If you have access to a sever... try to use git. There is a emacs mode and by 
opening your org-file on either the home or work-pc you could directly ask to 
sync it with your server. By this way syncing becomes a single key-stroke
In addition you have access to all changes over time. If you mess up you can 
restore it and if you miss to sync both systems git is very helpful to merge 
both versions into a single version again.

> I bought an A5 sized (5.5 x 8/5 inches / 14 x 21cm)
> student diary - one week to an opening with the 7 days on the
> left and a page for notes on the right. I use this for note taking
> and writing in very important dates, but I still refer to the 
> org-mode file as the master reference.  This diary cost $3.50 ...
> quite a bargain.

For the same reason I bought the moleskine. A bit more expensive but I thought 
it has to hold the harsh environments in my pocket for one year and I noticed 
that mid of January shops like to get rid of calendars urgently and greatly 
discount them ;)

> My other idea capture and note taking tool are 3 x 5 inch
> system cards. I cut up scrap paper into this size and keep several
> handy in my shirt pocket and a pencil. I can jot down notes any time
> and transfer what is important when I am back at the computer.

I tried this but always messed up with lost cards, messed up cards, etc. Thus 
I was looking for a more "stable" version.

> Printing a weekly agenda from org-mode is a handy motivational
> tool. I make it a game/challenge to cross everything off the list.
> The act of crossing something off a printed list is more rewarding
> and motivational than  C-c C-t d  (DONE) in org-mode :-)

That is definitely right. Maybe someone should try to implement a more 
attractive C-c C-t d in org-mode.  

Thanks for the ideas

Torsten


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Request: Slightly different structure mode

2010-02-22 Thread Torsten Wagner

Hi,
beside of the organising part I use org-mode as a lab-notebook for every 
"project" which involves more thinking and esp. remembering about it.


For that I create a new org-mode file for every project, linked to a 
main-file and I add all this links, infos, mails, deadlines, folder, 
files, data, and all other pieces of infos which I need to access or 
remember when I continue to work on this project (which might be weeks 
or months later). This works really great with org-mode and it help me 
to come quickly inside a particular project even after long time of 
non-processing.


I noticed that I prefer to create outlines like this (stupid example)

+--start--+
* Learn org-mode
  I start to read carefully the manual again. Esp. tables are still 
difficult to use for me.

** Just to remember the most important table commands
   Here I will write down all the table stuff commands a long long long 
text and maybe some tables.


 This text should belong again to outline 1. I just like to continue 
writing since I just write in a chronological order. I read the manual 
again and found some nice features I wasn't aware of ..more text.. .

+stop-+

Thus if I cylcle threw them I like to get the following:

+--start--+
* Learn org-mode
  I start to read carefully the manual again. Esp. tables are still 
difficult to use for me.

** Just to remember the most important table commands
  This text should belong again to outline 1. I just like to continue 
writing since I just write in a chronological order. I read the manual 
again and found some nice features I wasn't aware of ..more text.. .

+stop-+

Thus the last paragraph should belong to the first outline and only 
collapse if with the first outline. At the moment it belongs always to 
the last (in this case second outline) and collapsing result in:


+--start--+
Thus if I cylcle threw them I like to get the following"
* Learn org-mode
  I start to read carefully the manual again. Esp. tables are still 
difficult to use for me.

** Just to remember the most important table commands
+stop-+

So I like to use the outline levels more as a measure of importance or 
of detail. I write a generic text of how the project is going on, most 
likely just adding every day a little bit text like in a diary. If there 
is something very special or very detailed I like to encapsulate it in a 
outline and only open it up if I need to read again about it. Thus, it 
will not distract me by reading fast threw the main file and it is 
available if needed.


Any idea how to achieve that ?


Thanks

Torsten



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Request: Slightly different structure mode

2010-02-23 Thread Torsten Wagner

Dear Eric,


I noticed that I prefer to create outlines like this (stupid example)

+--start--+
* Learn org-mode
   I start to read carefully the manual again. Esp. tables are still
difficult to use for me.
** Just to remember the most important table commands
Here I will write down all the table stuff commands a long long
long text and maybe some tables.

  This text should belong again to outline 1. I just like to continue
writing since I just write in a chronological order. I read the manual
again and found some nice features I wasn't aware of ..more text.. .
+stop-+



Any idea how to achieve that ?


I do something similar but outlines don't allow for what you want.  I
use lists instead, particularly description (- XXX :: text) lists.
However, you would have to use list items for each paragraph as the
same problem of hiding will happen (the last item, when folded, will
hide any subsequent paragraphs).


Thanks for sharing the idea to use lists and thanks for using org-mode 
in a similar way like me ... that let me feel not to bad by abusing 
org-mode for my strange needs ;) . However, as you said it is rather the 
same problem with lists. Subsequent paragraphs always belongs to the 
last list or outline.
As far as I understood org-mode I could maybe use drawers to achieve 
something similar to what I want. However, I wonder if there is a more 
easy method esp. in way of typing, rather then wrapping a start and end 
command around the "inline"-paragraph. For my day-to-day use I always 
try to make it as easy as possible otherwise I might be to "lazy" to use it.


Thanks again for sharing your idea.

Torsten



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Propose: add developer infos to the manual

2010-03-03 Thread Torsten Wagner

Dear All,

I'm really an org-mode beginner and even more I'm a bloody emacs-lisp 
beginner. Nevertheless, I try to understand here and there who things 
work out and tweak some things here and there. Nothing which might be 
worse to share yet  but I'm on my way to learn about the internals 
of org-mode.


Normally I start to consult the manual and see if I could achive what I 
am looking for by the given function set of org-mode. If I concern a lot 
I try to dig down threw the source-code for different functions to see 
how they work.
I wonder whether it might be possible to add a footnote to every 
explained function with a link to the source-file.
By this way it would be much easier to find the desired code-lines. 
Maybe bug-fixing will be easier as well. I assume there are many 
org-mode users with solid lisp knowledge who might be able to help 
bug-fixing but who have no idea where to find the necessary code.


I know I can use C-h a in emacs to search for the desired function and 
jump to the lisp code. Just thought some redundancy in the manual might 
help to attract more people to contribute.


Since the manual and the lisp files are plain text, it might be easy to 
write a function which does this automatically?!


Furthermore, after I thought about this I started to wonder whether 
org-mode + babel could be used to literally program org-mode itself. 
This would result in a very nice developer manual and is a very nice 
example to literate programming.


Just some thoughts

Bye

Torsten








___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Writing a dissertation using org-mode

2010-03-03 Thread Torsten Wagner

Dear Henri,

On 03/04/2010 01:45 PM, Henri-Paul Indiogine wrote:

I started writing my doctoral dissertation in history using org-mode. I
am also using git.el for my version control and gnus for my email. Of
course I export my org file to LaTeX which I compile to pdf.  My
bibliography is managed using BibTeX.


please consider that you might have to follow a very stricy layout style 
depening on your university, department, lab or supervisor. If your are 
lucky there will be a LaTeX template somewhere at your university. If 
you are unlucky there is nothing like that or even worse only a MS-word 
template.


I'm not sure how good org-mode might be usable in that case. org-mode is 
really great and I try to use it for many purposes. However, for a 
thesis I would use directly LaTeX which gives me a bit more control of 
what is going on.


Furthermore, try biber [1] and biblatex [2]... the somehow next 
generation of bibtex and bib-file compatible. For me they work very well 
already despite of the fact that they are still beta-versions. biblatex 
gives you much more freedom of formatting your citations and 
bibliography... I guess both highly needed in your scientific field.


Good luck

Torsten

[1] http://biblatex-biber.sourceforge.net/
[2] http://www.ctan.org/tex-archive/help/Catalogue/entries/biblatex.html







___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Writing papers in foreign languages (toc and image captions)

2010-03-25 Thread Torsten Wagner

Hi Nirullah,

I guess for that you have to use the latex babel package (not mixing up 
with org-babel), furthermore, you might have to use inputenc and fontenc 
if you get problems with special turkish characters.

All of those you should be able to add to the LATEX header of your org-file
More infos will be here:
http://tug.ctan.org/cgi-bin/ctanPackageInformation.py?id=babel


Greetings
Torsten



On 03/26/2010 10:56 AM, Nurullah Akkaya wrote:

Hi,

I am using org-mode to write a paper in Turkish, when I export a pdf,
table of contents header reads "Contents" also images containing
captions has "Figure N" in them. Is it possible to change these words
to their Turkish equivalent?

Thanks...
--
Nurullah Akkaya
http://nakkaya.com


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode




___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Writing papers in foreign languages (toc and image captions)

2010-03-25 Thread Torsten Wagner

Nurullah,

nice to hear it is working now


 #+LATEX_HEADER: \usepackage[turkish]{babel}

changed both toc and figure captions to Turkish however,
images containing captions,

#+CAPTION: Iki sensor yerlesimi.
[[./img/sensor-yerlesim-2.jpg]]

disappeared, I have following in their place now,


Hmm that is a bit strange since as far as I know it should not make any 
differences to org-mode, or to say precisely, org mode has no idea that 
you are going to write in Turkish.


The only thing I could think about is some interference with between 
org-mode and babel... however, babel is a very frequently used package 
people would now about any problem and probably fixed it already.


Please check the tex-file generated by org-mode with and without 
babel-package. This gives you an idea whether it is a org-mode or a 
latex problem.


Your workaround might work but cut a bit of the elegance of LaTeX.

Greetings

Torsten


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Feasibility investigation: org-mode paper

2010-04-25 Thread Torsten Wagner

Hi all,

A few days ago I had this silly idea:

1. I create a template page, a kind of form, which assist me in writing 
directly in org-mode syntax. Different things could be predefined and 
others might be filled out.


2. I train a OCR resp. ICR to recognize this template with a hight 
accuracy. This might be easier then it sounds esp. since org-mode use a 
lot of keywords and key characters.


3. I write some lines of lisp code which allow (from within emacs) to 
scan the template by a paper scanner (or maybe use another digital 
picture source), perform some image processing, parse it through the ocr 
program, parse it through some org-mode releated parser and open the 
result in a emacs buffer.


This would allow in principle to write an org-mode file on real paper 
and get it into org-mode automagically.
Some of you might ask why?! Well, first of all "because we can" (its is 
still all plain text). Secondly, some of us might find this really 
handy. Think of this kind of boring meetings... hours of hours with 
nothing then a pencil and a paper in front of you. You know you will 
have to write a report, schedule, outline, etc. You know you will do 
this with org-mode and in front of your mind's eye you could already see 
the nice clear outline in org-mode style... however, you are stuck in 
that meeting for another hour... jotting down point for point and 
finally rush back to the office to type down all this. Others might find 
this interesting for conference meetings. There is normally enough time 
to write down clear notes clear and accurate ... thus why not directly 
in org-mode style.


I played with this idea (on a Linux system) and different tools come up 
to be handy.
Imagemagick can be used to improve the image quality for ocr and works 
perfectly in the background. I created a very first simple template with 
LaTeX. Scanning can be done easily from command line as long as the 
scanner is supported under Linux.


The real problem is the OCR or ICR. It seems there is a lack of really 
good OCR programs and handwriting recognition is even more poor.

I would be happy if someone can point me to some solution here.

As for the org-mode integration, I would wait and make it working first 
before I start to put my head into lisp-code.


In the meanwhile, I thought if handwriting is not supported well enough, 
there might be a kind of hand-writing assisted org-mode.
Printing out an existing org-mode file (maybe after a special form of 
export). Make certain annotations during the meeting e.g., stroke a 
line, stroke the keyword TODO and add DONE at the top, etc. and run this 
throw the process to update the real file. This would limit recognition 
to single keywords.


As I said it is just a silly idea, maybe not really useful but I thought 
it would be at least nice to make a "proof-of-principle". Finally, with 
the increase of ebook readers with touch screens, digital pens, tablets 
and netbooks with touchscreens, this might become even more interesting.


Happy to hear any opinion.

Torsten


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] For Org-mode on the go?

2010-06-07 Thread Torsten Wagner

I would be careful about that.
The price is nice but the question is how well the hardware works with a 
real open standard linux system.
I have an zaurus from sharp, which comes close to the nanonote. However, 
if I not go to use one of the heavy patched 2.4 kernels from sharp, 
suspend and resume is not working and the device hangs up.
That makes it rather useless since I don't want to power on and shutdown 
the device to add a note to org-mode and the 2.4 linux branch from sharp 
does not contain emacs.
Furtermore, I own a ebook-reader from a chinese manufacture and looking 
at the linux OS showed me that they really mess up many many things to 
bend it to working. Guess they are not really taking care of standards 
or of further user-based upgrades.


Thus, my suggestion please find out how well the hardware runs on 
GNU/Linux standard kernels and distributions (e.g., debian). If you know 
please report :D


Just my experience from some own "org-mode on the go" experiments.

Bye
Totti

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Why can't use Chinese folder while publishing projects?

2010-06-08 Thread Torsten Wagner

Hi,
just a guess...

see:
> 计算组/林绪虹/
it should be like the above one. right ?!
> ��Ŀ�걨/
but it is read like that one on your system

this looks very much like an encoding problem.
Make sure you use the same encoding for Windows and Emacs resp. the 
org-mode file. What happen if you open up the org-file in the windows 
notepad? Is it still readable, if not this might indicate the use of 
different font encodings.


Hope that helps

Totti

The other option is that my mailer is just writing everything different 
to the way you actually posting it. Font encoding is a nasty thing 
sometimes :)



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] [mobileorg] Android sync failed

2010-06-15 Thread Torsten Wagner
Hi,
I just got my new android based phone (HTC Desire) and the very first thing
I'm interesting in getting my org-based brainswap onto the android. I
installed Mats mobileorg program for android (btw., I hate the word "app",
sorry ;) ) version 0.4 Alpha
I followed the manuals and howtos, however, I can't get it to sync. I am
aware that the url needs to contain the "/index.org" part.
For first test I set-up a account on mydisk.se.

I rewrote the password and login name several times. I noticed that a wrong
passwort directly send me a "sync failed" whereas for the correct password
it needs some seconds to come up with the same error message. Thus, I think
the login into webdav works out correct. I can log-in via a direct webdav
client on my android.  Thus. technically it should be ok.

I tried several different org-files from very complex to just very simple
(one link to another file, which contains a single header).
I played around with the file permissions but without success.

Is there any thing else I could check? How could I get more details on what
actually failed. Is there a way to get more output via the usb debugging
function?

Any ideas are greetly welcome.

Torsten
___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: [mobileorg] Android sync fai led

2010-06-16 Thread Torsten Wagner
Dear Holger,

> I remember having to fiddle a little until I got it working - but
> nothing bad.
Thanks for the answer. I tried again and the only differences (beside of
different server), I saw in your and in my own set-up was the usage of
https vs. http. I tried to use http know and it seems to sync (at least
there is no error message). However, after that all I have is just a
empty screen. Files on webdav are not empty ;).
I will check again maybe I just created some error during testing and
fiddeling.

Can someone confirm that the present mobileorg work or cannot work with
https?

Furthermore, another thing I noticed, when I fire-up org-mobile-push, I
get the following message-log:

Agenda written to Org file /home/torsten/org/mobileorg/agendas.org
Creating agendas...done
Saving all Org-mode buffers...
(No files need saving)
Saving all Org-mode buffers... done
Copying files...
OVERVIEW
(No changes need to be saved)
Writing index file...
byte-code: Wrong type argument: listp, "TODO"

as you can see there seems to be an problem within the index-file.
Any idea what is going wrong there ?


Thanks for helping

Totti

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: [mobileorg] Android sync fai led

2010-06-16 Thread Torsten Wagner
Hi Matthew,

the content of my index.org looks like this

[[work.org]]
[[agendas.org]]

guess rather standard and normal

I will check further about possible errors. As I said, I pushed a lot of
buttons and turned a lot of knobs. Maybe one did create another problem now.

As for the error message and my problem it might be a problem within
org.el suggested in the thread

"[Orgmode] org-mobile-push error with no headings" from Erik

Thus, maybe you are totally innocent. ;)

BTW., I cloned the android client sources. I'm always short in time and
my Java knowledge is a bit rusty but since I like to learn about the
android internals and since orgmobile on android is the most interesting
topic for me I thought I can give you some assistance. If there is any
task you like to see performed, please let me know.


Thanks for helping

Totti

CC. Which envrionment did you use to develop the android client? I hope
and guess it was based around the emacs editor. Do you have any good
sources how to set-up emacs for android dev?



On 06/17/2010 10:35 AM, Matthew Jones wrote:
> Hi Torsten, the issue with https appears to be within Android, I have
> waited too long to add that information to the wiki so I'll do it now.  
> Can you give me an example of the index.org <http://index.org> file that
> was generated by org-mobile-push (or is it empty due to the error
> message from the push?) that should help in determining why nothing
> comes up.
> 
> 73,
> Matthew W. Jones (KI4ZIB)
> http://matburt.net
> 
> 
> On Wed, Jun 16, 2010 at 9:14 PM, Torsten Wagner
> mailto:torsten.wag...@gmail.com>> wrote:
> 
> Dear Holger,
> 
> > I remember having to fiddle a little until I got it working - but
> > nothing bad.
> Thanks for the answer. I tried again and the only differences (beside of
> different server), I saw in your and in my own set-up was the usage of
> https vs. http. I tried to use http know and it seems to sync (at least
> there is no error message). However, after that all I have is just a
> empty screen. Files on webdav are not empty ;).
> I will check again maybe I just created some error during testing and
> fiddeling.
> 
> Can someone confirm that the present mobileorg work or cannot work with
> https?
> 
> Furthermore, another thing I noticed, when I fire-up org-mobile-push, I
> get the following message-log:
> 
> Agenda written to Org file /home/torsten/org/mobileorg/agendas.org
> <http://agendas.org>
> Creating agendas...done
> Saving all Org-mode buffers...
> (No files need saving)
> Saving all Org-mode buffers... done
> Copying files...
> OVERVIEW
> (No changes need to be saved)
> Writing index file...
> byte-code: Wrong type argument: listp, "TODO"
> 
> as you can see there seems to be an problem within the index-file.
> Any idea what is going wrong there ?
> 
> 
> Thanks for helping
> 
> Totti
> 
> ___
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org <mailto:Emacs-orgmode@gnu.org>
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
> 
> 


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Does Org-mode need to be position aware?

2010-06-24 Thread Torsten Wagner
Dear All,

I recently bought a Android-based phone and was pleased to see the
mobileorg version for Android. As you all may know people tend away from
static computer places and we have mobileorg and some of us even run
emacs and org-mode natively on smartphones and other gadgets. More and
more of this devices come with a build-in GPS or at least they get can
get the current location by tracking the mobile phone towers.

Playing around with Android for a few days, I saw many applications
which make use of the fact that the location is known to them. E.g. they
show restaurants, shops, or doctors praxis close to you.

I start wondering whether org-mode should get aware of my location and
whether people might be interested to add a location tag to org-mode tasks.

In a similar way as we add status, priorities, dates, tags, etc. It
might be interesting to add a location. A special agenda search could
list only those entries associated with my current location (or within a
given circle).

Since GPS coordinates are somehow ugly and human unreadable, I thought
it should be possible to mask them similar to links. E.g., like
[[gps://35.71083783530009,139.8175048828125][Somewhere in Japan +3km]].

Obviously, the first part has to be generated by read out the GPS
location, the second part is a human readable description and a given
radius. Closing this "link" would end up in "Somewhere in Japan +3km".

A "C-a l" could compile an agenda list only showing those entries which
intersect with my current location.

Obviously, it requires to read in GPS data, which might be tricky to do
for all those different devices. Furthermore, it might need emacs-lisp
code as well as some external program to read-out the position of the
GPS module. But I guess the emacs-lisp gurus here might know this much
better then I do. Another issue comes to my mind for mobileorg users. As
far as I know, mobileorg only fetches agenda views from a server but
does not generate them. However, this would be necessary to create this
kind of location aware agendas.

Would be nice to hear other opinions. Makes this sens? Should it be part
of mobileorg, or rather a independent package?
Maybe something for me to get used to emacs-lisp ?! ;)

Bye

Torsten


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Fix: org-mobile-push results in byte-code: Wrong type argument: listp, "TODO"

2010-06-28 Thread Torsten Wagner
Hi all,
this problem was described by Xin already some monthes ago. Following
the thread, the solution was to remove the customisation of the variable
"org-todo-keywords".

Today, I faced the exact same problem. Removing seems not the correct
solution to me so I searched around in the org-manual.
To my surprise I found the following example:

(setq org-todo-keywords
   '((sequence "TODO" "FEEDBACK" "VERIFY" "|" "DONE" "DELEGATED")))

whereas in my init file I used simply

(setq org-todo-keywords
   '("TODO" "STARTED" "WAITING" "DONE"))

I changed my lines according to the manual and now org-mobile-push works
without any problem. I wasn't able to track down whether the
org-todo-keyword variable changed recently and I used an old definition
or why I customised it in this "simple" resp. wrong way. Surprisingly,
this didn't effect the TODO states mechanism in org-mode itself. They
work as desired with the old customisation.

Just thought I let you know, maybe some people fight or will fight with
the same problem.

Bye

Torsten



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] [org-babel] Does org-babel needs some simplification?

2010-06-28 Thread Torsten Wagner
Dear All,

as a (quite, but happy) org-bable user of the first hour I followed up
the development process actively.
Nevertheless, some weeks or months pass where I had no need for
org-babel (yes, really strange I know).

Whenever I come back to org-babel, it takes me a huge amount of time to
find myself back again in the syntax. Often I spend a day or two heavily
reading the website and manual again to figure out how to make it working.

There are so many options. tangle files, results, scripting mode,
sessions, noweb, lot, etc.

Just yesterday, I fighted again to make a simple python script running
as desired to generate an automatic report. I did this dozen of times
and even by using some old report as template I still struggle with it.
Comparing old reports I noticed that I did it in many different ways.
Tangeling all snipplets, using noweb syntax, with and without session
support, etc.

Don't get me wrong, I really love org-babel and I think it is really
great. I just wonder wether it has become too complex and too difficult
to use to attract most of the org-mode people. Esp. considering people
who use it not on a regular basis.

Best regards

Torsten

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] [org-babel] Does org-babel needs some simplification?

2010-06-30 Thread Torsten Wagner
Hi,

many thanks for the nice thoughts and posts.
To sum up, I think it might not be easy to remove parts of org-babel
since it is difficult to determine and a highly personal decision to
define what is important and what is unimportant.

Nevertheless Carten and Eric pointed out that the overhelming feature
set of org-babel, the fact that you could achive the same thing in
different ways and the missing of a "org-babel for dummies" might be a
problem for new org-babel users as well as for infrequent users.

Recently org-mode got his "org-mode for dummies" short manual. I guess
in the case of org-babel it might make more sense to create rather
typical examples for particular languages. This manuals could consist of
a typical example and of a template for this example which makes it easy
for beginners to fill in there own code and text.

Since Eric and the other org-babel and org-mode contributors are already
fully occupied with keeping org-babel and org-mode running, I would
suggest to collect a group of org-babel manual supporters. If possible
for each supported language one. This group could write up standard
situations for the particular language and maintain those manuscripts
whenever org-babel introduces some changes. In fact this group could
also serve as a kind of beta-testers for org-babel by trying on request
from e.g., Eric to compile there examples with the new org-babel
versions. I know there are some standard tests but I guess the do not go
that fare.

I guess, the manual maintainers do NOT have to be experts in both
org-mode resp. org-babel nore they have to be experts in the supported
language. Its more about the kind of standard stuff and maybe, to
complex stuff even scare people. More things like "How to create a
measurement protocol with org-babel and python", How to evaluate and
report data analysis with org-babel and R", etc.

To make it more easy for both the readers and the maintainers a kind of
template for such manuals might be helpful. This would help to find the
same information at the same locations and make a comparison e.g.
between the use of R and python possible.

I'am not an expert for both org-* and python and I'm often very limited
in time. However, I would try to maintain a "python and org-babel" manual.

If there are more people who are interested to act as a kind of manual
maintainers I would like to discuss with you how a template might look like.

Best regards

Torsten



On 06/29/2010 12:51 PM, Torsten Wagner wrote:
> Dear All,
> 
> as a (quite, but happy) org-bable user of the first hour I followed up
> the development process actively.
> Nevertheless, some weeks or months pass where I had no need for
> org-babel (yes, really strange I know).
> 
> Whenever I come back to org-babel, it takes me a huge amount of time to
> find myself back again in the syntax. Often I spend a day or two heavily
> reading the website and manual again to figure out how to make it working.
> 
> There are so many options. tangle files, results, scripting mode,
> sessions, noweb, lot, etc.
> 
> Just yesterday, I fighted again to make a simple python script running
> as desired to generate an automatic report. I did this dozen of times
> and even by using some old report as template I still struggle with it.
> Comparing old reports I noticed that I did it in many different ways.
> Tangeling all snipplets, using noweb syntax, with and without session
> support, etc.
> 
> Don't get me wrong, I really love org-babel and I think it is really
> great. I just wonder wether it has become too complex and too difficult
> to use to attract most of the org-mode people. Esp. considering people
> who use it not on a regular basis.
> 
> Best regards
> 
> Torsten


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] any idea how to convert org file to MS WORD an retain text structure?

2010-07-06 Thread Torsten Wagner
Hi Rainer,

> I tried HTML export and then imported the html in Word but
> I end up in an unusable xml style document which word wants an stylesheet for 
> which I do not have.

This is what does for me the best job if I have to deal with MS Word -
LaTeX conversion. How to do it with org-mode was answered already.

Let me bring another way into discussion.
Sometimes people ask for MS-Word files because they simply do not know
it better and the use MS-Word as a kind of media-container format. They
ask for MS-Word format but they will not process the document in any
way. Simply print it as it is.

This is often the case e.g., for conference proceedings where people
asked me for a camera ready MS Word document. Already the phrase
"camera-ready MS Word document" contains mutual exclusive words, taking
into account what a mess could happen after opening up a MS Word file in
a different version (both release and language version) of MS Office.

What I did already several times and I never got any complain was the
conversion of the generated PDF (from LaTeX) in a single image per page
(preferable png, tiff or any other compression format with a non-loss in
quality)
I placed this "page-pictures" in a Word-file, exactly as it would be
printed (I cropped the boarders with the MS-Word graphic tools.

This could be very quickly and easily done for < 10 pages by hand.

In the printed version of the proceeding, the conference organizers
simply added a head- and footnote. I guess they simply opened up every
MS Word file marked all content and copy and paste all of them in a
MS-Word file with the preferable head- and footnote.

As I said, I never got any negative feedback. Maybe the never noticed it
at all or there thought it might be some bug, safety feature, different
version problem, etc.


Just a quick and dirty trick which saves much much time. ;)


Greetings

Torsten

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Google calendar to org mode script and a feature request for agenda

2010-07-08 Thread Torsten Wagner
Just by reading and without the possibility to test it. Why you multiply the 
hour with 36 instead of 3600 to get seconds?

Grettings
 Torsten 

Eric S Fraga  wrote:

>On Wed, 7 Jul 2010 17:38:45 -0300, Daniel Martins  wrote:
>> 
>> Eric,
>> 
>> Your awk seems to get timed appts in GMT
>> 
>> How can I adapt it to GMT-3
>> 
>> Daniel
>
>Okay!  I think I've got this working for any time zone (as well as
>adding some more functionality -- read the prologue in the script for
>info).  
>
>Attached is the awk script.  I use this from within a shell script (on
>Linux) that essentially does this:
>
>--8<---cut here---start->8---
>ICS=basic.ics
>ORG=googlecalendar.org
>AWK=ical2org.awk
>
># get the Google calendar
>wget  http://www.google.com/calendar/ical/[...]/basic.ics
>
># convert the ical entries to org format, adjusting for the
># time zone information
>
># this next command yields hours from UTC, + or -, times 100
># Note: this does not cater for those people living in time zones
># that are not aligned with discrete hours (e.g. Newfoundland)...
>timezone=$(date +%z | sed 's/^\([+-]\)0/\1/')
>
># convert this to seconds for use in the awk script
>seconds=$(($timezone*36))
>
># and now process the ics file with appropriate time zone
>awk -f $AWK --assign SECONDS=$seconds < $ICS > $ORG
>--8<---cut here---end--->8---
>
>Please test this all out and let me know if it works.  If the date and
>sed commands work, you should be adjusting the times by -3*3600=-10800
>seconds.  This seems to be working for me with BST (aka GMT+1).
>
>eric
>
>-- 
>Eric S Fraga
>GnuPG: 8F5C 279D 3907 E14A 5C29  570D C891 93D8 FFFC F67D
>
>___
>Emacs-orgmode mailing list
>Please use `Reply All' to send replies to the list.
>Emacs-orgmode@gnu.org
>http://lists.gnu.org/mailman/listinfo/emacs-orgmode
___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] [ANN] org-protocol-httpd

2010-08-03 Thread Torsten Wagner
Hi Andreas,

this sounds very interesting and I would like to look further inside.
The following idea just came to my mind:
Might it be possible to use org-protocol-httpd as a server for
mobileorg? Because this would allow to have a light-weight client on a
smartphone (only to display the requested results) and to do all the
magic within org-mode and emacs on the server side.
E.g. I could ask the server to generate dynamically a particular
html-export of an agenda and display it in a browser like application on
my phone. Sure there need to be something like https and some other
security measures if it operates as an public accessible server.

However, by using the original export functions of org-mode, there would
be no need to parse org-files throw other programs to extract the
necessary information.

Running a emacs session on a server might be strange for some, but the
smartphone application might even provide a way to connect over ssh to
the emacs session. With this you would have easy viewing and simple
editing of org-mode files and if needed a full featured org-mode session
on your smartphone (yep I'm aware some here run emacs natively on there
phone).

Best regards

Torsten



On 08/04/2010 07:12 AM, Andreas Burtzlaff wrote:
> Hello all,
> 
> org-protocol-httpd is an Http-server running in Emacs that responds to
> requests where the path is:
> 
>  - an org-protocol action.
>In this case the associated handler from org-protocol is executed.
>  - an org-protocol-httpd action.
>In this case the associated handler is executed 
>and its return value is passed back to the client.
> 
> My reason for writing this is that I needed a proper way to retrieve
> information from Emacs for use in Fireforg, but it might be interesting
> for those of you having problems configuring protocols in Firefox as
> well. For details on how to use it from a Firefox bookmark please refer
> to the in-file documentation.
> 
> org-protocol-httpd.el is available in the lisp/ directory from the
> 'org-protocol-httpd' branch on:
> 
> git://github.com/atheb/org-mode.git
> 
> (Please note, that the small change to org-protocol.el in that branch is
> needed.)
> 
> Although I deem it stable, testing is very appreciated.
> 
> Andreas
> 
> ___
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[O] How-to evaluate Java-snippets in org-mode/org-babel?

2011-07-05 Thread Torsten Wagner

Hi all,

I need to evaluate many small java snippets. I tried to do this in 
org-mode but so fare it didn't work out. org-babel seems to have no java 
support ?


I can put the snippets in #BEGIN_SRC #END_SRC brackets which works nice 
for archiving and reporting. I can even call them in there own buffer 
via C-'. Now I would like to execute them to see if they work. Most of 
them just create some console output.
If I could simply execute the buffer I'm getting via C-' and see the 
output this would be totally sufficient.


I have trouble with different aspects of this. The buffer called by C-' 
has an unfortunate naming e.g. *Org Src main.org[ java ]* simply 
saving this buffer and trying to compile it troubles the java compiler.
Giving it a different name works, but then I face the problem that I 
need the following directories and name convention:


directory: \.java
to call
javac \.java
to create the class file and
java name.
to execute the file.

Obviously, I would prefer to to this automatically from within emacs.

Ideally I would love to use org-babel. If this doesn't work out. A 
command to create the directories and filenames on fly, compile and 
execute it would be awesome too.


If there is someone who did something similar or has an idea... would be 
glad to hear about



Totti




Re: [O] How-to evaluate Java-snippets in org-mode/org-babel?

2011-07-06 Thread Torsten Wagner

Hi Eric,

Somehow I was pretty sure you would answer ;)

I tried your example and it work great so far.

I have three points which I would like to discuss

1. I thought it might be nice to declare the package and class name for 
the java-stuff as variable in a property node then I could do something 
like:


* Coursework 1
:PROPERTIES:
:var: PKGNAME="cw1"
:var: CLASS="calc"
:END:

** Snippet 1
** Snippet 2

* Coursework 2
:PROPERTIES:
:var: PKGNAME="cw2"
:var: CLASS="string"
:END:

** Snippet 1
** Snippet 2

Unfortunately, org-mode does not allow multiple definition of the same 
property. I know there is a work around with a table. However, I thought 
I could use simply a list.


:var: vars="(cw1 calc)"
and use this in my shell script. However, this doesn't work. I can't 
index them. Any idea? Should it work in principle? Could I e.g., use

:var: vars="{'x': 128, 'y': 210}"
and put this in a python block accessing them by vars['x'] and 
vars['y']? That would be great!



2. I'm not totally sure but it seems that tangling creates the desired 
file if it is not existing so fare but it does not create folders thus,

:tangle path/filename seems not to work.
Any reason for this or maybe good idea to add it as a feature?
For now, I added a little shell-based block "start" which takes care of 
this.


3. Tangleing and executing the code via a shell blocks works great. I 
saw somewhere that you could even tangle from the command line by 
calling emacs in batch mode. That's maybe a bit overcomplex for my task 
but some additional style to noweb might be nice. Instead of placing the 
code block at the point of call, tangle the code block. Then I could call


<>
<>
<>

If I understood right, noweb for now only place the code of the block at 
the particular place. Maybe, I could write a lisp-block "tangle" which 
tangles the code and call it via

<>
Just want to know if this might be a good idea in general or if this 
works already in some other way.


All the best

Totti



Re: [O] How-to evaluate Java-snippets in org-mode/org-babel?

2011-07-06 Thread Torsten Wagner

Hi Jason,


My guess is that if you want to execute it directly within org, the
thing to do is to run it in beanshell[1], like JDEE does. I'm not
really familiar enough with org-babel to tell you how to go about
doing that, though.


Maybe this works nice too. However, so fare Erics solution turns out 
nice. Would need to see which advantages I would have using beanshell. 
Maybe code debugging might be easier then.


Thanks for the tipp

Totti




Re: [O] How-to evaluate Java-snippets in org-mode/org-babel?

2011-07-06 Thread Torsten Wagner
> But honestly, getting everything set up for your environment for it to
> actually work right is a pain and three quarters.

+1
I tried to use JDEE. It was crazy complex to set-up and at some point I gave up.
It seems Java support under emacs got a bit weak.

@Eric..
well I never used Java much. Learned a bit about it 10 years ago. Now
they asked me to assist teaching a Java class. you never now
what's coming next, right ;)

Totti



Re: [O] org-odt and bibliography

2011-07-07 Thread Torsten Wagner

There is jabref [1].
A standalone Java application, which uses the bib-format as native 
solution. Thus it could play nicely with org-mode. Since it will still 
remain all in a bib file.


The feature set is already outstanding compared to many other solutions. 
There is a emacs interaction as well to push \cite-keys to emacs.


It also claims to have a Openoffice support
never tried.

Totti

[1] http://jabref.sourceforge.net/



On 07/08/2011 01:56 PM, Christian Moe wrote:

Hi,

I regret to agree about the OOo bibliographic features.

Zotero is very nice, but getting Zotero IDs into an Org-mode document
(see Eric Hetzner's zotero-plain,
https://bitbucket.org/egh/zotero-plain) and then into OOo in a form
where they'll be useful (no ready solution I know of) is a somewhat
complex task. If Bibtex is your starting point and you want to maintain
your bibliography in Bibtex (and why wouldn't you, if you can /deliver/
your work as LaTeX/PDF), the round trip will be more complex and fragile
yet.

What are your minimal bibliographic requirements for documents to send
your supervisor? If you're using author-date citations and a reference
list, I might have a crude stopgap.

Yours,
Christian



On 7/8/11 3:40 AM, Henri-Paul Indiogine wrote:

Hi Matt!

2011/7/7 Matt Price:

The zotero Standalone Alpha has a Chrome extension. I think using
Zotero is
a much better bet than trying to use the native OOo bibliographic
features
which were always very primitive, never really expanded as they were
supposed to be, and have, I believe, more or less rotted in the last
several
years. there have been threads on this list about using zotero with
org-mode; now that org-odt as been incorporated into the org relase
(yay!)
maybe someone will figure out how to translate zotero ids into odt
documents
using the command-line version of OOo or something.


I know close to nothing about Zotero except that I have installed the
extensions for Firefox and LibreOffice.

I am willing to install the standalone Zotero. It has connectors for
Chrome and OpenOffice, so that should work.

Thanks,
Henri-Paul









Re: [O] Python script to download Google Calendar events

2011-07-12 Thread Torsten Wagner

Hi Felix,


Small disclaimer: I've tested this on Mac OS X only, using Python 2.7.2.


It took me a while to get the gpg part working but now its working nicely :)
I had to remove -no-tty for some reason.
getting from
authinfo = os.popen('gpg -q -no-tty -d ~/org/google_passwd.org.gpg').read()
to
authinfo = os.popen('gpg -q -d ~/org/google_passwd.org.gpg').read()

This is working under Arch-Linux, obvious after tweaking to use python2 
and not python3.


I will test if I could add the generated file to my agenda.

This would allow me to merge the google calendar with org.
Basically, I started to use the google calendar since most of the time I 
add events on my smartphone. Adding a quick event is, for now, much 
easier using the google calendar rather then trying to sync via 
org-mobile. I also appreciate the calendar view on small screens rather 
then a text-based view. A sync between org-mode and google events is not 
necessary as long as I stick with the way to add/change events only on 
my mobile phone. (but sure it would be awesome if there would be a real 
sync).


Lets see how it works out.

Totti





Re: [O] How-to evaluate Java-snippets in org-mode/org-babel?

2011-07-13 Thread Torsten Wagner

Hi Eric,


You probably don't want to pass the body of a code block to a lisp
function as quoting will become a nightmare, however passing the name to
a lisp block may be reasonable.

I would suggest that rather than implementing this behavior in a code
block you take a look at starting a ob-java.el file.  A partial
implementation (e.g., only external evaluation, no session evaluation)
would be a useful contribution, and given the many helper functions and
examples present in the other ob-* files this would most likely be
easier than a custom lisp-block implementation.


o.k. the first round of evaluations is over and it worked out o.k. 
However, there was still rather much handwork to do.
I tried to get a ob-java.el file together using the template and mainly 
by looking at ob-c.el which I guess comes close what would have to be 
done for java.
However, my lisp-skills (which are close to zero) are not enough to get 
it working. The main problem was that ob-c.el is working for both C and 
C++ and all this if then else troubles me a bit.


Basically, I want only tangle the actual code block into a temp file. 
Well temp is not really right, since java demand its file structure and 
file naming. Finally execute it externally by your proposed code


javac -cp . mypackage/myclass.java
java -cp . mypackage.myclass

and return the results

Hmm maybe better to give a real world example (stripped down to make it 
shorter)

I use now the following way
/---/
#+BABEL: :mkdirp t

* Coursework 1
** StudentID1
#+BEGIN_SRC java
  package foo;
  public class Bar
  {
  private double ans = 0
  public void set(double d){
  ans = d;
  }
  public void print(){
  System.out.println(ans);
  }
  public static void main(String[] argv){
  Bar c = new Bar();
  c.set(100);
  c.print();
  }
  }
#+end_src

** StudentID2
#+BEGIN_SRC java
  package foo;
  public class Bar
  {
  private double x = 0
  public void set(double in){
  x = in;
  }
  public void print(){
  System.out.println(x);
  }
  public static void main(String[] argv){
  Bar myclass = new Bar();
  myclass.set(100);
  myclass.print();
  }
  }
#+end_src

** Result
#+srcname: result
#+begin_src sh :results output
javac -cp . foo/Bar.java
java -cp . foo.Bar
#+end_src

//


For now I only added the tangle command to a single code block and 
created the file via C-c C-v t.


#+BEGIN_SRC java tangle: foo/Bar.java

Then I rushed down to a shell block  "result" which executed the the 
above commands. I checked the results and started to remove the tangle 
object from one block and added it to the next block. Kind of tiring if 
you have several dozen of blocks.
Guess you can see from the above example the trouble of having several 
dozen of them and then tangeling them one by one and execute the result 
block ;)


I tried to make it more easy by giving the shell block a name and call 
it under each java code block. This would save me the time going up and 
down in my file.


#+call: result()

However, I noticed that the result update was always done at the first 
appearances of the call , like under the first java code block but not 
at the desired code block?!

if you fold all together it would look like

/---/
#+BABEL: :mkdirp t

* Coursework 1
** StudentID1
#+BEGIN_SRC java
#+call: result()

#+results: result
: 100.0

** StudentID2
#+BEGIN_SRC java :tangle foo/Bar.java
#+call: result()

** Result
#+srcname: result
/---/

Calling the second call function updates the result on the first!

Anyhow, I guess having it working with a ob-java.el minimal system would 
be the most easiest. Simply type C-c C-c and it would be done.


Would be very glad if you could help me to get this somehow working.

Totti





Re: [O] How-to evaluate Java-snippets in org-mode/org-babel?

2011-07-17 Thread Torsten Wagner
Sorry took me a while to test it.
It works great 
Many many thanks for your help.
I found two minor things.
My snippets contain the definition of a package, which in turn end to be a
folder. The tangle function could create folders on demand. Would be useful
for your code too. It works already by creating the folder manually and
simply write...

#+begin_src java classname packagename/classname

in the next step, people might use sessions as equivalent to a package. This
would allow to define multiple classes and the usage of them within a single
execution.

However for now its perfect already. Why not putting it into ob-java.el and
see how its develope.
Totti
On Jul 16, 2011 12:37 AM, "Eric Schulte"  wrote:
> Hi Torsten,
>
> I've just written the included emacs-lisp function [1], which when added
> to your config should provide for minimal evaluation functionality for
> java code blocks.
>
> This function drops the body of a code block to a file named after the
> value of the :classname header argument (since java cares about file
> names), it then compiles the file with javac, and executes the resulting
> executable returning the results. See the attached Org-mode file [2]
> which evaluates successfully on my system (after I installed javac).
>
> I copied the code example and compilation process from [3].
>
> Please let me know how this works for you, hopefully once we iron out
> the kinks in this function it can serve as the seed for a full java
> mode.
>
> Cheers -- Eric
>
> Torsten Wagner  writes:
>
>> Hi Eric,
>>
>>> You probably don't want to pass the body of a code block to a lisp
>>> function as quoting will become a nightmare, however passing the name to
>>> a lisp block may be reasonable.
>>>
>>> I would suggest that rather than implementing this behavior in a code
>>> block you take a look at starting a ob-java.el file. A partial
>>> implementation (e.g., only external evaluation, no session evaluation)
>>> would be a useful contribution, and given the many helper functions and
>>> examples present in the other ob-* files this would most likely be
>>> easier than a custom lisp-block implementation.
>>
>> o.k. the first round of evaluations is over and it worked out
>> o.k. However, there was still rather much handwork to do.
>> I tried to get a ob-java.el file together using the template and
>> mainly by looking at ob-c.el which I guess comes close what would have
>> to be done for java.
>> However, my lisp-skills (which are close to zero) are not enough to
>> get it working. The main problem was that ob-c.el is working for both
>> C and C++ and all this if then else troubles me a bit.
>>
>> Basically, I want only tangle the actual code block into a temp
>> file. Well temp is not really right, since java demand its file
>> structure and file naming. Finally execute it externally by your
>> proposed code
>>
>> javac -cp . mypackage/myclass.java
>> java -cp . mypackage.myclass
>>
>> and return the results
>>
>> Hmm maybe better to give a real world example (stripped down to make
>> it shorter)
>> I use now the following way
>> /---/
>> #+BABEL: :mkdirp t
>>
>> * Coursework 1
>> ** StudentID1
>> #+BEGIN_SRC java
>> package foo;
>> public class Bar
>> {
>> private double ans = 0
>> public void set(double d){
>> ans = d;
>> }
>> public void print(){
>> System.out.println(ans);
>> }
>> public static void main(String[] argv){
>> Bar c = new Bar();
>> c.set(100);
>> c.print();
>> }
>> }
>> #+end_src
>>
>> ** StudentID2
>> #+BEGIN_SRC java
>> package foo;
>> public class Bar
>> {
>> private double x = 0
>> public void set(double in){
>> x = in;
>> }
>> public void print(){
>> System.out.println(x);
>> }
>> public static void main(String[] argv){
>> Bar myclass = new Bar();
>> myclass.set(100);
>> myclass.print();
>> }
>> }
>> #+end_src
>>
>> ** Result
>> #+srcname: result
>> #+begin_src sh :results output
>> javac -cp . foo/Bar.java
>> java -cp . foo.Bar
>> #+end_src
>>
>> //
>>
>>
>> For now I only added the tangle command to a single code block and
>> created the file via C-c C-v t.
>>
>> #+BEGIN_SRC java tangle: foo/Bar.java
>>
>> Then I rushed down to a shell block "result" which executed the the
>> above comm

Re: [O] How-to evaluate Java-snippets in org-mode/org-babel?

2011-07-28 Thread Torsten Wagner

Hi Eric,

some feedback of first testing weeks
It works well on my desktop machine, I tried to do the same on my 
laptop. However, I faced the problem that java did not find the files.
I tried everything. Made sure using the same java and emacs version 
(same linux distro, same test file). Copied over .emacs config files, 
compared the versions of ob-java.el on both machines. I couldn't figure 
out why it works with one and does not work on the other machine.
Somehow the classpath seems to differ buy I do not see where to change 
it in the correct way.


I hacked a bit into ob-java.el file. I noticed that you call the 
generated class file by creating the string


java packagename/classname

whereas packagename/classname is coming from the classname variable set 
at the source-code block.


In the earlier attempt we used

java -cp . packagename.classname

which makes sure the classpath is set to the local directory.

I hacked this into your code and now it works on the laptop too (to say 
this modification works on both desktop and laptop). It might be worse 
to add, since the classpath seems to be set depending on many parameters 
(distro, other java ides, local user settings, etc.). Thus, many might 
observe problems at this point.


Please find a patch attached.

Even better would be to add an option to set the classpath but my elisp 
skills are to poor for that but would like to see how to do it ;)

#+BABEL: :classpath "."
where it might be the local directory by default?!

Beside of that I noticed that there might be a need for a plain-text 
mode.. sounds funny, but maybe sometimes someone need auxiliary files 
which are not executed by themselves. Sure I could use simply a shell 
session and echo into a file, or tangle it,  but I guess it might be 
more elegant to have a, "only-paste-this-into-this-file-execute"


#+BEGIN_SRC: plain :filename folder/folder/testdata.csv
1, 2
2, 4
3, 8
#+END_SRC
to generate /folder/folder/testdata.csv which contains the data in the 
block.


Because sometimes, one might need to call external programs or programs 
in code-blocks are supposed to read data from files instead from within 
org-babel.


In general this could be the standard feature for all unrecognised 
languages. Probably with a warning that the required 
compiler/interpreter is not configured. However, this would allow people 
at least to get the source files which they could use externally. The 
difference to tangle would be that one can decide block by block what to 
execute. E.g., I could have several of the above "testdata" blocks and 
simply executing one of them would change the input for later code blocks.


Totti



>From 9853070846e98c2a14452e51c8756611aa145363 Mon Sep 17 00:00:00 2001
From: Torsten 
Date: Thu, 28 Jul 2011 19:27:08 +0900
Subject: [PATCH] resolve problems with wrong classpath

---
 lisp/ob-java.el |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/ob-java.el b/lisp/ob-java.el
index 8595a18..cee797a 100644
--- a/lisp/ob-java.el
+++ b/lisp/ob-java.el
@@ -50,7 +50,7 @@
 	 (compile
 	  (progn (with-temp-file src-file (insert full-body))
 		 (org-babel-eval
-		  (concat org-babel-java-compiler " " src-file) ""
+		  (concat org-babel-java-compiler " -cp . " src-file) ""
 ;; created package-name directories if missing
 (unless (or (not packagename) (file-exists-p packagename))
   (make-directory packagename 'parents))
@@ -65,7 +65,7 @@
 	 (cdr (assoc :colname-names params)) (cdr (assoc :colnames params)))
 	(org-babel-pick-name
 	 (cdr (assoc :rowname-names params)) (cdr (assoc :rownames params)
- (org-babel-eval (concat org-babel-java-command " " classname) ""
+ (org-babel-eval (concat org-babel-java-command " -cp . " classname) ""
 
 (provide 'ob-java)
 
-- 
1.7.6



Re: [O] cleaning all the #+results from an org document

2011-07-28 Thread Torsten Wagner

Hi,

but there is one interesting aspect missing. If I want to evaluate the 
blocks and see the results but e.g.


a) send it to someone without the results (to let him create his own)
b) archive them without having possible huge amount of lines of results 
which can be reproduced any time by executing the block again.

c) to delete all the old results and start "fresh"

A function to remove all results might become handy.
Sometimes I find it quite difficult to see if a source-code block 
execute at all and if the results are "up-to-date" or still rather old 
results. Sure there is the message in the mini-buffer but its quickly 
overlooked or removed by a key-press.


Actually, I would prefer that "old" results are deleted at the very 
first step, then the source code block should be executed and finally 
results are printed again. Its simply to dangerous to overlook that some 
results might not be updated after all because something might went 
silently wrong within the execution.


Another idea would be to add a timestamp making the last time of 
successful execution clear, which might be nice for many different other 
reasons.


#+results: [2011-07-28 Thu 21:15] ;; huh, no seconds in org-mode ?!

Greetings

Totti


On 07/28/2011 05:31 PM, Stephen Eglen wrote:

Is there an easy way to delete all the #+results: blocks that have been
generated as the result of running org mode blocks?  e.g. If I have the
following chunk:

#+begin_src R
round(runif(n=5, min=0, max=1), 3)
#+end_src

#+results:
| 0.435 |
| 0.884 |
| 0.219 |
| 0.748 |
| 0.532 |

I'd like the results table to be deleted, but not the code chunk.

Stephen






Re: [O] Release 7.7

2011-07-29 Thread Torsten Wagner

Hi Bastien,

It might be worse to mention that this version find its way into 
emacs-git. Hence, people who using the git or compile emacs on there 
own, will find org-mode 7.7 in the emacs site-lisp folders. The next 
release of emacs (unlike there is another org-mode update in between) or 
rolling updates of some distros will come along with org-mode 7.7 too.


Thanks for hard work

Totti



Re: [O] cleaning all the #+results from an org document

2011-07-29 Thread Torsten Wagner

Hi Eric,

On 07/29/2011 08:04 AM, Eric Schulte wrote:

#+begin_src emacs-lisp
   (org-babel-map-src-blocks nil (org-babel-remove-result))
#+end_src


it works on my java stuff, but for some reason it creates a result by 
itself in my system.

E.g.,
#+results:
: 508

There is another glitch...
The additional empty lines created by execution of a code block to 
create the result section are not removed. Going forth and back creates 
more and more empty lines.


   #+begin_src sh
   echo "No more empty rows"
   #+end_src
   * I am squeezed directly under the code block

execute it

   #+begin_src sh
   echo "No more empty rows"
   #+end_src

   #+results:
   : No more empty rows

   * I am squeezed directly under the code block

Remove the result with the given function

   #+begin_src sh
   echo "No more empty rows"
   #+end_src


   * I am squeezed directly under the code block

Execute the code again

   #+begin_src sh
   echo "No more empty rows"
   #+end_src

   #+results:
   : No more empty rows


   * I am squeezed directly under the code block


As for the key I like the C-c C-v k idea


What do you think about the (optional) timestamps idea for results ... 
might be great for archiving. Open a file a year later and still be able 
to see when you executed the blocks the last time might be helpful in 
terms of "Ohhh yeah this was before I fixed this terrible bug"...



Greetings

Totti



Re: [O] Undefined variable: org-babel-execute-src-block-maybe

2011-08-01 Thread Torsten Wagner

I can confirm that


- M-x org-reload with an up to date git pull


works as workaround.

Error appears also for setting a tag and executing code blocks...

Torsten




[O] [babel] link type to execute src_block

2011-08-25 Thread Torsten Wagner
Hi,
is there a way already to execute a (named source block) by creating a
link type?
I checked the manual and there is a link type for shell and elisp but
it seems not for babel.
Something like

[[babel: src_block_name()][Text]]

With this, one could create all kind of little features within an org-file
* start often used shell, python, and other language scripts,
* start little GUIs in a different programming  language (e.g., java
works fine) to allow a more mouse centric input (there was a tablet
discussion recently)
* link blocks to descriptive text making reproducible research more
readable  (e.g. ...after the applying a _FFT-transform_, the dataset
was _plotted_)

Would be nice to have the option to either execute the link and to
jump to the code block

All the best

Totti



[O] [babel] create tikz pictures in an floating LaTeX environment

2011-10-07 Thread Torsten Wagner
Hi all,
Hi Eric (hehehe because most likely you read it ;) )

I try for the first time to write an entire article in org-mode.
I do so, because with the tags :export: :noexport: I can easily keep
my personal notes and todos "hidden" and the final export will be just
what I want to publish.
Furthermore, I'm interested to do my data evaluation in python blocks
within the org-file itself, keeping all nicely together.

At the moment I try to add a tikz picture to the manuscript. I
followed the example at
http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-LaTeX.html
However, I have some problems. I can generate the picture by using the
following code.

#+srcname: mypicture
#+begin_src latex :file fig/mypicture.pdf :packages '(("" "tikz"))
:border 1em :fit
  \begin{tikzpicture}[line width=1pt,text centered, inner sep = 2]
  \draw[fill=red!50] (0,0) rectangle  ++(5,1);
  \draw[fill=yellow!50] (1,1) rectangle  ++(1,0.25);
  \draw[fill=yellow!50] (3,1) rectangle  ++(1,0.25);
  \draw[fill=green!50] (0.75,1) rectangle  ++(1.5,-0.4);
  \draw[fill=green!50] (2.75,1) rectangle  ++(1.5,-0.4);
  \end{scope}
  \end{tikzpicture}
#+end_src

Now, I want to include this in a floating figure environment
This troubles me a bit.
I tried to make a second latex src block which includes the
environment and an \includegraphic pointing to the generated pdf file.
However, I always find a link of the filename in addtion. I guess this
is the result of the first (above) source code block. The pdf contains
a line similar like
[[file:fig/mypicture.pdf ]]

I switched over to use the org-mode way of including a figure and
replaced the latex second src code block by

#+CAPTION:my great picture
#+LABEL:  fig:my_picture
#+ATTR_LaTeX:
[[file:fig/mypicture.pdf]]

This worked out too and was identically to the fist approach, however,
there was still the result line in the output.
I tried to add exports: none  and volia the line was gone. However,
the source code block was not exported at all and hence the picture
not updated at all (it simply used the old generated pdf)

I tried to be ueber-smart and replaced the static link
[[file:fig/mypicture.pdf]]
by
#+call:  mypicture
in the hope it would be executed and result in
[[file:fig/mypicture.pdf]]
finally getting the same like with the static link. However, this did
not work out at all. No figure.

Could someone help me to sort this out. Ideally, I would like to do a
rather logical combination and end up with the following:

#+CAPTION:my great picture
#+LABEL:  fig:my_picture
#+ATTR_LaTeX:
#+srcname: mypicture
#+begin_src latex :file fig/mypicture.pdf :packages '(("" "tikz"))
:border 1em :fit
  \begin{tikzpicture}[line width=1pt,text centered, inner sep = 2]
  \draw[fill=red!50] (0,0) rectangle  ++(5,1);
  \draw[fill=yellow!50] (1,1) rectangle  ++(1,0.25);
  \draw[fill=yellow!50] (3,1) rectangle  ++(1,0.25);
  \draw[fill=green!50] (0.75,1) rectangle  ++(1.5,-0.4);
  \draw[fill=green!50] (2.75,1) rectangle  ++(1.5,-0.4);
  \end{scope}
  \end{tikzpicture}
#+end_src

avoiding to call/type  the filename/link over and over again.

Thanks for helping

Torsten



Re: [O] [babel] create tikz pictures in an floating LaTeX environment

2011-10-08 Thread Torsten Wagner
Hi Nicholas,

>> a line similar like
>> [[file:fig/mypicture.pdf ]]
>>
>
>
> ``:results output silent'' should suppress that I think.
>

Yep, thanks that did the job.
Nevertheless, I have to add the generated output as a static link to
add resp. export it in an org-mode way..
#+CAPTION:   My great picture
#+LABEL:  fig:my_picture
#+ATTR_LaTeX:
[[fig/mpicture.pdf]]

Replacing the manual link by the function call
#+call: mypicture()
only results again in the line
fig/mypicture.pdf (this time without square brackets)

Thanks a lot for the help

Torsten



Re: [O] [babel] create tikz pictures in an floating LaTeX environment

2011-10-08 Thread Torsten Wagner
Hi Eric

>>
>> ``:results output silent'' should suppress that I think.
>>
>
> Nick's solution should work well.  Also, (if you're exporting to LaTeX)
> couldn't you just combine the tikz picture and the wrapping figure
> environment into a single begin_latex block?
>

Yep Nick solution is working fine. I just wonder what is the order of
execution during export. E.g. if I generate the link to a file as
output and place it directly under the lines to add a picture in
org-mode, I thought the code block would be execute first and the
result would replace the function call. The exporter will find a link
to a picture and export it as usual. This was the reason I thought the
following code should work.

#+CAPTION:my great picture
#+LABEL:  fig:my_picture
#+ATTR_LaTeX:
#+srcname: mypicture
#+begin_src latex :file fig/mypicture.pdf :packages '(("" "tikz"))
:border 1em :fit
 \begin{tikzpicture}[line width=1pt,text centered, inner sep = 2]
 \draw[fill=red!50] (0,0) rectangle  ++(5,1);
 \draw[fill=yellow!50] (1,1) rectangle  ++(1,0.25);
 \draw[fill=yellow!50] (3,1) rectangle  ++(1,0.25);
 \draw[fill=green!50] (0.75,1) rectangle  ++(1.5,-0.4);
 \draw[fill=green!50] (2.75,1) rectangle  ++(1.5,-0.4);
 \end{scope}
 \end{tikzpicture}
#+end_src

or alternatively
#+CAPTION:my great picture
#+LABEL:  fig:my_picture
#+ATTR_LaTeX:
#+call: mypicture()


As for putting all figure environment and tikz into one latex-code block.
First of all I thought that :file fig/mypicture.pdf will generate and
process an individual LaTeX file. Thus, I could not use any commands
for the main manuscript right? Sure I could skip the :file command
however, I would prefer to generate each picture as an individual pdf
file. This gives me much more flexibility. I can easily convert them
into any other format and share them individually with co-workers.
Furthermore, many journals are very strict (and minimal) with there
supported LaTeX environment. The tikz package is often not installed
on there machines and the upload process would fail. In addition some
journals require to upload each figure individually. Thus, I am used
already to generate individual pdf-files for each figure and include
them into the manuscript by a simple \includegraphic line.

Thanks for the help

Torsten

CC. I notice something else regarding to babel. Please see my next post



[O] [babel] Should babel be more error intolerant?

2011-10-08 Thread Torsten Wagner
Hi,

just playing around with a new aspect of org-mode and babel, I
noticed, that many of my typos and wrong syntax using are silently
accepted resp. ignored.
Even the message buffer keeps quite.
I just wonder if babel should be more error intolerant to tell users
that they are actually doing something wrong.
E.g., I don't see any error messages for (marked the typo by *):


#+begin_src latex :file*s* fig/mypicture.pdf :packages '(("" "tikz"))
:border 1em :fit  :results output silent
or
#+begin_src latex :file fig/mypicture.pdf :packages '(("" "tikz"))
:border 1em :fit  :*result* output silent
or
#+begin_src latex :file fig/mypicture.pdf :packages '(("" "tikz"))
:border 1em :fit  :results output *quite*

obviously the above errors might happen quickly just as typos or
because one tries to use commands from memory.

Trying something new, this might drive someone quickly crazy. One is
going to tackle the problem in many different ways and finally after
several minutes (or even hours) one notice its simply "silent" and not
"quite" ;)

I would prefer a bold
Error ":results output quite" is unknown to babel
in the minibuffer, maybe including jumping to the line in question.
Others might like to keep it quite (or silent), I guess it could be
easily set by an optional flag
like #+BABEL:debug:t

As a side note of this, I wonder if babel could use the same/similar
way like the TODO field in org-mode to switch between all possible
parameters for a certain code block?
I learned, different code blocks can have quite different possible
parameters. A bit difficult to remember esp., if you don't use them on
a daily basis.
If one could place the pointer to e.g., the :results keyword and hit
C-c C-t to switch between all possibilities for the :exports keyword
for this particular source code block, it would greatly simply the
usage and reduce errors. Parameters which require additional user
input like file names could indicate this (like in the manual) by
indicating it within brackets e.g., .

Thanks for all the help and support

Torsten



[O] [bug-report] #+LaTeX_CLASS: whitespaces in the parameter list are not omitted

2011-10-12 Thread Torsten Wagner
Hi,
just had 30 min of fun with a whitespace as in (note the space at the
end of koma_article)
#+LaTeX_CLASS: koma_article
Since I just use this option for the first time and I created my own
entry for 'org-export-latex-classes (according to the tutorial) I was
believing I am doing something wrong.
Not sure for other parameters but I would believe that leading and
ending whitespaces should be skipped.
Its hard to distinguish
#+LaTeX_CLASS: koma_article
and
#+LaTeX_CLASS: koma_article
;)

The error message on export was correct to say
org-export-latex-set-initial-vars: No definition for class
`koma_article ' in `org-export-latex-classes' (again notice the space)

Org-mode version 7.7 (git)
Emacs version 24
I know ... all bleeding edge but maybe its not a very recent problem.

All the best

Torsten



Re: [O] Ways to make org feasible for huge files

2011-10-12 Thread Torsten Wagner

Hi,

On 10/13/2011 09:54 AM, Marcelo de Moraes Serpa wrote:
f 10 emacs crashes because of that.


What could I do to make it faster? I'm willing to disable fancy rendering
features if needed, but I'm loosing way too much time with the rendering
issues and crashes.


Just by chance, are you running linum-mode (line numbers in a small 
column at the left side of the buffer?
I noticed this does not work well with org-mode. I had a file with a few 
thousand lines and folding took ages.

Switching the linum-mode off and folding was again instantly.

Maybe this helps

Totti





Re: [O] Wish: babel for python3

2011-10-18 Thread Torsten Wagner

Hi,
(sorry Arne for the eventual double post, I forogot to attt the mailing 
list)



Is there a way to get python3 support for Babel into org-mode
cleanly?




Something like:
-*- org-babel-python-command: "python3"



alternatively (a trick Eric is never tired to mention to me ) you could 
add a little lisp block which change all kind of language related 
aspects for you. This could include many more options and modify your 
emacs environment just to your personal needs for a certain language.


Make one for python2 and one for python3 and execute them dependent on 
which system you are going to use.


Without testing and without guarantee it should be something like the 
below code. To demonstrate some more functionality lets change the 
modebar background colour to make it more visible which python mode you 
are currently using.



#+srcname: python2_env
#+begin_src emacs-lisp
 (setq org-babel-python-command "python")
 (set-face-background 'modeline "#4477aa")
#+end_src

#+srcname: python3_env
#+begin_src emacs-lisp
 (setq org-babel-python-command "python3")
 (set-face-background 'modeline "#771944")
#+end_src

Sure both could be done with file bounded variables too. But know you 
can switch between both environments within the same buffer, e.g., to 
check if the code runs on both python versions


Regards

Totti



[O] direct link to mails in gmail

2011-10-19 Thread Torsten Wagner

Hi,
I just figured out some kind of very interesting possibility.
All the personal data and security feelings aside, I use a gmail account 
since I share it between many different computers.


In my org-files, I would sometimes like to link to a particular mail 
e.g., for reference purpose.
Today I noticed that each email in my google mail account has a unique 
and fixed URL.

Thus, I gave it a try

1. Open your gmail account (log-in)
2. Open the mail you like to refer too.
3. Copy the URL
4. Add the URL as a link (C-c C-l) to your org-file

After that, clicking on the link will open the mail directly in your 
standard webbrowser. If you logged out from google mail in between, you 
are ask to log-in first, after that select the link again.


But it is getting even better. You are not only able to link to 
particular mails within org-mode, but also to google mail labels 
(folders) or search results.


To make it even more org-mode friendly one can set-up org-capture in 
your webbrowser [1].


I added the following to the org-capture-templates list
("g" "Gmail-link" entry (file+headline "~/org/work.org" "Gmail-links") "%A")

Thus, pressing the assigned button in your browser and emacs will ask 
you what kind of link you want to add to your file. Press g for gmail 
and enter the description for the link (this could be done 
automatically, but I find it to long and not helpful). You will find the 
link in your capture buffer in emacs for further processing


I really like it and I hope others find this useful too.
Not sure about the safety issue to link to URLs within your gmail 
account. Maybe others can comment on this.


All the best

Totti


[1] http://orgmode.org/worg/org-contrib/org-protocol.html








Re: [O] [RFC] Standardized code block keywords

2011-10-21 Thread Torsten Wagner
Hi,

> Ideally if we limit each of the above to only one alternative we could
> simplify the specification of code blocks in Org-mode making them easier
> to learn and use and removing some of the mystery around their syntax.
>
> What does everyone think?

Just to make it as easy as possible for everyone
Might it be possible to introduce a small flags like "obsolete" and
"stable" (standard)
Old functions, old syntax, etc., might move first to obsolete before
completely removed...
We could open an older file and if it isn't working, we could try

#+PROPERTY: babel-function-set obsolete

if it works, we have to modify the code, because obviously the code
requires changed to be compatible in the future. However, just for the
moment it is still working. This would give people more time to change
there code accordingly. As murphy law tells us one will notice that
the particular file is broken exact 5 minutes before the meeting with
your boss standing behind you yelling print it, print it  ;)

I know git would be perfect to keep the code base frozen for a certain
syntax. However, babel is bundled with org-mode which is bundled with
Emacs. Thus, it might be very difficult to tell people they have to
use org-babel from git with the tag [org-babel_XX] if they want to use
there old style files.  AFAIK org-babel does not even come with a own
version numbering, right?

Alternatively, keep the syntax a little bit longer as it is and create
warning messages to point users to future changes (not sure how much
time left for emacs24)
"Warning: #+lob: in line XX is obsolete, please use #+call: in the
future. (manual-link)"

To make is short, is is possible to introduce changes "slowly"

As for voting:
[1]
#+function: would be what I would expect from other programming
languages. Where an unnamed source code block would be something like
a lambda function.
However, "function" as a term is heavily used in many target languages
too. This makes parsing, reading and discussing a bit difficult. ("I
called the function foo", "Wait, do you call the org-mode function
foo, or the python function foo?")
Thus, I vote for #+srcname similar to #+tblname to make sure about the
difference between org-babel and the target languages.

[2]
#+call:, simply because I never can remember "lob" and the acronym is
something difficult for newbies.

[3]
I tend to  #+results: because it fits more to the entire babel syntax.
However, earlier on the mailing list people were pointing out that one
is going to change "results" for a unknown source block (that was the
reason "data" was introduced) and I think this is a valid
argument. Maybe "data" and "results" should be both valid if only to
pleasure human thinking. However, if I understood correctly, maybe
data could be changed to be more some type of constant? That is,
#+data: foo can not be changed by a source code block named foo
(because it isn't a "result" but "data") but only by human (as a
"data" input). Does this make sense?

Totti



Re: [O] [RFC] Standardized code block keywords

2011-10-23 Thread Torsten Wagner

Hi Eric,
Hi Seb,



Eric Schulte wrote:

We could open an older file and if it isn't working, we could try

#+PROPERTY: babel-function-set obsolete


I think that making use of such a feature is almost as onerous as
changing to the new terms (which is a simple search replace, in fact
once terms are selected I'll happily share a function on list which can
be used to convert all old terms in existing Org-mode files).


Ok, I agree with both of you. Keeping obsolete functions active might be 
more difficult then just asking people to change the tiny bits and 
pieces. I like the idea to having a function to convert old syntax to 
new syntax (semi)automatically.
Python did the same with there 2to3 script and I was able to convert 
large parts of my scripts without problems.


Only make sure that the BIG BANG is really loud reaching all babelers 
out there (including the ones not on this mailing list and not reading 
changelogs)


Maybe an additional function could be called for a certain time whenever 
old syntax is found (just a list of keywords) generating a warning that 
this code is obsolete pointing to a special chapter in the manual to 
help with conversion. That would help people to understand what is going 
on rather then getting a standard error message for code which run 
perfectly fine a few months ago. Remember, people might upgrade to 
emacs24 and they might not be aware that this includes updates to 
org-mode and org-babel.


Anyhow I would like to offer to help with the manual (my lisp is to poor 
to help with coding). There should be a new section which helps 
old-babeler to change there code to the newest syntax, explain shortly 
changes in the syntax, etc. A two column table is often used for this

| old syntax | replaced now by |
| #+BABEL:   | #+ PROPERTIES   |
Followed by some more explanation or a link to the (rewritten) manual 
section.


Totti








[O] table alignment failed for Asian characters

2011-10-27 Thread Torsten Wagner
Hi,
just noticed, that the table alignment fails if I use Asian characters
within the table. Guess this has nothing to do with the table itself
but rather something with the different spacing of different character
sets.
Maybe someone had a similar problem already and know how to solve this.

Thanks
Torsten



Re: [O] table alignment failed for Asian characters

2011-10-27 Thread Torsten Wagner


Carsten Dominik  wrote:

>
>On Oct 27, 2011, at 1:33 PM, Torsten Wagner wrote:
>
>> Hi,
>> just noticed, that the table alignment fails if I use Asian
>characters
>> within the table. Guess this has nothing to do with the table itself
>> but rather something with the different spacing of different
>character
>> sets.
>> Maybe someone had a similar problem already and know how to solve
>this.
>
>If you are wondering if this question has come up before, why don't you
>try the FAQ?
Hehe I could simply say I like so much to talk to the org family but indeed 
I simply forgot about it. Well the FAQ tells me what I thought already. I will 
post here a specific solution for Japanese and it might be added to the FAQ 
later. Maybe others can contribute to add Chinese, Korean and other languages.
Thanks

Torsten




Re: [O] [odt] Support for annotations/comments

2011-10-29 Thread Torsten Wagner
Hi, Jambunathan
On Oct 29, 2011 7:32 AM, "Jambunathan K"
> I needed an excuse for adding support for annotations. Exporting the
> below org will produce the attached odt/pdf files. Note that the pdf
> file is produced by LibreOffice pdf export.
>
> Annotations is a ODT only feature right now and will not work with other
> backends.
Does this include annotations in form of text changes too? Marking removed
or added text?
Would be great to have such a feature. It would require rather less coding
to wrap annotation marks around the result of a diff output  between the
original org file and the modified version.
Hence, we would be able to generate automatically annotaded odt versions of
modified org files.

Totti


[O] execute lisp function after enter a cell in a org-table

2011-10-31 Thread Torsten Wagner
Hi,
I make my tiny steps in learning elisp by trying to improve org-mode
for my own needs.
Recently, I came across the needs to execute a small lisp function
whenever I enter the next / previous column in a org-mode table.
I thought it might be interesting if I could try to keep this as
general as possible. Think about calling a certain lisp function
whenever you enter a certain column in a table.
For my needs it would be (set-input-method 'foo) to change
automatically the input method. This would allow to type in two
different languages within the table. However, it could be anything
else, from validating input data, change between different minor modes
or automatic table formatting of the table itself (think about tables
with a fixed narrow column width and an automatic extension of the
current selected column),

I'm still in the middle of implementing this and want to ask
a) is there a general interest for such a feature?
b) for some guidance from the org-mode wizards ;)

I read a bit in org-table.el and there is a function
"org-table-current-column" which does already half of the job.
If I understand right I would have to create a new lisp function which
executes the given lisp snippets for a given column (I would like to
add them like normal table functions).
This new function would been a hook function? As far as I read throw
all possible hook functions, I could not find any which would be
called within tables for each jump into a cell or column.
I thought the tab-function itself (which let the cursor jump into the
next column) might be used. but I am unsure about this. Similar the
present way of tables to execute lisp functions is limited to updates
of the table. However as far as I could understand the simple movement
of the cursor does not trigger an table update.

Any ideas, help and pointers to org-mode code would be nice. For
learning purpose, I really want to go through this by myself, so
please no "add this to your .emacs" stuff ;)

Totti



Re: [O] New version of VimOrganizer, an Org-mode clone in Vim

2011-11-03 Thread Torsten Wagner
Hmmm...
nice! Maybe it helps to bring finally peace between Vi and Emacs users. I
will forward it to my Vi-friends:)
Torsten
On Nov 3, 2011 9:31 AM, "Herbert Sitz"  wrote:

> I just formally pushed up a new version of VimOrganizer, an Org clone in
> Vim.
>
> This version is much closer to being a true alternative to using Org-mode
> in
> Emacs.  I say alternative to "using Org-mode in Emacs", because
> VimOrganizer in
> large part operate as a front end to Org-mode by making calls to a running
> Emacs
> server.  All of the export functionality is done this way, as is access to
> stuff
> like Org-babel, spreadsheet evaluation, live blocks like clocktables,
> column
> blocks, etc.
>
> I'd be glad to hear any feedback, comments, suggestions. . .
>
> An intro to some of the stuff in the new version is here:
> https://github.com/hsitz/VimOrganizer/blob/master/intro.txt
>
> Git page is here:
> https://github.com/hsitz/VimOrganizer
>
> And the page on Vim's website is here:
> http://www.vim.org/scripts/script.php?script_id=3342
>
> I will try to get some videos of the new functionality in next day or two.
>  One
> main thing I'm happy about is I extended my patch of Vim to allow separate
> highlighting of TODO items on folded headings.  Previously my patch enabled
> level-dependent fold highlighting, but always showed TODOs in same color
> as the
> folded heading.  Much nicer to have everything collapsed and still have the
> TODOs pop out at you.
>
> Thanks to everybody on here who's provided help for my (sometimes silly)
> questions about Org-mode and how it works.  I'm starting to really
> appreciate
> elisp, so who knows what the future holds. . .
>
> Regards,
>
> Herb
>
>
>
>


Re: [O] Video showing Jambunathan's ODT exporter

2011-11-04 Thread Torsten Wagner

Hi,


This is some seriously cool functionality for Org that deserves wider exposure.
Jambunathan's done a great job.


Yep I tried it a few days ago and the results were nearly perfect.


It's obviously not for everyone; I'm sure some Org users have no need for
documents in a word processor and steer as far away as possible.  Others may
love it, though, and it could potentially bring more users to Org community.


Well it becomes particular important if it comes to collaboration with 
MS-Office people. I can write my stuff in org and make a LaTeX export 
for the final submission, however, I can send co-authors ODT (and by 
resaving doc) formats to allow them to make changes and comments to the 
manuscript.



I've seen comments about an ODT import that I haven't had a chance to look
into yet.



Well this is the exact point which is missing now. For now, I open the 
resubmitted modified ODT version on my PC and make all changes 
accordingly in my org-file. Thanks to a dual screen set-up it is rather 
ok. However, still very error prone.


Having the possibility to re-import the ODT-file into org and make a 
kind of diff which I simply step through and either agree or disagree 
would be perfect. Emacs already has diff functionallity. What would be 
needed is a way to re-import the ODT-file in a as much as possible exact 
way like it was originally.
The ODF format is open and I wonder whether there is some kind of 
metadata tag, which could be used to save the org-mode stuff directly 
beside the odt text stuff... this would allow to restore the org-mode 
file rather efficiently.


Pseudo code:

 *** DONE This is a subsubsub-header :COAUTHOR:  <\metadata>
<>



Cheers,

Herb








[O] Change options of source code blocks "on-the-fly" for the later Latex export?

2011-11-08 Thread Torsten Wagner
Hi,

I just trying minted and source code blocks do get nice formatted
fontified output in LaTeX export

#+source: test
#+begin_src c :exports code
/*
  Test
*/
int x = 10;
#+end_src

works fine. However, sometimes I would like to use different starting
numbers for the line-numbers. The minted package supports this by an
LaTeX-Environment option
e.g., \begin{minted}[firstnumber = 5]

How can I get firstnumber = 5 from org-mode into LaTeX. Since I would
have to change this several times within a file I would prefer an
rather easy method (rather then redefining the standard export
settings via org-export-latex-minted-options over and over again).
Other environments have access to certain options available via
#+ATTR_LaTeX: but this seems not to work for source code. I could use
plain LaTeX instead but would loose the ability to work and execute
the source code blocks.

Maybe its very easy to do, however, its rather late in this part of
the world and I can't see any solution at the moment.

Thanks a lot

Torsten



[O] Beamer export of a subtree seems wrong.

2011-11-10 Thread Torsten Wagner
Hi,
I recently started to prepare lecture notes in org mode. I used the example
from Eric on worg as a template.
Everything works well. I used the first headline level to define groups of
slides, the second level are slide titels and so on. A full export to PDF
looks like expected. However, I thought I can do something like
* lecture 1...
* lecture 2...
* lecture 3...
and exporting only the subtree, I assumed should result in a PDF file for a
single lecture. This does not work :( A subtree export with the pointer on
a toplevel headline ommits all slide titles (all ** levels). I tried to be
smart and added :noexport: to all but one lecture. However, that had no
effect at all.
Any idea what might be wrong? Or did I misunderstood the usage of the
grouping frames function.

All the best
Torsten


[O] Renew export fields

2011-11-10 Thread Torsten Wagner
Hi is there a way to renew or set export parameters specifically for a text
block? I would like to change the date depending on which subtree I'm going
to export. However the following way is not working.
#+DATE: 08-11-2011
* level 1
#+DATE: 12-11-2011
* level 2
#+DATE: 15-11-2011
trying to export only level 1 would still result with 15-11-2011 as date.
Any sugesstions? I tried properties blocks but had trouble with them too.

Thanks a lot
Torsten


[O] Feature request: Accept org mode dates in the date export field

2011-11-10 Thread Torsten Wagner
Hi,
one should be able to use org-modes date function to enter or modify a date
for the variable #+DATE:
At the moment its exported as plain text including the < > brackets.
Keeping the date org-mode friendly and exporting it nicley would be a nice
little feature.

Thanks
Torsten


Re: [O] org-mode using 100 CPU, weird note, or just too many of them?

2011-11-15 Thread Torsten Wagner
Hi Gijs

just by chance because this was the reason for many other slow-downs.
(Guess it is qualified for the FAQ already?!)
Do you have the linum-mode activated? Getting line-numbers left side
of the buffer?
This does not play nice with org-mode folding, since it seems to
recalculate the line umbers whenever you try to fold/unfold stuff.

Just an idea.

Torsten


On 15 November 2011 18:00, Gijs Hillenius  wrote:
>
> Catching the hints from the current thread on the org-mode list, "slow
> agenda view and scrolling through headlines",
>
> here is the result of
>
>    M-x elp-instrument-package RET org RET
>
> and opening the org file
>
>    M-x elp-results RET
>
> And, using Org-mode version 7.7 on GNU Emacs 24.0.91.1 (debian snapshot)
>
>
> org-cycle                                                     5           
> 0.081748  0.0163497999
> org-cycle-internal-local                                      4           
> 0.068494      0.0171235
> org-mode                                                      1           
> 0.023933      0.023933
> org-end-of-subtree                                            11          
> 0.021776      0.0019796363
> org-optimize-window-after-visibility-change                   3           
> 0.02153       0.007176
> org-subtree-end-visible-p                                     2           
> 0.021485  0.010742
> org-set-startup-visibility                                    1           
> 0.016646      0.016646
> org-cycle-internal-global                                     1           
> 0.011137      0.011137
> org-cycle-show-empty-lines                                    4           
> 0.009353      0.00233825
> org-overview                                                  1           
> 0.008841      0.008841
> org-outline-level                                             1003        
> 0.003750  3.739...e-06
> org-cycle-hide-archived-subtrees                              4           
> 0.003287      0.00082175
> org-update-radio-target-regexp                                1           
> 0.002786      0.002786
> org-all-targets                                               1           
> 0.002765      0.002765
> org-activate-footnote-links                                   16          
> 0.002545  0.0001591249
> org-footnote-next-reference-or-definition                     16          
> 0.002381  0.0001488125
> org-cycle-hide-drawers                                        5           
> 0.002227  0.0004454000
> org-footnote-at-reference-p                                   2           
> 0.002026      0.001013
> org-set-regexps-and-options                                   1           
> 0.001967      0.001967
> org-footnote-in-valid-context-p                               2           
> 0.001715      0.0008575
> org-babel-hide-all-hashes                                     1           
> 0.001583      0.001583
> org-set-visibility-according-to-property                      1           
> 0.001479      0.001479
> org-activate-dates                                            46          
> 0.001455  3.163...e-05
> org-in-block-p                                                2           
> 0.00145       0.000725
> org-in-regexps-block-p                                        18          
> 0.001324      7.355...e-05
> org-activate-plain-links                                      20          
> 0.001147      5.735e-05
> org-install-agenda-files-menu                                 1           
> 0.000676      0.000676
> org-do-emphasis-faces                                         15          
> 0.000629      4.193...e-05
> org-fontify-meta-lines-and-blocks                             15          
> 0.000491      3.273...e-05
> org-at-regexp-p                                               18          
> 0.000469      2.605...e-05
> org-hide-block-toggle-maybe                                   5           
> 0.000414  8.280...e-05
> org-back-to-heading                                           16          
> 0.000403  2.518...e-05
> org-fontify-meta-lines-and-blocks-1                           15          
> 0.000382  2.546...e-05
> org-at-item-p                                                 14          
> 0.000355      2.535...e-05
> org-agenda-files                                              1           
> 0.000328      0.000328
> org-activate-bracket-links                                    17          
> 0.000303  1.782...e-05
> org-activate-tags                                             15          
> 0.000288      1.92e-05
> org-in-regexp                                                 8           
> 0.000245      3.0625e-05
> org-unfontify-region                                          14          
> 0.000242      1.728...e-05
> org-hide-archived-subtrees                                    3           
> 0.000210  7.033...e-05
> org-cycle-item-indentation                                    5           
> 0.

[O] bug: BEAMER_FRAME_LEVEL does not work on subtrees

2011-11-15 Thread Torsten Wagner
Hi,

if I use
#+BEAMER_FRAME_LEVEL: 2
and export the entire document, the export is done correct.
First level ("*") is translated as section, second level headlines
("**") as slide titles and third level as headline for content of the
slides.

However, if I only want to export a subtree it does not work. Now,
first level headlines are omitted, second level headlines become
sections in the latex file and third level headlines are missing.
If I set
#+BEAMER_FRAME_LEVEL: 1
subtree export is working again as desired but sure export the entire
document is now wrong.
My guess would be that the subtree export is not taking care of the
#+BEAMER_FRAME_LEVEL property correctly. But this would not explain
why headlines are omitted.

Please find attached a minimal example to reproduce this behaviour.

Thanks

Torsten
#+TITLE: Export a subtree
#+AUTHOR:Torsten Wagner
#+EMAIL: 
#+DESCRIPTION:
#+KEYWORDS:
#+LANGUAGE:  en
#+OPTIONS:   H:3 num:t toc:nil \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
#+OPTIONS:   TeX:t LaTeX:t skip:nil d:nil todo:t pri:nil tags:not-in-toc
#+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js
#+EXPORT_SELECT_TAGS: export
#+EXPORT_EXCLUDE_TAGS: noexport
#+LINK_UP:   
#+LINK_HOME: 
#+XSLT:

#+startup: beamer
#+LaTeX_CLASS: beamer
#+LaTeX_CLASS_OPTIONS: [bigger]
#+BEAMER_FRAME_LEVEL: 2
#+COLUMNS: %40ITEM %10BEAMER_env(Env) %9BEAMER_envargs(Env Args) %4BEAMER_col(Col) %10BEAMER_extra(Extra)

* lecture 1
** start lecture 1
** slide 1
** slide 2
** slide 3
** end lecture 1
* lecture 2
** start lecture 2
** slide 1
** slide 2
*** Item 1
*** Item 2
*** Item 3
** slide 3
** end lecture 2
* lecture 2
** start lecture 3
** slide 1
** slide 2
** slide 3
** end lecture 3


Re: [O] About commit named "Allow multi-line properties to be specified in property blocks"

2011-11-15 Thread Torsten Wagner
Hi,

Eric I lost a bit track of what was the final decsion. Guess a good
way to get back on track would be helping with the documentary. Any
tasks to do?

Torsten



[O] BUG org-bibtex error for importing bibtex conference entries

2011-11-23 Thread Torsten Wagner
Hi,
I was going to convert my bibtex file into an org-mode file.
I receive an error message for conference entries.
E.g.
I can read in by org-bibtex-read

@CONFERENCE{foo11,
  author = {foo, A. and faa, B},
  title = {This is the title},
  booktitle = {Proceeding of the 5th Org-mode conference},
  year = {2011},
  month = Jul,
  day = {4--5},
  conference_name = {org-mode V},
  keywords = {published},
  location = {Somewhere, org-land},
  presentation = {Oral}
}

However, org-bibtex-write results in the following output

*
and a debug error-log [1]:

By changing the bibtex type to e.g., INPROCEEDINGS  the import works correct.
I tried to debug this but I can't see why it works for inproceedings
and not for conference.

As a side note, I noticed that the importer is rather quite about
errors. If I try to import an mal-formated BibTeX entry I often
receive an result for which some keyword-entries are simply missing.
E.g. try

@INPROCEEDINGS{foo11,
  author = {foo, A. and faa, B},
  title = {This is the title},
  booktitle = {Proceeding of the 5th Org-mode conference},
  year = {2011},
  month = Jul,
  day = (4--5),
  conference_name = {org-mode V},
  keywords = {published},
  location = {Somewhere, org-land},
  presentation = {Oral}
}
note the round instead of curl brackets around day. An import will
skip silently everything behind the month line.
Wouldn't it make more sens to issue a warning whenever the parser has
trouble to read something? I noticed that the beamer.el from
beamer-mode is involved in parsing. Thus, I have no idea whether
org-mode is capable to notice such a problem. You might argue that
BibTeX is specifies the correct syntax very well, but many other tools
export and import to BibTeX too and an error in these programs might
still allow them to import nd export entries with wrong syntax, a
import in org-mode however, could result finally in fatal data loose.
Thus, I vote for an error or warning message whenever there is
something which requires human attentions.
As for now, I have to carefully check, that all entries moved into the
org-mode file, which is a bit tiring and error prone.

All the best

Torsten



[1] Debug log:

Debugger entered--Lisp error: (wrong-type-argument char-or-string-p nil)
  insert(nil)
  (progn (fset (quote togtag) (function* (lambda (tag) (block togtag
(org-toggle-tag tag (quote on)) (org-insert-heading) (insert (val
:title)) (org-bibtex-put "TITLE" (val :title)) (org-bibtex-put
org-bibtex-type-property-name (downcase (val :type))) (dolist (pair
entry) (case (car pair) (:title nil) (:type nil) (:key (org-bibtex-put
org-bibtex-key-property (cdr pair))) (:keywords (if
org-bibtex-tags-are-keywords (mapc (lambda (kw) (togtag ...))
(split-string (cdr pair) ", *")) (org-bibtex-put (car pair) (cdr
pair (otherwise (org-bibtex-put (car pair) (cdr pair) (mapc
(function togtag) org-bibtex-tags))
  (unwind-protect (progn (fset (quote togtag) (function* (lambda (tag)
(block togtag (org-toggle-tag tag (quote on)) (org-insert-heading)
(insert (val :title)) (org-bibtex-put "TITLE" (val :title))
(org-bibtex-put org-bibtex-type-property-name (downcase (val :type)))
(dolist (pair entry) (case (car pair) (:title nil) (:type nil) (:key
(org-bibtex-put org-bibtex-key-property (cdr pair))) (:keywords (if
org-bibtex-tags-are-keywords (mapc (lambda ... ...) (split-string ...
", *")) (org-bibtex-put (car pair) (cdr pair (otherwise
(org-bibtex-put (car pair) (cdr pair) (mapc (function togtag)
org-bibtex-tags)) (if --cl-letf-bound-- (fset (quote togtag)
--cl-letf-save--) (fmakunbound (quote togtag
  (let* ((--cl-letf-bound-- (fboundp (quote togtag)))
(--cl-letf-save-- (and --cl-letf-bound-- (symbol-function (quote
togtag) (unwind-protect (progn (fset (quote togtag) (function*
(lambda (tag) (block togtag (org-toggle-tag tag ...)
(org-insert-heading) (insert (val :title)) (org-bibtex-put "TITLE"
(val :title)) (org-bibtex-put org-bibtex-type-property-name (downcase
(val :type))) (dolist (pair entry) (case (car pair) (:title nil)
(:type nil) (:key (org-bibtex-put org-bibtex-key-property (cdr pair)))
(:keywords (if org-bibtex-tags-are-keywords (mapc ... ...)
(org-bibtex-put ... ...))) (otherwise (org-bibtex-put (car pair) (cdr
pair) (mapc (function togtag) org-bibtex-tags)) (if
--cl-letf-bound-- (fset (quote togtag) --cl-letf-save--) (fmakunbound
(quote togtag)
  (letf (((symbol-function (quote togtag)) (function* (lambda (tag)
(block togtag (org-toggle-tag tag (quote on)))
(org-insert-heading) (insert (val :title)) (org-bibtex-put "TITLE"
(val :title)) (org-bibtex-put org-bibtex-type-property-name (downcase
(val :type))) (dolist (pair entry) (case (car pair) (:title nil)
(:type nil) (:key (org-bibtex-put org-bibtex-key-property (cdr pair)))
(:keywords (if org-bibtex-tags-are-keywords (mapc (lambda (kw) (togtag
...)) (split-string (cdr pair) ", *")) (org-bibtex-put (car pair) (cdr
pair (otherwise (org-bibtex-put (car pair) (cdr pair) (mapc
(

Re: [O] BUG org-bibtex error for importing bibtex conference entries

2011-11-24 Thread Torsten Wagner

On 11/24/2011 05:09 PM, Nick Dokos wrote:

Torsten Wagner  wrote:


Hi,
I was going to convert my bibtex file into an org-mode file.
I receive an error message for conference entries.
E.g.
I can read in by org-bibtex-read

@CONFERENCE{foo11,
   author = {foo, A. and faa, B},
   title = {This is the title},
   booktitle = {Proceeding of the 5th Org-mode conference},
   year = {2011},
   month = Jul,
   day = {4--5},
   conference_name = {org-mode V},
   keywords = {published},
   location = {Somewhere, org-land},
   presentation = {Oral}
}



I think the problem is in the reading: after org-bibtex-read,
*org-bibtex-entries* is still nil. I presume that's why
org-bibtex-write fails.



Yes it seems to be a problem within the bibtex-mode of emacs. I will try 
to send this upstream.
However, I just learned that there is no difference between CONFERENCE 
and INPROCEEDINGS.

A search and replace in my BibTeX file should solve the problem for now.

Thanks for looking into it

Torsten




[O] Can't get column view working

2011-11-25 Thread Torsten Wagner
Hi,

after I converted all my BibTeX stuff into a org-mode file, I thought
I can create (for the first time) a column view to see nicely title,
autors, year and bibtex-key. This would look very similar to Jabrefs
table view, which I used before.
I created the following line.

#+COLUMNS: %25TITLE %10AUTHOR %5YEAR %10CUSTOM_ID

However, switching into the column-view creates the column header with
the correct spacing but all headlines are empty now. Only many spaces
later in the same row I find the ... end markers. Tab still opens the
headline and q let me switch back.
Is there anything I do wrong? I tried

#+COLUMNS: %25ITEM %10AUTHOR %5YEAR %10CUSTOM_ID

as well as

#+COLUMNS: %25ITEM

without success.

It seems the column view is not working at all for my system. I tried
the example for org-mode beamer on worg as  well as the example in the
manual. I always get long blank rows.

Any idea?

Torsten



Re: [O] Beamer export of a subtree seems wrong.

2011-11-27 Thread Torsten Wagner
Hi Eric,
thanks for answering.

> Exporting a sub-tree does not work for beamer because of how org treats
> a sub-tree.  Basically, when compared with an export of the full file,
> all headings are promoted one level up with the top level heading taking
> on the role of the "file" enclosing the talk.
>
> If for the whole file, you have using the structure that says that 1st
> level headings are topics and second level are slides, then when
> exporting a sub-tree, the 1st level heading becomes the title of the
> talk and second level headings become the topics.  This is not what you
> expect.

O.K. I got it (I guess). What a pitty, because it would be very nice
to be able to split lecture notes into either individual notes per
class or into a full lecture script by simply exporting the full
document or a single subtree.
Do you see any chance that the new way of exporting using
org-elements, recently discussed will help to get this feature.
At least, it seems to me it would be easier doable.

Torsten



Re: [O] Can't get column view working

2011-11-27 Thread Torsten Wagner
Hi again,

could someone please confirm about the status of column view in the
present git.
I can't even get examples in worg working. All I get are long empty lines
Any ideas

Torsten


On 25 November 2011 22:42, Torsten Wagner  wrote:
> Hi,
>
> after I converted all my BibTeX stuff into a org-mode file, I thought
> I can create (for the first time) a column view to see nicely title,
> autors, year and bibtex-key. This would look very similar to Jabrefs
> table view, which I used before.
> I created the following line.
>
> #+COLUMNS: %25TITLE %10AUTHOR %5YEAR %10CUSTOM_ID
>
> However, switching into the column-view creates the column header with
> the correct spacing but all headlines are empty now. Only many spaces
> later in the same row I find the ... end markers. Tab still opens the
> headline and q let me switch back.
> Is there anything I do wrong? I tried
>
> #+COLUMNS: %25ITEM %10AUTHOR %5YEAR %10CUSTOM_ID
>
> as well as
>
> #+COLUMNS: %25ITEM
>
> without success.
>
> It seems the column view is not working at all for my system. I tried
> the example for org-mode beamer on worg as  well as the example in the
> manual. I always get long blank rows.
>
> Any idea?
>
> Torsten
>



[O] org-bibtex does not work

2011-11-28 Thread Torsten Wagner
Hi all,

I finally converted all my BibTex references into a org file.
Now I face the problem that I can't generate a BibTeX file.
org-bibtex ask me for the filename and then it seems to be stuck in a
infinite loop.
Only way to get out of this is using C-g.
The BibTeX file never appeared.
setting the debugger to start on quit (setq debug-on-quit) results in

Debugger entered--Lisp error: (quit)
  bibtex-realign()
  bibtex-reformat()
  (progn (insert entry) (when tags (bibtex-beginning-of-entry) (if
(re-search-forward "keywords.*=.*{\\(.*\\)}" nil t) (progn (goto-char
(match-end 1)) (insert ", ")) (bibtex-make-field "keywords" t t))
(insert (mapconcat (function identity) tags ", "))) (bibtex-reformat)
(buffer-string))
  (unwind-protect (progn (insert entry) (when tags
(bibtex-beginning-of-entry) (if (re-search-forward
"keywords.*=.*{\\(.*\\)}" nil t) (progn (goto-char (match-end 1))
(insert ", ")) (bibtex-make-field "keywords" t t)) (insert (mapconcat
(function identity) tags ", "))) (bibtex-reformat) (buffer-string))
(and (buffer-name temp-buffer) (kill-buffer temp-buffer)))
  (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn
(insert entry) (when tags (bibtex-beginning-of-entry) (if
(re-search-forward "keywords.*=.*{\\(.*\\)}" nil t) (progn (goto-char
(match-end 1)) (insert ", ")) (bibtex-make-field "keywords" t t))
(insert (mapconcat (function identity) tags ", "))) (bibtex-reformat)
(buffer-string)) (and (buffer-name temp-buffer) (kill-buffer
temp-buffer

followed by many many more lines.
I tried to export a single entry in a own buffer as well without
success. I skipped my entire emacs settings and used a bare-bone emacs
with exactly the same result.
As from the debugger it seems to be a problem of the internal bibtex
mode. However, I hope someone here is capable to help. I updated both
emacs and org-mode without luck

org-mode 7.7 (git build from today)
emacs GNU Emacs 24.0.91.1 (bzr build from today)

Would be helpfull already if someone could confirm whether it works at
the moment or whether it seems broken
Thanks

Torsten



[O] [babel] noweb and results for ob-screen?

2011-12-17 Thread Torsten Wagner
Hi,
recently I discovered babel in combination with screen. I really like it.
However, I tried to use noweb but it seems not to work.  Getting it working
would allow to write "tasks" and arbitrary combine them to bigger tasks.

I would be interested in results too.  Would be nice to receive some
feedback from above tasks.  Thus, one could document the success or
results.  For now I have to copy results from the screen terminal which is
kind of error prone.

Any chance to enhance ob-screen with the above features?

Totti


Re: [O] [babel] noweb and results for ob-screen?

2011-12-19 Thread Torsten Wagner

Hmmm...

I looked a bit into it and it seems screen can log the session into a 
file. org-mode could read the total number of lines of that file before 
executing a new block of the same session and add the number of line 
feeds for the executed source code block. Hence, we would know at which 
point the "result" would start.
However, this would add the entire output of the source code block as 
result.
One could limit the result to the last send command by the above method 
too. Just splitting the source code block internally into two parts. The 
first one contains all but the last command, the second contains only 
the last command.


As for noweb, I can't see from the source code why it should not work. 
Does someone have an idea about that. I gave names to all my source code 
blocks. Then I defined a source code block with the header argument 
:noweb true. However all <> lines are send to screen instead of 
the content of so called source code blocks.


I also looked into variables. However, this seems to be a bit tricky, 
the problem is screen runs interactively, hence, you could run all kind 
of other stuff in the screen session, e.g., python, emacs, a serial 
terminal, etc. . How could org-mode know if it has to warp the variable 
according to python-, shell-, lisp- or any other syntax.


Might it be possible (and does it make sense) to simply enable some kind 
of macro-like replacement. E.g.

:var _X_=3
would replace all _X_ by 3. There would be no formal syntax and no 
format rules. Just a simple greedy search and replace. Thus, the user 
can/have to think by himself how a variable name would have to look like 
to get no conflict with the target language.

E.g.
:var var=12
could be a bad idea if the source code would be
test = var
var2 = 12
def variant():

because it would be replaced by

test = 12
122 = 12
def 12iant():

We could not rely on spaces around variables because some languages 
might not allow spaces. That is


test=12 can not be written test = 12

However, source code blocks are normally relatively small and the user 
could use any kind of scheme which makes a distinction with the target 
language within screen easy (using all kind of seldom used characters 
_,%,#, etc.)


Any thoughts or ideas?

I really like the interactive screen functionality which allows me to 
perform all kind of tasks interactively within a screen session.


Torsten


On 12/17/2011 06:38 PM, Torsten Wagner wrote:

Hi,
recently I discovered babel in combination with screen. I really like it.
However, I tried to use noweb but it seems not to work.  Getting it working
would allow to write "tasks" and arbitrary combine them to bigger tasks.

I would be interested in results too.  Would be nice to receive some
feedback from above tasks.  Thus, one could document the success or
results.  For now I have to copy results from the screen terminal which is
kind of error prone.

Any chance to enhance ob-screen with the above features?

Totti






Re: [O] Org website for Japanese

2011-12-19 Thread Torsten Wagner

どうもありがとうございました。

Torsten


On 12/15/2011 11:29 AM, Yagnesh wrote:

Takaaki ISHIKAWA  writes:


Dear all,

I'm pleased to announce that Japanese translated Org website has been opened.

http://orgmode.org/ja/


This looks cool. Thank you Ishikawa-san. Now I can recommend "org" to my
friends.



Thanks Bastien! It's done with your great help.
And I'd like to say thanks to a Japanese translation team that I organized.


Best regards,
Takaaki Ishikawa
@takaxp







Re: [Orgmode] Status google calendar sync

2011-01-29 Thread Torsten Wagner
> Slightly OT perhaps, but I am contemplating getting an Android phone and
> figuring out how NOT to have my calendar on google, and would like to
> sync it with org.  (Right now I've made a 0.1-hearted attempt to export
> org to ical and put it in mac calendar.)  Are there ways to not sync
> with google on the android and sync with org?  I don't mind running my
> own calendar server.

As fare as I know Google does not allow native usage of any other calendar
service. There are a few calendar apps which allow the use of an non Google
calendar. However, I would prefer something which integrates neatly with
Android. I'm not a big fan of the idea to feed all my stuff to Google,
neither but at the moment it seems to be the best working option (not
surprisingly for using a OS developed by Google).

I checked for the API and googlecl. Lets say there is plenty space for
improvement on Googles side ;).

Maybe, we should all focus to improve mobileorg. Its just the stupid fact
that basically many functions of org-mode written in elisp would require a
reimplementation in orgmobile in java. Somehow, this sound to me a bit like
a mouse and cat game. Well, if there would be a elisp interpreter for
Android, this would change the game

Totti
___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Status google calendar sync

2011-01-31 Thread Torsten Wagner
> So would it be possible to build a native emacs for android?

I checked this a while ago and unfortunately emacs comes with a relatively
large pack of dependencies. Android on the other side does not deliver many
standard libraries. Xorg libc and afaik dbus are a few dependencies which
are not (natively) available on Android.
I tried Emacs in a debian chroot on my keyboard less device. It wasn't
really usable and I doubt that keyboard based smartphones are much better
since they most likely miss alt ctrl and other important keys.

Ideally we have something like Mobileorg and a emacs dameon running.
Mobileorg could send emacs elisp code to execute and access all org-mode
functions natively. This would allow to "reduce" mobileorgs task to
touchfriendly input and result representation.

If I manage to port a very basic version of emacs to android I will let you
know.

Greetings
Totti
___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


  1   2   3   >