[Orgmode] Error making new org-mode git pull

2009-01-22 Thread Alan E. Davis
I have attempted today to do a routine update by running git pull, then
making.  Make fails with the following message:

Loading /etc/emacs/site-start.d/65wl-beta.el (source)...

In toplevel form:
lisp/org-faces.el:399:1:Error: Wrong number of arguments: #[(face spec doc
rest args) \304\30D
F
 \244\207 [face spec doc args custom-declare-face quote] 4 1717761], 2
make: *** [lisp/org-faces.elc] Error 1
tei...@hardware:~/Emacs/org-mode.git$

Perhaps I have bodged things up?

Alan

-- 
Alan Davis

It is undesirable to believe a proposition when
there is no ground whatsoever for supposing it is true.
 -- Bertrand Russell
___
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] Re: [OT] basic emacs tips you will need someday (was: Footnotes and R output when exporting to HTML or Latex)

2009-01-22 Thread Graham Smith
Manish,

I will have a look at this. Thansk fro the pointer.

Graham

2009/1/22 Manish Sharma mailtomanish.sha...@gmail.com:
 Paul R paul.r...@gmail.com writes:

 Graham,

 Graham Thanks, but I would appreciate a bit more hand holding on this.
 Graham I don't actually know how to check org-footnote-re and
 Graham org-footnote-definition-re

 I think the best help I can do is to describe the first steps to find
 your way in the emacs jungle.

 [snip: nice helpful introduction to Emacs help (206 lines)]

 I hope this does not sounds too much like a stupid RTFM. This was
 a RTFM, indeed, but a nice one I hope  :)

 One of the best introductory materials to Emacs I have come across is a
 series of tutorials on IBM DeveloperWorks website at
 http://www.ibm.com/developerworks/views/aix/libraryview.jsp?search_by=emacs+editing+environment

 Hope someone finds it useful.
 --
 Manish

 Life is beautiful.*
 * Conditions apply.



 ___
 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



___
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-mode to iphone?

2009-01-22 Thread Carsten Dominik

Hi Christopher,

I am extremely interested in what you write here about using HTML
to look at the agenda, sending automatic emails for completed
tasks, and even the IMAP store idea.

So please get back to it when you find time and keep us
posted.  I could tweak the HTML exporter where necessary
to make a good mobile access idea for Org-mode stuff
a reality.

- Carsten

On Dec 22, 2008, at 11:10 PM, Christopher DeMarco wrote:


As a more-useful alternative to my ha-ha-only-serious email
response, look at the export-to-HTML functions.  I haven't gotten here
yet with org-mode, but I understand they're pretty powerful -- and
HTML is perfect for the iPhone.  A robust HTML interface to your
org-mode would be much more useful than a native iPhone app, IMHO, and
without the landmines of interfacing with iCal et.al.

My previous organization system (Python-based) had a simple CGI
interface to parse my sources into HTML with CSS for the iPhone; it
worked surprisingly well, including hyperlinks that sent me email
noting that I'd checked off an item -- I didn't trust myself to
actually change state from the iPhone, but sent a check off the item
manually reminder.

Once I've got my Emacs-native org-mode where I want it, I plan on
tackling the iPhone display and sharing my code with the list.  It
should be pretty easy to write a mod_python handler to pull org-mode
source from Git or Subversion and run that through the elisp
interpreter...

But seriously, you could totally expose your agenda view as an IMAP
store...


--
Christopher DeMarco dema...@maya.com
IT Director
MAYA Group
+1-412-708-9660



___
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




___
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 tables and R

2009-01-22 Thread Carsten Dominik


Hi everyone,

should we include Dan's code as a contributed package or
even merge it into org-plot?

- Carsten

On Dec 30, 2008, at 8:35 PM, Dan Davison wrote:


Hi all,

I've had a go at taking the org tables and R thing a bit further. I'm
using two different #+ lines in the org buffer: Lines starting with
#+TBLR: are in the standard org style (option:value) and can be used
to specify certain transformations of the table and standard plots of
the table data. In lines starting #+TBLR:: you can supply literal R
code, giving you full control over what you do with the table. M-x
org-table-R-apply makes happen whatever has been specified in those
lines. As long as the transformation results in something reasonably
one- or two-dimensional, then this is output to the org-buffer as an
org table (you can choose whether or not it replaces the original
table). You need to have R running in an inferior-ess-mode
buffer. Then, if you have this table,

| rowname | col1 | col2 |
|-+--+--|
| row 1   |1 |2 |
| row 2   |3 |4 |
| total   |  |  |
#+TBLR:: x[3,] - x[1,] + x[2,]
#+TBLR: rownames:1

org-table-R-apply turns it into

| rownames(x) | col1 | col2 |
|-+--+--|
| row 1   |1 |2 |
| row 2   |3 |4 |
| total   |4 |6 |

The action:something option specifies off-the-shelf actions, without
having to write any R code. E.g.

| col1 | col2 |
|--+--|
|1 |2 |
|3 |4 |
#+TBLR: action:transpose

produces

|  | V1 | V2 |
|--++|
| col1 |  1 |  3 |
| col2 |  2 |  4 |

and

#+TBLR: action:plot columns:((1)(2)) lines:t rownames:1

would plot column 2 against column 1.

You can mix user-code and off-the-shelf code: in this somewhat
solipsistic example user-supplied code is used to extract the day of
week, and then action:tabulate is used to build a 2-way table:

