[O] .emacs file in windows

2011-09-14 Thread Bob Qualls
I would like to add the suggested Activiation code to the .emacs file but
I can't figure out which one it is.  I downloaded the
emacs-23.1-bin-i386.zip file for windows.


[O] [PATCH] org-capture, removing whitespace from new captures

2011-09-14 Thread paulusm
I found myself manually cleaning most CAPTURE buffers of whitespace
prior to committing them with C-c C-c.  The attached patch adds a new
property :whitespace-cleanup to the org-capture-templates.

--
Paul.



diff --git a/lisp/org-capture.el b/lisp/org-capture.el
index a7dc92b..ae5af6d 100644
--- a/lisp/org-capture.el
+++ b/lisp/org-capture.el
@@ -205,6 +205,9 @@ properties are:
  capture was invoked, kill the buffer again after capture
  is finalized.
 
+ :whitespace-cleanup When set, call `whitespace-cleanup' prior to
+ widening the buffer.
+
 The template defines the text to be inserted.  Often this is an
 org-mode entry (so the first line should start with a star) that
 will be filed as a child of the target headline.  It can also be
@@ -329,7 +332,8 @@ calendar|  %:type %:date
((const :format %v  :clock-keep) (const t))
((const :format %v  :clock-resume) (const t))
((const :format %v  :unnarrowed) (const t))
-   ((const :format %v  :kill-buffer) (const t
+   ((const :format %v  :kill-buffer) (const t))
+   ((const :format %v  :whitespace-cleanup) (const 
t
 
 (defcustom org-capture-before-finalize-hook nil
   Hook that is run right before a capture process is finalized.
@@ -544,6 +548,9 @@ captured item after finalizing.
  (org-clock-in)))
   (message Interrupted clock has been resumed)))
 
+  (when (org-capture-get :whitespace-cleanup 'local)
+(whitespace-cleanup))
+
   (let ((beg (point-min))
(end (point-max))
(abort-note nil))



Re: [O] .emacs file in windows

2011-09-14 Thread Loris Bennett
Hi Bob,

Bob Qualls bobquall...@gmail.com writes:

 I would like to add the suggested Activiation code to the .emacs
 file but I can't figure out which one it is.  I downloaded the
 emacs-23.1-bin-i386.zip file for windows.

You have to create it yourself in your home directory.  Have a look
here:
 
http://www.gnu.org/software/emacs/windows/Installing-Emacs.html#Installing-Emacs

Regards

Loris
-- 
Dr. Loris Bennett (Mr.)
ZEDAT, Freie Universität Berlin Email loris.benn...@fu-berlin.de




Re: [O] exporting subtree moves point

2011-09-14 Thread Carsten Dominik

On 13.9.2011, at 11:00, Eric S Fraga wrote:

 Hello,
 
 I often export just a sub-tree (C-c C-e 1 p say).  At the end of the
 export, my point has moved to the enclosing headline and mark is at the
 end of the contents of that sub-tree.  This is a little annoying in that
 I am often making small changes to see the effect on the final exported
 document, especially when playing around with tikz.  Therefore, I find
 myself having to move back manually to where I was before the export.
 
 Is there an easy way to get back to where I was beyond setting a
 bookmark or register location manually?  Or is there a way to have org
 put me back to where I was (save-excursion of some sort maybe)?  


Hi Eric,

I have just pushed a fix for this issue.  The code to do this was already
there, but it did not work for the subtree restriction.

- Carsten

 
 If I remember to set a mark myself, I can get back to there by C-x
 C-SPC.  Maybe I should just advise the export command?
 
 Suggestions welcome!
 
 Thanks,
 eric
 
 -- 
 : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
 : using Org-mode version 7.7 (release_7.7.280.gdbf0)
 




[O] flyspell-prog-mode and org files

2011-09-14 Thread Luke Crook

Does org-mode support 'flyspell-prog-mode', in that flyspell should ignore 
everything within #+begin_src and #+end_src blocks?

Thanks,
-Luke




Re: [O] exporting subtree moves point

2011-09-14 Thread Eric S Fraga
Carsten Dominik carsten.domi...@gmail.com writes:

 On 13.9.2011, at 11:00, Eric S Fraga wrote:

 Hello,
 
 I often export just a sub-tree (C-c C-e 1 p say).  At the end of the
 export, my point has moved to the enclosing headline and mark is at the
 end of the contents of that sub-tree.  This is a little annoying in that
 I am often making small changes to see the effect on the final exported
 document, especially when playing around with tikz.  Therefore, I find
 myself having to move back manually to where I was before the export.
 
 Is there an easy way to get back to where I was beyond setting a
 bookmark or register location manually?  Or is there a way to have org
 put me back to where I was (save-excursion of some sort maybe)?  


 Hi Eric,

 I have just pushed a fix for this issue.  The code to do this was already
 there, but it did not work for the subtree restriction.

 - Carsten

Works like a charm!  Many thanks.

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
: using Org-mode version 7.7 (release_7.7.284.g11de)



Re: [O] [babel] Export problem (Wrong type argument: consp, nil)

2011-09-14 Thread Sebastien Vauban
Hi Eric,

Eric Schulte wrote:
 Sebastien Vauban wxhgmqzgw...@spammotel.com writes:
 If there is no value assigned to the code block...
 ... there is no an error when exporting:

 #+begin_src text
 Debugger entered--Lisp error: (wrong-type-argument consp nil)
   setcdr(nil nil=x)
 #+end_src

 All variables must be given a default value, which is why it is an error
 to write a code block like the following.

 #+source: circle(x)
 #+begin_src python
 return x*x
 #+end_src

 I've just pushed up a change which provides a better error message in
 this case.

It works OK. Thanks a lot for that.

Remark: This did correct a problem that I had with my local LOB, and which
appeared a couple of months ago. I tried to find the post back, but I
couldn't. At that time, you tried my example, but you couldn't reproduce it.
Anyway, I now could check that it was because of this, now that the message is
a lot clearer than consp, nil.

Question: Would it be possible to add the src-name in the error message?  You
know, in my LOB, I have so many times the same var name coming back again,
that having the name of the source block would be of a great help. I tried
looking into the code to see if I could do it myself, but I must admit it's
still too hard for me. I have the impression many functions must be extended
in order to pass the src-name down to where the error is thrown...

Other thing, I tried to add a test for checking your fix never will be
regressed. This is what I currently have:

* Does not work
  :PROPERTIES:
  :ID:   f2df5ba6-75fa-4e6b-8441-65ed84963627
  :END:

If there is no value assigned to the code block, a proper error should be
thrown.

#+source: carre(x)
#+begin_src python
return x*x
#+end_src

* Test

#+begin_src emacs-lisp
(ert-deftest test-org-babel/no-defaut-value-for-var ()
  Test that the absence of a default value for a variable does throw a proper
  error.
  (org-test-at-id f2df5ba6-75fa-4e6b-8441-65ed84963627
(org-babel-next-src-block)
(should-error (org-babel-execute-src-block))
:type 'error))
#+end_src

Though, I have 2 questions:

- How can I differentiate between the clean error (with a message) and the one
  which wasn't correctly trapped?  Based on the first line of a backtrace
  (string comparison) or on the type of the error?  In the latter case, how
  can I know what's the type of the current error thrown, and the one of the
  error before your fix?

- I wonder why we need twice the =org-babel-next-src-block= call, and not only
  once in the =should-error= form.

Thanks.

Best regards,
  Seb

-- 
Sebastien Vauban




[O] [babel] Some variables with no default value don't provoke an error

2011-09-14 Thread Sebastien Vauban
Hi Eric,

As said previously, I've been forced to add a default value to many code
blocks I had in my local LOB, which I ingest in my `.emacs' file:

