Re: [O] GNU Emacs ported to Android

2012-08-23 Thread Torsten Wagner
Hi Carsten,

great!
Once more org-mode has already a solution for a not yet existing problem ;)
I am not aware of any (non programming language) software project
which is more flexible and foreseeing then org-mode.

Torsten




On 23 August 2012 13:59, Carsten Dominik carsten.domi...@gmail.com wrote:

 On 23.8.2012, at 03:00, Torsten Wagner wrote:

 Hi Bastien,

 I guess many many people here are looking since a long time how to run
 a full version of org-mode on a mobile device.
 Thus, I believe the announcement itself was well placed.
 If we can keep the discussion towards how org-mode on an android
 version of emacs works out, I guess we are save for any police raids,
 right? ;)
 E.g. if this is getting a little bigger, it might be interesting to
 discuss a mobile-minor mode in org-mode which maps certain features to
 easier to enter keyboard shortcuts.
 Maybe someone can even thing of a specific emacs org-mode
 soft-keyboard which maps the most used functions to individual keys
 directly (not sure if this is possible)


 I think speed keys http://orgmode.org/manual/Speed-keys.html#Speed-keys
 will already go a long way to make Org-mode usable on an Emacs with
 no or limited modifier support.  So your minor mode could largely be
 an expansion of the speed key setup.

 - Carsten


 Torsten

 On 22 August 2012 02:43, Bastien b...@altern.org wrote:
 Hi Karl,

 Karl Voit devn...@karl-voit.at writes:

 Anybody else sharing experiences with Emacs or HW-keyboards on
 Android?

 sorry to act like a police officer, but please keep those discussions
 where they belong to -- either some Android or Emacs list.  You will
 probably have more answers on help-gnu-em...@gnu.org

 Thanks for your understanding!

 --
 Bastien






[O] org-export to Spreadsheet

2012-08-23 Thread Joost Helberg
ls,

org-export-odt-preferred-output-format doesn't support ods or xlsx. 
Libreoffice is incapable of converting odt to ods, which is the main
reason, as far as I can see, for org-export-odt to not deliver this
service. 

After exporting my calldata reports to odt, I end up `selecting
all' in libreoffice, creating a new spreadsheet and pasting all into
this new spreadsheet. Of course, as a org-mode user, I hate all this
interaction with GUI programs.

I was wondering whether there is a better way to do this, or if a
minor add-on would facilitate this (C-c C-e s|S maybe?).

regards,

Joost

-- 
Snow B.V.http://snow.nl



Re: [O] Please test current git HEAD with old Emacsen ( 23.4)

2012-08-23 Thread Bastien
Achim Gratz strom...@nexgo.de writes:

 Bastien writes:
 If there are users of older Emacsen here, please pull from the
 git repo and report any problem in compiling and running Org.

 Emacs 23.2 on openSuSE compiles and tests OK (except for the babel
 sh-session test that I reported earlier, but that only seems to affect
 batch mode).

Thanks a lot for the test and report!

-- 
 Bastien



Re: [O] GNU Emacs ported to Android

2012-08-23 Thread Bastien
Hi Torsten,

Carsten Dominik carsten.domi...@gmail.com writes:

 I think speed keys http://orgmode.org/manual/Speed-keys.html#Speed-keys
 will already go a long way to make Org-mode usable on an Emacs with
 no or limited modifier support.  So your minor mode could largely be
 an expansion of the speed key setup.

Yes.  

This and org-mouse.el, which can be useful for touch interactions with
the buffer.  I'm not using org-mouse.el that much though, so if anyone
wants to test and report what needs to be enhanced there, please do so.

-- 
 Bastien



Re: [O] Best way to implement project specific captures

2012-08-23 Thread Sylvain Rousseau
It is an org-capture issue. You have to specify the full path of the org
file in the template even if this file is an agenda file. Otherwise
org-capture assumes that the file is located in `org-directory'.


 Can you advise further? (Looks great regardless btw!)