| author  | date|
|-+-|
| Carsten Dominik | Thu, 12 Jun 2008 12:51:54 +0200 |
| Carsten Dominik | Wed, 11 Jun 2008 08:57:39 +0200 |
| Adam Spiers | Wed, 11 Jun 2008 12:06:23 +0100 |
| Eddward DeVilla | Wed, 11 Jun 2008 12:15:11 -0500 |
| Eddward DeVilla | Wed, 11 Jun 2008 20:09:50 -0500 |
| Harri Kiiskinen | Wed, 04 Jun 2008 16:38:37 +0200 |
| Carsten Dominik | Thu, 12 Jun 2008 14:15:49 +0200 |
| Harri Kiiskinen | Thu, 12 Jun 2008 14:31:49 +0200 |
| Carsten Dominik | Thu, 12 Jun 2008 16:17:59 +0200 |
| Manoj Srivastava| Mon, 09 Jun 2008 01:52:03 -0500 |
| Daniel Clemente | Wed, 04 Jun 2008 16:35:01 +0200 |
| Carsten Dominik | Mon, 9 Jun 2008 09:56:09 +0200  |
| Carsten Dominik | Tue, 10 Jun 2008 10:05:24 +0200 |
| Adam Spiers | Tue, 10 Jun 2008 10:57:52 +0100 |
| Manuel Hermenegildo | Tue, 10 Jun 2008 13:50:44 +0200 |
| Christian Egli  | Tue, 24 Jun 2008 13:27:05 +0200 |
#+TBLR: columns:(1 2) action:tabulate
#+TBLR:: x[,2] - substr(x[,2], 1, 3)

results in

| | Mon | Thu | Tue | Wed |
|-+-+-+-+-|
| Adam Spiers |   0 |   0 |   1 |   1 |
| Carsten Dominik |   1 |   3 |   1 |   1 |
| Christian Egli  |   0 |   0 |   1 |   0 |
| Daniel Clemente |   0 |   0 |   0 |   1 |
| Eddward DeVilla |   0 |   0 |   0 |   2 |
| Harri Kiiskinen |   0 |   1 |   0 |   1 |
| Manoj Srivastava|   1 |   0 |   0 |   0 |
| Manuel Hermenegildo |   0 |   0 |   1 |   0 |
#+TBLR: action:barplot rownames:1 columns:(1 2 3 4) showcode:t

The #+TBLR: line below that produces a bar plot of the data.

There are more details below. The code is at

http://www.stats.ox.ac.uk/~davison/software/org-table-R/org-table-R.el

It would be great to get any feedback on this. My thought was that
something like this has the potential to provide a unified plotting
and table formula interface, which might be attractive to people who
know and/or like and/or want to learn R. There's lots more that could
be done with this, and there must be all sorts of bugs in it at this
stage. But if there's any interest in it then it could be
improved. Anyway, read on if you're interested in hearing more details
about the options and actions available.

Dan

Currently, the available actions are

- plot
  A simple plot of the x and y values. If no x-values are specified
  then the the y values are plotted against 1,2,...,length(y). If
  lines:t then the points are joined by lines.
- lines
  Equivalent to action:plot lines:t
- points
  Equivalent to action:plot lines:nil
- barplot
  Create a bar plot. A vertical bar is drawn for each row, with
  height given by the value in that row. If multiple columns are
  selected the bars for different columns are placed side-by-side.
- hist
  A histogram
- density
  A smoothed histogram
- image
  A plot of a table in which each cell is coloured according its  
numeric value.

- tabulate
  Create a table containing counts of the 

Re: [Orgmode] Error making new org-mode git pull

2009-01-22 Thread Carsten Dominik

Fixed, thanks.

- Carsten

On Jan 22, 2009, at 9:42 AM, Alan E. Davis wrote:

I have attempted today to do a routine update by running git pull,  
then making.  Make fails with the following message:


Loading /etc/emacs/site-start.d/65wl-beta.el (source)...

In toplevel form:
lisp/org-faces.el:399:1:Error: Wrong number of arguments: #[(face  
spec doc rest args) \304\30D

F
 \244\207 [face spec doc args custom-declare-face quote] 4  
1717761], 2

make: *** [lisp/org-faces.elc] Error 1
tei...@hardware:~/Emacs/org-mode.git$

Perhaps I have bodged things up?

Alan

--
Alan Davis

It is undesirable to believe a proposition when
there is no ground whatsoever for supposing it is true.
 -- Bertrand Russell

___
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




___
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] Re: Advice sought on managing decision alternatives.

2009-01-22 Thread Carsten Dominik

Hi Tom,

I went through your draft and I think this is interesting functionality
which would be really nice to have.

I also see that you have thought carefully on how to implement it
and minimize impact on the core code, which I appreciate.

I would be happy to to make/accept the following changes
to org.el:

In addition to SEQ_TODO and TYP_TODO, I could look for similar
words.  We could even do this in a general way, looking for

#+XYZFOOBAR_TODO:

and making this call a special function org-todo-setup-xyzfoobar, which
could then be defined in add-on packages.

As you want to re-use the internal functions Org uses
to change states, I would like to change this code as
little as possible, even going beyond what you already proposed:
My proposal would be:

Your add-on defines a setup function which is actually a *filter*  
function.

It gets passed the list of words resulting from parsing the
#+CHOOSE_TODO: line, or equivalently such a list found in
org-todo-keywords.

For example:

#+CHOOSE_TODO: REJECTED - NOT_CHOSEN 0 MAYBE LEANING_TOWARDS + CHOSEN

or