#+begin_src emacs-lisp
 (when (try-require 'ob-lob)
   (org-babel-lob-ingest ~/emacs/site-lisp/my-local-lob.org))
#+end_src

Weirdly enough, in the following code block, I must add a default value for
vars `table', `column' and `type' but not for the var `nullability'.

I've even been able to add fake vars `something' and `else' with no error
being reported (at ingestion time):

#+srcname: add-column-in-table(table=, column=, something, type=, else, 
nullability)
#+begin_src sql
-- add column `$column' (if column does not exist yet)
IF NOT EXISTS (SELECT *
   FROM INFORMATION_SCHEMA.COLUMNS
   WHERE TABLE_NAME = '$table'
   AND COLUMN_NAME = '$column')
BEGIN
ALTER TABLE $table
ADD $column $type $nullability
END
#+end_src

Note that, in the above state, the code block is ingested with no error, but,
if I remove the default value of var `table', it then generates back an
error...

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] flyspell-prog-mode and org files

2011-09-14 Thread Sebastien Vauban
Hi Luke,

Luke Crook wrote:
 Does org-mode support 'flyspell-prog-mode', in that flyspell should ignore 
 everything within #+begin_src and #+end_src blocks?

Maybe have a look at http://comments.gmane.org/gmane.emacs.orgmode/42169, and
report wether the patch is functioning, or must be extended?

Best regards,
  Seb

-- 
Sebastien Vauban




[O] [odt] Support for table templates (was Re: org-odt/html table export: adjusting default behaviour?)

2011-09-14 Thread Jambunathan K

 If you need really prettier tables you can rely on Table-Autoformat.

I felt some sort of templating mechanism would be useful for odt
tables[1]. To this end, I have pushed some changes which honors ODF-1.2
spec[2].

The attached table-template.org and table-template.odt should serve as
an illustrative example of what is possible with the odt exporter. 

Note that you need to modify automatic-styles that are in
contrib/odt/styles/OrgOdtContentTemplate.xml. (Please consult the
comments in the attached org file.)

#+TITLE: table-template.org
#+AUTHOR:Jambunathan K
#+EMAIL: kjambunat...@gmail.com
#+DESCRIPTION:
#+KEYWORDS:
#+LANGUAGE:  en
#+OPTIONS:   H:3 num:t toc:t \n:nil @:t ::t |:t ^:nil -:t f:t *:t :t
#+OPTIONS:   TeX:t LaTeX:dvipng skip:nil d:nil todo:t pri:nil tags:not-in-toc

#+EXPORT_SELECT_TAGS: export
#+EXPORT_EXCLUDE_TAGS: noexport
#+LINK_UP:   
#+LINK_HOME: 
#+XSLT:


* Customization