Thank you, building on Bastien's suggestion I'm working on a stealing
feature, that steals templates from `org-capture-templates' and changes the
target.

Sylvain.


Re: [O] GNU Emacs ported to Android

2012-08-23 Thread Carsten Dominik

On 23 aug. 2012, at 08:04, Bastien b...@altern.org wrote:

 Hi Torsten,
 
 Carsten Dominik carsten.domi...@gmail.com writes:
 
 I think speed keys http://orgmode.org/manual/Speed-keys.html#Speed-keys
 will already go a long way to make Org-mode usable on an Emacs with
 no or limited modifier support.  So your minor mode could largely be
 an expansion of the speed key setup.
 
 Yes.  
 
 This and org-mouse.el, which can be useful for touch interactions with
 the buffer.

Ah yes, indeed.  Maybe long tap could be used to trigger the
actions defined by org-mouse.el.

  I'm not using org-mouse.el that much though, so if anyone
 wants to test and report what needs to be enhanced there, please do so.
 
 -- 
 Bastien

- Carsten






Re: [O] Best way to implement project specific captures

2012-08-23 Thread Bastien
Sylvain Rousseau this...@gmail.com writes:

 One possible enhancement: allow using only the capture/agenda
 template instead of the full template in
 `org-context-capture-alist'
 and `org-context-agenda-alist'.

 Good idea! Adding it to my todo list with org-context ;-)

Actually I love your idea so much I just implemented it in core.

See these new options:

  org-agenda-custom-commands-contexts
  org-capture-templates-contexts

The basic idea is the same than yours, except you only need to
define rules for the agenda/capture keys.  It's also extending
the notion of context by allowing to check against modes, not
only files.

Please let me know what do you think.  And thanks again for this
simple and beautiful idea.

-- 
 Bastien



Re: [O] Best way to implement project specific captures

2012-08-23 Thread Carsten Dominik
Hi Sylvain and Bastien,

this is an interesting idea!

I am wondering if the following feature would be useful as well:  Context 
sensitivity sounds most interesting to me if the same key would do different 
things in different contexts.  I am not sure if this is possible with the 
current implementation?  For example, I might want to have a bug recording key 
which creates an entry in a bug tracker file, but the file is different for 
different source files, and also the template and target type definitions might 
be different in different contexts.

That would require a setup which defines a selection letter, and then an a list 
of (sets of) conditions and the corresponding template definition.

Or am I going overboard here?

- Carsten

On 23 aug. 2012, at 11:13, Bastien b...@altern.org wrote:

 Sylvain Rousseau this...@gmail.com writes:
 
 One possible enhancement: allow using only the capture/agenda
 template instead of the full template in
 `org-context-capture-alist'
 and `org-context-agenda-alist'.
 
 Good idea! Adding it to my todo list with org-context ;-)
 
 Actually I love your idea so much I just implemented it in core.
 
 See these new options:
 
  org-agenda-custom-commands-contexts
  org-capture-templates-contexts
 
 The basic idea is the same than yours, except you only need to
 define rules for the agenda/capture keys.  It's also extending
 the notion of context by allowing to check against modes, not
 only files.
 
 Please let me know what do you think.  And thanks again for this
 simple and beautiful idea.
 
 -- 
 Bastien
 

- Carsten






Re: [O] org-export to Spreadsheet

2012-08-23 Thread Jambunathan K
Joost Helberg jo...@snow.nl writes:

 ls,

 org-export-odt-preferred-output-format doesn't support ods or xlsx. 
 Libreoffice is incapable of converting odt to ods, which is the main
 reason, as far as I can see, for org-export-odt to not deliver this
 service. 

LibreOffice is a collection of document classes - Writer is a Text
document, Calc is a Spreadsheet document and Impress is a
Presentation document.

LibreOffice provides filters - in common man's terms, what you with
Save as - from one format to another within the *same* document class
but *not* *across* document classes.

For example, you can move between doc file and odt file because both
are text documents.  You can move between csv and ods because both
are spreadsheet documents.  But you cannot move between odt and ods
because you are moving between text document to spreadsheet document.

This is exactly the reason why, when you do

M-x customize-variable RET org-export-odt-preferred-format RET

you will see only Text formats like doc etc in the drop down list and
not xls or ods.

 After exporting my calldata reports to odt, I end up `selecting
 all' in libreoffice, creating a new spreadsheet and pasting all into
 this new spreadsheet. Of course, as a org-mode user, I hate all this
 interaction with GUI programs.

The trick is to use M-x org-table-export RET to export a org-table to
csv format and then convert that csv file to ods format.

For the sake of illustration, 

1. Install below function