#+CHOOSE_TODO: REJECTED(r){-} NOT_CHOSEN(n){0} MAYBE(m)  
LEANING_TOWARDS(l){+} CHOSEN(c)


The format would be entirely up to you, as long as you do the following:

The filter function must return a list as it is *normally*
expected for TODO keywords, with flags for fast selection
and note taking, maybe a | entry to separate DONE entries
from the rest, but any other special stuff of your interface
removed, for example:

 (choseness REJECTED(r) NOT_CHOSEN(n) MAYBE(m)  
LEANING_TOWARDS(l) | CHOSEN(c))


Org will then process this return list appropriately, set up
keys for fast selection, arranges for notes and time stamps
to be recorded etc.

The interaction type does very little indeed inside Org, it
only decides if a cycling command should go to the next
step (sequence) or jump to the first DONE state (type).
I think we should treat any other interaction types like
sequence in this respect.

This would be all as far as Org is concerned.  No need to
change any code at all.

I will then add hooks wherever you need them, they will
be called whenever a TODO keyword changes and your code
can react to it.

One important precaution would be to make sure that one does
not end up in infinite loops, so maybe when the hook is called,
bind it dynamically to a nil value while you mess around with
with the status of the siblings.  Maybe do the same thing with
the variables that trigger time stamp and note recording.

What do you think?

- Carsten

P.S. What is you copyright status with the FSF?


On Jan 19, 2009, at 4:33 AM, Tom Breton (Tehom) wrote:


On my last two requests, Carsten had better ideas and my proposal
really benefitted from them.  So I'm asking for advice on the design.

** Rationale

When I make a decision, in org-mode, I write down the set of
reasonable alternatives that I see, each one as an item.  Then I make
notes about each one and then choose.

Often the process is messy.  I sometimes:

* add a new alternative later
* realize an alternative is fatally flawed and permanently reject it.
* choose one but come to regret it.  Then I need to unchoose it and
  then choose another.
* Realize that what I thought was an alternative is really a distinct
  yes/no choice.
* Add a related yes/no choice to the group - I could make a new
  subtree for each new related choice, but usually once I find one
  related choice, I soon find many, so that's a lot of restructuring
  for little benefit.

** The overall idea:

So I want a way of keeping track of alternatives and their state of
decision.  Where possible, I'd like this to automatically stay in a
sensible state.  Eg, if one alternative is chosen, no other is.

** A detailed example

*** Item markings

For example, each item could be marked from this set of markings:

* CHOSEN
  * Invariant :: The other items are marked NOT CHOSEN or lower
  * Reaction :: If another item becomes CHOSEN, this item becomes NOT
CHOSEN
  * Reaction :: If another item becomes LEANING TOWARDS, this item
becomes MAYBE.

* LEANING TOWARDS
  * Invariant :: The other items are marked MAYBE or lower.
  * Reaction :: If another item becomes LEANING TOWARDS, this item
becomes MAYBE.
* MAYBE
  * The default marking.  New items in the group get this marking
unless some item is marked CHOSEN, in which case new items get
NOT CHOSEN.
  * Reaction :: If another item becomes CHOSEN, MAYBE becomes NOT
CHOSEN.
* NOT CHOSEN
  * Reaction :: If it becomes the case that no item is CHOSEN, NOT
CHOSEN items become MAYBE.
  * If marks are to be changed by moving up and down this scale, an
item could become NOT CHOSEN in the course of becoming
REJECTED.  This requirement keeps me from adding an invariant
that if any item is NOT CHOSEN, exactly one item should be
CHOSEN.

* REJECTED
  * Remains marked REJECTED regardless what happens to 

[Orgmode] Publishing a HTML wiki

2009-01-22 Thread Jan Seeger
Greetings list,

Is there a guide anywhere how to use Org Mode to publish a wiki? A
howto on how to do something like worg, for example?

Regards,
Jan Seeger


___
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 tables and R

2009-01-22 Thread Graham Smith
Carsten

 should we include Dan's code as a contributed package or
 even merge it into org-plot?

I would like to see it included some how, as, for me, the more
integration between org-mode and R the better.

As to how it should be included, I must leave to other who more about
Org-mode, Emacs, ESS and R than I do.

Graham


___
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] Publishing a HTML wiki

2009-01-22 Thread Scot Becker
Jan,

Since a wiki is by nature an on-line editing experience, and org is by
nature an off-line editing experience, you might have to specify a
little more exactly what you mean.  (So far :-] there is no emacs
webapp).  You may have seen the discussions on this list in the past
few days about converting/exporting org texts to wiki *syntax*, and
there were even some links to rough scripts to do conversion to
particular wikis, as well as some discussion about extending org's
export capabilities to more easily export wikified text.  But this
requires a wiki already in place, and some mechanism --like cut and
paste--of passing org-exported text to it.

If you want a whole site, I think it's just a matter of using org's
publishing function.  I assume this is what Worg does.  Using
something like 'git' makes it possible to have org files which are
edited by the community (which is like a Wiki), but this is not
'publishing a wiki' exactly, since there is no editing possible
online.  Everyone has to get set up with your version management
software.

That said, I too have wondered exactly how the Worg is generated
(automatically, manually?) from uploaded org files, and just how the
styling (CSS I assume?) is done.

Scot


On Thu, Jan 22, 2009 at 12:25 PM, Jan Seeger jan.see...@thenybble.de wrote:
 Greetings list,

 Is there a guide anywhere how to use Org Mode to publish a wiki? A
 howto on how to do something like worg, for example?

 Regards,
 Jan Seeger


 ___
 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



