[Orgmode] OT: smex.el (was Re: keys and command name info)

2010-08-10 Thread Austin Frank
On Mon, Aug 09 2010, Carsten Dominik wrote:

 I don't think anyone calls Org commands with M-x, and if a hacker
 needs to find a command name, `C-h b' and in particular `C-h k' are
 the perfect ways to get to the names.

I don't have a horse in this race, but I will note that I call Org
commands with M-x /all the time/.  There's just so much functionality
that even when keybindings exist I may not know them.  And of course I
don't use the menu because that would require reaching for the mouse ;)

For anyone else in this situation, I can't recommend strongly enough the
package smex.el (I get it from http://github.com/nonsequitur/smex/, but
it's also in the Emacs Lisp Package Archive).  It offers ido-like
completion for function names.  For me, this makes the entire emacs
environment, but Org especially, much more discoverable via the M-x
interface.

HTH,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


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


[Orgmode] [babel] help debugging latex export

2010-08-06 Thread Austin Frank
Hi all!

I've got a very mysterious mystery bug that keeps biting me, and I don't
know how to hunt it down.  Even worse, I haven't been able to replicate
it in a small example file... it only happens in this one particular
document, but it happens consistently in that document.

I start with the following source block:

#v+
#+CAPTION:  Regression coefficients from standardized model of training trials
#+LABEL:  fig:reg-coef-train
#+ATTR_LATEX:  width=5in, height=3in
#+BEGIN_SRC R :exports results :file fig-reg-coef-train.png
names - rownames(summary(fit.a.lm.z)$coef)
coefs - summary(fit.a.lm.z)$coef[, 1]
sds - summary(fit.a.lm.z)$coef[, 2]
CI - sds * 1.96
a.coefs - data.frame(label = names, estimate = coefs, sd = sds, lower = coefs 
- CI, upper = coefs + CI)
a.coefs.gg -
ggplot(a.coefs,
   aes(x = label, y = estimate,
   ymin = lower, ymax = upper)) +
geom_pointrange() +
geom_hline(yintercept = 0) +
coord_flip()
a.coefs.gg
#+END_SRC

#+results[9d390c2ddaa0e5cc63614611542c9cfdf0f21d41]:
[[file:fig-reg-coef-train.png]]
#v-

When I run org-export-as-latex on the entire document, this block gets
incorrectly exported as:

#v+
[[file:fig-reg-coef-train.png][file:fig-reg-coef-train.png]]
#v-

Whereas if I select just that block and run org-export-region-as-latex,
it gets correctly exported as:

#v+
\begin{figure}[htb]
\centering
\includegraphics[width=5in, height=3in]{fig-reg-coef-train.png}
\caption{\label{fig:reg-coef-train}Regression coefficients from standardized 
model of training trials}
\end{figure}
#v-

This happens to some graphic-producing source blocks in the file and not
others.  I haven't been able to figure out what the common element is
that causes some to export correctly under all circumstances, and others
to have a link description added and be exported as plain text.

Does anyone have any advice on how to begin to identify where and why
this is happening?

Thanks,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


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


[Orgmode] Re: include value of single table cell in text?

2010-07-28 Thread Austin Frank
On Tue, Jul 27 2010, Eric Schulte wrote:

 The following should work.  It uses an inline code block

 #+TBLNAME:  test-table
 | key | value |
 |-+---|
 | a   | 1 |
 | b   | 2 |

 Is there any way to refer to cell @2$2 within the text of an org-mode
 document, and have that reference converted to the value
 src_emacs-lisp[:var d=test-table[3,1]]{d} during export?

Eric--

This is great!  Thanks very much.  If you're accepting feature requests,
I'd still love to have a way to use org-table reference syntax to embed
cell values inline.  I don't know whether this is better thought of as a
core or babel feature, though.

Looking at the source of org-table-fix-formulas and
org-table-eval-formula in org-table.el, there may be some room for
refactoring the reference resolution procedure into a standalone
function.  I'm in the middle of wrapping up my thesis and moving, so I
definitely won't look at this any time soon.  If this itch still needs
scratching in September I may revisit it then.  If a talented soul
addresses it before then, even better!

Thanks again,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


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


[Orgmode] Re: insert .org file into other .org file by link

2010-07-28 Thread Austin Frank
On Wed, Jul 28 2010, Rainer M Krug wrote:

 I have a .org file (lets call it basic.org), which creates me a report
 from a simulation (of a variable x, saved from R) - it works fine for
 export to html and pdf.

 Now I want to create a report (all.org), which should include the report
 from basic.org 10 times, but basic.report should be created from
 different simulations (X1, X2, X3, ..., X10).

 How can I acieve this, without having to copy - paste the .org file in
 10 times? I would like to have a kind of dynamic lining, so that I can

 a) specify the name of the variable to be analysed
 b) the all.org is using basic.org to create the all report, so that
 when I change basic.org, the report based on all.org is also changed.

To start, you probably want to use the #+SETUPFILE and #+INCLUDE
directives [fn:1] [fn:2].  An untested Babel-based dynamic solution
might look something like

--8---cut here---start-8---
#+BEGIN_SRC perl :results value org :var $n=10 $file=basic.org
# I've never actually used per with babel,
# so don't know how the :var headers work exactly
for (my $i = 0; $i  $n; $i++) {
  print #+INCLUDE:  $file\n;
}
#+END_SRC
--8---cut here---end---8---

Hope that helps!  Let me know what you come up with.

/au

Footnotes:

[fn:1] [[info:org:Export%20options][Export options]]

[fn:2] [[info:org:Include%20files][Include files]]

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


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


[Orgmode] Re: [babel] help debugging org-babel-execute-buffer

2010-07-27 Thread Austin Frank
On Tue, Jul 27 2010, Nick Dokos wrote:

 Have you tried C-c C-c on each source block in the buffer? If one (or
 more) fails, you know what to do.

I went back and named all of my source blocks so that I would get some
debugging information from the *Messages* buffer.  The error is thrown
when org-babel-execute-buffer has executed the last block in the file.
The error is not thrown when I evaluate any single block individually.

I'll try more of your suggestions later.

Thanks,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


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


[Orgmode] include value of single table cell in text?

2010-07-27 Thread Austin Frank
Hello!

Is it possible to include the value of a single cell from an org-mode
table in the body of an org-mode document? That is, given

#+TBLNAME:  test-table
| key | value |
|-+---|
| a   | 1 |
| b   | 2 |

Is there any way to refer to cell @2$2 within the text of an org-mode
document, and have that reference converted to the value 2 during
export?

I believe one approach would be to use babel's in-line source evaluation
capabilities along with the remote() function from the org spreadsheet
editor.  But I haven't yet been able to identify the right combination
of those functions to get the desired result.  This, for example,
doesn't work for me:

--8---cut here---start-8---
#+TBLNAME:  test-table
| key | value |
|-+---|
| a   | 1 |
| b   | 2 |

I'm testing to see whether
src_emacs-lisp{(org-table-eval-formula remote(test-table @2$2))}
works.
--8---cut here---end---8---

It throws an error during export, because I'm not in a table data field.


Additionally, if there's not already a built-in way to do this, I'd
nominate this functionality for some special syntax.  Following babel's
inlining and remote reference conventions, maybe

  table{test-table @2$2}

or

  test-table:@2$2

This would make it very easy to refer to specific elements the tabular
output of babel blocks, adding to the utility of babel as a
meta-programming language for org-mode.


Thanks for any help!
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


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


[Orgmode] [babel] help debugging org-babel-execute-buffer

2010-07-26 Thread Austin Frank
Hello!

I have a document that always throws an error when I call
org-babel-execute-buffer.  I'd guess that there's one particular block
that is to blame, but I can't tell which block babel is in at the point
when the error is thrown.

The error is:

#v+
Debugger entered--Lisp error: (invalid-function org-save-outline-visibility)
  org-save-outline-visibility(t 1 nil nil)
  org-babel-execute-buffer(nil)
  call-interactively(org-babel-execute-buffer nil nil)
#v-

Looking at the macro for org-save-outline-visibility, I think the
problem has to do with the last two arguments being passed in as nil
nil.  I don't, however, know how this is happening.

I know that I probably haven't given enough information to actually
diagnose this bug.  Can anyone give me a hand on what my next debugging
step should be for this problem?

Thanks,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


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


[Orgmode] Re: [babel] apply #+TABLEFM lines during export?

2010-07-13 Thread Austin Frank
On Tue, Jul 13 2010, Eric Schulte wrote:

 if you want to use my approach above more widely you could name the code
 block say #+source:less-precision, then add :exports none to each of
 your existing code blocks that output over-precise data, and for each
 such block add a call of the following form

 #+call: less-precision(tab=overly-precise-R-block) :exports results

 which should work, but would litter your file with these call lines.  I
 guess this is an instance where a post-processing function specified at
 the file/subtree level could potentially be useful.

Yes, the post-processing approach really seems appropriate here--
looking forward to seeing what you come up with.

In the mean time, is there definitely not any hook that applies

 a) during export, and
 b) after results are generated from source blocks?

If not, is it possible that adding a hook like

 org-post-execution-pre-export-hook

would be a reasonable suggestion?  Carsten, thoughts?

Thanks,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


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


[Orgmode] [babel] re-hash cached blocks on each execution? or, force re-hash?

2010-07-12 Thread Austin Frank
Hello!

I would find it extremely useful if the org-babel-execute-* family of
commands re-hashed the executed blocks on each execution, or,
alternatively, accepted a prefix argument that meant re-execute this
block even if cached, and replace the cache-hash if necessary.

Currently, if a block is cached, when I change something inside the
block and then execute the block again, the hash in the #+results line
doesn't change.  In cases where the contents of the block change but the
output of the block does not, this makes it very difficult to tell
whether the block has been re-executed or not.

If there are good reasons not to re-hash the block on each execution and
update the hash in the results line, I would like to be able to force
this behavior.  In cases where I know that I want the block to be
re-hashed and re-executed, it seems like C-u C-c C-c or C-u C-u C-c C-c
would be a natural and org-ish way to force this.

Here's a simple test case:

--8---cut here---start-8---
* elisp example
#+source:  elisp-test
#+BEGIN_SRC emacs-lisp :cache yes
(print hello world)
(print re-hash and re-execute, please!)
#+END_SRC

#+results[f6dfc164b16889f1569fcd3242ba3de721853bc8]: elisp-test
: hello world

Now I change the above block in place (but reproduce the changes
sequentially here):

#+source:  elisp-test
#+BEGIN_SRC emacs-lisp :cache yes
(print hello world)
(print re-hash and re-execute, please!)
#+END_SRC

#+results[f6dfc164b16889f1569fcd3242ba3de721853bc8]: elisp-test
: re-hash and re-execute, please!

Note that the block changed, and the results changed, but the hash did
not.

Now we change it again, in a way that doesn't change the output:

#+source:  elisp-test
#+BEGIN_SRC emacs-lisp :cache yes
(setq four (+ 2 2))
(print hello world)
(print re-hash and re-execute, please!)
#+END_SRC

#+results[f6dfc164b16889f1569fcd3242ba3de721853bc8]: elisp-test
: re-hash and re-execute, please!

Again the block changed, but this time the results did not change and
neither did the hash.  This makes it very hard to tell whether the code
has been re-executed or not.  If the hash changed when the block
changed, I could tell that the new code had been detected and run.

Finally, we check whether the previous change was actually evaluated:

* elisp test
#+source:  elisp-test
#+BEGIN_SRC emacs-lisp :cache yes
(setq four (+ 2 2))
(print hello world)
(print re-hash and re-execute, please!)
(print four)
#+END_SRC

#+results[f6dfc164b16889f1569fcd3242ba3de721853bc8]: elisp-test
: 4

So the block is re-evaluated when it's changed, but the hash isn't
updated.  The only way we can tell if an altered block is re-run is if
the output changes, but that won't necessarily be the case for every
change in a block.  It would be very useful if the block were re-hashed
before each execution, and the cache line updated whenever the hash
changes.  One possible solution is to force re-hashing and re-execution
with a prefix argument (or double prefix argument, if preferred).
--8---cut here---end---8---


Thanks,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


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


[Orgmode] Re: [babel] re-hash cached blocks on each execution? or, force re-hash?

2010-07-12 Thread Austin Frank
On Mon, Jul 12 2010, Eric Schulte wrote:

 You've found an error.  The hash should be updated every time a new
 result is inserted into the buffer.  I've just pushed up a fix which I
 believe should take care of this error.  Please let me know if any
 problems persist, or if some portion of your request remains
 unfulfilled.

Thanks, working great.

/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


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


[Orgmode] Re: [babel] apply #+TABLEFM lines during export?

2010-07-12 Thread Austin Frank
On Sun, Jul 11 2010, Eric Schulte wrote:

 Under the current setup, I don't know of a way to ensure that the
 formula will be re-run.  This may be a good place for future
 (post-feature-freeze) functionality.  There has also been discussion
 of adding a header argument for post-processing code blocks which
 could accept the output of the evaluated code block as input -- this
 might be related.

Yes, eager to see where this goes.

 As a work-around, I would suggest the following emacs-lisp code block.
 Export of this code block will trigger the evaluation of the R code
 block, and it will then trim the output of said block resulting in the
 desired table precision.

 #+begin_src emacs-lisp :var tab=anova-example :colnames yes :cache yes
   (mapcar
(lambda (row)
  (mapcar
   (lambda (cell) (if (numberp cell) (format %.4f cell) cell))
   row))
tab)
 #+end_src


I tried to customize your approach to apply to the whole buffer.  This
code seems to do a nice job of changing the appearance of the tables
within the buffer, but the extra precision is still maintained on
export.

--8---cut here---start-8---
#+source:  format-table-floats
#+BEGIN_SRC emacs-lisp :results silent :exports none
(add-hook 'org-export-preprocess-final-hook
  (lambda ()
(while (re-search-forward
|?[ ]+\\(-?[0-9]+\\.[0-9]+\\)\\(e-\\)?[ ]+|
nil t)
  (progn
(replace-match (concat
(format %.4f
(string-to-number (match-string 1)))
 |))
(org-table-align)
#+END_SRC
--8---cut here---end---8---

Can anyone suggest another approach that would change the precision of
floats in all tables in the buffer before export?  Perhaps there's a
different hook I should be using for LaTeX export?

Thanks!
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


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


[Orgmode] [babel] report name of source block during execution

2010-07-12 Thread Austin Frank
Hello!

I know I've been making a lot of suggestions on the org-babel front
lately-- if I'm asking too much, please let me know!

During execution of source blocks through org babel, a message appears
to indicate that code is being executed, like

  executing LANG code block...

In cases where the block being executed is a named block, would it be
possible to include the name of the block in this echo?  Maybe something
like

  executing LANG code block (NAME)...

This would provide a rudimentary progress tracking mechanism during long
operations like org-babel-execute-buffer.

Thanks!
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


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


[Orgmode] [babel] apply #+TABLEFM lines during export?

2010-07-10 Thread Austin Frank
Hi all--

I have a (hopefully quick question) about formatting tabular output from
ob-R.  Consider the following block:

--8---cut here---start-8---
#+source:  anova-example
#+BEGIN_SRC R :cache yes :exports results :colnames yes :results value
library(ez)
library(lme4)

eza - ezANOVA(dv = .(Reaction),
   sid = .(Subject),
   within = .(Days),
   data = sleepstudy)

print(eza$ANOVA)
#+END_SRC
--8---cut here---end---8---

This produces the following output:
--8---cut here---start-8---
#+results[7e7015e41d95ed8986fb9a211a8b5c6e121ae99d]: anova-example
| Effect | DFn | DFd | SSn |  SSd |F |  
  p | p.05 |  pes |
|+-+-+-+--+--+--+---+--|
| Days   |   9 | 153 | 166235.12250176 | 151101.038615303 | 18.7026979326383 | 
8.99534541600196e-21 | * | 0.52384550792003 |
--8---cut here---end---8---

That's more precision than I want in export, so I add a formula line to
the results, hoping to change the formatting of the floats.  After
hitting C-u C-u C-c C-c in the table, I get the following:

--8---cut here---start-8---
#+results[7e7015e41d95ed8986fb9a211a8b5c6e121ae99d]: anova-example
| Effect | DFn | DFd | SSn | SSd |   F |  p | p.05 |   
 pes |
|+-+-+-+-+-++---+|
| Days   |   9 | 153 | 166235.1200 | 151101.0400 | 18.7027 | 0. | * | 
0.5238 |
#+TBLFM: $4=$4;%.4f::$5=$5;%.4f::$6=$6;%.4f::$7=$7;%.4f::$9=$9;%.4f
--8---cut here---end---8---

That's much better!  But, if I export this section to LaTeX, the formula
line is not applied and I end up with the full precision in my table.

--8---cut here---start-8---
\begin{center}
\begin{tabular}{lrrlr}
 EffectDFnDFdSSn SSd   
F   pp.05 pes  \\
\hline
 Days9153166235.12250176151101.038615303
18.70269793263838.99534541600196e-21*0.52384550792003  \\
\end{tabular}
\end{center}
--8---cut here---end---8---

Is there a way to make sure that the table formula is applied to the
results block during export?  Alternatively, is there another way to
reduce the precision of the numbers produced during export?

Thanks for any help!
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


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


[Orgmode] [babel] key binding requests

2010-07-10 Thread Austin Frank
Hello!

I'm loving the level of polish and sophistication that have been
achieved with org-babel.  My entire PhD thesis is currently written in
org and org-babel, and it's the best authoring system I've ever used.

That said, I have a couple of features that I regularly find myself
missing.  I wonder whether other folks might also find them useful.

First, in terms of navigation, I would love to have keybindings under
the C-c C-v prefix that would navigate to the next and previous babel
blocks.  org-babel-goto-named-source-block[fn:1] is great, but a) not all my
blocks are named, and b) I don't always remember the name of the block
I'm looking for.  On that note...

Currently, org-babel-goto-named-source-block doesn't currently offer any
completion facilities in my setup.  Is there a way to hook it into the
rest of org's completion mechanisms so that I can hit tab to complete
the names of my source blocks?

Finally, to go along with facilities to navigate from source block to
source block, I'd also make regular use of something like
org-execute-src-block-and-step, which would execute the current block
and then jump to the next (or previous) one.

Thanks again for these excellent tools,
/au

Footnotes:

[fn:1] This is the only function that uses source instead of src in
its name.  Should this be changed for consistency?


-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


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


[Orgmode] [babel] exports, caching, remote execution

2010-06-17 Thread Austin Frank
Hey all--

Two (hopefully quick) questions:

1) Does the exporter respect the :cache argument?  When I evaluate a
   buffer, I can tell that cached blocks are not re-run, as expected.
   When I export to \LaTeX or PDF, it seems that all blocks in the file
   are re-run.  Is there a way to force the exporter to respect caching?

2) Is there a way to generate graphical output on a remote host and
   still have it included in export?  A block like

   #+BEGIN_SRC R :exports results :dir /u...@example.com: :file test.png
   plot(my-object)
   #+END_SRC
   
   Gives me
   
   #+results:
   [[file:/scpc:u...@example.com:/users/home/user/test.png]]

   When I export to latex or pdf, the graphic isn't included because the
   file for export is local but the graphic is remote.  Is there a way
   to include remotely generated graphics in a locally exported file?
   Something like downloading via scp before exporting?