#+begin_src emacs-lisp
  (setq org-export-odt-table-styles
'((TableWithHeaderRowAndColumn Custom
   ((use-first-row-styles . t)
(use-first-column-styles . t)))
  (TableWithFirstRowandLastRow Custom
   ((use-first-row-styles . t)
(use-last-row-styles . t)
#+end_src

  See docstring of =org-export-odt-table-styles= for more
  information. Also unzip the exported odt file and inspect the
  _content.xml_ for _automatic-styles_ starting with keyword _Custom_.

* Table Templates Illustrated

** Regular Org Table
   This table has no *#+ATTR_ODT:* associated with it.


| Labels | C1  | C2|   C3 |
|+-+---+--|
|  / ||  ||
|r | l | c   |  r |
| R1 (Right) | R1C1 (Left) | R1C2 (Center) | R1C3 (Right) |
| R2 | R2C1| R2C2  | R2C3 |
|+-+---+--|
| R3 | R3C1| R3C2  | R3C3 |
| R4 | R4C1| R4C2  | R4C3 |
|+-+---+--|
| R5 | R5C1| R5C2  | R5C3 |
| R6 | R6C1| R6C2  | R6C3 |
| R7 | R7C1| R7C2  |  |
|+-+---+--|


** Table using header row and column styles
   This table uses table template named _Custom_ and selects the
   following styles:
   - first row
   - first column

#+ATTR_ODT: TableWithHeaderRowAndColumn
| Labels | C1  | C2|   C3 |
|+-+---+--|
|  / ||  ||
|r | l | c   |  r |
| R1 (Right) | R1C1 (Left) | R1C2 (Center) | R1C3 (Right) |
| R2 | R2C1| R2C2  | R2C3 |
|+-+---+--|
| R3 | R3C1| R3C2  | R3C3 |
| R4 | R4C1| R4C2  | R4C3 |
|+-+---+--|
| R5 | R5C1| R5C2  | R5C3 |
| R6 | R6C1| R6C2  | R6C3 |
| R7 | R7C1| R7C2  |  |
|+-+---+--|

** Table using first row and last row styles
   This table also uses the same table template named _Custom_ and
   selects the following styles:
   - first row
   - last row

#+ATTR_ODT: TableWithFirstRowandLastRow
| Labels | C1  | C2|   C3 |
|+-+---+--|
|  / ||  ||
|r | l | c   |  r |
| R1 (Right) | R1C1 (Left) | R1C2 (Center) | R1C3 (Right) |
| R2 | R2C1| R2C2  | R2C3 |
|+-+---+--|
| R3 | R3C1| R3C2  | R3C3 |
| R4 | R4C1| R4C2  | R4C3 |
|+-+---+--|
| R5 | R5C1| R5C2  | R5C3 |
| R6 | R6C1| R6C2  | R6C3 |
| R7 | R7C1| R7C2  |  |
|+-+---+--|


table-template.odt
Description: table-template.odt


Footnotes: 

[1] I find the Org's regular way of drawing the grid lines a bit out of
the normal (scholarly?). Internally, I needed some control over the
table cells for supporting numbered equations (which uses tables). Also
a user will prefer Top-aligned content for text-intensive tables and
Centre-aligned content 

Re: [O] [PATCH] org-capture, removing whitespace from new captures

2011-09-14 Thread Olaf Dietsche
paul...@telstra.com writes:

 I found myself manually cleaning most CAPTURE buffers of whitespace
 prior to committing them with C-c C-c.  The attached patch adds a new
 property :whitespace-cleanup to the org-capture-templates.

Thanks for pointing to whitespace-cleanup, I've done this manually
cleaning as well.

You could use org-capture-before-finalize-hook for this:

(add-hook 'org-capture-before-finalize-hook 'whitespace-cleanup)

Regards, Olaf



[O] help with capture template

2011-09-14 Thread Renato
Hello, I have a computer.org file with this structure:

* Log
** [2011-09-12 Mon 17:34] update ...
** [2011-09-07 Wed 18:09] update ...
** TODO [2011-09-04 Sun 20:23] nouveau + pm-suspend - black tty:bug:

I've been adding entries manually up to now. However I'd like to use
capture to make adding entries easier. I have this template:   

(l System Log entry (file+headline ~/Documents/org/computer.org
Log) * %U %? \n %i\n)

which works, the only problem is that the entry gets added at the *bottom*
of the other level 2 headers, while I'd want it to be at the top 
(such that the top entry is the latest date).

Any help on how I could modify the template?

cheers
renato




Re: [O] Org minor mode in mail-mode

2011-09-14 Thread Rene
Eric Abrahamsen eric at ericabrahamsen.net writes:

 
 Thanks for this hint! I had been advising fill-paragraph, this seems
 like a more comprehensive solution.

What is strange though is that (turn-on-orgstruct++) messes up with the header
separator (--text follows this line--) when calling M-q (fill-paragraph);
whereas (turn-on-orgstruct) doesn't pose any problem.

Why such a different behavior between turn-on-orgstruct++ and turn-on-orgstruct?

Is that a feature or a bug?

--
Rene




Re: [O] [PATCH] org-capture, removing whitespace from new captures

2011-09-14 Thread Paul
# olaf+list.orgm...@olafdietsche.de, Wed, 14 Sep 2011 18:44:07 +1000:
 paul...@telstra.com writes:
 
  I found myself manually cleaning most CAPTURE buffers of whitespace
  prior to committing them with C-c C-c.  The attached patch adds a new
  property :whitespace-cleanup to the org-capture-templates.
 
 Thanks for pointing to whitespace-cleanup, I've done this manually
 cleaning as well.

My pleasure.  I just had it pointed out to me a couple of days ago!


 You could use org-capture-before-finalize-hook for this:
 
 (add-hook 'org-capture-before-finalize-hook 'whitespace-cleanup)


In fact adding whitespace-cleanup to org-capture-before-finalize-hook
was what I tried first, but it didn't do what I wanted.  This hook is
called _after_ the buffer is widened - making whitespace-cleanup
operate on the _entire_ buffer, not just the newly added capture.

I believe the patch is still required - I should have explained
org-capture-before-finalize-hook's behaviour more explicitly in my
original submission.


Further to this, can anybody suggest a better documentation string for
org-capture-before-finalize-hook?  (Preferably in tandem with my
proposed patch.)  Currently it is:

Hook that is run right before a capture process is finalized.
The capture buffer is still current when this hook runs.

I feel the finalized part is somewhat ambiguous.  What it means is
after the capture buffer is widened, and before it is saved.  I
expected it to mean BEFORE the capture buffer is widened.

Maybe:
Hook that is run after the capture buffer is widened and prior to
being finalized.  The capture buffer is still current when this
hook runs.


--
Paul.



Re: [O] [bug] equations in latex equation environment with leading +/- misinterpreted

2011-09-14 Thread Eric S Fraga
Nicolas Goaziou n.goaz...@gmail.com writes:

 Eric S Fraga e.fr...@ucl.ac.uk writes:

 but behaviour that I can accept, especially as the easy solution is to
 simply enclose the equation in a latex block:

 * equation with leading minus sign
   The following equation
 #+begin_latex
   \begin{equation}
   \label{eq:test}
   y = 3 x
   - 5
   + 4
   \end{equation}
 #+end_latex

 This works just fine and is probably for the best in any case.  Using a
 latex block allows for latex specific editing (C-c ').  Should have done
 this in the first place!

 Technically, this isn't the same. The LaTeX block would be removed
 during an HTML export while the plain LaTeX code would be changed into
 an image (or Mathjaxified, whatever that means).

Agreed.  For my use case, this is not a major issue, mind you, as my
preferred export route is to PDF via LaTeX...

 That's annoying because I tend to think that writing plain LaTeX
 environments (without any block marker) should be deprecated.

Again, agreed, but this will require a more general approach to the
handling of e.g. latex blocks for export to other languages.  Not easy,
I would guess, unless we make more use of conversion to png for blocks.

Thanks again,
eric
-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
: using Org-mode version 7.7 (release_7.7.284.g11de)



Re: [O] help with capture template

2011-09-14 Thread Christian Moe

Hi,

Try setting the :prepend property:

(l System Log entry (file+headline ~/Documents/org/computer.org 
Log) * %U %? \n %i\n :prepend t)


hth,
Christian

On 9/14/11 12:58 PM, Renato wrote:

Hello, I have a computer.org file with this structure:

* Log
** [2011-09-12 Mon 17:34] update ...
** [2011-09-07 Wed 18:09] update ...
** TODO [2011-09-04 Sun 20:23] nouveau + pm-suspend -  black tty:bug:

I've been adding entries manually up to now. However I'd like to use
capture to make adding entries easier. I have this template:

(l System Log entry (file+headline ~/Documents/org/computer.org
Log) * %U %? \n %i\n)

which works, the only problem is that the entry gets added at the *bottom*
of the other level 2 headers, while I'd want it to be at the top
(such that the top entry is the latest date).

Any help on how I could modify the template?

cheers
renato








Re: [O] [babel] Export problem (Wrong type argument: consp, nil)

2011-09-14 Thread Martyn Jago
Hi Sebastien

Sebastien Vauban
wxhgmqzgw...@spammotel.com writes:

 Hi Eric,

 Eric Schulte wrote:
 Sebastien Vauban wxhgmqzgw...@spammotel.com writes:
 If there is no value assigned to the code block...
 ... there is no an error when exporting:

 #+begin_src text
 Debugger entered--Lisp error: (wrong-type-argument consp nil)
   setcdr(nil nil=x)
 #+end_src

 All variables must be given a default value, which is why it is an error
 to write a code block like the following.

 #+source: circle(x)
 #+begin_src python
 return x*x
 #+end_src

 I've just pushed up a change which provides a better error message in
 this case.

 It works OK. Thanks a lot for that.

 Remark: This did correct a problem that I had with my local LOB, and which
 appeared a couple of months ago. I tried to find the post back, but I
 couldn't. At that time, you tried my example, but you couldn't reproduce it.
 Anyway, I now could check that it was because of this, now that the message is
 a lot clearer than consp, nil.

 Question: Would it be possible to add the src-name in the error message?  You
 know, in my LOB, I have so many times the same var name coming back again,
 that having the name of the source block would be of a great help. I tried
 looking into the code to see if I could do it myself, but I must admit it's
 still too hard for me. I have the impression many functions must be extended
 in order to pass the src-name down to where the error is thrown...

 Other thing, I tried to add a test for checking your fix never will be
 regressed. This is what I currently have:

 * Does not work
   :PROPERTIES:
   :ID:   f2df5ba6-75fa-4e6b-8441-65ed84963627
   :END:

 If there is no value assigned to the code block, a proper error should be
 thrown.

 #+source: carre(x)
 #+begin_src python
 return x*x
 #+end_src

 * Test

 #+begin_src emacs-lisp
 (ert-deftest test-org-babel/no-defaut-value-for-var ()
   Test that the absence of a default value for a variable does throw a proper
   error.
   (org-test-at-id f2df5ba6-75fa-4e6b-8441-65ed84963627
 (org-babel-next-src-block)
 (should-error (org-babel-execute-src-block))
 :type 'error))
 #+end_src

 Though, I have 2 questions:

 - How can I differentiate between the clean error (with a message) and the one
   which wasn't correctly trapped?  Based on the first line of a backtrace
   (string comparison) or on the type of the error?  In the latter case, how
   can I know what's the type of the current error thrown, and the one of the
   error before your fix?

I can help with the error question. You can test the specific error
message as follows:

--8---cut here---start-8---
(ert-deftest test-org-babel/no-defaut-value-for-var ()
  (org-test-at-id f2df5ba6-75fa-4e6b-8441-65ed84963627
(org-babel-next-src-block)
(let ((err
   (should-error (org-babel-execute-src-block)
 :type 'error)))
  (should (equal '(error variable \x\ must be assigned a default value) 
err)
--8---cut here---end---8---
 

 - I wonder why we need twice the =org-babel-next-src-block= call, and not only
   once in the =should-error= form.

 Thanks.

 Best regards,
   Seb

Best, Martyn




Re: [O] [babel] Collection of code block snippets

2011-09-14 Thread Martyn Jago
Hi David

David Maus dm...@ictsoc.de writes:

 Hi Martyn,

 At Sat, 10 Sep 2011 09:09:17 +0100,
 Martyn Jago wrote:
 I'll do some work on testing against version 23 and 22 and maybe put
 together a how-to get ERT on those earlier systems (on linux).

 Just read this through Org mode's patch tracker[1] and coincidentally
 started to work on the test framework, too. To get a recent ERT
 running on Emac22 we need to backport parts of simple.el as of Emacs23
 -- doing this is scheduled for the upcoming weekend in my Org mode.


Thanks for the heads-up, I'm still working on other tests at the moment,
so its great you're already working on testing legacy systems. I was also
intending on firing up a windows machine for testing purposes too if
that is going to be useful (OSX and Ubuntu are my usual systems).

 For fun I hacked together a test results parser using org babel, which
 calls your script from within a shell block, passing the results to a
 parser block. Output is in the form of org mode headings and
 sub-headings. I've attached it in case you were interested (org babel
 was just great for doing this).

 This is great. This would be useful for non-babel tests, too. There
 are some tests for link escaping and link export -- I'm going to
 extend the latter (that's why I started to work on the testing
 framework in the first place).


Great to hear that further tests are in the pipeline.

Best, Martyn





Re: [O] [PATCH] org-capture, removing whitespace from new captures

2011-09-14 Thread Olaf Dietsche
Paul emacs-orgm...@lookmumnohands.net writes:

 # olaf+list.orgm...@olafdietsche.de, Wed, 14 Sep 2011 18:44:07 +1000:
 paul...@telstra.com writes:
 
  I found myself manually cleaning most CAPTURE buffers of whitespace
  prior to committing them with C-c C-c.  The attached patch adds a new
  property :whitespace-cleanup to the org-capture-templates.
 
 Thanks for pointing to whitespace-cleanup, I've done this manually
 cleaning as well.

 My pleasure.  I just had it pointed out to me a couple of days ago!

 You could use org-capture-before-finalize-hook for this:
 
 (add-hook 'org-capture-before-finalize-hook 'whitespace-cleanup)

 In fact adding whitespace-cleanup to org-capture-before-finalize-hook
 was what I tried first, but it didn't do what I wanted.  This hook is
 called _after_ the buffer is widened - making whitespace-cleanup
 operate on the _entire_ buffer, not just the newly added capture.

 I believe the patch is still required - I should have explained
 org-capture-before-finalize-hook's behaviour more explicitly in my
 original submission.

 Further to this, can anybody suggest a better documentation string for
 org-capture-before-finalize-hook?  (Preferably in tandem with my
 proposed patch.)  Currently it is:

 Hook that is run right before a capture process is finalized.
 The capture buffer is still current when this hook runs.

 I feel the finalized part is somewhat ambiguous.  What it means is
 after the capture buffer is widened, and before it is saved.  I
 expected it to mean BEFORE the capture buffer is widened.

 Maybe:
 Hook that is run after the capture buffer is widened and prior to
 being finalized.  The capture buffer is still current when this
 hook runs.

Thanks again for this explanation. I haven't noticed this. For me this
isn't bad though, since I capture everything into an inbox.org.

Regards, Olaf



Re: [O] .emacs file in windows

2011-09-14 Thread Carson Chittom
Bob Qualls bobquall...@gmail.com writes:

 I would like to add the suggested Activiation code to the .emacs file but
 I can't figure out which one it is.  I downloaded the
 emacs-23.1-bin-i386.zip file for windows.

When you do C-x C-f to open a file just put in ~/.emacs and hit RET --
Emacs will open the file in the appropriate place. On Windows XP this is
C:\Documents and Settings\username\Application Data\.emacs and on
Windows 7 it's C:\Users\username\AppData\.emacs

Don't know about other Windows versions.

Unrelatedly, why did you download the binary for Emacs 23.1 instead of
23.3?





Re: [O] help with capture template

2011-09-14 Thread Renato
On Wed, 14 Sep 2011 13:35:19 +0200
Christian Moe m...@christianmoe.com wrote:

 Hi,
 
 Try setting the :prepend property:
 
 (l System Log entry (file+headline ~/Documents/org/computer.org 
 Log) * %U %? \n %i\n :prepend t)
 
 hth,

yes, it helped. Thank you very much,

renato



[O] plus in superscript.

2011-09-14 Thread Piter_
Hi all. I try to put a superscript in org-mode in this way: T^{+}. But
it gets exported in latex as $^{\st{}$.  Any idea how to avoid it?
Thanks.



Re: [O] plus in superscript.

2011-09-14 Thread Nick Dokos
Piter_ x.pi...@gmail.com wrote:

 Hi all. I try to put a superscript in org-mode in this way: T^{+}. But
 it gets exported in latex as $^{\st{}$.  Any idea how to avoid it?
 Thanks.
 

{Super,sub}scripts are latex math constructs - try the following:

--8---cut here---start-8---
* This is a test: \(T^{+}\)

And inline: \(T^{+}\) and displayed: \[T^{+}\]
--8---cut here---end---8---

Nick



Re: [O] plus in superscript.

2011-09-14 Thread Christian Moe
But latex subscripts/superscripts should work in Org even without an 
explicit math environment, and they do for me -- exporting Piter's 
T^{+} gives me


T$^{+}$

as expected. Something in his setup?

Yours,
Christian

On 9/14/11 6:55 PM, Nick Dokos wrote:

Piter_x.pi...@gmail.com  wrote:


Hi all. I try to put a superscript in org-mode in this way: T^{+}. But
it gets exported in latex as $^{\st{}$.  Any idea how to avoid it?
Thanks.



{Super,sub}scripts are latex math constructs - try the following:

--8---cut here---start-8---
* This is a test: \(T^{+}\)

And inline: \(T^{+}\) and displayed: \[T^{+}\]
--8---cut here---end---8---

Nick







Re: [O] plus in superscript.

2011-09-14 Thread Nick Dokos
Christian Moe m...@christianmoe.com wrote:

 But latex subscripts/superscripts should work in Org even without an
 explicit math environment, and they do for me -- exporting Piter's
 T^{+} gives me
 
 T$^{+}$
 
 as expected. Something in his setup?
 

You are right - sorry about the noise.

Nick



[O] Overall organization/setup for org mode: Projects and Tasks

2011-09-14 Thread Alan E. Davis
I've been using org-mode for a few years.  My agenda is cluttered with tasks
that are weeks and even months past due.  I am this close to declaring
orgmode bankruptcy and starting from scratch, except my current setup
works so well for other things.   Might still do that, but I want to ask for
ideas.

I stumble consistently over the distinction between projects and tasks.  I
think there is not clear distinction, but I need to find a way to organize
them so that, at least, agenda displays the day to day TODO tasks separated
in a meaningful way from the long term projects that I need to remind myself
of (and there are dozens of these).

PROJECTS: I can define projects as
   - an overall series of tasks related to a single purpose
   - a recurring task (monthly calendars that I need to remind myself to
make each month)
   - an actual project I am working on (writing a proposal, or a
research project about a coral, or a recipe database, or reconstructing a
LaTeX file tree for a publication ten years ago)


TODOS: perhaps tasks could be anything,
  - bills (marked by tag bill
 - phone calls to make

 I am starting to understand how I TODOS can be scattered through all my
other files.   However, the greater the number of agenda files, the greater
the clutter.   And, as a recent thread called to mind, there are times when
the list of agenda files prevents me from searching for tags or todos.  SO
where is the happy medium?

Some thoughts:
 -  I tried to write a custom agenda command that defined the agenda
files to encompass all *org files in a directory.  This actually set the
agenda-files variable to all files for the rest of the session, so I gave
that idea upalthough I know it's possible to do it.
 -  Again, the number of agenda files seems to be constraining.
 -  There seem to be issues between defining the agenda files
explicitly, or adding them one at a time.
 -  It would be useful if agenda searches automatically picked up the
recent files I had worked on during the session,
however, in as streamlined a way as possible.


I don't need to be reminded everyday that I have to organize bibliographic
references for my next trip to the library, but I have to have a way to keep
these organized to jog my memory in planning my time in some loose sense.

I do need to have a list of bills that I can access without having to sort
through the list of projects that are 3 months overdue.

Almost every week I have new insights into how to use tags, so perhaps I
need to junk alot of the tags I set up long ago.

These thoughts are somewhat disconnected, and I apologize for this.

And I would be grateful for any comments that would shed light on how to
solve these issues.

Alan Davis


Re: [O] Overall organization/setup for org mode: Projects and Tasks

2011-09-14 Thread Thomas S. Dye
Aloha Alan,

I found myself in a similar situation a while back and it helped me to
do a weekly review.  I base mine on Bernt Hansen's experience:

http://doc.norang.ca/org-mode.html#sec-11-1

Every Monday a task pops up reminding me to complete the weekly review.
Clicking on the task takes me to a checkbox list that gives a label to
the individual review task and the keystrokes needed to invoke the
corresponding agenda view.

I'm typically monitoring 1-2 dozen projects and the whole review, which
is now 12 steps, takes me a couple of hours to complete.  I suppose I
could cut this time down if I were more organized during the week, but
I'm not, which is why I value the tools in Org-mode.

Also, I found Bernt's ideas on how to structure org-mode files very
helpful.  I'm not able consistently to pick the best option among the
very many that org-mode makes possible, so I've come to rely on the
advice of Bernt and others.

hth,
Tom

Alan E. Davis lngn...@gmail.com writes:

 I've been using org-mode for a few years.  My agenda is cluttered with tasks
 that are weeks and even months past due.  I am this close to declaring
 orgmode bankruptcy and starting from scratch, except my current setup
 works so well for other things.   Might still do that, but I want to ask for
 ideas.

 I stumble consistently over the distinction between projects and tasks.  I
 think there is not clear distinction, but I need to find a way to organize
 them so that, at least, agenda displays the day to day TODO tasks separated
 in a meaningful way from the long term projects that I need to remind myself
 of (and there are dozens of these).

 PROJECTS: I can define projects as
- an overall series of tasks related to a single purpose
- a recurring task (monthly calendars that I need to remind myself to
 make each month)
- an actual project I am working on (writing a proposal, or a
 research project about a coral, or a recipe database, or reconstructing a
 LaTeX file tree for a publication ten years ago)


 TODOS: perhaps tasks could be anything,
   - bills (marked by tag bill
  - phone calls to make

  I am starting to understand how I TODOS can be scattered through all my
 other files.   However, the greater the number of agenda files, the greater
 the clutter.   And, as a recent thread called to mind, there are times when
 the list of agenda files prevents me from searching for tags or todos.  SO
 where is the happy medium?

 Some thoughts:
  -  I tried to write a custom agenda command that defined the agenda
 files to encompass all *org files in a directory.  This actually set the
 agenda-files variable to all files for the rest of the session, so I gave
 that idea upalthough I know it's possible to do it.
  -  Again, the number of agenda files seems to be constraining.
  -  There seem to be issues between defining the agenda files
 explicitly, or adding them one at a time.
  -  It would be useful if agenda searches automatically picked up the
 recent files I had worked on during the session,
 however, in as streamlined a way as possible.


 I don't need to be reminded everyday that I have to organize bibliographic
 references for my next trip to the library, but I have to have a way to keep
 these organized to jog my memory in planning my time in some loose sense.

 I do need to have a list of bills that I can access without having to sort
 through the list of projects that are 3 months overdue.

 Almost every week I have new insights into how to use tags, so perhaps I
 need to junk alot of the tags I set up long ago.

 These thoughts are somewhat disconnected, and I apologize for this.

 And I would be grateful for any comments that would shed light on how to
 solve these issues.

 Alan Davis
 I#39;ve been using org-mode for a few years.  My agenda is cluttered with 
 tasks that are weeks and even months past due.  I am this close to 
 declaring orgmode bankruptcy and starting from scratch, except my current 
 setup works so well for other things.   Might still do that, but I want to 
 ask for ideas.  

 I stumble consistently over the distinction between projects and tasks.  I 
 think there is not clear distinction, but I need to find a way to organize 
 them so that, at least, agenda displays the day to day TODO tasks separated 
 in a meaningful way from the long term projects that I need to remind myself 
 of (and there are dozens of these).   

 PROJECTS: I can define projects as   - an overall series of tasks related 
 to a single purpose   - a recurring task (monthly calendars that I need 
 to remind myself to make each month)   - an actual project I am working 
 on (writing a proposal, or a research project about a coral, or a recipe 
 database, or reconstructing a LaTeX file tree for a publication ten years ago)

 TODOS: perhaps tasks could be anything,   - bills (marked by tag 
 bill - phone calls to make I am starting to understand how I 

Re: [O] Overall organization/setup for org mode: Projects and Tasks

2011-09-14 Thread Russell Adams
On Wed, Sep 14, 2011 at 10:43:28AM -0700, Alan E. Davis wrote:
 I've been using org-mode for a few years.  My agenda is cluttered with tasks
 that are weeks and even months past due.  I am this close to declaring
 orgmode bankruptcy and starting from scratch, except my current setup
 works so well for other things.   Might still do that, but I want to ask for
 ideas.

 I stumble consistently over the distinction between projects and tasks.  I
 think there is not clear distinction, but I need to find a way to organize
 them so that, at least, agenda displays the day to day TODO tasks separated
 in a meaningful way from the long term projects that I need to remind myself
 of (and there are dozens of these).

 PROJECTS: I can define projects as
- an overall series of tasks related to a single purpose
- a recurring task (monthly calendars that I need to remind myself to
 make each month)
- an actual project I am working on (writing a proposal, or a
 research project about a coral, or a recipe database, or reconstructing a
 LaTeX file tree for a publication ten years ago)


 TODOS: perhaps tasks could be anything,
   - bills (marked by tag bill
  - phone calls to make

  I am starting to understand how I TODOS can be scattered through all my
 other files.   However, the greater the number of agenda files, the greater
 the clutter.   And, as a recent thread called to mind, there are times when
 the list of agenda files prevents me from searching for tags or todos.  SO
 where is the happy medium?

 Some thoughts:
  -  I tried to write a custom agenda command that defined the agenda
 files to encompass all *org files in a directory.  This actually set the
 agenda-files variable to all files for the rest of the session, so I gave
 that idea upalthough I know it's possible to do it.
  -  Again, the number of agenda files seems to be constraining.
  -  There seem to be issues between defining the agenda files
 explicitly, or adding them one at a time.
  -  It would be useful if agenda searches automatically picked up the
 recent files I had worked on during the session,
 however, in as streamlined a way as possible.


 I don't need to be reminded everyday that I have to organize bibliographic
 references for my next trip to the library, but I have to have a way to keep
 these organized to jog my memory in planning my time in some loose sense.

 I do need to have a list of bills that I can access without having to sort
 through the list of projects that are 3 months overdue.

 Almost every week I have new insights into how to use tags, so perhaps I
 need to junk alot of the tags I set up long ago.

 These thoughts are somewhat disconnected, and I apologize for this.

 And I would be grateful for any comments that would shed light on how to
 solve these issues.

 Alan Davis

Alan,

I keep two main Org files (Biz, Personal) which are the only two files
in my agenda. I use Capture almost exclusively to add to these files.

Every project I do is a separate Org file, which I timestamp heavily
but I don't typically add them to my agenda. If they need an agenda
item, I may temporarily add them to the agenda, or put an entry in my
main pair of files.

This really keeps the clutter down. I can run agenda inside a project
by restricting agenda to the current file.

I hope that helps.

Thanks.

--
Russell Adamsrlad...@adamsinfoserv.com

PGP Key ID: 0x1160DCB3   http://www.adamsinfoserv.com/

Fingerprint:1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3



[O] Error in post-command-hook: (void-variable org-ans1)

2011-09-14 Thread Diep Pham Van
I get this error: Error in post-command-hook: (void-variable
org-ans1) every time I want to use schedule or deadline. After that,
the error message appear with any command. After some minutes, this
error message disappear and I can use anny command as expected.

This problem happens with both the version ship with emacs 23.3 or
latest version (7.7).

This is my .emacs config.

http://pastebin.com/sQaTYJCR

C-h v post-command-hook before the problem appear:

post-command-hook is a variable defined in `C source code'.
Its value is
(linum-update-current ac-handle-post-command
autopair-post-command-handler t)

Local in buffer .emacs; global value is 
(global-font-lock-mode-check-buffers global-linum-mode-check-buffers
global-auto-complete-mode-check-buffers
autopair-global-mode-check-buffers yas/global-mode-check-buffers
global-hl-line-highlight)

After:
post-command-hook\ \ \  is void as a variable.

Documentation:
Not documented as a variable.

I've search around and still could not solve the problem.
Anyone help me with this?



Re: [O] Overall organization/setup for org mode: Projects and Tasks

2011-09-14 Thread Olaf Dietsche
Hi Alan,

Alan E. Davis lngn...@gmail.com writes:

 I've been using org-mode for a few years.  My agenda is cluttered with tasks
 that are weeks and even months past due.  I am this close to declaring
 orgmode bankruptcy and starting from scratch, except my current setup
 works so well for other things.   Might still do that, but I want to ask for
 ideas.

I (and many others) struggle too with becoming organized. And usually
it's not a tool bankruptcy, but the lack of a coherent system.

What helped me to some degree - and I'm still learning - was David
Allen's book Getting Things DONE. You will find lots of information
about GTD in the internet (google, youtube) and at the orgmode website
http://orgmode.org/worg/org-gtd-etc.html. I also took lots of good
ideas and .emacs snippets from Bernt Hansen's website at:
http://doc.norang.ca/org-mode.html.

And although GTD is a pretty simple system once you get it, I suggest,
take the time and read the book (your library might have a copy) and
start slowly from there on.

 I stumble consistently over the distinction between projects and tasks.  I
 think there is not clear distinction, but I need to find a way to organize
 them so that, at least, agenda displays the day to day TODO tasks separated
 in a meaningful way from the long term projects that I need to remind myself
 of (and there are dozens of these).

Both projects and tasks result in actions, which have to be completed
eventually. So there's not really any difference in handling these,
besides maybe the number of single steps it takes to complete.

And finally, paraphrasing Pete Phillips in
http://article.gmane.org/gmane.emacs.orgmode/4854, there will be the
time, where you have to bite the bullet and just do it.

Regards, Olaf



[O] Feature Requests: `org-refile-targets'

2011-09-14 Thread Dave Abrahams

Hi all,

I have two related feature requests:

1. The ability to refile based on properties.  I have a bunch of items
   with a :CATEGORY: entry in their property drawer.  I would like such
   items always to be refile targets.  So I'd like, perhaps, a regexp
   for property matching, e.g. \\`:CATEGORY:.*

2. In-buffer settings for `org-refile-targets'.  What makes an
   appropriate target in one file may not be a good target in another,
   and I want to be able to distribute the file with it refiling options
   built-in.

I can live without #2, since I can always use Emacs' file-local
variables to set `org-refile-targets', but #1 feels more urgent.

TIA,

-- 
Dave Abrahams
BoostPro Computing
http://www.boostpro.com




Re: [O] Overall organization/setup for org mode: Projects and Tasks

2011-09-14 Thread Martyn Jago
Hi Russell

Russell Adams rlad...@adamsinfoserv.com writes:

[...]


 I hope that helps.

 Thanks.

 --
 Russell Adamsrlad...@adamsinfoserv.com

 PGP Key ID: 0x1160DCB3   http://www.adamsinfoserv.com/

 Fingerprint:1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3

(Off topic) I never thanked you for your (video) talk at HLUG, which
essentially introduced me to org-mode proper (despite having already
generated 'outline mode' formatted output to benefit from the
outlining).  Your talk blew me away, since I had literally no idea of
the power of org-mode.  Great practical enthusiasm demonstrated - and I
bought it (the killer app).  So - thanks for that!

Best, Martyn





Re: [O] Overall organization/setup for org mode: Projects and Tasks

2011-09-14 Thread Christian Moe
I realize that other people's mileage may and does differ, but 
personally, I have long found the amazing functionality, 
customizability and hackability of Org-mode an astonishingly effective 
tool for PTO (Putting Things Off).


:-)

Christian


On 9/14/11 8:59 PM, Olaf Dietsche wrote:

Hi Alan,

Alan E. Davislngn...@gmail.com  writes:


I've been using org-mode for a few years.  My agenda is cluttered with tasks
that are weeks and even months past due.  I am this close to declaring
orgmode bankruptcy and starting from scratch, except my current setup
works so well for other things.   Might still do that, but I want to ask for
ideas.


I (and many others) struggle too with becoming organized. And usually
it's not a tool bankruptcy, but the lack of a coherent system.

What helped me to some degree - and I'm still learning - was David
Allen's book Getting Things DONE. You will find lots of information
about GTD in the internet (google, youtube) and at the orgmode website
http://orgmode.org/worg/org-gtd-etc.html. I also took lots of good
ideas and .emacs snippets from Bernt Hansen's website at:
http://doc.norang.ca/org-mode.html.

And although GTD is a pretty simple system once you get it, I suggest,
take the time and read the book (your library might have a copy) and
start slowly from there on.


I stumble consistently over the distinction between projects and tasks.  I
think there is not clear distinction, but I need to find a way to organize
them so that, at least, agenda displays the day to day TODO tasks separated
in a meaningful way from the long term projects that I need to remind myself
of (and there are dozens of these).


Both projects and tasks result in actions, which have to be completed
eventually. So there's not really any difference in handling these,
besides maybe the number of single steps it takes to complete.

And finally, paraphrasing Pete Phillips in
http://article.gmane.org/gmane.emacs.orgmode/4854, there will be the
time, where you have to bite the bullet and just do it.

Regards, Olaf







Re: [O] Overall organization/setup for org mode: Projects and Tasks

2011-09-14 Thread Darlan Cavalcante Moreira

I'm in the same situation and (lack of) consistence is my main problem.

One thing that helps me is to define in my custom agenda commands one
command that only returns the STARTED tasks (Bernt Hansen's website has
more info about this). In this way I can quickly go back to a task that I
started but didn't finished in the previous day, for instance.

For my custom agenda commands I use
--8---cut here---start-8---
(setq org-agenda-custom-commands
  (quote (
  (...)
  (S Started Tasks todo STARTED 
((org-agenda-todo-ignore-with-date nil) (org-agenda-todo-ignore-scheduled nil)))
  (...)
  )))
--8---cut here---end---8---


--
Darlan


At Wed, 14 Sep 2011 20:59:00 +0200,
Olaf Dietsche olaf+list.orgm...@olafdietsche.de wrote:
 
 Hi Alan,
 
 Alan E. Davis lngn...@gmail.com writes:
 
  I've been using org-mode for a few years.  My agenda is cluttered with tasks
  that are weeks and even months past due.  I am this close to declaring
  orgmode bankruptcy and starting from scratch, except my current setup
  works so well for other things.   Might still do that, but I want to ask for
  ideas.
 
 I (and many others) struggle too with becoming organized. And usually
 it's not a tool bankruptcy, but the lack of a coherent system.
 
 What helped me to some degree - and I'm still learning - was David
 Allen's book Getting Things DONE. You will find lots of information
 about GTD in the internet (google, youtube) and at the orgmode website
 http://orgmode.org/worg/org-gtd-etc.html. I also took lots of good
 ideas and .emacs snippets from Bernt Hansen's website at:
 http://doc.norang.ca/org-mode.html.
 
 And although GTD is a pretty simple system once you get it, I suggest,
 take the time and read the book (your library might have a copy) and
 start slowly from there on.
 
  I stumble consistently over the distinction between projects and tasks.  I
  think there is not clear distinction, but I need to find a way to organize
  them so that, at least, agenda displays the day to day TODO tasks separated
  in a meaningful way from the long term projects that I need to remind myself
  of (and there are dozens of these).
 
 Both projects and tasks result in actions, which have to be completed
 eventually. So there's not really any difference in handling these,
 besides maybe the number of single steps it takes to complete.
 
 And finally, paraphrasing Pete Phillips in
 http://article.gmane.org/gmane.emacs.orgmode/4854, there will be the
 time, where you have to bite the bullet and just do it.
 
 Regards, Olaf
 



Re: [O] plus in superscript.

2011-09-14 Thread suvayu ali
Hi Nick,

On Wed, Sep 14, 2011 at 6:55 PM, Nick Dokos nicholas.do...@hp.com wrote:
 * This is a test: \(T^{+}\)

Apart from what Christian said, do you have any comments about $..$
and \(..\) ? I hear conflicting arguments about which is preferred
(e.g. $..$ is a TeX construct where as \(..\) is a LaTeX macro arguing
in favour of $..$). Specially an opinion in the context of org -
latex export would be interesting to hear.

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] Overall organization/setup for org mode: Projects and Tasks

2011-09-14 Thread Russell Adams
 (Off topic) I never thanked you for your (video) talk at HLUG, which
 essentially introduced me to org-mode proper (despite having already
 generated 'outline mode' formatted output to benefit from the
 outlining).  Your talk blew me away, since I had literally no idea of
 the power of org-mode.  Great practical enthusiasm demonstrated - and I
 bought it (the killer app).  So - thanks for that!

I'm glad you enjoyed it! There's a screencast I posted to Vimeo not
long ago, and I've considered doing a video tutorial through the
manual...

Thanks.

--
Russell Adamsrlad...@adamsinfoserv.com

PGP Key ID: 0x1160DCB3   http://www.adamsinfoserv.com/

Fingerprint:1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3