___
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] Publishing a HTML wiki

2009-01-22 Thread Jan Seeger
At Thu, 22 Jan 2009 14:26:27 +,
Scot Becker wrote:
 
 Jan,
 
 Since a wiki is by nature an on-line editing experience, and org is by
 nature an off-line editing experience, you might have to specify a
 little more exactly what you mean.

Yeah, sorry for the short question. What I meant is:

How would I configure org mode to allow easy export of static HTML
suitable for a (fishbowled) wiki? Features I would like are easy links
inside the wiki, image support (preferably with copyig between source
and HTML tree) and folder structure support.

Regards,
Jan Seeger


___
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] Publishing a HTML wiki

2009-01-22 Thread Carsten Dominik


On Jan 22, 2009, at 3:26 PM, Scot Becker wrote:


Jan,

Since a wiki is by nature an on-line editing experience, and org is by
nature an off-line editing experience, you might have to specify a
little more exactly what you mean.  (So far :-] there is no emacs
webapp).  You may have seen the discussions on this list in the past
few days about converting/exporting org texts to wiki *syntax*, and
there were even some links to rough scripts to do conversion to
particular wikis, as well as some discussion about extending org's
export capabilities to more easily export wikified text.  But this
requires a wiki already in place, and some mechanism --like cut and
paste--of passing org-exported text to it.

If you want a whole site, I think it's just a matter of using org's
publishing function.  I assume this is what Worg does.  Using
something like 'git' makes it possible to have org files which are
edited by the community (which is like a Wiki), but this is not
'publishing a wiki' exactly, since there is no editing possible
online.  Everyone has to get set up with your version management
software.

That said, I too have wondered exactly how the Worg is generated
(automatically, manually?) from uploaded org files, and just how the
styling (CSS I assume?) is done.


Bastien set this up.  Here is how it works:

On the web server, we have a git directory that contains
clones of the public repositories of Worg and Org.

We have a .emacs file which defines publishing projects, and a little
helper function to call the publishing command:


(require 'org-publish)

(setq org-publish-project-alist
  '((worg :components (worg-pages worg-code worg-images))
(worg-pages
 :base-directory ~/git/Worg/
 :base-extension org
 :html-extension php
 :publishing-directory /home/cdominik/orgmode.org/worg/
 :publishing-function org-publish-org-to-html
 :section-numbers nil
 :table-of-contents nil
 :style link rel=\stylesheet\ href=\/worg/worg.css\  
type=\text/css\ /

 :recursive t
 :auto-preamble t
 :auto-postamble nil)
(worg-code
 :base-directory ~/git/Worg/code/
 :base-extension html\\|css\\|png\\|js\\|bz2
 :html-extension html
 :publishing-directory /home/cdominik/orgmode.org/worg/code/
 :recursive t
 :publishing-function org-publish-attachment)
(worg-images
 :base-directory ~/git/Worg/images/
 :base-extension png\\|jpg\\|gif
 :html-extension html
 :publishing-directory /home/cdominik/orgmode.org/worg/ 
images/

 :recursive t
 :publishing-function org-publish-attachment)
(orgweb
 :base-directory ~/git/org-mode/ORGWEBPAGE/
 :base-extension org
 :html-extension html
 :publishing-directory /home/cdominik/orgmode.org/
 :publishing-function org-publish-org-to-html
 :section-numbers nil
 :table-of-contents t
 :style link rel=\stylesheet\ href=\/org.css\ type= 
\text/css\ /

 :auto-preamble t
 :exclude DS_Store
 :recursive t
 :auto-postamble nil)))

(defun worg-org-publish nil
  Publish Worg and Org.
  (interactive)
  ;; (org-publish-initialize-files-alist t)
  (org-publish-all))



Then we have two little shell scripts:

The first one pulls the git repositories for Org and Worg from the git  
server:



#!/bin/bash

export PATH=$PATH:/home/cdominik/bin/

cd /home/cdominik/git/Worg/
/home/cdominik/bin/git-pull

cd /home/cdominik/git/org-mode/
/home/cdominik/bin/git-pull


The second calls emacs and tells it to publish all projects:

#!/bin/bash

/home/cdominik/bin/emacs23 --batch -l ~/.batch-color.el --eval (load- 
file \/home/cdominik/.emacs.el\) -f worg-org-publish



Finally there are crontab entries that trigger these
shell scripts the full and half hour, respectively.

0 * * * * /home/cdominik/bin/pull-worg-org.sh  /dev/null 21
30 * * * * /home/cdominik/bin/publish-worg-org.sh  /dev/null 21

So it can take at most 90 minutes for changes to arrive at the website.

I myself am impatient, with ssh access to the web server,
I can simply do

make updateweb

in my Org directory.  This will do something like

ssh cdomi...@caprisun.dreamhost.com 'pull-worg-org.sh  publish-worg- 
org.sh'


i.e. it will pull and publish new stuff right away


Great system, works well, kudos to Bastien!!

- Carsten





Scot


On Thu, Jan 22, 2009 at 12:25 PM, Jan Seeger  
jan.see...@thenybble.de wrote:

Greetings list,

Is there a guide anywhere how to use Org Mode to publish a wiki? A
howto on how to do something like worg, for example?

Regards,
Jan Seeger


___
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




___
Emacs-orgmode mailing list

Re: [Orgmode] Publishing a HTML wiki

2009-01-22 Thread Matthew Lundin

Hi Jan,

Jan Seeger jan.see...@thenybble.de writes:

 At Thu, 22 Jan 2009 14:26:27 +,

 Yeah, sorry for the short question. What I meant is:

 How would I configure org mode to allow easy export of static HTML
 suitable for a (fishbowled) wiki? Features I would like are easy links
 inside the wiki, image support (preferably with copyig between source
 and HTML tree) and folder structure support.

If I understand your question correctly, you are interested in how to
export a set of org files as an html website with links between the
files intact and the org folder structure mirrored on the website.

That is precisely what org-publish can do. There's a really nice
tutorial on Worg on how to publish a static website with org.

http://orgmode.org/worg/org-tutorials/org-publish-html-tutorial.php

I'm glad for this thread because I was really interested in the
scripts that automate Worg.

Thanks for that info Carsten!

Best,
Matt


___
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] Re: org-mode to iphone?

2009-01-22 Thread Wes Hardaker
 On Thu, 22 Jan 2009 09:06:38 +0100, Carsten Dominik 
 domi...@science.uva.nl said:

CD So please get back to it when you find time and keep us
CD posted.  I could tweak the HTML exporter where necessary
CD to make a good mobile access idea for Org-mode stuff
CD a reality.

I've been meaning to write this up for a while, and I think this sort of
idea is exactly what could benefit from it...

I think there should be a generic exporter that contains simple
customization rules for how to do an export.  Something like:

 (setq org-export-templates
   '((mediawiki
  :heading1-prefix = 
  :heading1-suffix  =
  :heading2-prefix == 
  :heading2-suffix  ==

  :bold-prefix '''
  :bold-suffix '''

  :link-format [%{url} %{link-text}]

  :numbered-list-prefix #
  :numbered-list-suffix \n
)))

I'm making stuff up on the fly above, but I think you get the idea.
Most of the exporting formats that are needed could really be simplified
down to something minimal like the above.  It'd be much easier than
continually rewriting much of the export process when a lot of it is the
same across multiple back-ends.

I'm not sure it could be applied everywhere.  Certainly there are some
very tricky elements to deal with (and the default, if not defined,
should be to fall back to a straight text conversion).  IE, I'm not sure
the latex backend could be easily rewritten using something like the
above (but hey, you never know).

There are a number of things I'd like to export to something unusual,
and the above would allow that flexibility.  Unfortunately, I don't have
much time, and more importantly don't have the org skill at all to make
it happen.

Thoughts?

-- 
In the bathtub of history the truth is harder to hold than the soap,
 and much more difficult to find.  -- Terry Pratchett


___
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] graphing from org-tables

2009-01-22 Thread Dan Davison
On Mon, Dec 22, 2008 at 12:00:14PM -0500, Eric Schulte wrote:
 Hi Dan,
 

...
 
 2) Also interesting is the idea of referencing a table from a block of R
code elsewhere in the org file.  I've worked some on processing
blocks of R code in org files in a manner similar to Sweave.
http://github.com/eschulte/org-contrib/tree/master/org-exp-blocks.el
If we could implement a simple means of referencing tables (either
whole tables, or cells/cols/rows of tables) from these R-code blocks
then that seems like it may be fairly powerful.

I agree with this. So in the case of my code, I think we would like to
be able to do something like

#+TBLR: data:org-table-reference columns:(1 2) action:tabulate

This would make the output of the analysis/plot of the table pointed
to by org-table-reference appear at the location in the file of the
#+TBLR line. Perhaps one design aim would be to have the same
mechanism work for referencing tables for processing by #TBLFM,
org-plot, org-table-R, org-exp-blocks, etc. What ideas to people have
about implementation (and syntax) for this sort of table referencing?