Thanks for any help,
/au
   
-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


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


[Orgmode] Re: [babel] exports, caching, remote execution

2010-06-17 Thread Austin Frank
Eric--

Thanks for the reply.

On Thu, Jun 17 2010, Eric Schulte wrote:

 I believe the exporter does respect caching, the following minimal
 example worked (i.e. was not re-run) for me on export to html.  Could
 you provide an example that demonstrates the problem?

Yes, I'll keep an eye on this and try to narrow it down to an example if
I can.

 Not that I'm currently aware of.  Dan has handled most of the remote
 execution work so he may know more than me in this regard.

And thanks to him for that!  I tipped him off to using TRAMP with ESS,
and he took it and ran further than I ever hoped!

 Is scpc in the line above a transport protocol?

Yes, it is scp over an existing ssh connection.  The following org-style
link goes to the relevant info page.

[[info:tramp:External%20methods][info:tramp:External methods]]

 Maybe this should be an org-mode wide features, i.e. the ability to
 resolve remote file references with C-c C-o and on export.  Does that
 sound reasonable, and would it take care of the need in this
 particular case?

C-c C-o actually works!  I was extremely encouraged to see this, and it
got my hopes up for export =)

If remote file references could be resolved during export, that would be
ideal.

 A block like the following may be an acceptable workaround in the near
 term (notice I named your block above).

 #+begin_src sh :file test.png :var remote=rplot :exports results
   scp $remote ./test.png
 #+end_src

Nice suggestions, I'll try it later today.

Thanks,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


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


[Orgmode] [org-babel] suggestions for using tikz() graphic device with org-babel-R

2010-04-14 Thread Austin Frank
Hi all--

I'm very excited about a relatively new R package, tikzDevice.  This
takes R graphics and generates LaTeX code inside a tikzpicture
environment that reproduces the desired graphic.  This allows, among
other things, for all text in a figure to use the same fonts as the rest
of your document, and for graph annotations to use latex math markup.

I have attached an example org file that has embedded R code that
generates figures using the tikz() device.[fn:1]

The output from a call to tikz() is a .tex file, which is intended to be
included in a larger LaTeX file using the \input{} command.

How would the org-babel gurus suggest that I automate the process of
embedding these TeX-based graphics in an org file?  What is the right
combination of :file, :exports, and :results arguments to have the
generated file automatically included by a LaTeX \input{} command?

Thanks for any advice!
/au

Footnotes:

[fn:1] If requested, I can send the generated tex and pdf files as well

#+TITLE: Generating PGF graphics from R in org-babel
#+AUTHOR:Austin F. Frank
#+EMAIL: austin.fr...@gmail.com
#+DATE:  2009-12-11 Fri
#+LANGUAGE:  en
#+OPTIONS:   H:3 num:nil toc:nil \n:nil @:t ::t |:t ^:t -:t f:t *:t :t
#+OPTIONS:   TeX:t LaTeX:t skip:nil d:nil todo:t pri:nil tags:not-in-toc
#+LATEX_HEADER:  \usepackage{tikz} 


Recently a new =R= package, =pgfSweave=, was announced.[fn:1]  This
package boasts a fascinating capability:  generating all R graphics as
\{LaTeX} code that will be typeset using the tikz package and included
as PGF graphics.[fn:2]  This is an appealing option for several
reasons:
  1.  Scaling of size and adjustments of position should be handled
  seamlessly and without loss of resolution
  2.  Colors can be specified identically for graphics and any other
  markup in the $\LaTeX$ document
  3.  Since they're just more $\LaTeX$ code, graphics can be manually
  edited in emacs
  4.  Same fonts will be used for text in figures as are used in the
  text of the document
  5.  $\LaTeX$ markup can be used in figure text
  6.  tikz integrates nicely with Beamer

Given this list of features, I decided to see whether I could get
similar functionality in org-babel.
* R code
** Load =tikzDevice=
   First, we need to load the packages required for producing tikz
   output in =R=.  If all goes well, you should get a message about
   the paths to the various programs required to generate $\LaTeX$
   markup from within =R=.

#+source: load_tikzDevice
#+BEGIN_SRC R :results output :exports both :cache
## I want to show the messages that are generated when the package is
## loaded.  These are printed to the equivalent of stderr, so I have
## to rewrite the `message' function to produce output that I can
## print back later.
tikz.message -
  capture.output(withCallingHandlers(library(tikzDevice),
 message =
 function (m) cat(m$message)))

cat(tikz.message, sep=\n)
#+END_SRC

** R example
#+source: lmer_example
#+BEGIN_SRC R :results output :exports both :cache :session
## I use this library all the time
library(lme4)

## here's the standard example
m - lmer(Reaction ~ Days + (1 | Subject), sleepstudy)
print(m)
#+END_SRC

** Graphics creation
#+source: tikz_example
#+BEGIN_SRC R :results file :exports code :cache :session
library(tikzDevice)
ranef.m - ranef(m, postVar = TRUE)
tikz(file = ranef.tex, width=4, height=4)
print(qqmath(ranef.m))
dev.off()
#+END_SRC

#+BEGIN_CENTER
#+CAPTION:  sample graphics
\input{ranef}
#+END_CENTER

* Footnotes

[fn:1] http://thread.gmane.org/gmane.comp.lang.r.packages/351

[fn:2] http://sourceforge.net/projects/pgf/




-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


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


[Orgmode] Re: [org-timer] mode line request

2010-04-09 Thread Austin Frank
On Thu, Feb 25 2010, Bastien wrote:

 Austin Frank austin.fr...@gmail.com writes:

 Would it be possible for timers set using org-timer-set-timer to
 display their current value in the mode line?

 I'm working on this.

Ping?  I know you're a busy fella, but have you had a chance to look at
this.  If not, any takers?  If not, any tips for an example function I
can look at for how to set and update the mode-line?

Thanks,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


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


[Orgmode] Re: Using Org for browsing and managing buffers

2010-04-08 Thread Austin Frank
Dan--