(defun org-export-to-ods ()
  (interactive)
  (let ((csv-file data.csv))
(org-table-export csv-file orgtbl-to-csv)
(org-export-odt-convert csv-file ods 'open)))

2. Put your cursor on a table

3. Do M-x org-export-to-ods

You will see that the table is exported to a spreadsheet and it is
opened.

TIP:

1. You can replace csv to tsv.
2. You can replace ods with xls or xlsx
3. You will get a spreadsheet but not any of the meta-data transferred.
   For example, no transference of TBLFM lines or recognition of
   spreadsheet fields like number, date etc.
4. LibreOffice's command line converter - this I suppose being new - has
   some issues if LibreOffice application is already running.  So if you
   are exporting multiple tables you can replace 'open in the above
   function with nil.

 I was wondering whether there is a better way to do this, or if a
 minor add-on would facilitate this (C-c C-e s|S maybe?).

There was a prior request to convert org-tables to LibreOffice Calc
directly - so that some TBLFM lines could be transferred.  But this
cannot be done in a day or two and requires more efforts (and may
necessitate improvement of org-element/org-export infrastructure)

 regards,

 Joost

-- 



Re: [O] Best way to implement project specific captures

2012-08-23 Thread Jambunathan K

May be dir local variables could be used?

Carsten Dominik carsten.domi...@gmail.com writes:

 Hi Sylvain and Bastien,

 this is an interesting idea!

 I am wondering if the following feature would be useful as well:
 Context sensitivity sounds most interesting to me if the same key
 would do different things in different contexts.  I am not sure if
 this is possible with the current implementation?  For example, I
 might want to have a bug recording key which creates an entry in a bug
 tracker file, but the file is different for different source files,
 and also the template and target type definitions might be different
 in different contexts.

 That would require a setup which defines a selection letter, and then
 an a list of (sets of) conditions and the corresponding template
 definition.

 Or am I going overboard here?

 - Carsten

 On 23 aug. 2012, at 11:13, Bastien b...@altern.org wrote:

 Sylvain Rousseau this...@gmail.com writes:
 
 One possible enhancement: allow using only the capture/agenda
 template instead of the full template in
 `org-context-capture-alist'
 and `org-context-agenda-alist'.
 
 Good idea! Adding it to my todo list with org-context ;-)
 
 Actually I love your idea so much I just implemented it in core.
 
 See these new options:
 
  org-agenda-custom-commands-contexts
  org-capture-templates-contexts
 
 The basic idea is the same than yours, except you only need to
 define rules for the agenda/capture keys.  It's also extending
 the notion of context by allowing to check against modes, not
 only files.
 
 Please let me know what do you think.  And thanks again for this
 simple and beautiful idea.
 
 -- 
 Bastien
 

 - Carsten






-- 



Re: [O] GNU Emacs ported to Android

2012-08-23 Thread Jason F. McBrayer

On 23.08.2012 00:59, Carsten Dominik wrote:


I think speed keys
http://orgmode.org/manual/Speed-keys.html#Speed-keyswill already go a
long way to make Org-mode usable on an Emacs with no or limited
modifier support. So your minor mode could largely be an expansion of
the speed key setup.


I've run emacs a little bit in a Fedora-ARM chroot on my Android 
tablet,

and speed keys were definitely my primary means of interacting with
it. The modifier support was not *that* limited -- running it in a 
local

ConnectBot session and using Hacker's Keyboard is as-far-as-I-can-tell
equivalent to a normal TTY Emacs with a PC keyboard. But, of course, 
the

modifier support in a normal TTY Emacs is a little limited.

My notes on running Emacs and Org-mode in this environment are at
http://www.carcosa.net/jason/blog/computing/emacs/2012-07-19-21-31-emacs-on-android.html
if anyone is interested. The setup bits are a bit obsolete given the 
new
native app that's out, but the native app basically wraps a terminal 
app

around an ARM-linux emacs, so a lot of things still apply.

--
+---+
| Jason F. McBrayer jmcb...@carcosa.net |
| If someone conquers a thousand times a thousand others in |
| battle, and someone else conquers himself, the latter one |
| is the greatest of all conquerors. --- The Dhammapada |





Re: [O] Best way to implement project specific captures

2012-08-23 Thread Bastien
Hi Carsten,

Carsten Dominik carsten.domi...@gmail.com writes:

 I am wondering if the following feature would be useful as well: Context
 sensitivity sounds most interesting to me if the same key would do
 different things in different contexts.  I am not sure if this is possible
 with the current implementation?  For example, I might want to have a bug
 recording key which creates an entry in a bug tracker file, but the file is
 different for different source files, and also the template and target type
 definitions might be different in different contexts.

 That would require a setup which defines a selection letter, and then an a
 list of (sets of) conditions and the corresponding template
 definition.

I implemented this, relying on the existing contexts options.

Please have a go with the attached patch.  I copy the comment
from the commit log:

In the setup below, X is not a real capture template, it is just
an alias to templates A and B in .txt and .el files.  A and B are
deactivated by default in all files.

(setq org-capture-templates
  '((X Nothing but an alias)
(A  entry (file+headline [...]))
(B  entry (file+headline [...]

(setq org-capture-templates-contexts
  '((A A ((not-in-file . .*)))
(B B ((not-in-file . .*)))
(X A ((in-file . \\.txt)))
(X B ((in-file . \\.el)

I find this quite handy...  let me know what you think!

From c191d48aa1f2eb6c28fe2503b6b039265fb1da1e Mon Sep 17 00:00:00 2001
From: Bastien Guerry b...@altern.org
Date: Thu, 23 Aug 2012 17:04:43 +0200
Subject: [PATCH] Implement key replacement depending on the contexts.

* org.el (org-contextualize-agenda-or-capture): Handle key
replacement depending on the contexts.

* org-capture.el (org-capture-templates-contexts): Allow to
use the context as a way to replace one capture template by
another one.

* org-agenda.el (org-agenda-custom-commands-contexts): Allow
to use the context as a way to replace one agenda custom
command by another one.

* org.texi (Templates in contexts): Document the new structure
of the variables `org-agenda-custom-commands-contexts' and
`org-capture-templates-contexts'.

In the setup below, X is not a real capture template, it is just
an alias to templates A and B in .txt and .el files.  A and B are
deactivated by default in all files.

(setq org-capture-templates
  '((X Nothing but an alias)
	(A  entry (file+headline [...]))
	(B  entry (file+headline [...]

(setq org-capture-templates-contexts
  '((A A ((not-in-file . .*)))
	(B B ((not-in-file . .*)))
	(X A ((in-file . \\.txt)))
	(X B ((in-file . \\.el)

Thanks to Carsten for suggesting this key-replacement idea!
---
 doc/org.texi|   16 +---
 lisp/org-agenda.el  |   20 +---
 lisp/org-capture.el |   22 ++
 lisp/org.el |   40 +++-
 4 files changed, 79 insertions(+), 19 deletions(-)

diff --git a/doc/org.texi b/doc/org.texi
index 897115c..3ec72b3 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -6863,10 +6863,14 @@ for example that you have a capture template @code{p} for storing Gnus
 emails containing patches.  Then you would configure this option like this:
 
 @example
-(setq org-capture-templates-contexts '((p (in-mode . message-mode
+(setq org-capture-templates-contexts
+  '((p p (in-mode . message-mode
 @end example
 
-See the docstring of the variable for more information.
+The second @code{p} tells what template to really call in the specified
+context.  You can set this to another capture template, so that @code{p} will
+transparently fall back on it.  See the docstring of the variable for more
+information.
 
 @node Attachments, RSS Feeds, Capture, Capture - Refile - Archive
 @section Attachments
@@ -8778,9 +8782,15 @@ that you only need when reading emails.  Then you would configure this option
 like this:
 
 @example
-(setq org-agenda-custom-commands-contexts '((o (in-mode . message-mode
+(setq org-agenda-custom-commands-contexts
+  '((o o (in-mode . message-mode
 @end example
 
+The second @code{o} tells what command to really call in the specified
+context.  You can set this to another agenda custom command, so that @code{o}
+will transparently fall back on it.  See the docstring of the variable for
+more information.
+
 See the docstring of the variable for more information.
 
 @node Exporting Agenda Views, Agenda column view, Custom agenda views, Agenda Views
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 9c7f29b..563ed3f 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -2341,9 +2341,22 @@ For example, if you have a custom agenda command \p\ and you
 want this command to be accessible only from plain text files,
 use this:
 
-   '((\p\ (in-file . \\\.txt\)))
+   '((\p\ \p\ (in-file . \\\.txt\)))
 
-Here are the available checks:
+If you replace the second \p\ by another key (say \q\), then
+the \p\ key will be 

[O] org-e-html and table of contents

2012-08-23 Thread Eric Schulte
Hi,

I've been using the new html exporter (org-e-html) recently, and I'm
surprised that it does not add tables of contents by default.  Is there
a user variable which I can customize to change this default?  Currently
the only way I see to add a table of contents is to add a TOC keyword to
the buffer.

Thanks,

-- 
Eric Schulte
http://cs.unm.edu/~eschulte



Re: [O] org-export to Spreadsheet

2012-08-23 Thread Joost Helberg
Jambunathan,

Thanks for the code, it will probably match what I need.

Regards,

Joost

 Jambunathan == Jambunathan K kjambunat...@gmail.com writes:
  Subject: Re: org-export to Spreadsheet
  From: Jambunathan K kjambunat...@gmail.com
  To: Joost Helberg jo...@snow.nl
  Cc: emacs-orgmode@gnu.org
  Date: Thu, 23 Aug 2012 16:29:30 +0530

  Joost Helberg jo...@snow.nl writes:

  ls,
  
  org-export-odt-preferred-output-format doesn't support ods or xlsx. 
  Libreoffice is incapable of converting odt to ods, which is the main
  reason, as far as I can see, for org-export-odt to not deliver this
  service. 

  LibreOffice is a collection of document classes - Writer is a Text
  document, Calc is a Spreadsheet document and Impress is a
  Presentation document.

  LibreOffice provides filters - in common man's terms, what you with
  Save as - from one format to another within the *same* document class
  but *not* *across* document classes.

  For example, you can move between doc file and odt file because both
  are text documents.  You can move between csv and ods because both
  are spreadsheet documents.  But you cannot move between odt and ods
  because you are moving between text document to spreadsheet document.

  This is exactly the reason why, when you do

  M-x customize-variable RET org-export-odt-preferred-format RET

  you will see only Text formats like doc etc in the drop down list and
  not xls or ods.

  After exporting my calldata reports to odt, I end up `selecting
  all' in libreoffice, creating a new spreadsheet and pasting all into
  this new spreadsheet. Of course, as a org-mode user, I hate all this
  interaction with GUI programs.

  The trick is to use M-x org-table-export RET to export a org-table to
  csv format and then convert that csv file to ods format.

  For the sake of illustration, 

  1. Install below function

  (defun org-export-to-ods ()
(interactive)
(let ((csv-file data.csv))
  (org-table-export csv-file orgtbl-to-csv)
  (org-export-odt-convert csv-file ods 'open)))

  2. Put your cursor on a table

  3. Do M-x org-export-to-ods

  You will see that the table is exported to a spreadsheet and it is
  opened.

  TIP:

  1. You can replace csv to tsv.
  2. You can replace ods with xls or xlsx
  3. You will get a spreadsheet but not any of the meta-data transferred.
 For example, no transference of TBLFM lines or recognition of
 spreadsheet fields like number, date etc.
  4. LibreOffice's command line converter - this I suppose being new - has
 some issues if LibreOffice application is already running.  So if you
 are exporting multiple tables you can replace 'open in the above
 function with nil.

  I was wondering whether there is a better way to do this, or if a
  minor add-on would facilitate this (C-c C-e s|S maybe?).

  There was a prior request to convert org-tables to LibreOffice Calc
  directly - so that some TBLFM lines could be transferred.  But this
  cannot be done in a day or two and requires more efforts (and may
  necessitate improvement of org-element/org-export infrastructure)

  regards,
  
  Joost

  -- 


-- 
Snow B.V.http://snow.nl



Re: [O] org-e-html and table of contents

2012-08-23 Thread Nick Dokos
Eric Schulte eric.schu...@gmx.com wrote:

 Hi,
 
 I've been using the new html exporter (org-e-html) recently, and I'm
 surprised that it does not add tables of contents by default.  Is there
 a user variable which I can customize to change this default?  Currently
 the only way I see to add a table of contents is to add a TOC keyword to
 the buffer.
 

org-export-with-toc perhaps?

Nick



[O] Create link using refile interface?

2012-08-23 Thread Nathan Neff
Does org-mode have the ability to use
the refile interface or something like it when creating links?

For example, if I have a headline like this:

--
* Terms
** Xcaligraphicasfoobar

Definition of Xcaligraphicasfoobar goes here, but it's hard to link to
easily because I can't remember how to spell it.
--

And I want to link to Terms/Xcaligraphicasfoobar from another place in
the document,
or another org-mode document and I can't remember how it's spelled.

Is there an interface like the refile interface that would show me the
headlines under
the Terms headline so that I could pick from a list when creating a link?

I've tried using C-x C-l and typing file: and pressing RETURN I get a
list of files to pick from
-- but after I pick the file by typing terms.org:: I would like to see
a list of child headers in terms.org.

Thanks,
--Nate



Re: [O] org-e-html and table of contents

2012-08-23 Thread Eric Schulte
Nick Dokos nicholas.do...@hp.com writes:

 Eric Schulte eric.schu...@gmx.com wrote:

 Hi,
 
 I've been using the new html exporter (org-e-html) recently, and I'm
 surprised that it does not add tables of contents by default.  Is there
 a user variable which I can customize to change this default?  Currently
 the only way I see to add a table of contents is to add a TOC keyword to
 the buffer.
 

 org-export-with-toc perhaps?

 Nick


Nope,

With this variable set to t the e-html backend does *not* produce a
table of contents.  To demonstrate, run the following from the command
line with the attached Org-mode file (although any file will do) saved
to /tmp/example.org.

# -*- shell-script -*-
emacs --batch -l path/to/org-mode/lisp/org-element.el \
  -l path/to/org-mode/contrib/lisp/org-export.el \
  -l path/to/org-mode/contrib/lisp/org-e-html.el \
  /tmp/example.org \
  --eval '(let ((org-export-with-toc t)) (org-export-to-file (quote 
e-html) /tmp/example.html))'

#+Title: example file

* foo
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec
hendrerit tempor tellus. Donec pretium posuere tellus. Proin quam
nisl, tincidunt et, mattis eget, convallis nec, purus. Cum sociis
natoque penatibus et magnis dis parturient montes, nascetur ridiculus
mus. Nulla posuere. Donec vitae dolor. Nullam tristique diam non
turpis. Cras placerat accumsan nulla. Nullam rutrum. Nam vestibulum
accumsan nisl.

* bar
| one   | two  |
| three | four |

* baz
** sub one
- one
- two

** sub two
- three
- four

-- 
Eric Schulte
http://cs.unm.edu/~eschulte


Re: [O] Including multiple plots resulting from a loop of R code in LaTeX

2012-08-23 Thread Eric Schulte
John Hendy jw.he...@gmail.com writes:

 I'm conducting some neural network analysis, and the results are
 highly dependent on the random seed set prior to creating the model. I
 loop through seeds 1-500, storing the predicted values in one data
 frame and a table of mean sum of squared errors in another table.

 Then, I use ggplot to create only the 10 or so plots with the lowest
 error. The loop is something like this:

 --
 for(i in 1:10) {

 filename - paste(neuralnet-,-seed-,as.character(mse[i,1]),.pdf, sep=)

 pdf(filename, width=12, height=8)

 [ggplot code]

 dev.off()
 --

 What I want to know is how to include the resultant files in LaTeX
 export. Since my model runs and then sorts by error, I don't know
 which seeds produce the best files beforehand, so I'd have to look at
 the error table and manually insert the plot names by hand. Changing
 results means changing file names by hand again.

 Any suggestions for things like this where the output of a babel block
 is not a single file?


Have you tried using header arguments like the following.

:results output raw :exports results

and then printing the file names (including the Org-mode link syntax) to
STDOUT from within your R code block.

If I understand correctly that should result in the behavior you're
after.

Best,



 Thanks,
 John


-- 
Eric Schulte
http://cs.unm.edu/~eschulte



Re: [O] Interaction between org tables and embedded calc

2012-08-23 Thread Eric Schulte
Gilles Charron gilles.char...@gmail.com writes:

 Hi,

   I recently discovered the beauty of emacs embedded calc.  Works great inside
 org files for note taking with math  engineering related content.   

 I've been trying to get org tables and embedded calc to coordinate with each
 other using assigned variables however it appears that embedded calc uses some
 sort of namespace for storing variables.  Below is a sample of what I'm trying
 to do:

 Let's say I need to calculate something - I'll assign it to an embedded calc
 variable:

 myVariable := 1 + 0.5 =  1.5

 Now, embedded calc knows about myVariable .  Next I would like to use this
 variable inside a org table (like offset all elements in a column with
 myVariable):

 | Data | Corrected Data (-myVariable) |
 | 0| should yield -1.5|
 | 1| should yield -0.5|
 | 2| should yield  0.5|

 I've been trying to use calc-eval along with evalv however they don't appear 
 to
 resolve myVariable.   

 Reading though the embedded calc documentation:


 The assignment operator `a := 17' does not actually do anything by itself. 
 But
 Embedded Mode recognizes it and marks it as a sort of file-local definition of
 the variable.

 How can I access these file-local definitions through calc-eval or org
 tables?  Essentially, I'm looking for an equivalent of org properties
 $PROP_propertyName which can be accessed in org tables.  


This is an interesting question but to the extent that you're asking how
to resolve an embedded calc variable from general calc execution I think
this is more of a calc than an Org-mode question, and should be sent to
the calc mailing list.


 I would also like the ability to read from an org table and use the
 content later in a embedded math equation:

 | Data |
 |--|
 | 1|
 | 2|
 | 3|
 |--|
 | 6|
 #+TBLFM: @5$1=vsum(@I..II)

 Would like to read the results (6) and use it in a equation:

 MoreProcessing := $result + 1.234

 How would one go about doing this?


Assuming you know the syntax to specify vectors in embedded calc, you
could use a code block to read the table from Org-mode and output the
calc vector syntax into your document.

Best,



 Thanks!
 Gilles



-- 
Eric Schulte
http://cs.unm.edu/~eschulte



Re: [O] Best way to implement project specific captures

2012-08-23 Thread Sylvain Rousseau
2012/8/23 Carsten Dominik carsten.domi...@gmail.com:
 I am wondering if the following feature would be useful as well:  Context 
 sensitivity sounds most interesting to me if the same key would do different 
 things in different contexts.  I am not sure if this is possible with the 
 current implementation?  For example, I might want to have a bug recording 
 key which creates an entry in a bug tracker file, but the file is different 
 for different source files, and also the template and target type definitions 
 might be different in different contexts.

For what it's worth I have pushed changes to github implementing this
and offering the choice to override templates or put them in a submenu
as well as a stealing mechanism to modify existing templates'
target.

I do not have access to Bastien's changes yet but from what I
understood we might run out of letters to identify templates. For
example, if we have 10 projects with 3 different templates each, we
already have 30 items in `org-capture-templates'... Or did I miss
something?

Anyway, I'm glad to see that this feature will be in a future org release!

Sylvain.



Re: [O] Best way to implement project specific captures

2012-08-23 Thread Richard Riley
Sylvain Rousseau this...@gmail.com writes:

 It is an org-capture issue. You have to specify the full path of the org file 
 in the template even if this file is an agenda
 file. Otherwise org-capture assumes that the file is located in
 `org-directory'.

with no path to use the existing one would be a real boon and
certainly works for the original journal template capture. I dont know
about the implementation details but no path == loaded file would make
sense with the user wanting specific files then hard code it. 

I see Bastien and Carsten are in on the thread too, I'll step back and
see in what direction this now goes ;) Thanks again for the great
feature!



 Can you advise further? (Looks great regardless btw!)

 Thank you, building on Bastien's suggestion I'm working on a stealing 
 feature, that steals templates from
 `org-capture-templates' and changes the target.

 Sylvain.





Re: [O] org-e-html and table of contents

2012-08-23 Thread Nick Dokos
Eric Schulte eric.schu...@gmx.com wrote:

 Nick Dokos nicholas.do...@hp.com writes:
 
  Eric Schulte eric.schu...@gmx.com wrote:
 
  Hi,
  
  I've been using the new html exporter (org-e-html) recently, and I'm
  surprised that it does not add tables of contents by default.  Is there
  a user variable which I can customize to change this default?  Currently
  the only way I see to add a table of contents is to add a TOC keyword to
  the buffer.
  
 
  org-export-with-toc perhaps?
 
  Nick
 
 
 Nope,
 
 With this variable set to t the e-html backend does *not* produce a
 table of contents.  To demonstrate, run the following from the command
 line with the attached Org-mode file (although any file will do) saved
 to /tmp/example.org.
 
 # -*- shell-script -*-
 emacs --batch -l path/to/org-mode/lisp/org-element.el \
   -l path/to/org-mode/contrib/lisp/org-export.el \
   -l path/to/org-mode/contrib/lisp/org-e-html.el \
   /tmp/example.org \
   --eval '(let ((org-export-with-toc t)) (org-export-to-file (quote 
 e-html) /tmp/example.html))'

Try setting it to 4: org-e-html.el says (around line 1475)


--8---cut here---start-8---
   ;; table of contents
   (let ((depth (plist-get info :with-toc)))
 (when (wholenump depth) (org-e-html-toc depth info)))
--8---cut here---end---8---

even though that contradicts the docstring for the variable.

Nick



[O] exporter / org-man

2012-08-23 Thread Achim Gratz

I just realised that there's a trainwreck in the making:

We have org-e-man and org-man in contrib.  Now when the exporter moves
into core, org-e-man supposedly changes its name to org-man as
well... not good.  Since org-man was there first, could org-e-man be
renamed to something that will not collide?


Regards,
Achim.
-- 
+[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+

DIY Stuff:
http://Synth.Stromeko.net/DIY.html




Re: [O] org-e-html and table of contents

2012-08-23 Thread Eric Schulte
Nick Dokos nicholas.do...@hp.com writes:

 Eric Schulte eric.schu...@gmx.com wrote:

 Nick Dokos nicholas.do...@hp.com writes:
 
  Eric Schulte eric.schu...@gmx.com wrote:
 
  Hi,
  
  I've been using the new html exporter (org-e-html) recently, and I'm
  surprised that it does not add tables of contents by default.  Is there
  a user variable which I can customize to change this default?  Currently
  the only way I see to add a table of contents is to add a TOC keyword to
  the buffer.
  
 
  org-export-with-toc perhaps?
 
  Nick
 
 
 Nope,
 
 With this variable set to t the e-html backend does *not* produce a
 table of contents.  To demonstrate, run the following from the command
 line with the attached Org-mode file (although any file will do) saved
 to /tmp/example.org.
 
 # -*- shell-script -*-
 emacs --batch -l path/to/org-mode/lisp/org-element.el \
   -l path/to/org-mode/contrib/lisp/org-export.el \
   -l path/to/org-mode/contrib/lisp/org-e-html.el \
   /tmp/example.org \
   --eval '(let ((org-export-with-toc t)) (org-export-to-file (quote 
 e-html) /tmp/example.html))'

 Try setting it to 4: org-e-html.el says (around line 1475)


 --8---cut here---start-8---
;; table of contents
(let ((depth (plist-get info :with-toc)))
  (when (wholenump depth) (org-e-html-toc depth info)))
 --8---cut here---end---8---

 even though that contradicts the docstring for the variable.


Indeed, setting this variable to 4 does result in TOC generation.

I'd recommend the attached patch.

Thanks,

From 228c4bbdd2fc145b135de233632e8884d1d53cd7 Mon Sep 17 00:00:00 2001
From: Eric Schulte eric.schu...@gmx.com
Date: Thu, 23 Aug 2012 12:41:52 -0600
Subject: [PATCH] Better use of default org-export-with-toc value

* contrib/lisp/org-e-html.el (org-e-html-template): Default value of t
  for org-export-with-toc has no impact, so instead when t set TOC depth
  to 4.
---
 contrib/lisp/org-e-html.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/contrib/lisp/org-e-html.el b/contrib/lisp/org-e-html.el
index 4e9d398..ee0f247 100644
--- a/contrib/lisp/org-e-html.el
+++ b/contrib/lisp/org-e-html.el
@@ -1473,6 +1473,7 @@ original parsed data.  INFO is a plist holding export options.
 h1 class=\title\%s/h1\n (org-export-data (plist-get info :title) info))
;; table of contents
(let ((depth (plist-get info :with-toc)))
+ (when (eq t depth) (setq depth 4))
  (when (wholenump depth) (org-e-html-toc depth info)))
;; document contents
contents
-- 
1.7.12


-- 
Eric Schulte
http://cs.unm.edu/~eschulte


Re: [O] org-e-html and table of contents

2012-08-23 Thread Nick Dokos
Eric Schulte eric.schu...@gmx.com wrote:

 I'd recommend the attached patch.
 
 Thanks,
 
 From 228c4bbdd2fc145b135de233632e8884d1d53cd7 Mon Sep 17 00:00:00 2001
 From: Eric Schulte eric.schu...@gmx.com
 Date: Thu, 23 Aug 2012 12:41:52 -0600
 Subject: [PATCH] Better use of default org-export-with-toc value
 
 * contrib/lisp/org-e-html.el (org-e-html-template): Default value of t
   for org-export-with-toc has no impact, so instead when t set TOC depth
   to 4.
 ---
  contrib/lisp/org-e-html.el | 1 +
  1 file changed, 1 insertion(+)
 
 diff --git a/contrib/lisp/org-e-html.el b/contrib/lisp/org-e-html.el
 index 4e9d398..ee0f247 100644
 --- a/contrib/lisp/org-e-html.el
 +++ b/contrib/lisp/org-e-html.el
 @@ -1473,6 +1473,7 @@ original parsed data.  INFO is a plist holding export 
 options.
  h1 class=\title\%s/h1\n (org-export-data (plist-get info :title) 
 info))
 ;; table of contents
 (let ((depth (plist-get info :with-toc)))
 + (when (eq t depth) (setq depth 4))
   (when (wholenump depth) (org-e-html-toc depth info)))
 ;; document contents
 contents


In the t case, the depth should probably be set to org-export-headline-levels,
instead of 4.

Nick



Re: [O] org-e-html and table of contents

2012-08-23 Thread Nicolas Goaziou
Hello,

Nick Dokos nicholas.do...@hp.com writes:

 Eric Schulte eric.schu...@gmx.com wrote:

 I'd recommend the attached patch.
 
 Thanks,
 
 From 228c4bbdd2fc145b135de233632e8884d1d53cd7 Mon Sep 17 00:00:00 2001
 From: Eric Schulte eric.schu...@gmx.com
 Date: Thu, 23 Aug 2012 12:41:52 -0600
 Subject: [PATCH] Better use of default org-export-with-toc value
 
 * contrib/lisp/org-e-html.el (org-e-html-template): Default value of t
   for org-export-with-toc has no impact, so instead when t set TOC depth
   to 4.
 ---
  contrib/lisp/org-e-html.el | 1 +
  1 file changed, 1 insertion(+)
 
 diff --git a/contrib/lisp/org-e-html.el b/contrib/lisp/org-e-html.el
 index 4e9d398..ee0f247 100644
 --- a/contrib/lisp/org-e-html.el
 +++ b/contrib/lisp/org-e-html.el
 @@ -1473,6 +1473,7 @@ original parsed data.  INFO is a plist holding export 
 options.
  h1 class=\title\%s/h1\n (org-export-data (plist-get info :title) 
 info))
 ;; table of contents
 (let ((depth (plist-get info :with-toc)))
 + (when (eq t depth) (setq depth 4))
   (when (wholenump depth) (org-e-html-toc depth info)))
 ;; document contents
 contents


 In the t case, the depth should probably be set to org-export-headline-levels,
 instead of 4.

This should be fixed in master. Note that the #+TOC: support is still
incomplete.

Thanks for the report. Cc'ing Jambunathan for the heads up.


Regards,

-- 
Nicolas Goaziou



Re: [O] exporter / org-man

2012-08-23 Thread Luis Anaya
Achim Gratz strom...@nexgo.de writes:

 I just realised that there's a trainwreck in the making:
Choo choo! :)

 We have org-e-man and org-man in contrib.  Now when the exporter moves
 into core, org-e-man supposedly changes its name to org-man as
 well... not good.  Since org-man was there first, could org-e-man be
 renamed to something that will not collide?

I have no problems. We can rename org-e-groff.el to org-groff-mm.el and
consequently, org-groff-man.el ? If I get hold around the MOM macros, I
can then name them org-groff-mom.el 

??

Luis


-- 
Luis R. Anaya
papo anaya aroba hot mail punto com
Do not use 100 words if you can say it in 10 - Yamamoto Tsunetomo



[O] Export citation with Org-cite

2012-08-23 Thread Benoit Benoit

Good morning everyone,

I am a new org-mode user and I previously used LaTeX.
Unfortunatly, my boss want me to produce MS word file for draft version of 
articles.

So I am looking for a solution allowing me to produce articles both in LaTeX 
and in Word.
I think that the org mode and its LaTeX, Html and Odt exporter can be usefull.

I tryed to export files in Odt and Html using the org-cite.el .
It works quite fine but I obtained some non expected results such as : Lorem 
ipsum dolor sit amet, consectetur adipiscing elit. Sed non risus.(nil)
where (nil) should have been an author-date.

Can that be fixed easily ?

Kind regards

Ben
  

[O] Beamer export and notes

2012-08-23 Thread Fabrice Popineau
Hi,

Something is not working as expected with beamer export and notes in the
current release of org-mode.
Nodes tagged with B_note or B_noteNH are exported as \note{} only if they
are not at the same level
as frame nodes. See the small example attached. Any idea on how to fix this
because I assume
it is not intended this way, is it? Or am I misunderstanding something?

Best regards,

Fabrice


foo.org
Description: Binary data


foo.tex
Description: TeX document


[O] no visual-line-mode for tables

2012-08-23 Thread Frieder Wittmann
Hi,

I'm new here. First of all, I'd like to thank the whole team here for the 
terrific work!
I've been long looking for a tool like this for a long time. I was so desperate 
that I entertained the idea of writing my own lightweight markup language. But 
never would I have achieved anything close to what you guys have created!
Until a month ago, I didn't use emacs for more than quick tasks, like commit 
messages in the command line. Now I spend more time in emacs than any other 
program. Org-mode is an absolute KILLER APP! And yes, Im spreading the word. 
Several of my colleagues and friends have started using org-mode now and 
Carsten Dominik's book proofs to be a nice and nerdy present. 

Here is a question I have:
I like to use visual-line-mode when writing text in emacs. However for 
long org-mode tables, the automatic line wrap becomes very ugly, to the point 
where the table is almost unreadable. 
Is there a way to have visual-line-mode on, but deactivated for tables, so that 
you would have to scroll to the side to read the full table?

best
Frieder


Re: [O] [babel, ess] How can I make S-RET to be multi-session friendly?

2012-08-23 Thread Mikhail Titov
Another issue I've noticed is that if I save a buffer, that was
previously associated with R session, under different name in different
folder, then that association is not getting reset and/or overridden by
session property of Org buffer. Namely, I had dot R file that I saved in
different folder as dot org one while wrapping code in babel blocks and
adding session property. I did C-c C-c.

I believe there is somewhere a check whether a buffer is associated or
not but no check if it is associated with a proper buffer/session.

Eric Schulte writes on Fri Aug 17 2012 at 09:29 :


 The `org-src-in-org-buffer' macro may be used from an edit buffer to run
 elisp inside the code block, in the org-mode buffer of the edit buffer.
 e.g., the following 

 ;; -*- emacs-lisp -*-
 (org-src-in-org-buffer (message --%S (org-babel-get-src-block-info)))

 Where is org-src-in-org-buffer macro defined. Searching all dot el files
 in org folder does not show anything neither does C-h f show anything
 similar.

 (describe-function 'org-src-in-org-buffer) shows that
 org-src-in-org-buffer can be found in org-src.el (line 679 in my
 version).

I guess it did not propagate to bzr yet :( I've checked with rev
109760. For some reason I had problems building git version on Windows a
while ago and I didn't try since then.

-- 
Mikhail



[O] Babel/R issue: 'x' must be atomic

2012-08-23 Thread Karl Voit
Hi!

Generating two separate boxplots for a given set of data is no problem. But
when I combine them into one single diagram (with two boxplots), I get:

Error in sort.int(x, na.last = na.last, decreasing = decreasing, ...) : 
  'x' must be atomic
Calls: Anonymous ... boxplot.stats - Anonymous - sort - sort.default - 
sort.int
Execution halted


You can get the minimal example Org-mode on http://paste.grml.org/1036/

When I replace the line 
boxplot(list(folders, tags),
with 
boxplot(list(mfolders, mtags),
it works, though :-O

mfolders and mtags are lists in R and not imported via »:var«. Therefore I
guess this is an Org-mode/babel issue and not an R issue. What is my error?

Any help would be very cool!


PS: Org-mode version from git from yesterday

-- 
Karl Voit




Re: [O] Babel/R issue: 'x' must be atomic

2012-08-23 Thread John Hendy
On Thu, Aug 23, 2012 at 6:23 PM, Karl Voit devn...@karl-voit.at wrote:
 Hi!

 Generating two separate boxplots for a given set of data is no problem. But
 when I combine them into one single diagram (with two boxplots), I get:

 Error in sort.int(x, na.last = na.last, decreasing = decreasing, ...) :
   'x' must be atomic
 Calls: Anonymous ... boxplot.stats - Anonymous - sort - sort.default 
 - sort.int
 Execution halted


 You can get the minimal example Org-mode on http://paste.grml.org/1036/

 When I replace the line
 boxplot(list(folders, tags),
 with
 boxplot(list(mfolders, mtags),
 it works, though :-O

 mfolders and mtags are lists in R and not imported via »:var«. Therefore I
 guess this is an Org-mode/babel issue and not an R issue. What is my error?

 Any help would be very cool!

Org must convert tables to data.frames, which is a problem for boxplot():

,- ?boxplot -
| x: for specifying data from which the boxplots are to be
|   produced. Either a numeric vector, or a single list
|   containing such vectors.
`-

So, you need to pass a list of /vectors/, not a data.frame. Here's
what's going on:

#+begin_src R
 str(folders)
'data.frame':   10 obs. of  1 variable:
 $ V1: int  14 14 15 18 18 19 20 21 22 23
 str(mfolders)
 num [1:17] 4.3 3.72 5.1 4.03 5.7 ...
 str(tags)
'data.frame':   15 obs. of  1 variable:
 $ V1: int  1 3 3 3 3 3 4 4 4 4 ...
 str(mtags)
 num [1:15] 3.95 4.25 5.22 6.2 5.27 ...
#+end_src

So... folders is a data.frame with one numeric vector, V1. Same for
tags. For mfolder and mtags, you created a vector, not a data.frame.

Try this to pass the vectors from each data.frame:

#+begin_src R
boxplot(list(folders$V1, tags$V1),
names=c(one, two),
xlab=boxplot12,
ylab=numbers,
pars = list(boxwex = 0.3, staplewex = 0.5,
boxfill=lightblue))
#+end_src


That should work!
John



 PS: Org-mode version from git from yesterday

 --
 Karl Voit





[O] Create links to agenda commands

2012-08-23 Thread Nathan Neff
I just found out how to create links to execute custom agenda commands
and wanted to share it with the list for those that didn't know about
this feature.

Basically, I have a bunch of custom agenda commands that I *want* to
run periodically and it would be great to be able to create a link that I can
click on, instead of remembering to press a sequence of characters
(I'm just lazy that way).

For example:

* todo Check waiting tasks
  - Cilck Here to see Waiting Tasks

---
Here's how I did it:

First, here's an example of two custom views that I have defined for my agenda.

(setq org-agenda-custom-commands
  (quote (
(w Tasks waiting on something todo waiting
((org-use-tag-inheritance nil)))
(p Projects tags project)
)))

To run these views, I need to run org-agenda, then press w or p, but I want
to create a *Link* to run these commands that I can click on.

So in some .org file, I have these links:

* Links to these common agenda Views:project:

- [[elisp:(org-agenda nil w)][Show Waiting Tasks]]
- [[elisp:(org-agenda nil p)][Show Projects]]


That's it!  Just create the links like above, and then click on them
and Emacs will ask you if you want to run the elisp, and when you say
Yes, then the
appropriate custom agenda views will be shown.

Try it out with a heading like this in one of your org-agenda-files

* Project 1 :project:
** todo task 1
** todo task 2

I think it's a really cool feature and wanted to show it to others who
didn't know about it.

--Nate



[O] Bug with org-agenda-span org-agenda-start-day

2012-08-23 Thread Charles Philip Chan
Hello:

I am trying to setup a block in one of my Agenda views for coming up
events in the next 7 days. I have org-agenda-start-day set to
+1d. However, it is not working- the block keeps starting on Sunday of
the current week. If I set org-agenda-start-day to anything but 7, it
works.

I am using the current git version of org-mode (7.8.11).

Thanks.

Charles

-- 
Open Standards, Open Documents, and Open Source

  -- Scott Bradner (Open Sources, 1999 O'Reilly and Associates)


pgpfGWvZaUsqA.pgp
Description: PGP signature