Dan


 
 Thanks -- Eric
 
 Dan Davison davi...@stats.ox.ac.uk writes:
 
  On Mon, Jul 28, 2008 at 04:41:52PM +0100, Dan Davison wrote:
  On Mon, Jul 28, 2008 at 08:32:22AM -0700, Eric Schulte wrote:
   Hi Dan,
   
   One way around the sleep(60) hack may be to create the R graph using
   an inferior R process.  See
  
  Yep, I just this minute asked for help on the Emacs Speaks Statistics
  (ESS) mailing list! I'll report back if I make progress with that.
  
  https://stat.ethz.ch/pipermail/ess-help/2008-July/004785.html
 
  I think it's worth keeping this avenue alive, despite so much progress
  having been made with gnuplot in the interim. So below is an initial
  version of org-table-eval-R, which takes an arbitrary R function, and
  applies it to an org table. As suggested above, this uses
  inferior-ess-mode and therefore requires ess (emacs speaks statistics)
  and R to be installed.
 
  At it's simplest, R-function can be the name of a standard R
  function. So with Eric's first example data set on Worg
  (http://legito.net/worg/org-tutorials/org-plot.php) i.e. with 2
  dependent variables
 
  (org-table-eval-R summary) produces (in a new buffer)
 
   first.dependent.var second.dependent.var
   Min.   :0.1560  Min.   :0.1808  
   1st Qu.:0.1773  1st Qu.:0.1985  
   Median :0.1900  Median :0.2146  
   Mean   :0.2110  Mean   :0.2262  
   3rd Qu.:0.2333  3rd Qu.:0.2375  
   Max.   :0.4250  Max.   :0.3750  
 
  and (org-table-eval-R matplot) produces a rough version of Eric's
  gnuplot figure. (see below for a closer reproduction of the figure,
  with the legend etc).
 
  It would be simple to provide org-plot/R which would construct a
  suitable plotting function and pass it to org-table-eval-R, and some
  ready-made R code could be provided for standard plots -- histograms 
  barplots, scatter plots, etc. I've given an initial version of
  org-plot/R below, which gives the option to produce eps output rather
  than a pop-up window (and it would be easy to use any of the R
  graphics devices for output: jpeg, png, ps, pdf, tiff, X11, quartz,
  etc)
 
  But the power of this approach is that it provides not just plotting
  functionality, but the ability to do arbitrary calculations and
  statistical analyses of the org table, via the base R packages and the
  hundreds of user-written packages.
 
  It would have been better to have developed these ideas along with the
  development of org-plot, but unfortunately I let that slip. But
  org-table-eval-R provides a lot of power for anyone that's prepared to
  write some R code. And if there's interest, then some more
  user-friendly functionality could be provided for org users that want
  something easier, but can install ess and R.
 
  Dan
 
  and here's a rough version of the O R G grid plot
 
  (org-table-eval-R (function (x) image(t(as.matrix(x t)
 
  Of course, these can be beautified to your heart's content with lots
  of extra arguments to the R plotting functions. This comes a bit
  closer to the two dependent-variables graph:
 
  (org-table-eval-R (function(x) { matplot(x, type=\l\, ylab=\\) ; 
  legend(\topright\, legend=c(\dep var 1\\,\dep var 2\), col=1:2, 
  lty=1:2) }))
 
 
 
  --
  (defun org-table-eval-R (R-function optional rownames-absent)
Apply an arbitrary R function to the org table at
  point. R-FUNCTION is an R function (a string) taking one
  argument, which is the R data frame representation of the org
  table. It may be the name of an appropriate R
  function (e.g. \summary\, \plot\), or a user-defined
  anonymous function of the form \(function(data.frame)
  {...})\. Unless ROWNAMES-ABSENT is non-nil the row names of the
  data frame are taken from the first column of the org table
(interactive)

Re: [Orgmode] org-mode to iphone?

2009-01-22 Thread David Thole
I've been tempted to create a frontend web site devoted toward very simple
operations in regard to using org-mode - something say in Django or
something, and using sync scripts to the org files.The idea I was thinking
is just a simple CRUD operation with that file (either that or use a sql
database such as sqllite and use a cron job that syncs these together).  I
wouldn't mind still completing that if people are interested in such a
tool.  Since I have just an ipod touch, I've been reluctant to build it
since I don't have access 100% of the time to the app.

-David

On Thu, Jan 22, 2009 at 2:06 AM, Carsten Dominik domi...@science.uva.nlwrote:

 Hi Christopher,

 I am extremely interested in what you write here about using HTML
 to look at the agenda, sending automatic emails for completed
 tasks, and even the IMAP store idea.

 So please get back to it when you find time and keep us
 posted.  I could tweak the HTML exporter where necessary
 to make a good mobile access idea for Org-mode stuff
 a reality.

 - Carsten

 On Dec 22, 2008, at 11:10 PM, Christopher DeMarco wrote:

  As a more-useful alternative to my ha-ha-only-serious email
 response, look at the export-to-HTML functions.  I haven't gotten here
 yet with org-mode, but I understand they're pretty powerful -- and
 HTML is perfect for the iPhone.  A robust HTML interface to your
 org-mode would be much more useful than a native iPhone app, IMHO, and
 without the landmines of interfacing with iCal et.al.

 My previous organization system (Python-based) had a simple CGI
 interface to parse my sources into HTML with CSS for the iPhone; it
 worked surprisingly well, including hyperlinks that sent me email
 noting that I'd checked off an item -- I didn't trust myself to
 actually change state from the iPhone, but sent a check off the item
 manually reminder.

 Once I've got my Emacs-native org-mode where I want it, I plan on
 tackling the iPhone display and sharing my code with the list.  It
 should be pretty easy to write a mod_python handler to pull org-mode
 source from Git or Subversion and run that through the elisp
 interpreter...

 But seriously, you could totally expose your agenda view as an IMAP
 store...


 --
 Christopher DeMarco dema...@maya.com
 IT Director
 MAYA Group
 +1-412-708-9660



 ___
 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




 ___
 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

___
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] bugs in C-*

2009-01-22 Thread Scott Otterson

Thanks, Carsten.

Not only is this a bug fix, it's a nice improvement that increases  
consistency with other org operations.  I think it's fine touches like  
this that make org mode so intuitive.


Scott

On Jan 21, 2009, at 9:43 AM, Carsten Dominik wrote:


Hi,

following this thread,  I have revisited the commands
`C-c -' and `C-c *' and hope that they are now better
behaved and more useful:

...



___
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] Re: Advice sought on managing decision alternatives.

2009-01-22 Thread Tom Breton (Tehom)
 P.S. What is you copyright status with the FSF?

I believe I'm already good to go.  A few years back when I contributed
some code to emacs' lread.c, RMS had me sign and send the letter that
legally enabled FSF to include it.  IIUC, that step only has to be
done once for any code contributor.


 Your add-on defines a setup function which is actually a *filter*
 function.

OK, sounds good.  And makes it a bit easier to test.

 The interaction type does very little indeed inside Org, it
 only decides if a cycling command should go to the next
 step (sequence) or jump to the first DONE state (type).
 I think we should treat any other interaction types like
 sequence in this respect.

Here it would also distinguish chosenness from the other
interpretations, but that would be entirely inside org-decisions.el.

 I will then add hooks wherever you need them, they will
 be called whenever a TODO keyword changes and your code
 can react to it.

OK.

 One important precaution would be to make sure that one does
 not end up in infinite loops, so maybe when the hook is called,
 bind it dynamically to a nil value while you mess around with
 with the status of the siblings.  Maybe do the same thing with
 the variables that trigger time stamp and note recording.

Right.  I had already planned to let the hooks to nil; I will do the
same for the time stamp and note recording variables.

Thanks for the advice.  I will code it up and send it.

Tom Breton (Tehom)




___
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-mode to iphone?

2009-01-22 Thread Scot Becker
The idea of a generic exporter sounds very cool. Especially if it
could still make use of the very refined set of options org mode has
to include and prune subtrees, to include or exclude keywords,
timestamps, and tags.  I wonder if it could be made also to work with
something like the Pandoc extensions to Markdown
[http://johnmacfarlane.net/pandoc/], which would then allow further
export into the range of formats Pandoc supports (markdown,
reStructuredText, HTML, ConTeXt, RTF, DocBook XML, OpenDocument XML,
ODT, GNU Texinfo, MediaWiki markup, groff man pages, and S5 HTML slide
shows).  Of course, such flexibility probably doesn't come without
it's struggles, but the ability to throw an org document in and get
and ODF would have significant benefit.

I'll have to think about how far a generic substitution-based exporter
could get at such a conversion

Scot




On Thu, Jan 22, 2009 at 4:57 PM, David Thole dth...@gmail.com wrote:
 I've been tempted to create a frontend web site devoted toward very simple
 operations in regard to using org-mode - something say in Django or
 something, and using sync scripts to the org files.The idea I was thinking
 is just a simple CRUD operation with that file (either that or use a sql
 database such as sqllite and use a cron job that syncs these together).  I
 wouldn't mind still completing that if people are interested in such a
 tool.  Since I have just an ipod touch, I've been reluctant to build it
 since I don't have access 100% of the time to the app.

 -David

 On Thu, Jan 22, 2009 at 2:06 AM, Carsten Dominik domi...@science.uva.nl
 wrote:

 Hi Christopher,

 I am extremely interested in what you write here about using HTML
 to look at the agenda, sending automatic emails for completed
 tasks, and even the IMAP store idea.

 So please get back to it when you find time and keep us
 posted.  I could tweak the HTML exporter where necessary
 to make a good mobile access idea for Org-mode stuff
 a reality.

 - Carsten

 On Dec 22, 2008, at 11:10 PM, Christopher DeMarco wrote:

 As a more-useful alternative to my ha-ha-only-serious email
 response, look at the export-to-HTML functions.  I haven't gotten here
 yet with org-mode, but I understand they're pretty powerful -- and
 HTML is perfect for the iPhone.  A robust HTML interface to your
 org-mode would be much more useful than a native iPhone app, IMHO, and
 without the landmines of interfacing with iCal et.al.

 My previous organization system (Python-based) had a simple CGI
 interface to parse my sources into HTML with CSS for the iPhone; it
 worked surprisingly well, including hyperlinks that sent me email
 noting that I'd checked off an item -- I didn't trust myself to
 actually change state from the iPhone, but sent a check off the item
 manually reminder.

 Once I've got my Emacs-native org-mode where I want it, I plan on
 tackling the iPhone display and sharing my code with the list.  It
 should be pretty easy to write a mod_python handler to pull org-mode
 source from Git or Subversion and run that through the elisp
 interpreter...

 But seriously, you could totally expose your agenda view as an IMAP
 store...


 --
 Christopher DeMarco dema...@maya.com
 IT Director
 MAYA Group
 +1-412-708-9660



 ___
 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



 ___
 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


 ___
 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




___
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] Problem with org-batch-agenda

2009-01-22 Thread Mark Elston

I am trying to export information from my org files and am
getting an error every time I run the batch file (Windows XP)

I am starting with a stripped down .emacs file which just sets up
my load path then does the following:

;
;;  ORG MODE
(require 'org-install)

(add-to-list 'auto-mode-alist '(\\.org$ . org-mode))

(setq org-log-done 'time)
(setq org-agenda-include-diary t)
(setq org-directory ~/org/)
(setq org-agenda-custom-commands
  '((S Schedule for the week plus TODO's
 ((agenda )
  (todo TODO)

My batch file looks like this:

c:\emacs-22.3\bin\emacs.exe -batch -l ~/_emacs_org -eval 
'(org-batch-agenda S)'


When I run this from the command line I get:

Loading c:/Home/emacs-22/precompile.el (source)...
Loading c:/Home/emacs-22/all_org.el (source)...
Loading c:/Home/emacs-22/melston-note-paths.el (source)...
Done loading ~/emacs/all_org
Loading c:/Home/emacs-22/custom.el (source)...
Loading gnus...
Done loading init file
End of file during parsing

I saw this mentioned in the list at gmane but never saw
any resolution for it.  Any ideas?

Mark


___
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] graphing from org-tables

2009-01-22 Thread Eric Schulte
Dan Davison davi...@stats.ox.ac.uk writes:

 On Mon, Dec 22, 2008 at 12:00:14PM -0500, Eric Schulte wrote:
 Hi Dan,
 

 ...
  
 2) Also interesting is the idea of referencing a table from a block of R
code elsewhere in the org file.  I've worked some on processing
blocks of R code in org files in a manner similar to Sweave.
http://github.com/eschulte/org-contrib/tree/master/org-exp-blocks.el
If we could implement a simple means of referencing tables (either
whole tables, or cells/cols/rows of tables) from these R-code blocks
then that seems like it may be fairly powerful.

 I agree with this. So in the case of my code, I think we would like to
 be able to do something like

 #+TBLR: data:org-table-reference columns:(1 2) action:tabulate

 This would make the output of the analysis/plot of the table pointed
 to by org-table-reference appear at the location in the file of the
 #+TBLR line. Perhaps one design aim would be to have the same
 mechanism work for referencing tables for processing by #TBLFM,
 org-plot, org-table-R, org-exp-blocks, etc.

That sounds like a very good idea.  A uniform interface for referencing
table ranges (either globally from outside of the table or locally from
within the table) that could be used for any table formula be it in
calc, R, elisp, etc...  I find the idea of easily accessing and writing
table data from external tools very intriguing

 What ideas to people have about implementation (and syntax) for this
 sort of table referencing?

As for syntax, I believe the syntax currently in use by TBLFM should be
sufficient for addressing ranges inside of a table.  The only need is
the ability to reference a table globally.

Maybe it would make sense to allow the naming of a table, say something
like a line of the following format either above or below the table.

#+TBLNAME: my-table-name

Then portions of the table could be references from inside the same file
using a syntax like

 my-table-name:$...@2

or from outside of the file using a syntax like

 path/to/file.org:my-table-name:$...@2

or something similar.

I don't know how difficult this would be to implement.  I also don't
know how similar the existing calc table interface is to this new R
table interface.  So basically it's not clear to me how difficult this
would be to implement.  When I have briefly looked into the mechanics of
the current org spreadsheet functionality, I remember being intimidated.

Although I don't really use R, I find this discussion very interesting.
The spreadsheet functions are one of my favorite features of org.

Thanks -- Eric


___
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] graphing from org-tables

2009-01-22 Thread Carsten Dominik


On Jan 23, 2009, at 2:37 AM, Eric Schulte wrote:


Dan Davison davi...@stats.ox.ac.uk writes:


On Mon, Dec 22, 2008 at 12:00:14PM -0500, Eric Schulte wrote:

Hi Dan,



...

2) Also interesting is the idea of referencing a table from a  
block of R

  code elsewhere in the org file.  I've worked some on processing
  blocks of R code in org files in a manner similar to Sweave.
  http://github.com/eschulte/org-contrib/tree/master/org-exp-blocks.el
  If we could implement a simple means of referencing tables (either
  whole tables, or cells/cols/rows of tables) from these R-code  
blocks

  then that seems like it may be fairly powerful.


I agree with this. So in the case of my code, I think we would like  
to

be able to do something like

#+TBLR: data:org-table-reference columns:(1 2) action:tabulate

This would make the output of the analysis/plot of the table pointed
to by org-table-reference appear at the location in the file of the
#+TBLR line. Perhaps one design aim would be to have the same
mechanism work for referencing tables for processing by #TBLFM,
org-plot, org-table-R, org-exp-blocks, etc.


That sounds like a very good idea.  A uniform interface for  
referencing
table ranges (either globally from outside of the table or locally  
from

within the table) that could be used for any table formula be it in
calc, R, elisp, etc...  I find the idea of easily accessing and  
writing

table data from external tools very intriguing


For what it is worth,  here is a function that will grab a field value
or a range from a remote table, be it in the current file or in a
different file.  That is not yet a syntax to have such a reference
in a formula, but it is the most important component, and maybe it will
already be useful for you.

This function uses an entry ID to access the table - obviously
other schemes like table naming could be used.

It is not going to be very fast, and multiple accesses
to the same remote table would each cause the same overhead,
but it sure is working.

- Carsten

(defun org-table-remote-range (id form
  optional replace keep-empty numbers lispp)
  Get a field value or a list of values in a range from table at ID.

ID refers to an entry, and the first table in that entry is the one
being looked at.
FORM is a field or range descriptor like \@2$3\ or \@i$...@ii$2\.
All the references must be absolute, not relative.
When REPLACE is non-nil, the return value will be a string in which  
the field
descriptor has been replaced, according to the flags KEEP-EMPTY,  
NUMBERS, and
LISPP.  These flags correspond to the E and N flags, and to the fact  
if the

formula is a lisp formula, not a calc formula.

When REPLACE is nil, a single string or a list of strings is returned,
with with the content(s) of the referenced field(s).
  (save-match-data
(let ((id-loc (org-id-find id 'marker))
  org-table-column-names org-table-column-name-regexp
  org-table-local-parameters org-table-named-field-locations
  org-table-current-line-types org-table-current-begin-line
  org-table-current-begin-pos org-table-dlines
  org-table-hlines org-table-last-alignment
  org-table-last-column-widths org-table-last-alignment
  org-table-last-column-widths tbeg rtn)
  (save-excursion
(switch-to-buffer (marker-buffer id-loc))
(save-excursion
  (save-restriction
(widen)
(goto-char id-loc)
(forward-char 1)
(unless (and (re-search-forward ^\\(\\*+ \\)\\|[ \t]*| nil t)
 (not (match-beginning 1)))
  (error Cannot find a table at ID %s id))
(setq tbeg (point-at-bol))
(org-table-get-specials)
(when (and (string-match org-table-range-regexp form)
   ( (length (match-string 0 form)) 1))
  (save-match-data
(setq rtn (org-table-get-range
   (match-string 0 form) tbeg 1
(if replace
(replace-match
 (save-match-data
   (org-table-make-reference rtn keep-empty numbers lispp))
 t t form)
  rtn)))




___
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