Very nice.  I will say, though, that the very first thing I did was

  (define-key org-buffers-mode-map q 'bury-buffer)

I would request that something like this be included in the default
keybindings.  A smarter version might try to restore the window config
From before org-buffers-list was called.  See ibuffer-quit for an
example.

Will report back after more testing!

Thanks!
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


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


[Orgmode] Re: Bug: (REVISED) trouble with updated latex export [6.35 (release_6.35a.26.g78cc)]

2010-04-07 Thread Austin Frank
On Wed, Apr 07 2010, Austin Frank wrote:

 I then document some unexpected behavior when exporting to latex.
 Options specified with #+LATEX_HEADER are not exported, and if
 `org-export-latex-packages-alist' is customized then only those packages
 are exported.

Upgrading to Org-mode version 6.35b (release_6.35b.27.g35f5) allows my
packages from `org-export-latex-packages-alist' packages to be exported
correctly, but following the steps in my previous mail still does not
result in the inclusion of packages specified in #+LATEX_HEADER lines.

Thanks,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


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


[Orgmode] Re: Bug: (REVISED) trouble with updated latex export [6.35 (release_6.35a.26.g78cc)]

2010-04-07 Thread Austin Frank
On Wed, Apr 07 2010, Robert Klein wrote:

 Also, when I put

 (add-to-list 'org-export-latex-packages-alist '( listings))

What's the value of `org-export-latex-listings'?  Carsten, how should
listings be addressed in the new setup?

Thanks,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


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


[Orgmode] Re: Bug: (REVISED) trouble with updated latex export [6.35 (release_6.35a.26.g78cc)]

2010-04-07 Thread Austin Frank
On Wed, Apr 07 2010, Carsten Dominik wrote:

 Looks I am having a bad day.

 Can you please pull and try again?  As soon as possible?

This works correctly for my test file on Org-mode version 6.35b
(release_6.35b.30.g9115).  It also works for a more complex document
with my full configuration loaded.

In case it matters, the \tolerance{1000} line doesn't show up with an
org-reload.  I had to restart emacs before that aspect of the default
header was incorporated.  But I could be imagining things on that one.

Thanks,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


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


[Orgmode] Bug: trouble with updated latex export [6.35 (release_6.35a.26.g78cc)]

2010-04-06 Thread Austin Frank

Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

 http://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org-mode mailing list.


Hello!

I'm having trouble getting the new latex export set up correctly.  Below
I start with a a bare-bones config file, as follows:

 1. start with emacs -Q, then do
 2. (add-to-list 'load-path (expand-file-name path/to/org.git/lisp))
 3. (require 'org-install)

I then document some unexpected behavior when exporting to latex.
Options specified with #+LATEX_HEADER are not exported, and if
`org-export-latex-packages-alist' is customized then only those packages
are exported.

Thanks for any help,
/au

With the following test file and no emacs customizations, I get the
following latex export:

#v+
#+TITLE: test.org
#+AUTHOR:Austin Frank
#+DATE:  2010-04-07 Wed
#+OPTIONS:   H:3 num:t toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t :t
#+OPTIONS:   TeX:t LaTeX:t skip:nil d:nil todo:t pri:nil tags:not-in-toc

This will produce \LaTeX output.
#v-

#v+
% Created 2010-04-07 Wed 00:52
\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{longtable}
\usepackage{float}
\usepackage{wrapfig}
\usepackage{soul}
\usepackage{amssymb}
\usepackage{hyperref}


\title{test.org}
\author{Austin Frank}
\date{2010-04-07 Wed}

\begin{document}

\maketitle

\setcounter{tocdepth}{3}
\tableofcontents
\vspace*{1cm}

This will produce \LaTeX output.

\end{document}
#v-

When I include extra options via #+LATEX_HEADERS, as follows, I get the
following output.  Note that the options specified in LATEX_HEADERS are
not exported at all.

#v+
#+TITLE: test.org
#+AUTHOR:Austin Frank
#+DATE:  2010-04-07 Wed
#+OPTIONS:   H:3 num:t toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t :t
#+OPTIONS:   TeX:t LaTeX:t skip:nil d:nil todo:t pri:nil tags:not-in-toc
#+LATEX_HEADER:  \usepackage{tipa}
#+LATEX_HEADER:  \usepackage{fullpage}
#+LATEX_HEADER:  \usepackage[backend=biber,style=footnote-dw]{biblatex}
#+LATEX_HEADER:  \bibliography{statement}

This will produce \LaTeX output.
#v-

#v+
% Created 2010-04-07 Wed 00:52
\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{longtable}
\usepackage{float}
\usepackage{wrapfig}
\usepackage{soul}
\usepackage{amssymb}
\usepackage{hyperref}


\title{test.org}
\author{Austin Frank}
\date{2010-04-07 Wed}

\begin{document}

\maketitle

\setcounter{tocdepth}{3}
\tableofcontents
\vspace*{1cm}

This will produce \LaTeX output.

\end{document}
#v-

If I evaluate the following elisp code, then run export on the following
org file, I get the final tex output.  Note that only the packages
described in `org-export-latex-packages-alist' are exported.

#v+
(mapc #'(lambda (spec)
  (add-to-list 'org-export-latex-packages-alist spec))
  '(( listings)
( xcolor)
( tikz)
( amsmath)
( microtype)
( fixltx2e)))
#v-

#v+
#+TITLE: test.org
#+AUTHOR:Austin Frank
#+DATE:  2010-04-07 Wed
#+OPTIONS:   H:3 num:t toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t :t
#+OPTIONS:   TeX:t LaTeX:t skip:nil d:nil todo:t pri:nil tags:not-in-toc
#+LATEX_HEADER:  \usepackage{tipa}
#+LATEX_HEADER:  \usepackage{fullpage}
#+LATEX_HEADER:  \usepackage[backend=biber,style=footnote-dw]{biblatex}
#+LATEX_HEADER:  \bibliography{statement}

This will produce \LaTeX output.
#v-

#v+
% Created 2010-04-07 Wed 01:01
\documentclass[11pt]{article}
\usepackage{fixltx2e}
\usepackage{microtype}
\usepackage{amsmath}
\usepackage{tikz}
\usepackage{xcolor}
\usepackage{listings}
\providecommand{\alert}[1]{\textbf{#1}}

\title{test.org}
\author{Austin Frank}
\date{2010-04-07 Wed}

\begin{document}

\maketitle

\setcounter{tocdepth}{3}
\tableofcontents
\vspace*{1cm}

This will produce \LaTeX output.

\end{document}
#v-

At the end of the experiment, this was the org setup:

current state:
==
(setq
 org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars)
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-export-latex-format-toc-function 'org-export-latex-format-toc-default
 org-export-preprocess-hook '(org-export-blocks-preprocess)
 org-tab-first-hook '(org-hide-block-toggle-maybe)
 org-src-mode-hook '(org-src-mode-configure-edit-buffer)
 org-confirm-shell-link-function 'yes-or-no-p
 org-export-first-hook '(org-beamer-initialize-open-trackers)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-export-latex-packages-alist '(( fixltx2e) ( microtype)
   ( amsmath) ( tikz) ( xcolor)
   ( listings))
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
  org-cycle-show-empty-lines

[Orgmode] Bug: (REVISED) trouble with updated latex export [6.35 (release_6.35a.26.g78cc)]

2010-04-06 Thread Austin Frank

Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

 http://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org-mode mailing list.


(Apologies, I made some copy-paste errors in my first report.  The
reported behavior hasn't changed, but the exact latex output now matches
what I'm seeing on my end.  Thanks.)

Hello!

I'm having trouble getting the new latex export set up correctly.  Below
I start with a a bare-bones config file, as follows:

 1. start with emacs -Q, then do
 2. (add-to-list 'load-path (expand-file-name path/to/org.git/lisp))
 3. (require 'org-install)

I then document some unexpected behavior when exporting to latex.
Options specified with #+LATEX_HEADER are not exported, and if
`org-export-latex-packages-alist' is customized then only those packages
are exported.

Thanks for any help,
/au

With the following test file and no emacs customizations, I get the
following latex export:

#v+
#+TITLE: test.org
#+AUTHOR:Austin Frank
#+DATE:  2010-04-07 Wed
#+OPTIONS:   H:3 num:t toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t :t
#+OPTIONS:   TeX:t LaTeX:t skip:nil d:nil todo:t pri:nil tags:not-in-toc

This will produce \LaTeX output.
#v-

#v+
% Created 2010-04-07 Wed 01:31
\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{longtable}
\usepackage{float}
\usepackage{wrapfig}
\usepackage{soul}
\usepackage{t1enc}
\usepackage{textcomp}
\usepackage{marvosym}
\usepackage{wasysym}
\usepackage{latexsym}
\usepackage{amssymb}
\usepackage{hyperref}
\providecommand{\alert}[1]{\textbf{#1}}

\title{test.org}
\author{Austin Frank}
\date{2010-04-07 Wed}

\begin{document}

\maketitle

\setcounter{tocdepth}{3}
\tableofcontents
\vspace*{1cm}

This will produce \LaTeX output.

\end{document}
#v-

When I include extra options via #+LATEX_HEADERS, as follows, I get the
following output.  Note that the options specified in #+LATEX_HEADERS are
not exported at all.

#v+
#+TITLE: test.org
#+AUTHOR:Austin Frank
#+DATE:  2010-04-07 Wed
#+OPTIONS:   H:3 num:t toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t :t
#+OPTIONS:   TeX:t LaTeX:t skip:nil d:nil todo:t pri:nil tags:not-in-toc
#+LATEX_HEADER:  \usepackage{tipa}
#+LATEX_HEADER:  \usepackage{fullpage}
#+LATEX_HEADER:  \usepackage[backend=biber,style=footnote-dw]{biblatex}
#+LATEX_HEADER:  \bibliography{statement}

This will produce \LaTeX output.
#v-

#v+
% Created 2010-04-07 Wed 01:33
\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{longtable}
\usepackage{float}
\usepackage{wrapfig}
\usepackage{soul}
\usepackage{t1enc}
\usepackage{textcomp}
\usepackage{marvosym}
\usepackage{wasysym}
\usepackage{latexsym}
\usepackage{amssymb}
\usepackage{hyperref}
\providecommand{\alert}[1]{\textbf{#1}}

\title{test.org}
\author{Austin Frank}
\date{2010-04-07 Wed}

\begin{document}

\maketitle

\setcounter{tocdepth}{3}
\tableofcontents
\vspace*{1cm}

This will produce \LaTeX output.

\end{document}
#v-

If I evaluate the following elisp code, then run export on the following
org file, I get the final tex output.  Note that only the packages
described in `org-export-latex-packages-alist' are exported.

#v+
(mapc #'(lambda (spec)
  (add-to-list 'org-export-latex-packages-alist spec))
  '(( listings)
( xcolor)
( tikz)
( amsmath)
( microtype)
( fixltx2e)))
#v-

#v+
#+TITLE: test.org
#+AUTHOR:Austin Frank
#+DATE:  2010-04-07 Wed
#+OPTIONS:   H:3 num:t toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t :t
#+OPTIONS:   TeX:t LaTeX:t skip:nil d:nil todo:t pri:nil tags:not-in-toc
#+LATEX_HEADER:  \usepackage{tipa}
#+LATEX_HEADER:  \usepackage{fullpage}
#+LATEX_HEADER:  \usepackage[backend=biber,style=footnote-dw]{biblatex}
#+LATEX_HEADER:  \bibliography{statement}

This will produce \LaTeX output.
#v-

#v+
% Created 2010-04-07 Wed 01:34
\documentclass[11pt]{article}
\usepackage{fixltx2e}
\usepackage{microtype}
\usepackage{amsmath}
\usepackage{tikz}
\usepackage{xcolor}
\usepackage{listings}
\providecommand{\alert}[1]{\textbf{#1}}

\title{test.org}
\author{Austin Frank}
\date{2010-04-07 Wed}

\begin{document}

\maketitle

\setcounter{tocdepth}{3}
\tableofcontents
\vspace*{1cm}

This will produce \LaTeX output.

\end{document}
#v-

At the end of the experiment, this was the org setup:

#v+
current state:
==
(setq
 org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars)
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-export-latex-format-toc-function 'org-export-latex-format-toc-default
 org-export-preprocess-hook '(org-export-blocks-preprocess)
 org-tab-first-hook '(org-hide-block-toggle-maybe)
 org-src-mode-hook '(org-src-mode-configure-edit-buffer

[Orgmode] Re: org-mode tutorial questionaire

2010-03-25 Thread Austin Frank
On Wed, Mar 24 2010, Ian Barton wrote:

 I keep my stuff in git too, but recently I have found Dropbox very
 useful. Once I discovered how to install it on my server it meant that
 all my config files were automatically kept in sync on my
 computers. in fact Dropbox is still great even if you don't run your
 own server.

 Git is still very useful for letting you easily go back if you make a
 mistake, or want to start over again from an earlier version.

Even better, make a git repo in your dropbox directory.  Great tastes
that taste great together!

(There's a valid question as to whether the git repo in dropbox should
be a bare repo to facilitate pushing and pulling, or a working repo so
that you can use it directly.  Suggestions on this point are welcome).

/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


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


[Orgmode] Re: Publish atom feeds based on Org files

2010-03-19 Thread Austin Frank
David--

This is an absolutely phenomenal development.  I can't wait to add this
to my setup.  Thank you so much for this contribution.

Cheers,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


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


[Orgmode] Re: [PATCH 2/2] Fix adaptive filling.

2010-03-11 Thread Austin Frank
On Thu, Mar 11 2010, Carsten Dominik wrote:

 Hi everyone,


 I know that a few people have been using this patch.

 How has it been working?

Brilliant.  When composing messages in mml-mode with orgstruct++-mode
enabled, I now get mml-appropriate wrapping in non-orgish parts of the
message.  This mostly means that on message sections with more than one
level of quoting I get proper wrapping.

Thanks for the patch, and I'd be in favor of including it in core org.

Thanks,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


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


[Orgmode] Re: [PATCH 2/2] Fix adaptive filling.

2010-03-03 Thread Austin Frank
On Wed, Mar 03 2010, Carsten Dominik wrote:

 Hi,

 can I ask a few volunteers to try out this patch?  I am not sure if I
 can completely oversee if this will not have adverse effects.

 Thanks Dan!

I've applied this patch and will report back.  I've noticed that with
orgstruct++-mode enabled for message composition, I lose wrapping of
paragraphs with multiple prefixed quote indicators (e.g.,  ).  I'm
eager to see if this addresses that.

For anyone wondering how to apply a patch from an email in gnus, here's
what I just figured out:

 1. Save the entire message using `gnus-uu-decode-save' (bound to `X o'
on my system).  I saved it to ~/repos/org-mode.remote/adaptive.patch
 2. cd to the org-mode repository
 3. apply the patch using git am:

git am  adaptive.patch

I was pleased that this was so was so easy to do once I figured it out.
I honestly didn't expect 'git am' to work with a message saved from
gnus, since the man page talks about mbox files and so on.  But it did
work, and I figured I'd pass it on.

Have a good one,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


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


[Orgmode] [org-timer] PATCH add hooks to org-timer.el

2010-02-20 Thread Austin Frank
Hello all--

I'm experimenting with the pomodoro technique [1] and trying to
integrate it with org mode.  I've attached a patch that defines some
hooks for org-timer.el.  My intention is to use these hooks to automate
record keeping and interactions with org-clock.

If this isn't the correct approach to adding hooks to timer functions,
what would you suggest?

Thanks for considering it,
/au

[1] http://www.pomodorotechnique.com

From 86de94d18302bda17379c35f11423788b11348c2 Mon Sep 17 00:00:00 2001
From: Austin F. Frank austin.fr...@gmail.com
Date: Sat, 20 Feb 2010 08:22:47 -0500
Subject: [PATCH 3/3] add hooks for relative and countdown timers

---
 lisp/org-timer.el |   36 ++--
 1 files changed, 34 insertions(+), 2 deletions(-)

diff --git a/lisp/org-timer.el b/lisp/org-timer.el
index ed5a423..47397aa 100644
--- a/lisp/org-timer.el
+++ b/lisp/org-timer.el
@@ -48,6 +48,31 @@ the value of the relative timer.
   :group 'org-time
   :type 'string)
 
+(defcustom org-timer-start-hook nil
+  Hook run after relative timer is started.
+  :group 'org-time
+  :type 'hook)
+
+(defvar org-timer-stop-hook nil
+  Hook run before relative timer is stopped.
+  :group 'org-time
+  :type 'hook)
+
+(defvar org-timer-pause-hook nil
+  Hook run before relative timer is paused.
+  :group 'org-time
+  :type 'hook)
+
+(defvar org-timer-set-hook nil
+  Hook run after countdown timer is set.
+  :group 'org-time
+  :type 'hook)
+
+(defvar org-timer-cancel-hook nil
+  Hook run before countdown timer is canceled.
+  :group 'org-time
+  :type 'hook)
+
 ;;;###autoload
 (defun org-timer-start (optional offset)
   Set the starting time for the relative timer to now.
@@ -82,7 +107,8 @@ the region 0:00:00.
   (org-timer-set-mode-line 'on)
   (message Timer start time set to %s, current value is %s
 	   (format-time-string %T org-timer-start-time)
-	   (org-timer-secs-to-hms (or delta 0))
+	   (org-timer-secs-to-hms (or delta 0)))
+  (run-hooks 'org-timer-start-hook
 
 (defun org-timer-pause-or-continue (optional stop)
   Pause or continue the relative timer.  With prefix arg, stop it entirely.
@@ -102,6 +128,7 @@ the region 0:00:00.
 (org-timer-set-mode-line 'on)
 (message Timer continues at %s (org-timer-value-string)))
(t
+(run-hooks 'org-timer-pause-hook)
 ;; pause timer
 (setq org-timer-pause-time (current-time))
 (org-timer-set-mode-line 'pause)
@@ -110,6 +137,7 @@ the region 0:00:00.
 (defun org-timer-stop ()
   Stop the relative timer.
   (interactive)
+  (run-hooks 'org-timer-stop-hook)
   (setq org-timer-start-time nil
 	org-timer-pause-time nil)
   (org-timer-set-mode-line 'off))
@@ -264,6 +292,7 @@ VALUE can be `on', `off', or `pause'.
   (interactive)
   (mapc (lambda(timer)
 	  (when (eval timer)
+(run-hooks 'org-timer-cancel-hook)
 	(cancel-timer timer)
 	(setq timer nil)))
 	'(org-timer-timer1
@@ -317,7 +346,10 @@ VALUE can be `on', `off', or `pause'.
 		  (setq org-timer-last-timer
 			(run-with-timer
 			secs nil 'org-notify (format %s: time out hl) t))
-		  (set timer org-timer-last-timer)))
+  (setq org-timer-mode-line-timer
+(run-with-timer 1 1 'org-timer-update-mode-line))
+		  (set timer org-timer-last-timer)
+  (run-hooks 'org-timer-set-hook)))
 	  '(org-timer-timer1
 		org-timer-timer2
 		org-timer-timer3)
-- 
1.7.0


-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


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


[Orgmode] [org-timer] mode line request

2010-02-20 Thread Austin Frank
Hi!

Would it be possible for timers set using org-timer-set-timer to display
their current value in the mode line?

I think all of the required pieces to implement this exist already, but
I haven't been able to get it to work.  The relevant functions seem to
be org-timer-update-mode-line and parts of
org-timer-show-remaining-time.

I'd like to be able to watch as the timer counts down towards zero.  If
this behavior isn't desired generally, could we introduce a variable to
control whether these timers are shown in the mode line?

Thanks,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


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


[Orgmode] Re: [org-timer] PATCH add hooks to org-timer.el

2010-02-20 Thread Austin Frank
On Sat, Feb 20 2010, Carsten Dominik wrote:


 @@ -317,7 +346,10 @@ VALUE can be `on', `off', or `pause'.
 +  (setq org-timer-mode-line-timer
 +(run-with-timer 1 1 'org-timer-update-mode-
 line))

 Could you please coment on the above section?  What exactly is it
 doing and why?

These two lines were left in accidentally.  This was my initial attempt
at addressing the issue I brought up in my other post about putting
countdown timers in the mode line.  It didn't work and can be removed.

A clean patch is attached.

Thanks,
/au

From ec22f579f9c1fe3169e6103ad05d05658ab90f8e Mon Sep 17 00:00:00 2001
From: Austin F. Frank austin.fr...@gmail.com
Date: Sat, 20 Feb 2010 09:42:48 -0500
Subject: [PATCH] add hooks to start/stop/pause functions for relative and countdown timers

---
 lisp/org-timer.el |   34 --
 1 files changed, 32 insertions(+), 2 deletions(-)

diff --git a/lisp/org-timer.el b/lisp/org-timer.el
index ed5a423..9cee0b4 100644
--- a/lisp/org-timer.el
+++ b/lisp/org-timer.el
@@ -48,6 +48,31 @@ the value of the relative timer.
   :group 'org-time
   :type 'string)
 
+(defcustom org-timer-start-hook nil
+  Hook run after relative timer is started.
+  :group 'org-time
+  :type 'hook)
+
+(defvar org-timer-stop-hook nil
+  Hook run before relative timer is stopped.
+  :group 'org-time
+  :type 'hook)
+
+(defvar org-timer-pause-hook nil
+  Hook run before relative timer is paused.
+  :group 'org-time
+  :type 'hook)
+
+(defvar org-timer-set-hook nil
+  Hook run after countdown timer is set.
+  :group 'org-time
+  :type 'hook)
+
+(defvar org-timer-cancel-hook nil
+  Hook run before countdown timer is canceled.
+  :group 'org-time
+  :type 'hook)
+
 ;;;###autoload
 (defun org-timer-start (optional offset)
   Set the starting time for the relative timer to now.
@@ -82,7 +107,8 @@ the region 0:00:00.
   (org-timer-set-mode-line 'on)
   (message Timer start time set to %s, current value is %s
 	   (format-time-string %T org-timer-start-time)
-	   (org-timer-secs-to-hms (or delta 0))
+	   (org-timer-secs-to-hms (or delta 0)))
+  (run-hooks 'org-timer-start-hook
 
 (defun org-timer-pause-or-continue (optional stop)
   Pause or continue the relative timer.  With prefix arg, stop it entirely.
@@ -102,6 +128,7 @@ the region 0:00:00.
 (org-timer-set-mode-line 'on)
 (message Timer continues at %s (org-timer-value-string)))
(t
+(run-hooks 'org-timer-pause-hook)
 ;; pause timer
 (setq org-timer-pause-time (current-time))
 (org-timer-set-mode-line 'pause)
@@ -110,6 +137,7 @@ the region 0:00:00.
 (defun org-timer-stop ()
   Stop the relative timer.
   (interactive)
+  (run-hooks 'org-timer-stop-hook)
   (setq org-timer-start-time nil
 	org-timer-pause-time nil)
   (org-timer-set-mode-line 'off))
@@ -264,6 +292,7 @@ VALUE can be `on', `off', or `pause'.
   (interactive)
   (mapc (lambda(timer)
 	  (when (eval timer)
+(run-hooks 'org-timer-cancel-hook)
 	(cancel-timer timer)
 	(setq timer nil)))
 	'(org-timer-timer1
@@ -317,7 +346,8 @@ VALUE can be `on', `off', or `pause'.
 		  (setq org-timer-last-timer
 			(run-with-timer
 			secs nil 'org-notify (format %s: time out hl) t))
-		  (set timer org-timer-last-timer)))
+		  (set timer org-timer-last-timer)
+  (run-hooks 'org-timer-set-hook)))
 	  '(org-timer-timer1
 		org-timer-timer2
 		org-timer-timer3)
-- 
1.7.0




-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


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


[Orgmode] [org-clock] default clock for non-org-mode buffers

2010-02-10 Thread Austin Frank
Hello--

Sometimes I want to clock in but I'm not in an org-mode buffer.  Would
it be possible to either provide a function or hook that uses the
current buffer to add a selection to the destinations provided by
`org-clock-select-task'?

I can see two possible functions I would add to an
`org-clock-prepare-selections-hook'.  First, a version with remember
that would create a new task to clock into based on the current buffer

#v+
(defun au-clock-in-to-new-task ()
  (if (fboundp org-remember)
;; use one of my remember templates that creates a TODO entry under
;; the heading uncategorized tasks.  it includes a link to the
;; current buffer
(org-remember nil (kbd t)))
  ;;
  ;; then either clock in to the task right away,
  ;; or add the new task to the selection buffer somehow
  ;; ...
)
#v-

And second, a version that lets you browse to an existing task.

#v+
;; I think this one doesn't work as written, but only because I don't
;; know what I am doing
(defun au-clock-in-go-to-task ()
  ;; use the org-refile interface to go to an existing task
  (org-refile t)
  ;;
  ;; then do something with link to buffer we clocked in on
  ;; ...
)
#v-

Does a hook or some other way of introducing this functionality already
exist?  If not, would other people use it?

Thanks,
/au
  
-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


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


[Orgmode] [org-habit] repetition specification

2010-02-08 Thread Austin Frank
Hello--

I'm trying to get started with org-habit, which looks to be a great
addition to the already fantastic org-mode.

For me, certain habitual tasks are best thought of as do this n times
within d days.  For example, I might try to exercise 5 times per 7
days, to eat my vegetables 3 times per 1 day, or to clean the oven 4
times per 365 days.  Similar to the original description of habits, it
doesn't matter exactly when within the period these events occur, nor is
any one occurrence especially important.  Rather, I just want to see if
I'm getting close to my desired number of repetitions within a given
period.

Is there a way of mapping this conception of habitual repetitions into
the functions provided by org-habit?  Is there a different way to do
this in org-mode that I'm missing?

Thanks,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


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


[Orgmode] Re: [org-beamer] inline slides?

2010-01-29 Thread Austin Frank
On Wed, Jan 27 2010, Eric S Fraga wrote:


 I could see it being useful, along the lines of all the tangling
 examples in org-babel.

Yes!  Tangling of embedded code is a good comparison.

 more importantly, I often will prepare more than one presentation
 based on a given project and each presentation will be substantially
 different enough to make it difficult to embed slides.

 Yes, this I can see.  However, the type of different content you may
 wish to attach/embed will depend on its final purpose.  That is, in
 terms of presentations, who will be in the audience?

These are good points.  My inclination would be to handle variations on
the same talk using git.  For projects where this workflow makes sense,
I would write the initial paper and presentation together.  Upon
completion, I would make a git tag marking the finished state for that
version of the talk.  Subsequent talks could be created by creating a
branch.  In most cases, I would probably edit the slides-only version of
the file directly (rather than in the context of the original paper).

 Since slides are mostly just headlines with special tags and properties,
 at the end of the process I could easily selectively export just the
 text of the dissertation or just the embedded slides.

 This begs the question: maybe an export to org based on tags
 function is all that is required?  And this is probably already
 implemented; I hesitate to suggest how or where, given my lack of
 awareness of all the various multitude of features of org-mode, but I
 can imagine that sparse trees could be part of any solution?

Yes, I think that the basis of the export function will be building a sparse
tree and then exporting the visible buffer.  I wouldn't say this is all that
is required, though.  I'd really like to have the

*** embedded slide
*** END

style of inline definition.  Again, this allows slides to be embedded
without changing the surrounding outline context.

 Just some thoughts...

Thanks!

/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


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


[Orgmode] Re: [org-beamer] inline slides?

2010-01-29 Thread Austin Frank
On Thu, Jan 28 2010, Darlan Cavalcante Moreira wrote:

 I can see the merit of your idea about writing the slides when writing
 the thesis, but you could also create a Presentation headline at the
 and of the org file and put commented anchor and links in the the
 thesis and in the slides. This would allow you to easily jump from on
 to another.

Nice suggestion, thanks!  I don't tend to use links within the same
file, but I definitely see the application here.  I'd have to make sure
that those links weren't exported, but that's easily done.

 Another option would be splitting the frame in two windows, one
 showing the thesis and the other one showing the slides.

My issue with this approach is that I'll definitely be using org-babel
code blocks, and will want to use their output in both the thesis and
the presentation.  Named code and result blocks make this possible, as
long as components are in the same file.

Thanks for the ideas!
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


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


[Orgmode] [org-beamer] inline slides?

2010-01-26 Thread Austin Frank
Carsten and other beamerers--

Thanks for the excellent extension to org.  I've used it for one
presentation already and found it quite useful.

I have an idea that doesn't yet qualify as a feature request, more like
an idea for discussion.  What do people think about the idea of adding
the capability to write inline slides, akin to the way we can currently
write inline TODO items?

The parallels between the two applications seem pretty significant to
me.  Sometimes you're in the middle of a long block of text or an
outline tree where you don't want to disrupt the structure, and you want
to add a different kind of content alongside the current material.

The application I have in mind has to do with writing my doctoral
thesis.  I know that I'll be writing long chapters; I also know that
I'll have to prepare slides for my public defense.  Ideally, during the
writing process I'll be able to notice a series of important points and
drop into an inline slide to jot them down for the talk.  Similarly, I
could see wanting to start a section with an overview slide, but not
wanting to alter the structure of the section.

Since slides are mostly just headlines with special tags and properties,
at the end of the process I could easily selectively export just the
text of the dissertation or just the embedded slides.

Early on in the process of developing org-beamer, a suggestion was made
that footnotes could serve as a way of entering \note{} elements into
beamer slides.  That proposal sees notes as ways of annotating slides.
I'm interested in sort of flipping that idea around, so that slides are
basically short annotations of the major points in my thesis.

Do people think that an inline-slides interface akin to the inline-tasks
interface would be a useful way of incorporating beamer slides into org
documents?

Thanks,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


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


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

2010-01-25 Thread Austin Frank
On Thu, Jan 21 2010, Taru Karttunen wrote:

 I am wondering whether org-babel would be suitable for managing a
 bibtex database of ~1500 entries. I am thinking of making Bibtex
 entries into literate source code and thus have org-mode managing them
 in a more sensible way.

 Has anyone else done something like this? Any better ideas how to
 accomplish this?

As an intermediate step, I'd be interested in seeing integration between
ebib [1, 2] and org-mode.  At the least, it would be great to store a
link in the ebib buffer, have it inserted as a link to the ebib database
when added to the org buffer, and have it exported as a working
reference (at least when exporting to \LaTeX).

Thanks,
/au

[1] http://ebib.sourceforge.net/
[2] http://repo.or.cz/w/ebib.git

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


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


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

2010-01-25 Thread Austin Frank
On Sun, Jan 24 2010, Torsten Wagner wrote:

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

The moleskine notebooks are VERY nice and I love the construction
quality and feel of them.  Unfortunately, this exact feature kept me
From using what ended up being the most effective strategy.  When I'm
being good and keeping analog and org in sync, it's because I am
making one note per page and indiscriminately tearing them out of my
notebook as I process them.  Nowadays I keep a cheaper flimsier notebook
in my back pocket at all times [1].  In addition to letting me
guiltlessly destroy the thing, it's also more comfortable to sit on.

I don't have a great system for going back the other direction, but am
at my computer often enough to make that process less important to me.

HTH,
/au

[1] 
http://www.officedepot.com/a/products/323629/Office-Depot-Brand-Mini-Marble-Composition/

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


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


[Orgmode] Re: [babel] R - variable names in summary

2009-12-09 Thread Austin Frank
On Wed, Dec 09 2009, Dan Davison wrote:

 Graham Smith myotis...@gmail.com writes:

 Next question is is to do with output with things like summary. In R
 if you have lots of variables,the output wraps so it fits on the
 screen. With babel it runs off the edge of the page. is there a quick
 way of getting the output to fit an anticipated a4 pdf output.

 I'd suggest using :results output, and controlling the width of the
 output with options(width=whatever) in R. E.g.

 #+begin_src R :session babeltest :colnames t :results output
 options(width=80)
 summary(cbind(babeltest, babeltest))
 #+end_src

I don't know whether this will end up fitting into your setup, but
there's an emacs function `ess-execute-screen-options' that does what
Dan just suggested on a per-session basis taking the width of the
current buffer into account.  Even if it doesn't help with org-bable, it
makes life in ESS much pleasanter.

You can also look at the latex() function in the R package Hmisc and the
function xtable() from the R package xtable.  For data frames, matrices,
and some common summary functions, these functions will create a latex
table out of your R object.  Maybe Dan can suggest how latex code
generated in R could be properly included and typeset in org-babel.

HTH,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


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


[Orgmode] Re: [babel] R - variable names in summary

2009-12-08 Thread Austin Frank
On Tue, Dec 08 2009, Graham Smith wrote:

 The colnames t works as expected, but how do I then see the variable
 names when using the summary command, and str doesn't work at all
 (source block produced no output) . They appear OK in the R buffer.

This is help from the R side, not from the org-babel side.  If these
suggestions don't work, one of the babelers will have to step in.

Many functions that print output to the interactive buffer will not
produce that output when called outside of the interactive buffer.  For
these functions, if you wrap them in print() you can usually get the
results you want.  So, in your R code blocks, try

  print(summary(whatever))

and

  print(str(whatever))

If all you need is the names of the columns,

  print(names(whatever))

might be useful.

HTH,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


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


[Orgmode] Re: ANN: org-mac-protocol : AppleScripts to invoke org-protocol from various applications

2009-07-20 Thread Austin Frank
On Mon, Jul 20 2009, Christopher Suckling wrote:

 [...]

 Currently supported apps are:

 Finder

Christopher--

Thanks!  This looks really interesting.  Is there any way to use
applescript to track change in application focus?  I'd be interested in
logging when I change to or away from each application, and having that
time tracking information available from within org.  Does this seem
possible?

Thanks,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc



___
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] application switching hook

2009-06-02 Thread Austin Frank
Hi all--

I'd like to extend my time tracking to some activities outside of emacs.
More specifically, I'd like to be prompted to log a note in the active
time clock block whenever I change to an application outside of emacs.
I'm trying to be honest with myself about why I move from one
application to another (the difference between needed a reference from
Zotero and got bored so went to check the score of the baseball
game).

In Mac OS X, I switch applications using the Command-Tab key sequence.
I suspect that the solution to my problem involves writing some
applescript that fires a call to emacsclient every time Command-Tab is
pressed, or perhaps every time the focused application changes.

I think the relevant command line call will be something like

  emacsclient -e (progn (org-clock-goto) (org-add-note))

But maybe other people have better ideas for this part of the solution.
Perhaps calling a remember template with the current clock as its target
(using whichever function drives `C-2 C-c C-c' in the remember buffer)
would be better?


Unfortunately, I know nothing of applescript and haven't turned up any
promising leads in web searches.  I know I've seen some applescript
posted to this list before, so someone out there must know something
about it.  Any chance one of you folks has an idea about how to
implement this functionality?

Alternatively, does emacs have something like an
`emacs-loses-focus-hook'?  I don't see anything using `M-x apropos' or
`M-x apropos-variable' for focus, but perhaps I'm looking in the wrong
place.

Thanks for any comments,
/au


-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpSIoJYbN2mN.pgp
Description: PGP signature
___
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: GOAL keyword with DEADLINE semantics?

2009-03-10 Thread Austin Frank
On Mon, Mar 09 2009, Carsten Dominik wrote:

 since you want to use the same semantics as for deadlines, i.e. the
 same warning period etc, this really is a psychological issue :-)

But isn't that why we have org-mode in the first place-- to help us
label our way out of these pesky psychological issues?  :P

 What I would do if I was bothered by this would be

 (setq org-deadline-string DUE:)

 which captures both the colors of DEADLINE and GOAL pretty well, I
 think.

Yes, I will use this.

I think that the case I described where I wanted both a GOAL and a
DEADLINE for the same task can be handled reasonably well by creating
two different tasks and giving each a due date.  So instead of

* TODO submit manuscript
  GOAL: optimistic date
  DEADLINE: hard deadline

I can do

* TODO submit manuscript
  DUE: optimistic date

*** publisher deadline
DUE: hard deadline


This way I have all of the information in one place, and both dates get
into the agenda.  The top level TODO and its due date represent my goal
for submitting.  The sub-heading isn't a TODO because I'm working on my
schedule, not theirs.  But, I put the hard deadline there just in case
my schedule and the official deadline get too close for comfort.  Also,
if I keep them close together, then follow mode helps me see both at the
same time.

I don't know if DEADLINE timestamps are supposed to be applied to
non-TODO headings, but it didn't seem to break anything, so I'm going to
go forward with this approach for now.

Thanks,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgp45XibPyZRq.pgp
Description: PGP signature
___
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] GOAL keyword with DEADLINE semantics?

2009-03-08 Thread Austin Frank
Hi all!

Currently we can use the DEADLINE keyword to indicate a target date for
an item to be finished.  By my way of thinking, deadlines make sense for
externally imposed constraints.  I also try to set goals for myself for
when an item will be completed.  These are softer than deadlines, but
I think they could share the same semantics for creation, display, and
export.

Would it be possible to make `org-deadline-string' a list of strings
that get handled in the same way as DEADLINE is currently handled?  That
way I could do things like

* TODO write first chapter
  GOAL:  2009-03-09 Mon

* TODO submit manuscript
  GOAL:  2009-05-15 Fri
  DEADLINE:  2009-06-01 Mon

Where the first represents my own planning process and the second
contains my target completion date (trying to work ahead!) and the hard
constraint imposed by whoever I'm submitting to.  In all cases, I'd like
agenda notification as the date approaches, I'd like to know if I've
passed it by, and I'd like the option of including it in ical export.

Or maybe I should just learn to treat my GOALs like DEADLINEs and stop
letting myself off the hook so easily ;)

Do other people think about things this way?  Would you have a use for
a customizable list of keywords that all had the same semantics that
DEADLINE currently has?

Thanks for considering it,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpdzgoCrVqWy.pgp
Description: PGP signature
___
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: bug? in orgstruct-mode

2009-02-25 Thread Austin Frank
On Sun, Feb 22 2009, Carsten Dominik wrote:

 yes, this is something I have been missing myself.

Glad it wasn't just me.  I feel guilty if I'm the only one requesting
the feature.  Now that you've implemented it, are you using
orgstruct++-mode?

 orgstruct-mode is a mode that steals away bindings from the major mode
 and overrules them in certain contexts.  In general, it does make
 sense to keep the regions where this applies small, so that the normal
 functions bound to the same keys can do there thing everywhere else.

Maybe it makes sense for people who still cling to the idea that there
are useful modes outside of org-mode ;)

 You are describing here a case, where you actually never want to use
 the original function of that key M-RET, right?

Yes, I almost never want to use `message-newline-and-reformat'.

 (defun org-run-insert-heading ()
(interactive)
(run-like-in-org-mode 'org-insert-heading))

Did not know about `run-like-in-org-mode'.  Very cool.

 What I have now done as well is to extend orgstruct++-mode so that it
 will do what you ask for.  You neet to pull the git version for this
 change.

I use this full time in text-based modes now.  It's especially great for
composing emails (message-mode) and editing commit messages
(magit-log-edit-mode).

Thanks for adding this feature.  I understand why it can't be the
default, but I would encourage folks to try it.  It works really well
for me.

Have a good one,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgptWBgxD85yc.pgp
Description: PGP signature
___
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] bug? in orgstruct-mode

2009-02-21 Thread Austin Frank
Hi all--

In normal org buffers, creating a new list item works fine at the end of
a multi-line list item, or on the line following a multi-line list item,
even if the multi-line item covers lots of lines.  In orgstruct-mode, it
seems that new items can't be inserted unless the current line is a list
item.

Can orgstruct-mode be made to be as good as org-mode at recognizing when
it's in a plain list?  It'd be nice to be able to create a new list item
after a multi-line item in orgstruct-mode.

Steps to reproduce:
1. emacs -Q -nw test.txt
2. `M-:' (require 'org-install)
3. `M-x orgstruct-mode'
4. Create a list item like

--8---cut here---start-8---
- item 1
--8---cut here---end---8---

5. `M-return' to get a new list item
6. `C-u C-4 C-0 x SPC C-u C-4 C-0 x' to get two long words
7. `M-q' to wrap the long list item.  Now looks like:

--8---cut here---start-8---
- item 1
- 
  
--8---cut here---end---8---

8a. At the end of the third line, try to add a new list item with
`M-return'.  I get the message:

#v+
orgstruct-error: This key has no function outside structure elements
#v-

8b. At the beginning of a new line below the third line, hit
`M-return'.  Same error.

Expected behavior:
Following the same sequence in org-mode, steps 8a and 8b will both
result in a new list item being created correctly.


This took me longer to figure out than it should have, but this also has
an unpleasant interaction with the default keybindings for message-mode.
If I am writing an email and try to insert a new list item after a
wrapped like using `M-return' I end up invoking
`message-newline-and-reformat', which moves me down a line and then
inserts four blank lines-- not what I wanted to do!  If orgstruct-mode
learns to recognize when it's in plain list context, this problem will
disappear :)

Thanks!
/au


-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpwfjH0ec1U6.pgp
Description: PGP signature
___
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: POLL: the 40 variables project

2009-01-29 Thread Austin Frank
On Thu, Jan 29 2009, Carsten Dominik wrote:

 - why you set the variable like this
 - if you feel that the default value of that variable
   should be different
 - Any other comments you might what to give.

I have four org config files:  org-config.el, org-config-remember.el,
org-config-latex.el, and org-config-publish.  At the beginning of
org-config.el I load the other three.

From org-config.el:
--8---cut here---start-8---
(add-hook 'org-mode-hook
  (lambda ()
(imenu-add-to-menubar Imenu)
(local-set-key \M-I 'org-toggle-iimage-in-org)))

;;; general org functionality tweaks
(setq org-completion-use-ido t)

;;; customized list and outline behaviors
(setq org-empty-line-terminates-plain-lists t
  org-log-state-notes-insert-after-drawers t
  org-hide-leading-stars t)

;;; agenda customization
(setq org-agenda-files '(~/org/))
(setq
 org-agenda-window-setup 'other-frame
 org-agenda-include-diary t
 org-agenda-ndays 7
 org-deadline-warning-days 14
 org-agenda-show-all-dates t
 org-agenda-skip-deadline-if-done t
 org-agenda-skip-scheduled-if-done t
 org-agenda-skip-timestamp-if-done t
 org-agenda-start-on-weekday nil
 org-stuck-projects
 '(+LEVEL=2+CATEGORY=\PROJ\|+CATEGORY=\TASK\/-DONE-CANCELED
   (NEXT WAITING)
   nil
   )
 org-agenda-custom-commands
 '((n NEXT items todo NEXT)
   (w WAITING items todo WAITING)
   (h at Home tags @CASTLE|@ERRANDS|@WEGMANS)
   (w at Work tags @LAB|@OFFICE)
   (j Just Todos todo TODO)
   (r todo TO-READ)
   (z todo TO-SUMMARIZE)
   (o todo TO-NOTE)
   (f todo TO-FILE)
   (p All reading tasks ((todo TO-READ)
 (todo TO-SUMMARIZE)
 (todo TO-NOTE)
 (todo TO-FILE)

(add-hook 'org-agenda-mode-hook '(lambda () (hl-line-mode 1))) 

;;; notes
(setq
 org-default-notes-file ~/notes.org
 org-reverse-note-order t)

;;; org-mairix
(setq org-mairix-gnus-results-group 'nnmairix-default-group
  org-mairix-gnus-select-display-group-function)

;;; GTD setup
(setq
 org-todo-keywords
 '((sequence TODO(t) NEXT(n) WAITING(w@/!) | DONE(d!) SOMEDAY(s))
   (sequence TO-FIND(l) TO-READ(r) READ-NEXT(x) TO-SUMMARIZE(z) 
TO-NOTE(o) TO-FILE(f)  | READ(e!))
   (sequence | CANCELED(c@/!

(setq
 org-log-done t
 org-fast-tag-selection-single-key 'expert
 org-tags-match-list-sublevels t
 org-use-fast-todo-selection t
 org-fast-tag-selection-include-todo t)

(defun org-toggle-iimage-in-org ()
  Display images in your org file
  (interactive)
  (if (face-underline-p 'org-link)
  (set-face-underline-p 'org-link nil)
(set-face-underline-p 'org-link t))
  (iimage-mode))

;; sometimes we need IDs?
(setq org-id-method 'uuidgen)

;; moving items
(setq
 org-refile-targets '((org-agenda-files . (:maxlevel . 3)))
 org-refile-use-outline-path 'file)
--8---cut here---end---8---
   
From org-remember.el:
--8---cut here---start-8---
;; moving tasks
(setq org-remember-use-refile-when-interactive t)

;; remember
(setq
 org-remember-store-without-prompt t
 org-remember-default-headline Unfiled
 org-remember-templates
 '((todo
?t * TODO %? %^G\n  CREATED:  %u\n%a\n
~/org/todo.org
Unscheduled tasks)
   (deadline
?d * TODO %? %^G\n  DEADLINE:  %^T\nCREATED:  %u\n%a\n
~/org/todo.org
Unscheduled tasks)
   (standing
?s * %?\n  CREATED:  %u\n%^T\n%a\n
~/org/todo.org
Standing obligations)
   (event
?e * %? %^G\n  CREATED:  %u\n%^T\n%a\n
~/org/todo.org
One-time events)
   (project todo
?p * TODO %? %^G\n  CREATED:  %u\n%a\n
~/org/projects.org)
   (note
?n * %u %? %^G
~/org/notes.org
Unfiled Notes)
   (to-read
?r * TO-READ %a\n** Details\n%:author (%:year). %:title.  In %:journal, 
%:pages.\n\n
~/org/todo.org
Reading)
   (music
?m * %^{Song} by %^{Artist} on %^{Album}\n  %U %?%!%
~/org/notes.org
Music)))
--8---cut here---end---8---

org-config-latex.el sets org-export-latex-classes, but I never actually
use the classes I defined now that there are #+ directives for LaTeX
export.

org-config-publish.el sets org-publish-project-alist, and

--8---cut here---start-8---
(setq
  org-export-with-toc nil
  org-export-with-section-numbers nil)
--8---cut here---end---8---

Thanks,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpURxYPbEzba.pgp
Description: PGP signature
___
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: desirability of boxquote-style snippets for helping new users

2009-01-15 Thread Austin Frank
On Thu, Jan 15 2009, Samuel Wales wrote:

 I have noticed more people using boxquote and similar ways of setting
 off code.  This makes it pretty and makes it stand out, both of which
 are good things.

 [snip]

 What do you think?

For anyone using gnus, I think a good alternative is to use
message-mark-inserted region.  Select a region and hit C-c M-m to get

--8---cut here---start-8---
a region set apart in this manner.
--8---cut here---end---8---

If you use a prefix on the command, C-u C-c M-m, you get slrn style
verbatim marks,

#v+
resulting in a region set a part in this manner.
#v-

Gnus gives nice highlighting in buffers containing sections like these.
Even for mail readers that don't recognize them, I think at least the
first is a good way of setting examples apart from the rest of the text.

FWIW, I do like boxquote for quoting excerpts from Info pages.  On an
info page, put some text into the kill ring (I use kill-ring-save, which
is M-w in my setup).  Then call M-x boxquote-info.

,[ (info (message)Insertion) ]
| `C-c M-m'
|  Mark some region in the current article with enclosing tags.  See
|  `message-mark-insert-begin' and `message-mark-insert-end'.  When
|  called with a prefix argument, use slrn style verbatim marks
|  (`#v+' and `#v-').
`

Just my $0.02.
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpz2eS7mJokf.pgp
Description: PGP signature
___
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: Inline images in exported HTML

2009-01-14 Thread Austin Frank
On Wed, Jan 14 2009, Graham Smith wrote:

 Carsten,

 I think it worth while mentioning that I am looking for a quick
 preview of my document, that also shows the images.

 These are natively produced by R on the Mac as PDFs. I want to keep
 them in vector format for the final report, so a) don't really want to
 change the output from R, Or b) convert them to PNGs just to allow me
 a quick Preview, which would no longer be quick

Graham--

As another option, you might consider svg() from the RSvgDevice
package.  SVG images display in some modern web browsers.

HTH,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpK8ed4HTNkR.pgp
Description: PGP signature
___
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 and ESS

2008-11-12 Thread Austin Frank
On Tue, Nov 11 2008, Graham Smith wrote:

 Is any one using Org-mode with ESS.  ESS seems to need a file with a
 *.R name to work, but it would be really useful to use Org-mode
 features to keep notes of comments and code, before sending to R, and
 of course to copy results back into an Org-Mode file from R.

 As a search here and a google hasn't thrown up anything obvious, I
 assume not, but I thought I would ask.

In my local git repo of the org sources I have a pretty nice setup for
using R or S inside org-mode.  I liked the in-file native editing of
source code so much that I decided that I wanted to use org files as
source files with Sweave (instead of using .Rtex or .Rnw files).  My
goal was to export documents with embedded R code, rather than to use
org within the comments of R files.  I can certainly see a use for the
latter approach (which seems to be what you have in mind), as well.

There was recently a thread where someone created a preprocessing system
for specific types of blocks.  That would be another possible strategy
for evaluating blocks of R code before export.  Since that facility
didn't exist yet and there was already the extensible Sweave
pre-processor, I took the route of making Sweave org-aware.


Basically, in the workflow I've developed, I create a file with the
extension .Rorg, say homework_key.Rorg.  Within that file, I can embed
blocks of R code, and can refer to variables defined in the R code
contained in the document.

--8---cut here---start-8---
#+BEGIN_R
a - 3
a
#+END_R

* the value of a is \R{a}
* the value of a + 3 is \R{a + 3}  
--8---cut here---end---8---

Executing C-c ' inside the block takes you into a temporary buffer
that's in ESS mode, with full support for interactive evaluation.


When I'm ready to export, I run the R command

  Sweave(homework_key.Rorg, driver=RweaveOrgLatex, syntax=SweaveSyntaxOrg).

(I've defined those driver and syntax functions locally).  This creates
a new file, homework_key.org.  In the new file, the above text would be
translated into

--8---cut here---start-8---
#+BEGIN_LATEX
\begin{Schunk}
\begin{Sinput}
 a - 3
 a
\end{Sinput}
\begin{Soutput}
[1] 3
\end{Soutput}
\end{Schunk}
#+END_LATEX

* the value of a is 3
* the value of a + 3 is 6
--8---cut here---end---8---

The plain homework_key.org file could then be exported into \LaTeX.  It
even works with the new pdf export.
  

I haven't put the code anywhere public because there are several things
I still need to do:

- test graphic creation and export
- improve generation of latex headers
- automate processing from .Rorg to .tex (or .pdf) (currently at least 3
  steps, should be 1)
- come up with suggested keybindings for inserting the #+BEGIN/END_R
  blocks
- create a driver to generate HTML instead of \LaTeX

Still, it is in a works-for-me state at the moment, and I could send a
pull request to Carsten or could push it worg if folks were interested.

Let me know,
/au


-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgp68slAN4f7E.pgp
Description: PGP signature
___
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 and ESS

2008-11-12 Thread Austin Frank
On Wed, Nov 12 2008, Eric Schulte wrote:

 In the above example how would you/Sweave handle the case where there
 are multiple R blocks in the same file?  For example

Sweave puts all variables defined in a document into the same
environment.  So assigning to a twice overwrites the first assignment.

,[ tmp2.Rorg ]
| #+BEGIN_R
| a - 3
| a
| #+END_R
| 
| - the value of a is \R{a}
| - the value of a + 3 is \R{a + 3}  
| 
| #+BEGIN_R
| a - 8
| a
| #+END_R
| 
| - the value of a is \R{a}
| - the value of a + 3 is \R{a + 3}  
`

,[ tmp2.org ]
| #+BEGIN_LaTeX
| \begin{Schunk}
| \begin{Sinput}
|  a - 3
|  a
| \end{Sinput}
| \begin{Soutput}
| [1] 3
| \end{Soutput}
| \end{Schunk}
| #+END_LaTeX
| 
| - the value of a is 3
| - the value of a + 3 is 6  
| 
| #+BEGIN_LaTeX
| \begin{Schunk}
| \begin{Sinput}
|  a - 8
|  a
| \end{Sinput}
| \begin{Soutput}
| [1] 8
| \end{Soutput}
| \end{Schunk}
| #+END_LaTeX
| 
| - the value of a is 8
| - the value of a + 3 is 11  
`

 With that questions answered it should be relatively straightforward
 to implement exporting as you described using only org-mode's block
 processing, and letting ESS do the actual calculations all without any
 dependence on Sweave.

There is a Sweave.sty that handles formatting of the Schunk, Sinput, and
Soutput environments.  While you may not need to depend on Sweave for
the preprocessing step, it would be nice if the formatted document at
least had the option of having the same appearance as Sweave-processed
files.  Still, I suppose I could just add a #+LATEX_HEADER line for
these files.

 if you have examples of graphic creation, I'd be interested to see how
 they work, and relatedly how difficult it would be to move that
 functionality into org-mode.

OK, here comes the first attempt.  The additional feature demonstrated
in this example is the inclusion of options to the Sweave preprocessor
at the beginning of the block.  In this case I've specified fig=TRUE to
tell the preprocessor to generate image files for the plot commands
contained in the block.  By default, Sweave creates a .eps and a .pdf
file for each block that contains a plotting or printing command and has
the fig=TRUE argument, and then inserts an \includegraphics{} command in
the output file.

,[ tmp3.Rorg ]
| * first figure
| #+BEGIN_R fig=TRUE
| x - rnorm(100)
| y - rnorm(100)
| 
| plot(x,y)
| #+END_R
`

,[ tmp3.org ]
| * first figure
| #+BEGIN_LaTeX
| \begin{Schunk}
| \begin{Sinput}
|  x - rnorm(100)
|  y - rnorm(100)
|  plot(x, y)
| \end{Sinput}
| \end{Schunk}
| #+END_LaTeX
| #+LaTeX:  \includegraphics{tmp3-001}
`

,[ tmp3.tex ]
| % Created 2008-11-12 Wed 23:46
| \documentclass[11pt,a4paper]{article}
| \usepackage[utf8]{inputenc}
| \usepackage[T1]{fontenc}
| \usepackage{graphicx}
| \usepackage{hyperref}
| \usepackage{Sweave}
| 
| \title{tmp3}
| \author{Austin Frank}
| \date{12 November 2008}
| 
| \begin{document}
| 
| \maketitle
| 
| 
| \section*{first figure}
| \label{sec-1}
| 
| \begin{Schunk}
| \begin{Sinput}
|  x - rnorm(100)
|  y - rnorm(100)
|  plot(x, y)
| \end{Sinput}
| \end{Schunk}
| \includegraphics{tmp3-001}
| 
| \end{document}
`

And the pdf is attached.



tmp3.pdf
Description: Adobe PDF document

I haven't looked into it too closely, but I would guess that when
fig=TRUE is specified, first the R block is run, and then the additional
R commands

  dev.copy2eps()
  dev.copy2pdf()
  
are run.  This results in the creation of eps and pdf files based on the
last thing plotted.  The functions could each take a file=foo argument
(the filename defaults to Rplots.[eps|pdf]).  Sweave uses automatically
incremented names for its generated graphics files.  If your block
system could have an after-block hook, you could evaluate the original
block, then the appropriate dev.copy function, and then add an
additional line to the exported file for inclusion of the graphics file.

 However I think the rest of the point you make immediately below would
 be easily addressed through using an org-mode only approach.

Exciting!  If you're interested in what other options the Sweave
preprocessor contains, the manual can be found at
http://www.stat.auckland.ac.nz/~dscott/782/Sweave-manual-20060104.pdf.

Sweave also has a processing option called tangle.  This extracts all
of the R code from a document and puts into its own file.  This would be
a useful feature in a generic block exporter as well, I would think.
Take all of the blocks of a certain type and dump the content into a
file with the appropriate extension for whatever the major mode was for
that block.

Finally , a couple of systems for caching Sweave output have sprung up.
I think these use the strategy of hashing the content of each block,
saving the output of each block, and only re-running the block if the
content has changed.  A general-purpose option like this for the block
exporting system in org could be very nice to have.  It's possible that
the attachment system with git integration

[Orgmode] Re: possible latex export bug

2008-10-14 Thread Austin Frank
On Tue, Oct 14 2008, Carsten Dominik wrote:

 Hi Austin,

 please give it another try, I think I have fixed this problem.

 - Carsten

Carsten--

Very very close!  As far as I can tell, there's just one bug left with
the ordering of export operations.  The problem is that a line within a
#BEGIN/END_LATEX block that starts with a + is exported as belonging to
an itemized list.  My expectation is that no org formatting should be
applied inside a block that's been declared with one of
org-additional-option-like-keywords or org-edit-src-region-extra.

Bug report follows.

Thanks!
/au

Start emacs with emacs -Q

evaluate (require 'org-install)

open a new file in org mode, testing.org

enter the following content:

--8---cut here---start-8---

* test
#+BEGIN_LATEX
\begin{verbatim}
a -
+ 3
\end{verbatim}
#+END_LATEX
--8---cut here---end---8---

execute org-export-as-latex

get the following output

--8---cut here---start-8---
% Created 2008-10-14 Tue 22:46
\documentclass[11pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{hyperref}


\title{testing}
\author{Austin Frank}
\date{14 October 2008}

\begin{document}

\maketitle

\setcounter{tocdepth}{3}
\tableofcontents


\section{test}
\label{sec-1}

\begin{verbatim}
a -
\begin{itemize}
\item 3
\end{itemize}

\end{verbatim}


\end{document}
--8---cut here---end---8---


--
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpS3v9Qzywr5.pgp
Description: PGP signature
___
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: possible latex export bug

2008-10-12 Thread Austin Frank
On Fri, Oct 10 2008, Carsten Dominik wrote:

 I believe this bug has been fixed recently by Bastien.  Could you
 please check and confirm that this is the case?

Carsten and Bastien--

I still get this behavior.  To reproduce

1.  Start emacs with emacs -Q
2.  Evaluate the line

  (require 'org-install)

3.  Open a new file, tesing.org.  Execute M-x org-mode.
4.  Put the following content in testing.org

--8---cut here---start-8---

* test
#+BEGIN_LATEX
\begin{verbatim}
a - 3
\end{verbatim}
#+END_LATEX
--8---cut here---end---8---

5.  Execute org-export-as-latex by C-c C-e l
6.  Output is

--8---cut here---start-8---
% Created 2008-10-12 Sun 23:43
\documentclass[11pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{hyperref}


\title{testing}
\author{Austin Frank}
\date{12 October 2008}

\begin{document}

\maketitle

\setcounter{tocdepth}{3}
\tableofcontents


\section{test}
\label{sec-1}

\begin{verbatim}
a - 3
\end{verbatim}
#+END_LATEX


\end{document}
--8---cut here---end---8---


I also am seeing that file-local variables at the bottom of the file are
still exported into the latex.  For now I'm assuming that it's the same
bug, but if the #+END_LATEX bug gets fixed and the other persists, I'll
file another report :)

Org-mode version 6.09a
GNU Emacs 23.0.60.1 (powerpc-apple-darwin8.11.0, *Step 9.0) of
2008-10-12

Just to be sure, I also ran

  git diff origin lisp/org-exp.el
  git diff origin lisp/org-export.el

and found no differences between my local copy and the copy in the
origin repository.  I think that's the right way to check, but feel free
to correct me if I'm comparing things incorrectly.

Thanks,
/au

--
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpLJlCbQb0vB.pgp
Description: PGP signature
___
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: Question about agenda

2008-10-08 Thread Austin Frank
On Wed, Oct 08 2008, Robert Goldman wrote:

 I think this means that I don't really understand the meaning of
 SCHEDULED, nor do I understand how the agendas are composed.  But I'm
 looking at the info manual now, and I'm not actually enlightened.

 Is there something I should do to tag something SCHEDULED like this so
 that it no longer appears in my agenda view as something still to be
 done?  Is there a HAPPENED tag, or something like that?

,[ (info (org)Deadlines and scheduling) ]
| SCHEDULED
|  Meaning: you are planning to start working on that task on the
|  given date.
| 
|  The headline will be listed under the given date(1).  In addition,
|  a reminder that the scheduled date has passed will be present in
|  the compilation for _today_, until the entry is marked DONE.
|  I.e., the task will automatically be forwarded until completed.
| 
|   *** TODO Call Trillian for a date on New Years Eve.
|   SCHEDULED: 2004-12-25 Sat
| 
|  Important: Scheduling an item in Org mode should not be understood
|  in the same way that we understand scheduling a meeting.  Setting
|  a date for a meeting is just a simple appointment, you should mark
|  this entry with a simple plain time stamp, to get this item shown
|  on the date where it applies.  This is a frequent
|  mis-understanding from Org-users.  In Org mode, scheduling means
|  setting a date when you want to start working on an action item.
`


HTH,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpE9VGeInpOB.pgp
Description: PGP signature
___
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] possible latex export bug

2008-10-02 Thread Austin Frank
Hello!

I'll start by confessing up front that I've been tinkering with
different exporting functions these past few weeks, so it's possible
that the bug I'm reporting here is of my own making.  I can't track it
down, so here I am, hat in hand, to ask

a) is this reproducible?  and,
b) if not, any idea which functions I should look at to chase it
   down?

If I have the following org file

--8---cut here---start-8---
* this is a test
#+begin_latex
\mu
#+end_latex
--8---cut here---end---8---

and run org-export-as-latex, I get the following output

--8---cut here---start-8---
% normal preamble stuff
% ...

\begin{document}

\maketitle


\section*{this is a test}


\mu

\end{document}
--8---cut here---end---8---

That's the correct behavior.  If I use this org file

--8---cut here---start-8---
* this is a test
#+begin_latex
\begin{quote}
\mu
\end{quote}
#+end_latex
--8---cut here---end---8---


and run org-export-as-latex, I get

--8---cut here---start-8---
% normal preamble stuff
% ...
\begin{document}

\maketitle


\section*{this is a test}


\begin{quote}
\mu
\end{quote}
#+end_latex

\end{document}
--8---cut here---end---8---

In the second example, the #+end_latex line is not removed during
org-export-to-latex.

Possibly related, possibly unrelated, I'm also seeing that file-local
variables defined at the end of a buffer are being exported verbatim
during org-export-as-latex.  This only happens in cases where the
#+end_latex is also erroneously exported.

--8---cut here---start-8---
* this is a test
#+begin_latex
\begin{quote}
\mu
\end{quote}
#+end_latex

#+ Local Variables:
#+ org-export-latex-append-header: 
#+ \\usepackage{graphicx}
#+ 
#+ End:
--8---cut here---end---8---
  
gives

--8---cut here---start-8---
% normal preamble stuff
% ...

\begin{document}

\maketitle

\begin{quote}
\mu
\end{quote}
#+end_latex

#+ Local Variables:
#+ org-export-latex-append-header: 
#+ \\usepackage{graphicx}
#+ 
#+ End:

\end{document}
--8---cut here---end---8---

This doesn't just apply to the quote environment, I've reproduced it
with other #begin/end_latex blocks that contain latex environments.
That is to say

--8---cut here---start-8---
* this is a test
#+begin_latex
\begin{verbatim}
\mu
\end{verbatim}
#+end_latex
--8---cut here---end---8---

has the same problem of including the #+end_latex tag after export.

This is with Org-mode version 6.08-pre01, GNU Emacs 23.0.60.1
(powerpc-apple-darwin8.11.0, *Step 9.0) of 2008-10-01.


Can anyone reproduce this?  Any debugging tips?

Thanks,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpHYFsxY3RKQ.pgp
Description: PGP signature
___
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] #+LATEX_PREAMBLE

2008-10-01 Thread Austin Frank
Carsten and org-ers--

I have a feature request related to \LaTeX export.  I know that we can
set up custom \documentclass declarations in org-export-latex-classes,
and that each of these can contain arbitrary preamble information along
with the \documentclass{} declaration.  I also know that the preamble
can be further customized using file local variables to set
org-export-latex-append-header.  These two solutions can seem relatively
heavyweight when one just wants to add a new \usepackage{} declaration
to the preamble of a specific file.

Any chance we could have a mechanism to add single line declarations to
the preamble of the exported tex file using the #+FOO syntax?  I would
really love to be able to do something like

#+LATEX_PREAMBLE:  \usepackage{pstricks}
#+LATEX_PREAMBLE:  \usepackage{Sweave}

at the top of a file and have each of those lines inserted before the
\begin{document} line of the exported tex file.  I think for readability
and flexibility the possibility of having multiple declarations would be
really nice, but I could certainly live with

#+LATEX_PREABMLE:  \\usepackage{pstricks}\n\\usepackage{Sweave}

if that were easier to implement.

Thanks for considering it,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpqsMSTgRZeX.pgp
Description: PGP signature
___
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-export-sweave

2008-09-22 Thread Austin Frank
On Thu, Sep 18 2008, Carsten Dominik wrote:

 These regular expressions are incorrect. \\s- is the way to denote
 whitespace.  However, since that also includes newlines, I prefer to
 write [ \t] in such cases.

Carsten--

Thanks for the tip.  I now to get dumped into r-mode correctly when I
hit C-c ' inside the regions defined in the attached patch.  There's one
annoying quirk left, though.

When coming out of r-mode by hitting C-c ' in the Org Edit Src Example
buffer, the line that ends the example (#+latex:  \end{Scode}) is
concatenated to the last line of the source code, regardless of how many
new lines are included at the end of the source code in the temporary
buffer.

   #+latex: \begin{Scode}
   a - 3
   #+latex: \end{Scode}

goes to

   #+latex: \begin{Scode}
   a - 3#+latex: \end{Scode}

Any suggestions on how to preserve the formatting of the end marker?

Thanks,
/au

diff --git a/lisp/org.el b/lisp/org.el
index 3143e13..75f25f8 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -5562,6 +5562,8 @@ the language, a switch telling of the content should be in a single line.
 	   (^#\\+begin_example.*\n ^#\\+end_example fundamental)
 	   (^#\\+html: \n html single-line)
 	   (^#\\+begin_html.*\n \n#\\+end_html html)
+   (^[ \t]*begin{scode}\\({.*}\\)?\\s-+ ^[ \t]*end{scode}\\({.*}\\)?\\s-+ r)
+	   (^#\\+latex:[ \t]*begin{scode}\\({.*}\\)?\\s-+ ^#\\+latex:[ \t]*end{scode}\\({.*}\\)?\\s-+ r)
 	   (^#\\+begin_latex.*\n \n#\\+end_latex latex)
 	   (^#\\+latex: \n latex single-line)
 	   (^#\\+begin_ascii.*\n \n#\\+end_ascii fundamental)

   
-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc
___
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-export-sweave

2008-09-17 Thread Austin Frank
Carsten--

Thanks for the response!

On Tue, Sep 16 2008, Carsten Dominik wrote:

 since you want to include tis code literally into LaTeX,  the best is
 probably to encapsulate it into

 #+BEGIN_LATEX  #+END_LATEX

 and to try to solve only the local editing issue.

Yes, this makes sense.  Though, since really all I need to do is wrap
source code written in R in a \LaTeX environment, I might also like to
use

#v+
#+LATEX:  \begin{Scode}
a - 3
a
#+LATEX:  \end{Scode}
#v-

 Take a look at the function org-edit-src-find-region-and-lang.  There
 is a list of regular expressions that can be used to identify regions
 that should be edited in special modes - maybe I can make this list
 extensible - first, give it a try and see if you can get it working by
 editing the list.

While I think opening up this list to customization is probably a good
idea, I could not get my new entries to behave the way I wanted.  The
problem, I suspect, may have to do with the ordering of the different
language environments.  Suppose I had

#v+
#+BEGIN_LATEX
\begin{Scode}
a - 3
a
\end{Scode}
#+END_LATEX
#v-

in an org file.  I guess that I want the code within the Scode
environment to me in r-mode, and the code outside of that but still
within the LATEX block to be in LaTeX-mode.  In what order should these
two definitions appear within the re-list?

FWIW, attached is a patch of the setup I tried to use.  When I hit C-c '
inside either of the above examples, I get a temporary buffer that's in
latex-mode.  I was hoping to get a temporary buffer in r-mode.  I also
tried a version of the code that used the same entries in the re-list,
but put them at the bottom, under the entries for ascii.  Same results.

Thanks for any further advice,
/au

diff --git a/lisp/org.el b/lisp/org.el
index 4b29704..0612653 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -5562,6 +5562,8 @@ the language, a switch telling of the content should be in a single line.
 	   (^#\\+begin_example.*\n ^#\\+end_example fundamental)
 	   (^#\\+html: \n html single-line)
 	   (^#\\+begin_html.*\n \n#\\+end_html html)
+   (^\\s*begin{scode} ^\\s*end{scode} r)
+	   (^#\\+latex:\\s*begin{scode} ^#\\+latex:\\s*end{scode} r)
 	   (^#\\+begin_latex.*\n \n#\\+end_latex latex)
 	   (^#\\+latex: \n latex single-line)
 	   (^#\\+begin_ascii.*\n \n#\\+end_ascii fundamental)



-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpA7norSaf0y.pgp
Description: PGP signature
___
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] org-agenda-busy-at

2008-09-17 Thread Austin Frank
Carsten and other org-folk--

Any chance that it would be possible to query the agenda to see whether
anything is scheduled at a particular time?  The application I have in
mind is scheduling new events with remember templates.  If there's
already something in the agenda for the timestamp I enter in a new
remember entry, I would love to be given the message There is already
an event scheduled at that time.  Really use this timestamp?

I could see a further extension of this, such that it allowed different
behavior for different kinds of time stamps.  Something like

(setq org-agenda-busy-warn
  '(active . t)
  '(scheduled . -1h +1h)
  '(deadline . +3d))

would warn you if you tried to add a new timestamp that occurred within
the range of an active timestamp; and would warn you if the new
timestamp were within plus or minus one hour of a timestamp with the
SCHEDULED property; and would also warn you if you tried to add a new
timestamp within three days of a deadline.

You tried to create a new event with timestamp 2008-10-31
20:00-21:30.   There is already an entry with timestamp 2008-10-31
20:30-12:00.  You have an event SCHEDULED at 2008-10-31 19:30.  You
have a DEADLINE on 2008-11-2.  Proceed/Edit timestamp/Cancel?

We could then use a function, org-agenda-busy-at, to check timestamps
included in new remember notes before they get filed.  

I don't know whether this kind of information is easily retrievable from
the agenda, or whether it could be stored as the agenda is built.  Is
there someplace in the code that I should look to check into the
feasibility of this idea?  Is it just impossible?  Is it one of those
things where Carsten says a mystical incantation and it's done?

Thanks,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpu7uH1VU0ty.pgp
Description: PGP signature
___
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] org-export-sweave

2008-09-01 Thread Austin Frank
Hello!

Sweave is a preprocessing step that can be applied to LaTeX files that
contain code written in the S or R programming languages.  Sweave allows
authors to embed their statistical analyses in body of their LaTeX
articles, enabling what I find to be a very nice style of literate
programming.  It seems to me like org currently has all of the
functionality needed to be a top-notch Sweave authoring environment, but
I can't get the pieces to work correctly together.  So this is both a
feature request and a request for implementation advice.

I'm hoping that it will be possible to add an option for exporting
Sweave blocks from org mode.  A Sweave block in LaTeX looks like

  % NB:  options are comma separated, spaces are optional
  \begin{Scode}{opt1=foo, opt2=bar,opt3=baz}
  a - 3
  a
  \end{Scode}

Right now I can easily get this exported using

  #+LATEX: \begin{Scode}{opt1=foo, opt2=bar,opt3=baz}
  a - 3
  a
  #+LATEX: \end{Scode}

But I would also like to be able to use the native editing mode for
writing the code, as happens in #+BEGIN_SRC blocks. I can't currently
get a combination of #+BEGIN_SRC and #+LATEX blocks to work.

Would it be possible to have something like

  #+BEGIN_SWEAVE: language opt1=foo, opt2=bar, opt3=baz
  a - 3
  a
  #+END_SWEAVE

where the code inside the SWEAVE block is edited in the appropriate
major mode for the language argument?  An actual use, then, would look
like

  #+BEGIN_SWEAVE:  r fig=TRUE, echo=FALSE,keep.source=TRUE
  x - runif(100, 0, 100)
  y - runif(100, 0, 100)
  plot(x ~ y)
  #+END_SWEAVE

C-c ' inside the block would call out to r-mode from the package ESS.
LaTeX export would result in

  \begin{Scode}{fig=TRUE, echo=FALSE,keep.source=TRUE}
  x - runif(100, 0, 100)
  y - runif(100, 0, 100)
  plot(x ~ y)
  \end{Scode}

The file output by export to LaTeX should have the extension .Rtex.  The
author can then run Sweave on the file to generate a .tex file, and then
the normal LaTeX compilation process continues.

I've started trying to put this together myself, but haven't gotten very
far.  Some of the existing behavior for exporting source code relies on
prefixing the code inside the block with a ':' at the beginning of the
line, which then results in a verbatim environment in LaTeX.  I can't
figure out how to override this selectively for Sweave blocks, while
retaining the major-mode switching with C-c '.


Thanks for any implementations tips or (even better!) working
implementations ;)

/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpFX0PuQTxAx.pgp
Description: PGP signature
___
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 release 6.04

2008-05-25 Thread Austin Frank
On Sun, May 25 2008, Carsten Dominik wrote:

 Editing source code example in the proper mode
 --

 If you are writing a document with source code examples, you can
 include these examples into a `#+BEGIN_SRC lang ... #+END_SRC' or
 (with the org-mtags module loaded) a `src...' structure.  `lang'
 stands for the Emacs mode used for editing the language, this could be
 `emacs-lisp' for Emacs Lisp mode examples, or `org' for Org mode
 examples.  You can now use the key C-c ' (that is C-c followed by
 the single quote) to edit the example in its native mode.  This works
 by creating an indirect buffer, narrowing it to the example and
 setting the appropriate mode.  You need to exit editing by killing
 that indirect buffer, with `C-x k'.  This is important, because lines
 that have syntactic meaning in Org will be quoted when the indirect
 buffer is killed.

Carsten--

This is a phenomenally exciting addition.  Combining this with the
htmlized code examples in html export, and the option for \LaTeX export,
org has clearly just vaulted past the rest of the field for literate
programming.  Expect a tutorial from me in the next few weeks about
using org with RWeave (the R variant of SWeave).  This will be a
fantastic way to write articles that include statistical analyses and
figures.

That said, don't be surprised if by opening this door you end up with
some new feature requests from me :)  One addition that I can already
see being interested in is the evaluation of embedded code before
export, so that the results of the code are included along with the
source.  Obviously, there are security issues here that will need to be
thought about, but I'd like to see if we could make this work.

Greedy feature requests aside, this is very, very cool.

 I guess it would be nice to exit with `C-c C-c', but who knows what
 this key is supposed to do in a random mode.

I can tell you now that C-c C-c is almost as overloaded in R-mode (from
the package ESS) as it is in org-mode, and I will want it to have its
R-mode interpretation while I edit R code.  While I'm writing, I'll try
to keep an eye out for sensible ways of jumping out of coding mode and
back to org-mode.

Thanks for this release!
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpifd0UQAibq.pgp
Description: PGP signature
___
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] adding semantics to properties

2008-05-15 Thread Austin Frank
Hello all--

I recently had an idea for a possible generalization of some existing
org-mode functionality, and I wonder whether others would find it useful
and whether implementing it seems feasible.

One way to think of org is as program for creating structured texts with
the ability to associate arbitrary meta-data at any point in the
hierarchy.  This meta-data comes in two general forms:  structured and
unstructured.  Structured meta-data in org includes todo state, priority
level, tags, deadlines, schedules, timeclocks, categories, and probably
some others that I'm forgetting.  Unstructured meta-data is stored in
properties.  My proposal is that we add the ability to store structured
meta-data in properties.

The current forms of structured meta-data fall into classes with similar
functionality.  Most importantly, we have interfaces for adding,
manipulating, and searching tags, timestamps, and states.  As org has
developed, we've seen the addition of different todo cycles and tag
sets.  I think it would be useful not only to be able to define these
different sets, but to store them independently as well.

I propose that users should be able to declare that a given property has
a particular kind of interpretation, and that in doing so they gain
access to org's existing interfaces for that kind of information.  For
example, rather than having a single tag line that holds all of my
tag-like information about an entry, I could split the tags up into
meaningful classes in properties of the entry.  For example, when I go
to set the PEOPLE property, I would get to use org's tag selection
interface rather than plain text entry.  In another case, I might have
multiple todo cycles that are relevant to the same entry:  I could have
a WRITING property that used todo semantics, and an associated todo
cycle, and I could still have my general todo cycle stored in the
default TODO property using its own cycle.


To be a bit more concrete, I'm proposing that an entry like

#v+
* NEXT Research project :advisor1:advisor2:computer:office:writing:analysis:
#v-

could actually be stored as something like

#v+
:PROPERTIES:
:TODO: NEXT
:WRITING: EDIT
:PEOPLE: :advisor1:advisor2:
:EQUIPMENT: :computer:
:LOCATION: :office:lab:
:TASK_TYPE: :writing:analysis:
:END:
#v-

Important to note are that I have multiple banks of tags and multiple
todo cycles within a single entry.  The display of the headline could be
almost the same-- display the union of all the tags from all of
properties using tag semantics, and maybe display only one todo state by
default.

I envision this sort of setup would being based on user configurations
like:

#v+
(setq org-tag-alist '((:PEOPLE:)
  (advisor1 . ?a)
  (advisor2 . ?b))
  org-todo-keywords '((:WRITING:)
  (DRAFT EDIT DISTRIBUTE REVISE | SUBMIT)))

(org-declare-property PEOPLE 'tagged)
(org-declare-property WRITING 'cycled)
(org-declare-property LAST_REVISED 'timestamped)
#v-

With a setup like this, when I did C-c C-x C-p PEOPLE, I would get a tag
selection interface that included tags only from the PEOPLE tagset.  C-c
C-x C-p WRITING would let me cycle through the appropriate todo states.
C-c C-x C-p LAST_REVISED would give me the timestamp entry dialog.

Given that there are already a set of special properties that use each
of the above semantics, my proposal boils down to letting users declare
their own special properties with those same semantics.

Org is clearly a great tool already.  In fact, I like its different
interfaces so much that I want to be able to use them in even more ways.
Do people think this generalization of existing org interfaces to
arbitrary properties is an interesting idea?  Would you use it?

Thanks for your thoughts,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpWN6y3FbIO1.pgp
Description: PGP signature
___
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] repeating events in icalendar export

2008-02-04 Thread Austin Frank
Hello!

I'm wondering whether it's possible for active timestamps with repeater
information to exported as repeating events using
org-export-icalendar-*.  

I have a buffer with an entry like this:

#v+
* Weekly meeting
  2008-02-01 14:00-16:00 +1w
#v-

When I call org-export-icalendar-this-file, the meeting shows up on
2/1/2008, but not on any subsequent weeks.  Is there another way to get
this to work?

Thanks for any tips,
/É”/

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpaQBwlmmaeI.pgp
Description: PGP signature
___
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] bug report: setting tags via %^G in remember template

2008-01-31 Thread Austin Frank
Hello!

When I include a %^G in a remember template, I am prompted to enter tags
whenever I use that template.  I get tab completion for all tags that
are in any agenda files.  If I choose a tag that starts with @, for
example @FUN, when the tags are written to the headline the leading
@ is stripped, resulting in the tag :FUN:.

remember template:
   org-remember-templates '((todo ?t
 * TODO %? %^G\n  CREATED:  %u\n%a\n
 ~/todo.org
 Unscheduled tasks))

Intended result:

  * TODO template entry :@FUN:

Actual result:

  * TODO template entry :FUN:

If others don't have this problem, I will try to track down what the
problem is in my setup.
  
This is only a minor annoyance, but I reckon its a bug nonetheless.

Thanks!
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpJz2keOKsNQ.pgp
Description: PGP signature
___
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] tags in remember templates

2008-01-24 Thread Austin Frank
Hello!

Two quick questions about tags in remember templates.  First, should
this line (line number 13423 in org.el v5.19a) in
org-remember-apply-template also include G?

(while (re-search-forward %^\\({\\([^}]*\\)}\\)?\\([guUtT]\\)? nil t)

Second, I set the value of org-tags-alist in my org-config.el (loaded by
my .emacs).  This allows me to have access to a useful set of default
tags in every buffer, but these tags aren't available for completion in
remember templates.  Would it be possible to include the value of
org-tags-alist in the tags that are available for completion, at least
for %^G?  It would be very useful to me to have access to these tags as
well as any defined in the file.

Thanks,
/au
  
-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpuj66Zqe7sf.pgp
Description: PGP signature
___
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] FR: interactive todo creation with remember templates

2008-01-22 Thread Austin Frank
Hello again!

I love all of the options that are available for inclusion in remember
templates.  I've got templates for the kinds of tasks I create most
often.  But sometimes I find myself saying man, I wish I could just
tack a %^G onto this template, or something similar.  These aren't task
types that I use often enough to justify giving them their own
templates, but I still want to have access to the features offered in
remember templates.

Would it be possible to build a single-use remember template through
prompts at the minibuffer?

I imagine that I would call org-remember, and one of the options would
be [i]nteractive.  Upon hitting i, a menu (like the one for fast tag
selection) would come up.  It would look like

  t:  timestamp
  T:  timestamp with time
  u:  inactive timestamp
  c:  clipboard contents
  g:  tag selection from target file
  k:  insert keyword information
  [...]

Pressing any of the keys would either enter that feature in the current
remember buffer, or open the appropriate prompt in the minibuffer.

This has several advantages over just visiting the appropriate file and
entering the task manually:  single key strokes for some common
operations (e.g. timestamps), access to link keywords, file inclusion,
and sexp evaluation.

It might also be possible to use this to extend an existing template on
a per-use basis.  I could call org-remember, and instead of hitting t
for my todo template, I would hit C-u t.  This would insert the normal
contents of my todo template, but also prompt for additional template
options.

Is something like this possible?

Thanks,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpMuKGc7XXVK.pgp
Description: PGP signature
___
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: FR: multiple or repeating active timestamps in agenda

2008-01-22 Thread Austin Frank
On Tue, Jan 22 2008, Carsten Dominik wrote:

 Hi Austin,

 I'd like to be able to mark it as done every week, without needing it
 to be SCHEDULED or have a DEADLINE.  Currently, the first time I mark
 it as done, all past and future repetitions are also marked as done.

 What is the purpose of marking it done?  It is not going to be on your
 agenda after that day, if you have notes for the meeting you can just
 add them.  So I don't really see the use of this.

The point of marking it done is mostly to have a record of having
completed it.  I'm trying to use org to generate reports of what I get
done each week, and attending recurring meetings and courses is a large
portion of the stuff I have to do.  I'd like a way to include these
recurring events in the list of things I've accomplished.

I could create a new task for each instance of the event, but a) I worry
I would forget, and b) that gets to be a hassle when it's something that
happens two or three times a week over several months.

 Given that we can't combine repetition intervals with date ranges (or
 can we?),

 No, we cannot.

Understandable, for exactly the reasons you mention below.

 --8---cut here---start-8---
 * Standing Appointments
 ** Swing III
 *** TODO Week 1
2008-01-21 Mon 19:30-21:30
 *** TODO Week 2
2008-01-28 Mon 19:30-21:30
 *** TODO Week 3
2008-02-04 Mon 19:30-21:30
 --8---cut here---end---8---


 I'd say this is a pretty good way of dealing with a limited amount of
 meetings.

I will probably use this structure to deal with this case.  I would
still appreciate any suggestions from the list on how to include
recurring events as TODO items without marking them as SCHEDULED or
DEADLINE.  Has anyone else dealt with this situation?

 Yes, I am lazy to no implement this, but believe me, time stamp
 handling is complex already, in part because I have been adding the
 new features one at a time.  Had I know from the start what kind of
 features would be goot, time ranges with repeater intervals would
 probably be in.  Now, it is hard to do.  I'll put it into my tickler
 file, but no promises

Org is obviously already incredibly useful.  I'm certainly not
complaining, just looking for the best way to fit org to my thinking and
vice versa.  Thanks for considering the request, and for all of the
features that already are in org.

/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpXIcKaAl4xq.pgp
Description: PGP signature
___
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] displaying outline path in agenda

2008-01-22 Thread Austin Frank
Hi!

Apologies for the rash of posts.  Hopefully some of these will be
useful, if only by chance :)

I recently wrote about a way for recording an event that only repeats a
few times, using something like

--8---cut here---start-8---
* Standing Appointments
** TODO Swing III
*** Week 1
2008-01-21 Mon 19:30-21:30
*** Week 2
2008-01-28 Mon 19:30-21:30
*** Week 3
2008-02-04 Mon 19:30-21:30
--8---cut here---end---8---

One problem with this approach is that the agenda entry is not
especially informative-- simply Week 1.  I'd like to edit the function
that generates the agenda entries from active timestamps to include the
option of using new outline path notation.  In this case, the agenda
would read Standing Appointments/Swing III/Week 1.

I've already identified org-get-outline-path and org-format-agenda-line
as functions that might be relevant, but it seems to me that
org-format-agenda-line comes in to late in the process.  What I really
want is to replace use the outline path as the txt argument to
org-format-agenda-line.  Can anyone point me towards the part of the
org.el source I should be looking at for adding this functionality?

Thanks,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpHUGE1wa2p9.pgp
Description: PGP signature
___
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: clocking in and out in remember buffers - seems to be buggy

2008-01-22 Thread Austin Frank
On Tue, Jan 22 2008, Rainer Stengele wrote:

 I use to clock in a task when beginning to write in a remember buffer.
 For example when receive a phone call from a customer I pop up a
 remember template and the first thing I do is to start the clock.

 After writing down notes and doing some stuff, documenting further in
 the clocked in remember buffer, I finally want to save and close the
 remember template.

Here's what I would tried, but none of them worked

--8---cut here---start-8---
;; try to use advice to start and stop the clock
(defadvice remember (after clock-in-on-remember-open) 
  Call org-clock-in after opening a remember buffer.
  ;; also tried adding advice to org-remember and
  ;; org-remember-apply-template, neither worked
  (org-clock-in))

(defadvice remember-finalize (before clock-out-on-remember-close)
  Call org-clock-out before closing a remember buffer.
  (org-clock-out))

;; try to add clock starting to the remember mode hook
(add-hook 'remember-mode-hook 'org-clock-in)
--8---cut here---end---8---

Maybe one of these will give you an idea that will get you started in
the right direction.  Sorry I couldn't actually figure it out.

/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpFxzqDzqcBK.pgp
Description: PGP signature
___
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] FR: multiple or repeating active timestamps in agenda

2008-01-21 Thread Austin Frank
Hello!

I'm getting to the point of actually using org for organization (as
opposed to using it for note taking and publishing and procrastination).
Currently, when a repeated task is marked as done, it shows up again in
the agenda on the date of the next occurrence of the task as long as the
task is scheduled or has a deadline.  I'd like to request two additions
to this behavior.

First, would it be possible to add this same feature for active
timestamps that don't occur in a SCHEDULED or DEADLINE line?  I follow
the advice in the manual and don't use SCHEDULED for meetings, but I do
have some recurring meetings.  So, for the following entry:

--8---cut here---start-8---
* Standing Appointments
** TODO Meeting with Mike
   2008-01-23 Wed 10:00-11:30 +1w
--8---cut here---end---8---

I'd like to be able to mark it as done every week, without needing it to
be SCHEDULED or have a DEADLINE.  Currently, the first time I mark it as
done, all past and future repetitions are also marked as done.

Second, for some events with only a few repetitions I create multiple
active timestamps within one entry instead of using a repeating
timestamp.  So, for example, I have an entry like:

--8---cut here---start-8---
* Standing Appointments
** TODO Swing III
   2008-01-21 Mon 19:30-21:30
   2008-01-28 Mon 19:30-21:30
   2008-02-04 Mon 19:30-21:30
--8---cut here---end---8---

Given that we can't combine repetition intervals with date ranges (or
can we?), would it be possible to add a new behavior to deal with this
case?  When a TODO entry contains multiple time stamps, all of them
would show up in the agenda as TODO items.  Marking the item as done
would use the same logic used for dealing with repeaters, and would
continue to include the next active timestamp in the agenda as a TODO.

In the past I have dealt with this second case by adding more structure
to the task:

--8---cut here---start-8---
* Standing Appointments
** Swing III
*** TODO Week 1
2008-01-21 Mon 19:30-21:30
*** TODO Week 2
2008-01-28 Mon 19:30-21:30
*** TODO Week 3
2008-02-04 Mon 19:30-21:30
--8---cut here---end---8---

This gets the job done, but seems unnecessarily cluttered and redundant
to me.

Thanks for considering it,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpdcwEkCYgxQ.pgp
Description: PGP signature
___
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] org-mairix bug?

2008-01-07 Thread Austin Frank
Hello!

I'm working on integrating mairix into my email workflow.  The recently
added nnmairix in gnus is a great tool-- I encourage any gnus + mairix
users to try it.

I'd like to make use of org-mairix as well, but I am having some
trouble.  The link seems to be built correctly, containing the proper
options and message id.  Unfortunately, it seems that the arguments to
mairix aren't being constructed correctly.  For me, to get any searches
to work, I needed to append m: in front of the message-id in the
search argument to org-mairix-command-substitution.  I think this is
just an oversight on the original author's part, as the function
org-mairix-gnus-display-results actually checks for this string.  In any
case, I think the fix could look something like this

--8---cut here---start-8---
(defun org-mairix-command-substitution (cmd search args)
  Substitute '%search%' and '%args% in mairix search command.
  (while (string-match %search% cmd)
(setq cmd (replace-match search 'fixedcase 'literal (concat m: cmd
  (while (string-match %args% cmd)
(setq cmd (replace-match args 'fixedcase 'literal cmd)))
  cmd)
--8---cut here---end---8---

This allows my links in org mode to single out the message with the
specified ID.  I get complaints from org-mairix-gnus-display-results
because it doesn't think the first two characters of the search are
m:... I can't figure out why this is the case.

Thanks for org-mairix.  I hope this report is useful.
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgp9tS4fWkyak.pgp
Description: PGP signature
___
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] integrating org-mairix and nnmairix

2008-01-07 Thread Austin Frank
Hello again!

Right now org-mairix provides a very useful piece of functionality.  It
stores the message-id of an email, and creates a link from that
message-id which allows that specific email to be recovered using the
mairix search tool.  This is great for making todo items out of
individual mails, or for filing mails away for future reference.

Mairix provides the ability to search for lots of things other than
message-ids, though, and I think some of them would be useful in org.
For example, at the top of a project tree it might be useful to have a
link to a search like

--8---cut here---start-8---
mairix -t fc:[EMAIL PROTECTED] d:20080101-
--8---cut here---end---8---

This would give me a quick way to access all of the threads from, to, or
cc'd to [EMAIL PROTECTED] since the first of the year.  Assuming that's
when the project began, a search like this would be an excellent way to
get quick access to the emails relevant to the project.

So, I'd like to see org-mairix extended to include ways to build links
using more than just message-ids.

Recently the nnmairix backend for gnus has been released.  It includes
several great ways to build mairix searches from within emacs.  Users
can specify an arbitrary search string (nnmairix-search), build a search
string via interactive prompts in the minibuffer
(nnmairix-search-interactive), or use a neat widget interface to build
searches (nnmairix-widget-search).  Would it be possible to call these
functions from org-mairix to build more sophisticated searches for
links?  I believe that this would not even be gnus-specific, as the same
searches should work regardless of the client that eventually displays
the results.

On a gnus-specific note, nnmairix also includes some functions that
might be useful for linking to specific messages.
nnmairix-search-from-this-article and
nnmairix-search-thread-this-article could both be used in constructing
org links to individual messages, I think.

I should add that in some cases, the best option might be to create
search groups (nnmairix-create-search-group) and just link to those
using the gnus link type rather than using the mairix search type.  For
the most frequently used searches, I bet this is what I'll do.  Even
with this option, I still think being able to use all of the mairix
search syntax in the mairix link type will end up being useful.

Thanks for considering the request,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpLTbn52yxb4.pgp
Description: PGP signature
___
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] bibtex fields in remember templates

2007-10-30 Thread Austin Frank
Hello!

I am wondering whether it would be possible to have access to the values
of bibtex fields in remember templates when calling remember from a
buffer in bibtex mode.  I would like to define a template that includes
a link to the bibtex entry, but which also lays out a brief citation.
Something like

* TO_READ%?\n %a\n %:author (%:year).  %:title.  %:journal: %:pages.

I know that links to bibtex entries are created using the custom search
mechanism, but I can't figure out how to expose properties of the bibtex
entry to remember or org-remember.

Thanks for any help,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpjNi7Nt5Lkf.pgp
Description: PGP signature
___
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] FR: move subtree to category's file

2007-10-17 Thread Austin Frank
Hello!

I'd like to propose some functionality that I think would be useful, and
offer a very naive proof-of-concept implementation.

The basic idea is that I'd like to be able to add or change a property
on a tree, and then move the whole tree to a location based on that
property.

To be more concrete, I take lots of notes with remember.  They all get
saved to ~/notes.org.  Later in the day, I go back and add a PROJECT or
CATEGORY property to many of these notes.  Especially for a tree that
has to do with a project, I'd like to be able to quickly file the note
away in a file dedicated to that project by moving the tree to a
predefined file.

I know that there's a lot of power in the one-file-to-rule-them-all
approach, and that there are lots of ways I could view just the parts of
the file that have to do with a given project.  So if this idea is a
non-starter, that's fine, too.  Still there are some contexts where
having multiple files can be a good thing (for example, when using the
org-publish-project-alist).

I've got a very simple implementation of the idea that goes like this:

;; My filing system
(setplist 'project '(research1 ~/research1.org
 grant1 ~/grant1.org))

(defun aff-org-move-to-project-file ()
  Use value of the PROJECT property to move the subtree at the
  point to a predefined file.
  (interactive)
  (let* ((pom (point))
 (file (get 'project (intern (org-entry-get pom PROJECT)
(org-cut-subtree)
(org-open-file file)
(end-of-buffer)
(org-paste-subtree)))

This is does the basic job, but it'd be neat to see it extended in a
couple of ways:

 - Have a single variable that defines mappings for multiple
   properties.  Something like

   ;; probably lousy syntax for this, but
   ;; (PROP_NAME (prop_value associated_info))
   (setq org-property-map '((PROJECTS (research research.org
 grants grants.org))
(CATEGORY (chores home.org

 - Be able to use the syntax for linking to other org files to specify a
   location in the other file to insert the tree

 - With a prefix, be prompted for location to insert the tree in the
   file, like with remember notes

 - When more than one property of a given tree has a destination
   defined, prompt for which location to use  

 - It would also be nice to use these values to build appropriate
   archive locations, so that (for example) any DONE item with a value
   of research for the PROJECT category would be archived at the
   bottom of the research.org file rather than the default
   org-archive-location.

This whole proposal is basically just a generalization of
org-archive-subtree and org-archive-location to allow movement and
archiving based on properties other than just ARCHIVE.  Hopefully this
means most of the required functionality is already in place.

I know that for my workflow this would be very useful.  Would other
folks also like to have this functionality?

Thanks,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpBjqw3hFPrv.pgp
Description: PGP signature
___
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: bug report with org 5.11b and remember 1.19

2007-10-10 Thread Austin Frank
On Wed, Oct 10 2007, Carsten Dominik wrote:

 This happens because you are calling `remember-mode' interactively.
 Org-mode assumes that the command you are using is either `remember'
 or `org-remember'.  What are you calling `remember-mode'?  What are
 you trying to achieve?

Carsten--

So far I am just trying to mirror the setup described in John Wiegley's
day planner tutorial.  Eventually there are some things I mean to
customize to fit my work flow, but for now I've just been working on
replicating John's set up.  Thanks for the help with this!  Your post
helped me find my error.

I had

(global-set-key \C-cr 'remember-mode)

when I should have had

(global-set-key \C-cr 'remember)

Making this change has everything working as advertised.

Thanks again,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpT6N5xC7i06.pgp
Description: PGP signature
___
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] bug report with org 5.11b and remember 1.19

2007-10-09 Thread Austin Frank
Hello!

I've been trying to implement a setup based on John Wiegley's day
planner tutorial.  I have a file org-config.el that is loaded in my
.emacs.  org-config.el looks like this:

(require 'org-install)
(require 'remember)

;; basic org-mode configuration
;; keys are set in ekeys.el
(add-to-list 'auto-mode-alist '(\\.org$ . org-mode))

(add-hook 'remember-mode-hook 'org-remember-apply-template)

(custom-set-variables
 '(org-agenda-include-diary t)
 '(org-log-done t)
 '(org-export-with-toc nil)
 '(org-export-with-section-numbers nil)
 '(org-agenda-files (quote (~/todo.org)))
 '(org-default-notes-file ~/notes.org)
 '(org-agenda-ndays 7)
 '(org-deadline-warning-days 14)
 '(org-agenda-show-all-dates t)
 '(org-agenda-skip-deadline-if-done t)
 '(org-agenda-skip-scheduled-if-done t)
 '(org-agenda-start-on-weekday nil)
 '(org-reverse-note-order t)
 '(org-fast-tag-selection-single-key (quote expert))
 '(org-remember-store-without-prompt t)
 '(org-remember-templates
   (quote ((116 * TODO %?\n  %u ~/todo.org Tasks)
   (110 * %u %? ~/notes.org Notes
 '(remember-annotation-functions (quote (org-remember-annotation)))
 '(remember-handler-functions (quote (org-remember-handler


When I try to store a note using remember, I get the following error:
Symbol's value as variable is void:  initial

And here's the debugger output.

Debugger entered--Lisp error: (void-variable initial)
  org-remember-apply-template()
  run-hooks(remember-mode-hook)
  remember-mode()
  call-interactively(remember-mode)


Is there something incorrect about my setup?

Thanks,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc



___
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] indenting bug

2007-09-15 Thread Austin Frank
Hello!

Consider the following org tree:

* test
  - an item
  - another
1) number 1
2) number 2
  - last one

Position your cursor on the 'l' of 'last one'.  Use M-right to change
the level of indentation:

* test
  - an item
  - another
1) number 1
2) number 2
3) last one

Now use M-left to go back to the original level:

* test
  1  - an item
  2  - another
1) number 1
2) number 2
  3  - last one

I expected to see the same tree I started with.

Thanks!
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpFmxbokKUFd.pgp
Description: PGP signature
___
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] org-set-tag-hook

2007-09-10 Thread Austin Frank
Hello!

I am wondering whether it would be possible to introduce a new hook into
org-mode.  This hook would be run after any tags are added to an entry.
The main use would be to check for the presence of some tag among the
entry's tags, and execute some function in response to it.

I suggest this because I would like to maintain a list of tags that will
cause an entry to be excluded from export.  I would like to do something
like

(setq excluded-tags '(home private bills))
(add-hook 'org-set-tag-hook
'excluded-tags
'(org-set-property PRIVATE t))

This would automatically set the PRIVATE property of the headline to t
whenever one of the members of excluded-tags was added to a headline.
From there I think I could wrap the export functions to exclude all
entries with a value of t for that property.  I hope that, in general,
the strategy of setting properties in response to the presence of
certain tags will be useful.

Do other folks think this would be an interesting addition?  Am I
overlooking an easy way to accomplish this without adding the hook to
org?

Thanks,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpSY9rMcxghP.pgp
Description: PGP signature
___
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: Feature request: Selective encryption

2007-09-01 Thread Austin Frank
On Sat, Sep 01 2007, Anupam Sengupta wrote:

 I use epg to encrypt the org-mode files. EPG expects the files to have
 a suffix of .gpg, which conflicts with the .org suffix - however, I
 circumvent this with a file local mode setting as the first line in my
 org files:

 # -*- mode: org; epa-file-encrypt-to: (my private key email ID here); 
 coding: utf-8-unix; -*-

 This allows the file's major mode to be Org-mode.

 In addition, the archive files are also encrypted, and hence an
 over-ride is needed for the file name (otherwise the defaults will
 conflict):

 I have ...

 #+ARCHIVE: ~/org/filename.org_archive.gpg::

 In my active Org files - which works fine for the archival process,
 and ensures that the archives are also encrypted.

A few other options:

- EPG also has the function epa-encrypt-region.  It asks for a
  recipient's key to use for encrypting, and does symmetric
  encryption if none is selected.  This could be used to selectively
  encrypt certain subtrees.  Especially given that...

- message-mode has functions like mml-secure-encrypt (there are lots
  of others in the mml-secure-* family).  These functions use the
  strategy of inserting tags around the region to be encrypted.  I
  haven't actually read the functions, but from the outside it looks
  like the tags are used to set the region, the region is
  encrypted/signed, and then the tags are removed from the outgoing
  copy of the message.  FWIW, the tags look like (the leading # was
  added by me to keep the tag from actually doing anything in this
  message):

##secure method=pgpmime mode=sign
 

For interactive encrypting, I think epa-encrypt-region is probably
already good enough to do what folks have asked for.  For permanently
marking a subtree for encryption, maybe we could set a property like
ENCRYPT_CHILDREN, or set pairs of properties like ENCRYPT_BEGIN and
ENCRYPT_END.  The presence of these properties would cause the
appropriate region to be selected and passed to epa-encrypt-region when
org-encrypt-subtrees or org-encrypt-buffer is called (just speculating
about some possible function names).  Maybe on org-encrypt-buffer the
default is to call epa-encrypt-file unless some portion of the file is
marked for encryption, in which case it calls epa-encrypt-region on the
appropriate text.

The values of the ENCRYPT_* properties could be the key to use, or just
t.  If the value is t, either the key will be pulled from a file-level
variable, or the user will be prompted for which key to use (as
epa-encrypt-region normally does).

Thanks,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc



___
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Feature request: Selective encryption

2007-08-31 Thread Austin Frank
On Fri, Aug 31 2007, Carsten Dominik wrote:

 I do think this would be a useful feature.  Some properties I'd find
 useful:

 ...


If you're interested in using GPG to accomplish these goals, I highly
recommend the EasyPG (EPG) package created by Daiki Ueno.  At this
point I believe it's mostly used for Gnus, but it's intended to be a
general-purpose GPG interface for Emacs.

http://www.easypg.org
http://sourceforge.jp/projects/epg

HTH,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc



___
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] bug report for org 5.03

2007-07-14 Thread Austin Frank
Hello!

Just a quick bug report.  It's my recollection that, given a headline
followed by a plain list, using meta-right and meta-left to change the
level of indentation on the headline would also change the level of
indentation on the plain list.  This is not working in 5.03.

On a related note, if I highlight a region and try to use the keyboard
to change the indentation level of the region, plain lists do not have
their indentation level changed at all, while headlines do.

Apologies if I've misunderstood and the current behavior is intentional.

Thanks for the continuing improvements to org,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpTBSsBj2apr.pgp
Description: PGP signature
___
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] repeating within a range

2007-06-23 Thread Austin Frank
Hello!

I'd like to specify that an event repeats weekly, but only for a month.
Ideally, I'd also be able to specify a time for the weekly event.  Is
there currently a way to say this event happens every Thursday in July
From 17:00-19:00?

Given the new time range syntax from 4.78, I wonder if something like
the following might work

2007-07-06--2007-26-31 17:00--19:00 +1w

I changed the time range to also use -- as the range indicator to
provide some consistency across the date and time specifications.  It's
fine with me if that changes back to 17:00-19:00.

Another option would be to use a diary sexp.  I'm not aware of a
built-in diary function that accomplishes the above goal, but if anyone
can show me how to do this with a %%() timestamp I'd really appreciate
it.

Thanks,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpx5AjqB0els.pgp
Description: PGP signature
___
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] another (different) template request

2007-01-18 Thread Austin Frank

Hello all!

I've just finished the collection step of getting started with GTD 
and am working through my inbox for the first time.  I've read the 
discussions of Org and GTD with great interest.  In particular, 
the post by Carsten at 
http://article.gmane.org/gmane.emacs.orgmode/715 should be 
required reading for anyone considering using Org for GTD-- really 
excellent.  Now that I'm actually getting down to brass tacks, I 
find myself with a feature request.


Previously, I've used Org to publish notes about a variety of 
projects.  Now that I'm using Org for GTD as well, I'm discovering 
that I've got a few different kinds of files:


- notes: I consider these a type of reference material in the GTD 
  system
- projects: combinations of notes, next actions, links to support 
  materials, and deferred items
- web pages: content created explicitly to be published with my 
  projects

- other: mostly random stuff I want to keep on my local machine
  
Now, I intend to use one file per project for two reasons.  First, 
it provides nice structure when the files are published.  I can 
have research/projectA and research/projectB on my site, rather 
than just one huge research.html page.  Second, it seems useful to 
maintain separate sets of tags for different projects.  I'm 
intending to follow Carsten's advice of using tags both for 
contexts and people.  I have different collaborators on different 
research projects, so each file within the research directory may 
different tags; personal projects might have tags for my 
housemates or family.


Given the above setup, I'd like to be able to define a few 
different templates for org file headers.  My notes files might 
have different export options than my projects files, and tags 
will differ from project to project.  I can imagine creating a few 
such templates:


- research project templates (include a line for tags, no 
  pre-defined tags)
- personal project templates (predefined tags for the people that 
  tend to be involved in my personal projects)
- notes templates (turn on all LaTeX stuff, maybe change 
#+TYP_TODO)
- web page templates (include #+TITLE, maybe change archiving 
  system)


I haven't yet investigated the templating options mentioned here 
(though dmacro sounds like it's got potential).  Still, I wonder 
if a) the feature already exists, or b) other people would be 
interested in seeing it included in a future version of Org.


Thanks for any comments,
/au

--
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc


pgpAdoDAPIuRu.pgp
Description: PGP signature
___
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Emacs-orgmode] ranges of rows in other columns

2006-06-26 Thread Austin Frank
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hello all--

I'm looking for help in setting up a calculation in a table in org mode.
 I'd like to keep a running average of my past three days worth of
measurements.  Something like

|--+-+-|
| Date | TV Time (hours) | Running Average |
|--+-+-|
| 2006-06-24 Sat |   1 | |
| 2006-06-25 Sun | 1.5 | |
| 2006-06-26 Mon |  .5 |   1 |
| 2006-06-27 Tue |   3 |1.66 |
| 2006-06-28 Wed | 2.5 |   2 |
|--+-+-|

I just did the numbers for running average in my head-- I'm hoping for
help with a formula that will get the mean for the last three rows of
the `TV Time' column.  I tried using $3=vsum($23-1), but this didn't
work.

Is there a syntax for accessing row ranges of other columns for a
calculation?  If not, can anyone suggest an elisp formula that will
accomplish this?

If a helpful soul is feeling especially generous, is there also a way to
set this table up that will calculate the new running average every time
I enter a new date's measurement?  Extra credit if you use Carsten's
constants.el to provide units in the measurment column and the
calculated column ;)

Thanks for any help,
/au
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.3 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEoEX8lHMl2/XbR4ERAgQMAKDb48ZGq4JlA8NU4g6jBtV/BG3DBwCfb5at
OHz4gmF2ONOcPhOUPGWbXow=
=zkAf
-END PGP SIGNATURE-


___
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Emacs-orgmode] exporting typefaces

2006-06-06 Thread Austin Frank
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hello all--

I'm interested in being able to export stacked typefaces.  This org file:

* headline
  *bold* /italic/ _underlined_
  */bold italic/* *_bold underlined_* /_italic underlined_/


produces this xhtml:


h1 class=titletest/h1

h2headline/h2

pbbold/b iitalic/i uunderlined/u
/pul
li
/bold italic/* *subbold/sub underlinedsub*/sub
/subitalic/sub underlined_/

/li
/ul


I would like to see something like


h1 class=titletest/h1

h2headline/h2

pbbold/b iitalic/i uunderlined/u
/pul
li
bibold italic/i/b bubold underlined/u/b iuitalic
underlined/u/i

/li
/ul


One can even imagine stacking all of the typeface indicators, like
*/_really fancy text_/*.  I can understand if there's some restriction
on the order that the indicators should be stacked in (e.g., _/.../_
instead of /_..._/), but I still hope that there is some syntax for
applying multiple typeface markups to the same string.

Thanks,
/au
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.3 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEhZB7lHMl2/XbR4ERArSpAKDqUY3I5NXOrkfN88Km8TBjwh1CJACfbSmA
WTN9hJsV9eT6WsWerWL/s4Y=
=9Ypd
-END PGP SIGNATURE-


___
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Emacs-orgmode] circufix notation for inline pre and strike styling

2006-06-06 Thread Austin Frank
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hello!

We already have the ability to add bold, italic, and underline
formatting to our documents using circumfix notation (*bold*, /italic/,
_underlined_).  We can also style entire lines using pre notation by
having a colon  as the first non-whitespace character on a line, or by
putting the line under a QUOTE headline.  I would like to see an
additional feature added to org which would allow some circumfix
notation to be exported with pre/pre tags.  This would be useful for
including single programming terms in a sentence and setting them apart
visually.  I'm envisioning something like

many programming languages have a ;for; loop.

which would be exported as

pmany programming languages have a prefor/pre loop./p

another possible syntax would be

many programming languages have a #for# loop.

The specific markup used isn't really important to me, but I would like
the ability to specify this kind of formatting for single words instead
of whole lines.

While I'm at it, is strike-through possible?

-event- was canceled

could become

pstrikeevent/strike was canceled/p

Again, any syntax which is easy to parse is fine with me.

As mentioned in my previous mail, it would also be nice if these two
pieces of markup could stack with each other and the existing markup syntax.

Thanks,
/au
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.3 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEhZNVlHMl2/XbR4ERAl8wAKDHEYpsMHtkFyTaPshbrfPCbUL6tQCfRIz/
vHEghc+6mzHrVGA51qkDaeo=
=zeJO
-END PGP SIGNATURE-


___
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Emacs-orgmode] exporting typefaces

2006-06-06 Thread Austin Frank
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Carsten Dominik wrote:

 I have never even once in my lifetime applied two different styles to
 a piece of text.  What is the application of this?

Looking through a few O'Reilly books on my shelf, I see that different
books use constant-width bold (bpretext/pre/b) and
constant-width italics (ipretext/pre/i) to indicate where a user
should enter input in example code.

I've been writing a tutorial for use in my lab, and have wanted the
ability to typographically distinguish between optional and required
parts of our in-house scripting language.  I'd like to say

All *bold* terms are properties of a certain part.  All
/*italic bold*/ terms are required properties of that part.

I don't know if this request is common enough to warrant inclusion, or
how much of a pain it would be to add to the parser, but that's the
first example off the top of my head of where I'd use this kind of
formatting.

Thanks,
/au

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.3 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEhZdVlHMl2/XbR4ERAh7AAKCexPBqwT5cXTmeeIv0GeiIT7dx8gCgtF5p
ODgsAQccvx72clftxlD3J3s=
=lRQH
-END PGP SIGNATURE-


___
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Emacs-orgmode] configurable link export

2006-05-21 Thread Austin Frank
Carsten Dominik wrote:

 Anyway, I have been thinking about your argumentation and come to the
 conclusion that this is an issue I would like to push almost entirely
 onto Davids table.  David, are you listening? :-)

I seem to have a knack for setting David's table.  Hi dto!

 [...]

 David, what do you think?  Austin, do you think this could be a viable way?

The solution you propose looks workable to me, and I fully agree with
the distinction you make between the role of export and publish in this
case.  Thanks for taking the time to think it through.

/au



___
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Emacs-orgmode] configurable link export

2006-05-19 Thread Austin Frank
First off, thank you to Carsten and David for org and org-publish. 
These tools have made it easier to get myself organized locally and 
online than it ever has been before.


I'd like to suggest a configuration option that influences the way links 
are exported in the org-export-as-* functions.


When I create local org files, I link to whatever files on my disk are 
relevant and useful.  When I publish those org files, some of the org 
links (like to other published org files) still work and make sense as 
html links.  Others (like links to local documents or directories) don't 
make any sense when published-- the resources they pointed to on the 
local system aren't on the remote filesystem that hosts the html pages.


To be more specific, I maintain a directory ~/notes/ and a directory 
~/blog/, each with a bunch of org files underneath it.  I then use 
org-publish to generate the html files, which are then uploaded to my 
website.  Crucially, this same directory structure is mirrored at my 
website, so local org links between those files work perfectly as html 
links when they are published and uploaded.


I'd love to be able to specify that I want all org links of 
[file:///home/aufrank/notes/*] and [file:///home/aufrank/blog/*] to be 
exported as full html links, and exclude org links to any other files on 
my filesystem at export time.


I think that David has established a good system for including and 
excluding files during publishing.  Org-publish first generates a list 
of files to publish based on regex matching of the extensions of files 
in a directory.  These are filtered through a regex-based exclude list, 
and then individual files can be added back in with an include list.


Applying this strategy to link export, I might want to have something 
like the following in my org-config.el:


(setq org-export-links-extension org\\|txt
  org-export-links-exclude   ~/*
  org-export-links-include   (~/notes/, ~/blog/))

This would result in exporting all of the .org and .txt files in 
~/notes/ and ~/blog/ as working links in html files, but would ignore 
links in org files to anything else in my home directory during export.


There's certainly a question about how org links that are not exported 
as html links should be handled.  I would actually be fine with just 
exporting the double-bracketed notation, but I bet there are better 
ideas out there.


Thanks again for the org suite,
/au


___
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Emacs-orgmode] third export request

2006-05-19 Thread Austin Frank

Last one on this topic, I think :)

I don't know if this is more of an org-export or an org-publish request, 
but I'd like to be able to do something like


(setq org-export-as-ascii-directory ~/notes/text/)

and have any org-export-as-ascii files sent to that directory.  Likewise 
for the other org-export-as-* functions.  It'd be nice to be able to 
configure where the ical files end up when they're exported, as well.


Allowing exports to be written to specific directories seems like it 
might provide a sensible default for the :publishing-directory plist 
entry in org-publish-projects-alist, but I admit I haven't thought that 
through very thoroughly.


Thanks again for reading,
/au


___
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Emacs-orgmode] Use case of TIMESTAMP, SCHEDULED and DEADLINE

2006-04-10 Thread Austin Frank

Christian Egli wrote:

  1. What is the use case of TIMESTAMP? I seem to only have a use
 for SCHEDULED, so marking them as Scheduled: in the
 Org-Agenda Week mode is superfluous for me. What do other
 people use it for?


Hello!  In my previous thread I noted that I want to use org to manage 
notes and tasks.  This left out an important aspect of the way I have 
used org and intend to, one of things that actually pushed me toward the 
system in the first place.  I also need to track how I'm spending time 
on my tasks.


I recently lost ~20 lbs, and the most important tool for affecting that 
change was writing down my weight every day and kept a running average 
(I used the system described in the Hacker's Diet).  Just seeing the 
trend was enough to keep me motivated to eat a little bit less each day, 
or find a small extra opportunity to be active.


As a graduate student I'm not required to do much in the way of 
accounting for how I use my time, as long as certain long-term 
milestones are met.  This can make it difficult to stay on task during 
shorter stretches.  Even breaking large tasks into small ones and 
documenting my progress on them can sometimes lead to a lot of small 
tasks being put off just as long as the large one would have been.


So, just like for weight loss, I want to start keeping a record of my 
daily time use.  Hopefully, once I have enough data to aggregate and 
look at the trends, I'll be able to pinpoint areas where I can improve 
and will be able to motivate myself to stay on task longer or return to 
my tasks more quickly after distractions.


A guide for beginning grad students in the computer science department 
at my university suggests keeping a log file where you record your 
accomplishments at 15 minute intervals on days when you're having 
trouble being productive.  I've tried this, using an external timer and 
marking an org file with a time stamp for each entry.  I found the 
method to be both too frequent and too removed from my current task to 
be especially useful.


My intention is to keep an org file (per day? per week?  per month?) 
where I track my work using timestamp ranges and links.  When I start on 
a task I'll make a time stamp and link to a resource relevant to the 
task (the file I'm editing, the article I'm reading, notes from the 
class I'm going to).  When I finish a task or change tasks, I'll mark 
the end of the time range I spent on that task (and begin a new one if 
necessary).  In some cases I'll record notes with the entry about what 
happened while I worked, to try to pin down things that are especially 
effective or especially distracting.


I do think there's something to the notion of making regular progress 
reports while you work during stretches where it's hard to stay on task. 
 In a case where I was following this strategy, I would still start an 
entry with a time range and a link to my current work, but I might 
include sub-entries marked with timestamps to allow me to keep 
finer-grained records of my progress.  I intend to write a nag-me elisp 
function that prompts for a new entry after a certain amount of time has 
elapsed-- hopefully with programmable prompt intervals.  I have a hunch 
that an exponential function describing the interval between prompts 
might be effective:  record often early in the task to get myself honed 
in, but record less often as time passes and I become more involved with 
the work.


I believe that tagging these progress entries with a series of 
categorical tags will allow me to aggregate across similar tasks and do 
some analysis of how much time I'm spending on different tasks.  I'd 
like to be able to ask questions like How much time did I spend last 
week on project X?, How much time did I spend last week on all 
research projects?, and How much time did I spend last week working 
productively?.  I'm hopeful that the org/tables/calc combination will 
serve me well in pursuing this.


Hope that gives you some ideas about some potential uses of timestamps 
and time ranges.  I'd welcome any comments about the ideas I've 
described here, whether people are using similar systems or have 
different approaches to the same kind of issue.


Thanks,
/au


___
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode