[O] Babel: a way to get the org-heading into source block

2016-09-18 Thread Benjamin Andresen
Hello,

small intro in case there is a better way than I thought up: I've just
started using Ledger and wanted to use Babel to tangle the ledger file.

Every entry is its own heading:

* <2016-07-01 Fri> * Hollywood | Monthly rent
#+begin_src ledger :tangle yes
07-01 * Hollywood | Monthly rent
Expenses:Rent 500.00 USD
Expenses:Rent:Parking spot 50.00 USD
Assets:BOA:Checking
#+end_src

I've written a function to basically do what I want:
(defun org-header-to-ledger ( point)
  (save-excursion
(re-search-backward org-ts-regexp)
(let* ((context (org-element-context))
   (year (org-element-property :year-start context))
   (month (org-element-property :month-start context))
   (day (org-element-property :day-start context))
   (title (cadr (split-string (org-element-property
   :title (org-element-property
   :parent context))
  (rx (or "]" ">"))
  (format "%04d-%02d-%02d%s" year month day title
;; (There are known bugs but for illustraton purposes this is suitable)

Now in babel I would basically want to not have repeated data, so my
entry should look like this:

* <2016-07-01 Fri> * Hollywood | Monthly rent
#+begin_src ledger :tangle yes
<>
Expenses:Rent 500.00 USD
Expenses:Rent:Parking spot 50.00 USD
Assets:BOA:Checking
#+end_src

The actual syntax is not that important, but something to that effect so
I only have to keep one headline up to date is what I'm looking for.

Is there a way to accomplish this right now? If there isn't, can you
point me to where I would add such functionality? AFAIK named src block
can already be inserted, I just don't know where in the source that is
found.

Thanks in advance and best regards,
Benny



[O] [PATCH] fix calc-eval date(timestamp)

2011-07-09 Thread Benjamin Andresen
Hello list,

I'm not always up-to-date with the org master lately, so excuse me for
only noticing it now.

The commit 2e20cf9358deb9579ae6a22bc0deb2a772387194 and its parent broke
the following functionality for me:

|   | Items   | Dispatched | Arrived| HT |
|---+-+++|
| # | Foo bar baz | [2011-07-06 Wed 01:51] | [2011-07-09 Sat 14:00] | #ERROR |
#+TBLFM: $5=(date($4) - date($3))*24*60*60;%i

Before the above commit it would calculate the amount of seconds between
the Dispatched and Arrived time using
$5=(date($4) - date($3))*24*60*60;%i

However with the introduction of org-table-time-string-to-seconds it
broke, because [2011-07-06 Wed 01:51] would match the regexp
\\([0-9]+\\):\\([0-9]+\\) and be considered a duration.

I think this patch fixes this.
diff --git a/lisp/org-table.el b/lisp/org-table.el
index fcb6e9e..23118cc 100644
--- a/lisp/org-table.el
+++ b/lisp/org-table.el
@@ -3213,6 +3213,7 @@ For example:  28 - AB.
 	  (sec (string-to-number (match-string 3 s
   (+ (* hour 3600) (* min 60) sec)))
((and (stringp s)
+	 (not (string-match org-ts-regexp-both s))
 	 (string-match \\([0-9]+\\):\\([0-9]+\\) s))
 (let ((min (string-to-number (match-string 1 s)))
 	  (sec (string-to-number (match-string 2 s

Hope that helps and thanks for the good work everyone,
Benjamin Andresen


[Orgmode] Bug: tags grouping not working

2011-01-25 Thread Benjamin Andresen
Hey there,

I've just upgraded to the latest org-mode HEAD and noticed that the tag
behavior changed. (It now sorts entries, except now grouping is broken.)

This is how it used to work:
(Assume #+TAGS: { foo(f) bar(b) } quux(q) for all of this.)

* Foo :foo:

now using M-x org-set-tags-command and pressing 'b' will result in:

* Foo :bar:

now selecting 'q' in the same prompt will result in:

* Foo :bar:quux:

but instead what will happen is:

* Foo :quux:

The offending commit is: 
commit c7d1e0f997d2aa1043c9cbbf72d03f05195d692e
Author: Bastien Guerry b...@altern.org
Date:   Tue Jan 18 00:50:32 2011 +0100

just reverting that piece of code on the current HEAD makes grouping
work again.

best regards,
benny

P.S. Sorry if that has been reported before, I couldn't find any mention
of tags. Also git bisect is handy.

___
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: Debate about One clock per user, but user is identified

2010-06-12 Thread Benjamin Andresen
Hey Sébastien,

Sébastien Vauban wxhgmqzgw...@spammotel.com writes:

 Hi all,

 What do you think about all this?

I just read this and before nobody answers, I'll give you a small POC
that should work for you. As far as I can tell it doesn't break
anything.

(defun org-clock-out-mark-clock ()
  (unless remove (insert (format  (%s) user-full-name

(add-hook 'org-clock-out-hook 'org-clock-out-mark-clock)


 Best regards,
   Seb

br,
benny

___
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: Proposal: Emtest as tester

2010-06-07 Thread Benjamin Andresen
Hey Tom,

I was wondering what the status was of the emtest inclusion in org-mode?

Looks like the tehom-master in the org-mode repo is not the right one
(last commit Wed Apr 28 16:39:59 2010 -0500)

br,
benny

___
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-FAQ request for full-text dump

2010-05-12 Thread Benjamin Andresen
Hello guys,

quite often people ask question in the IRC-channel (#org-mode on
freenode) which are answered in the FAQ. Now I personally find the
org-faq very cumbersome to use, due to its javascript-interface that
grabs keys.

(Just a short thing: I'm faster with my native browser search
functionality than with the interface that is used on org-faq.php

In my browser it's: /color n n n N n

vs.

s color s RET s RET s RET and I don't even know how to jump back to a
previous search results (also sometimes the first search doesn't even
work, I have to do it twice, haven't investigated this further.))

Because of this I currently use the org-faq.org file locally and
then grab the CUSTOM_ID and attach it to the org-faq.php link as an
anchor.

So my question is basically: Could we get a plain dump of the file?

(I don't know who controls the export and I guess just copying the file
and stripping out all the infoJS stuff is not the right way to do it.)

br,
benny

Please don't take offense, I'm sure many other people like the infoJS
interface, I just find it inefficient and mainly different from the way
I search the web.

___
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: Poll: Who is using these commands

2010-05-08 Thread Benjamin Andresen
Eric Schulte schulte.e...@gmail.com writes:

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

 Hi everyone,

 I am wondering:

 How many of your are using these keys

 C-c C-f
 C-c C-b
 C-c C-n
 C-c C-p


 Not me, I'm using CM-n, CM-p, CM-u, and CM-d for outline navigation.

Same here.
I'm also using speed commands a lot for navigation.

br,
benny


___
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: Automatic clock-in

2010-04-19 Thread Benjamin Andresen
Hey Andrea,

Andrea Crotti andrea.crott...@gmail.com writes:

 Or is there another better way to do already what I'm asking?

Maybe C-u M-x org-clock-in RET does what you want.

br,
benny


___
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-mime: [PATCH] Toggle between plaintext and html

2010-04-15 Thread Benjamin Andresen
Hello,

I hope I'm not polluting this mailing list wrongly (due to org-mime
being contrib and not mainline).

I wrote a small patch that gives the function org-mime-toggle-html
(+ support) for that I had to unfortunately rewrite `org-mime-multipart'

Maybe Eric can look at it and if useful include it.

diff --git a/contrib/lisp/org-mime.el b/contrib/lisp/org-mime.el
index 14a8ce3..79a1789 100644
--- a/contrib/lisp/org-mime.el
+++ b/contrib/lisp/org-mime.el
@@ -116,19 +116,30 @@
(buffer-string)
 ('vm ?)))
 
+(defvar org-mime-multipart-alist
+  '((mml  ((beg . #multipart type=alternative\n#part type=text/plain\n)
+   (mid . #part type=text/html)
+   (end . \n#/multipart\n)))
+(semi ((beg . --alternative-{\n--[[text/plain]]\n)
+   (mid . --[[text/html]]\n)
+   (end . --}-alternative\n)))
+(vm   ((beg . ?)
+   (mid . ?)
+   (end . ?
+  Text to wrap around plain and html strings.)
+
+(defun org-mime-multipart-get (pos optional mime-lib alist)
+  (let ((alist (cadr (assoc (or mime-lib org-mime-library)
+(or alist org-mime-multipart-alist)
+(cdr (assoc pos alist
+
 (defun org-mime-multipart (plain html)
   Markup a multipart/alternative with text/plain and text/html
   alternatives.
-  (case org-mime-library
-('mml (format (concat #multipart type=alternative#part type=text/plain
-  %s#part type=text/html%s#/multipart\n)
-  plain html))
-('semi (concat
--- alternative-{\n
--- [[text/plain]]\n plain
--- [[text/html]]\n  html
--- }-alternative\n))
-('vm ?)))
+  (let ((begin (org-mime-multipart-get 'beg))
+(middle (org-mime-multipart-get 'mid))
+(end (org-mime-multipart-get 'end)))
+(concat begin plain middle html end)))
 
 (defun org-mime-replace-images (str current-file)
   Replace images in html files with cid links.
@@ -190,6 +201,40 @@ export that region, otherwise export the entire body.
   (insert (org-mime-multipart body html)
   (mapconcat 'identity html-images \n)
 
+(defun org-mime-unhtmlize (arg)
+  Delete mime-related text and revert buffer to pure plaintext state.
+  (interactive P)
+  (let ((body-start (save-excursion
+  (goto-char (point-min))
+  (search-forward mail-header-separator)
+  (+ (point) 1)))
+(plaintext-start (org-mime-multipart-get 'beg))
+(plaintext-end (org-mime-multipart-get 'mid)))
+(condition-case nil
+(when (org-mime-buffer-html-p)
+  (goto-char body-start)
+  (search-forward plaintext-start)
+  (delete-region body-start (point))
+  (search-forward plaintext-end)
+  (delete-region (- (point) (length plaintext-end)) (point-max))
+  (goto-char body-start))
+  (error nil
+
+(defun org-mime-buffer-html-p ()
+  Return true if buffer has already been htmlized.
+  (condition-case nil
+  (save-excursion
+(goto-char (point-min))
+(search-forward (org-mime-multipart-get 'beg)))
+(error nil)))
+
+(defun org-mime-toggle-html (arg)
+  If buffer hasn't been htmlized, do it. Otherwise revert.
+  (interactive P)
+  (if (org-mime-buffer-html-p)
+  (org-mime-unhtmlize arg)
+  (org-mime-htmlize arg)))
+
 (defun org-mime-org-export (fmt body tmp-file)
   Org-Export BODY to format FMT with the file name set to
 TMP-FILE during export.

Critique and comments always welcome. :-)

br,
benny
___
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: Toggle between plaintext and html

2010-04-15 Thread Benjamin Andresen
Eric Schulte schulte.e...@gmail.com writes:

 Hi Benny,

 Thanks for the patch.  I've refactored it so that it's smaller and only
 changes the htmlized portion if `org-mime-htmlize' was called on a
 partial region.  What do you think about the attached alternative?

 I guess given this patch `org-mime-toggle' should be bound to C-c M-o
 rather than `org-mime-htmlize'.

 If the changed version works for you I'd be happy to apply it.

 Thanks! -- Eric

Hey Eric,

much much better. :-)

I also second the C-c M-o change.

br,
benny



___
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: New Org-mode talk by Carsten Dominik

2010-03-07 Thread Benjamin Andresen
Hey,

Tom levelha...@gmail.com writes:

 Stefan Vollmar vollmar at nf.mpg.de writes:

 
 Hallo, 
 
 we proudly present:
 
 Emacs Org-mode: Organizing a Scientist's Life and Work
 

 I noticed the org color config in the talk was much
 catchier (e.g. the keywords with bgcolor) than in the default org
 config.

I agree with this. The appearance of TODO keywords being buttons is very
nice.

About the talk: Too bad that the audio quality of the wireless(?)
microphone is so bad. The talk itself was very good.

And another positive thing worth mentioning: Whoever did this
translucent overlay business from your monitor over your face. That was
a great way to handle these kinds of presentation.

br, benny


___
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 unschedule a task in agenda view?

2010-01-14 Thread Benjamin Andresen
Hey Eric,

Eric S Fraga ucec...@ucl.ac.uk writes:

 Hello,

 the short question is: how can I easily unschedule a task when in the
 agenda view?  C-c C-s allows me to re-schedule (as do shifted arrow
 keys) but sometimes I simply want to remove the schedule entry for the
 item.

C-u C-c C-s on the item in the agenda will remove the SCHEDULED entry.

I know of no way to Bulk UnSchedule things though. The best bet you have
for that scenario is to use a keyboard macro. Obvious drawbacks to this
is that you have to manually skip entries that you don't want
UnScheduled. This is where bulk actions shine.

 Thanks,
 eric

br,
benny


___
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: Which version org-mode

2010-01-12 Thread Benjamin Andresen
Hey Shawn,

Shawn Koons srko...@gmail.com writes:

 How can I tell which version of Org-mode I am using? I originally installed
 emacs-snapshot and org-mode through Ubuntu's Synaptic Package manager, then
 found out about git, which I have used since.  I just want to make sure that
 I am using the latest version.

General strategy under Emacs. Use apropos. It takes regexp and therefor
something like org.*version works as an input.

M-x apropos RET org.*version RET

The result will be org-version


 Thanks

HTH,
benny


___
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: Update ispell-dictionary to text language

2010-01-11 Thread Benjamin Andresen
Hey Sébastien,

Sébastien Vauban wxhgmqzgw...@spammotel.com writes:

 Hello,

 Here my proposal (and my very first self-written chunk of ELisp code) for
 switching to the right language for ispell, upon reading the contents of the
 meta-tag `LANGUAGE'.

I think using File Variables are better for this. For no particular
reason except they are standardized and don't require any additional
code in Org Mode.
(info (emacs)Specifying File Variables)
# -*- ispell-local-dictionary: german -*-

 Best regards,
   Seb

br,
benny


___
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: Date calculations

2009-12-30 Thread Benjamin Andresen
Hey,

Fredrik fred...@jumans.net writes:

 I'm using a normal org-file as my contact register so I easier can
 link tasks to a specific person. I have also added events as birthdays
 to each contact but is there some way I can make them show up in the
 agenda with some yearly calculations?

 For example a simple birthday reminder can look like this:

 * 2006-12-30 ++1y Happy Birthday!

 Is there some clever way I can add a date calculation to it when it
 shows up in the agenda?

 * 2006-12-30 ++1y Happy Birthday %d years!

I used to do it the way it was done in the manual:

(info (org)Weekly/daily agenda)
under Calendar/Diary integration

 %%(diary-anniversary 14  5 1956) Arthur Dent is %d years old

I now use bbdb which also works good and has gnus integration which is
important to me.


 Regards,

 Fredrik

br,
benny


___
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: Date calculations

2009-12-30 Thread Benjamin Andresen
Hey,

Benjamin Andresen be...@in-ulm.de writes:

 I used to do it the way it was done in the manual:

 (info (org)Weekly/daily agenda)
 under Calendar/Diary integration

  %%(diary-anniversary 14  5 1956) Arthur Dent is %d years old

I can't for the life of me get this to work.

I tried emacs 22.1, 22.3, emacs 23.1 and the current CVS head.

Additionally I tried a few combination of org 5.23a, 4.12a, the newest
git HEAD and others in between. I also changed the value of
`org-agenda-include-diary' and whether or not a ~/diary file existed.
(Zero-length though).

I remember that this worked. But not at the moment.

Does anyone have this working?

br,
benny


___
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: Date calculations

2009-12-30 Thread Benjamin Andresen
Hey Carsten,

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

 On Dec 30, 2009, at 3:21 PM, Benjamin Andresen wrote:

 Hey,

 Benjamin Andresen be...@in-ulm.de writes:

 I used to do it the way it was done in the manual:

 (info (org)Weekly/daily agenda)
 under Calendar/Diary integration

 %%(diary-anniversary 14  5 1956) Arthur Dent is %d years old

 Hi Benjamin,

 currently these lines must be all the way at the left margin, they
 cannot be indented.

I'm sorry for that line, it was ambiguous. I meant to indent it for
clarity, not to represent how it's indented in my file.

I have found the culprit though.

This works:
%%(diary-anniversary 12 30 1984) Arthur Dent is %d years
 ^   ^   ^
 M   D   Y
This doesn't:
%%(diary-anniversary 30 12 1984) Arthur Dent is %d years
 ^   ^   ^
 D   M   Y

This isn't affected by any locale setting on my end.

I tried en_GB, de_DE and en_US and it will always choose the US M/D/Y
format in the org-mode file. That runs counter to the documentation
example cited above, so does anyone else see that?


 - Carsten

br,
benny


___
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: Date calculations

2009-12-30 Thread Benjamin Andresen
Memnon Anon gegendosenflei...@googlemail.com writes:

 Probably related to these settings in my .emacs:

 (setq european-calendar-style t)  ; obsolete!
 (setq calendar-date-style 'european)  ;(info (emacs)Date Formats)

 Do you have these set, too?

Thanks! If I set it to european, it works.

Should the documentation be changed to the american default? (If it is a
default and not based on the $LANG when emacs is being built.)

br,
benny


___
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: Date calculations

2009-12-30 Thread Benjamin Andresen
Hey Carsten,

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

 Hi Benjamin,

 can you point out exactly where in the documentation this is located?

Sure.

org-mode/doc/org.text
Line: 6643

I wouldn't know how to phrase it, but maybe a link to
(info (emacs)Special Diary Entries) where this behaviour is explained
is the best.

 The entry looks like this:

 %%(diary-anniversary 10 31 1948) Arthur's birthday

 This entry applies to October 31 in any year after 1948; `10 31 1948'
 specifies the date.  (If you are using the European or ISO calendar
 style, the input order of month, day and year is different.)


 Thanks.

 - Carsten

 P.S.  Emacs calendar is great, but changing function call arguments
 depending on calendar style was a truly braindead decision.

I completely agree. Or go all the way with localization and make the
`and' macro short-circuit right to left when you run the elisp in
Israel. ;-)

br,
benny


___
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: Encrypting files for org-mobile

2009-12-29 Thread Benjamin Andresen
Richard Moreland r...@ncogni.to writes:

 Hi Daniel,

 There is no support for this in MobileOrg yet, but it has resided on my todo
 list for a while.

 Do you currently use any encryption on your local Org-files in Emacs?  I've
 been meaning to examine AutoEncryption or CryptPlusPlus (
 http://www.emacswiki.org/emacs/CategoryCryptography) to see how it plays
 with Org.  If it worked well, my rough plan was to make MobileOrg able to
 en/decrypt files along those lines.

 If anyone has any better ideas, let me know.  I'm not sure how this would
 best be implemented.

I don't know about a better idea, but I use EasyPG. (info (epa)Overview)

It works well with org and the interface is very easy to use.
(C-x C-w filename.gpg, and select whom to encrypt to from your keyring)

It's also part of upstream Emacs and uses GnuPG.


 -Richard

br,
benny


___
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: Know what has been done for a certain date ?

2009-12-23 Thread Benjamin Andresen
Hey Xavier,

Xavier Maillard x...@gnu.org writes:

 Hi,

 I heavily use logbook in order to track things. I need a way 
 to know what has been done for a certain day. The master problem 
 is that using logbook does not imply I marked something as DONE. It can be 
 contextual informations (I phoned someone, 
 ...).


You can press [ to see all inactive timestamps on a particular day.
They would include times you CLOSED a todo item and maybe other
[inactive] timestamps you include in your items.

 Do you know any way to list my action list for a particular date ?

I don't know of any way other than the one above.

What would be interesting and probably crazy is a way to simulate a
future or past date. SCHEDULED and DEADLINE would act as if the
simulated date was .

 Thank you.

 Xavier

br,
benny


___
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: Saving and restoring visibility

2009-12-14 Thread Benjamin Andresen
Hey Carsten,

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

 Hi,

 I vaguely remember that someone posted code here a
 while ago (one year?) to save and restore outline visibility.

 Who remembers or can find back the post?

There is Org-mode and saveplace.el
http://orgmode.org/worg/org-hacks.php#sec-18

And the Thread by User
http://article.gmane.org/gmane.emacs.orgmode/15827

http://www.emacswiki.org/emacs/orgfold-separate-file.el

 Thanks.

 - Carsten

HTH,
benny


___
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: sreen : unable to run org-babel-screen-test

2009-12-01 Thread Benjamin Andresen
Hey,

bluedian blued...@gmail.com writes:

 Hi,

 With the last git version (updated by org-track 5 five minutes ago), I have
 still the same problem and the same error message.

I'm a bit at a loss with debugging this thing non-interactively. (Yeah I
know, after the first one was unsuccessful that's early to give up.)

But because it uses both the filesystem and GNU screen the error could
lie anywhere and not just in the emacs lisp code.

I will try and see if I can improve the test code by testing checking at
several stages if something has gone wrong, so that I will get a better
idea why and when things start to go awry.

 Regards,
 BlueDian

br,
benny

P.S. Could anyone that comes by this with GNU/Linux and GNU screen try
it out as well? I'm using this line to test the setup:
% emacs --batch -l orgloadpath_org-babel-screen-test.el


___
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: sreen : unable to run org-babel-screen-test

2009-11-30 Thread Benjamin Andresen
Hey,

bluedian blued...@gmail.com writes:

 Hi,

 When running org-babel-screen-test, a xterm appear with its prompt, but no
 message appear. Emacs hangs and my cpu is à 100%.

I just tried it myself, and apparently it's broken with the current git.

I will have a look and report back with my findings!

br,
benny


___
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: sreen : unable to run org-babel-screen-test

2009-11-30 Thread Benjamin Andresen
Hey,

Benjamin Andresen be...@in-ulm.de writes:

 I will have a look and report back with my findings!

I was relying on a variable which used to contain the value it needed,
but doesn't do any more. It was a foolish shortcut and now it uses the
official route by processing the parameters that are passed to it.

As I don't have access to the official org-mode git repo, can someone
please apply this patch for me?

br,
benny

P.S. I'm not committing this patch to the org-babel repo, out of fear of
merge issues later on. I guess this route is better? Thanks!

diff --git a/contrib/babel/lisp/langs/org-babel-screen.el b/contrib/babel/lisp/langs/org-babel-screen.el
index efeab23..1529ac0 100644
--- a/contrib/babel/lisp/langs/org-babel-screen.el
+++ b/contrib/babel/lisp/langs/org-babel-screen.el
@@ -55,7 +55,9 @@ In case you want to use a different screen than one selected by your $PATH)
 \default\ session is be used when none is specified.
   (message Sending source code block to interactive terminal session...)
   (save-window-excursion
-(let ((socket (org-babel-screen-session-socketname session)))
+(let* ((processed-params (org-babel-process-params params))
+   (session (first processed-params))
+   (socket (org-babel-screen-session-socketname session)))
   (unless socket (org-babel-prep-session:screen session params))
   (org-babel-screen-session-execute-string session body
 
___
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] RFC: sort subtree by most recently clocked in and most time spend on

2009-11-23 Thread Benjamin Andresen
Hey there,

I wrote a bit of code to do the things in the subject.

I'm interested if someone has a better way to deal with the subtree
copying thing I'm doing. I'm not really happy with using the kill-ring
like that.

`org-narrow-subtree' won't work, because `save-excursion' doesn't revert
it to the previous state and the org-sort already uses it.

Thanks in advance for looking over it!

(defun ba/org-heading-clock-times ()
  Return alist of clocktimes from current heading.
  (let* ((re (concat ^\\(\\*+\\)[ \t]\\|^[ \t]*
 org-clock-string
 [ \t]*\\(?:\\(\\[.*?\\]\\)-+\\(\\[.*?\\]\\)\\|=[ 
\t]+\\([0-9]+\\):\\([0-9]+\\)\\)))
 t1 ts te tsf tef dt
 results)
(save-excursion
  ;; shut up about copying
  (flet ((message (rest ignored) nil))
(org-copy-subtree))
  (with-temp-buffer
(yank)
(while (re-search-backward re nil t)
  (when (match-end 2)
;; Two time stamps
 (setq ts (match-string-no-properties 2)
   te (match-string-no-properties 3)
   tsf (org-float-time (apply 'encode-time 
(org-parse-time-string ts)))
   tef (org-float-time (apply 'encode-time 
(org-parse-time-string te)))
   dt (- tef tsf)
   t1 (floor (/ dt 60)))
 (add-to-list 'results `(,ts . ,t1))
results))


(defun ba/org-sort-most-time-spend ()
  (let ((org-ts-w/mins (ba/org-heading-clock-times)))
(- (apply '+ (mapcar '(lambda (a)
   (cdr a))
 org-ts-w/mins)

(defun ba/org-sort-most-recently-clocked ()
  (let ((org-ts-w/mins (ba/org-heading-clock-times)))
(if (not org-ts-w/mins)
(org-float-time)
(- (org-float-time)
   (org-float-time (apply 'encode-time
  (org-parse-time-string (caar 
org-ts-w/mins

br,
benny


___
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: Speed commands

2009-11-15 Thread Benjamin Andresen
Hey Dan,

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

 Here are simplified versions of the forward- and backward-scroll speed
 commands that I'm suggesting.

I love it!

 Dan

br,
benny


___
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: Speed commands

2009-11-14 Thread Benjamin Andresen
Hey Dan,

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

   (unless (org-heading-has-child-p) (org-cycle))

There is no function by the name of org-heading-has-child-p in the
current org-mode tree. I'd like to try the above code.


 Dan

br,
benny


___
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-show-effort ideas

2009-11-03 Thread Benjamin Andresen
Hey org-mode,

Adam Spiers orgm...@adamspiers.org writes:

 I definitely did try it, and I just did another 'git pull' and tried
 again, and I still don't see it, so I guess we're talking about
 different things ;-)

 To clarify, I'm referring to showing effort via a single keystroke
 when on a todo line in the *Org Agenda* buffer.  Currently, when I hit
 e on a todo which has an existing Effort property value set, my
 minibuffer prompt shows Value: .  The same applies with C-c C-x e in
 a normal .org file buffer.

When I press 'e' in an agenda on an item that has the Effort property
value set, I get a minibuffer prompt that shows Value [5]:  when the
Effort value is 5.

This is with a git version from Sunday morning.

Check the source of the function org-set-effort, it will show you that
it concats [ cur ], where cur is the current Effort prop value.

br,
benny


___
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: Fast traversing directories

2009-10-31 Thread Benjamin Andresen
Hey Andrea,

andrea Crotti andrea.crott...@gmail.com writes:

 I didn't find any function in elisp, maybe it would be better
 to get a list of org-files with an external command (python or shell script),
 what do you think?

http://orgmode.org/worg/org-faq.php#set-agenda-files-recursively

br,
benny


___
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: FAQ incorrect

2009-10-27 Thread Benjamin Andresen
Hey W.,

W.Bentley MacLeod bentley.macl...@columbia.edu writes:

 FAQ on how to include all org files in a directory is incorrect (view 85).
 Correct code is:
 (setq org-agenda-files (file-expand-wildcards ~/org-files/*.org))

You are right.

This isn't valid: (setq org-agenda-files ~/my/special/path/org/)

M-x org-agenda RET will reply with: `org-agenda-files' cannot be a single 
directory

I propose the following for the FAQ:

(setq org-agenda-directory ~/Org/)
(setq org-agenda-files (directory-files (expand-file-name org-agenda-directory) 
t ^[^\.][^#][[:alnum:]]+\.org$))

That will add every org file. I've had the problem of normal glob
expansion to include emacs lock files that are in this format:
.#todo.org

I was under the impression that org-agenda-directory set to
~/my/special/path/org/ would Just Work(tm) because if you do C-c a a v A
it pulls in the right files for me.

 best bm

br,
benny



___
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: Search in the archive file by date

2009-10-27 Thread Benjamin Andresen
Hey Marcelo,

Marcelo de Moraes Serpa celose...@gmail.com writes:

 Hello,

 When someone asks you: Hey, do you remember what you have done last day
 x?, it would be useful to query org to return in the archive for the items
 that have been closed that day. Is there a way to do that?

Sure. Let me tell you how I would do it:

|-+---|
| C-c a a | the same as M-x org-agenda RET a  |
| v A | include all archive-files |
| j   | select the date you want to view  |
| ]   | this will include inactive timestamps |
|-+---|

I like 'l' as well, which will include (or exclude, based on your
setting) all the clock times that day.

Hope that helps.

 Thanks!

 Marcelo.

br,
benny


___
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: Emacs23 Menus Org and Tbl empty

2009-10-06 Thread Benjamin Andresen
Hey Erich,

e.waelde ew.ng7...@nassur.net writes:

 Hello,

 I noticed today that the pulldown menus Org and Tbl remain
 empty, even though org mode is loaded and all functions can be
 called by M-x org-
 Any hints where to look?

Might be a shot in the dark, but: (Only applicable if you use the gtk
version of Emacs)

gtk 2.18 changed a few things but gtk 2.16 should work from the get-go.
http://library.gnome.org/devel/gtk/unstable/gtk-migrating-ClientSideWindows.html

There you can see that you could try exporting GDK_NATIVE_WINDOWS=1
before running emacs and see if that fixes things.

HTH,
benny


___
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: allow emacs-lisp results to be pretty-printed

2009-10-04 Thread Benjamin Andresen
Eric Schulte schulte.e...@gmail.com writes:

 Hi Benny,

 Benjamin Andresen be...@in-ulm.de writes:

 Benjamin Andresen be...@in-ulm.de writes:

 where should this special parameter be documented?

 I would add a page on Worg that is linked from org-babel.org that
 contains the following.

 I have done this for org-babel-screen.org here:
 http://orgmode.org/worg/org-contrib/babel/org-babel-screen.php
 (might not be visible yet, because Worg is only exported from git every
 hour or so)

 Is that a good way to do this?

 * Header Arguments
   :PROPERTIES:
   :CUSTOM_ID: header-arguments
   :END:
 - results :: supports everything documented
   
 [[file:org-babel.org::results%20arguments%20specify%20what%20should%20be%20done][here]]
   as well as
   - pp :: pretty prints results and replaces any previously inserted
   results from code block


 There is currently a header-arguments [1] section to the Org-babel page
 on worg.  This is the place where this sort of documentation should be
 added.

I was talking about language specific documentation. I don't think every
language mode should be documented at [1]. That could become very big and
cumbersome to look through.

Yesterday I added a section called Language specific documentation under
http://orgmode.org/worg/org-contrib/babel/org-babel.php#reference-and-documentation

And have the header arguments linked from there to here (first example):
http://orgmode.org/worg/org-contrib/babel/org-babel-screen.php#header-arguments


 WRT the pp patch for emacs-lisp, I think it is an excellent addition and
 in fact I think that it points to a more general need.  Languages should
 have the option of returning values as they would appear when written in
 the language.  That is how they would be printed in a source-code file.
 This seems to be what your pp patch does for emacs-lisp.  In fact such
 output should be wrapped in a #+begin/end-src block for fontification of
 the results on export.


 Would you feel like attempting this change?  If not I will add it to the
 TODO section of the babel development file on worg.

I'm not comfortable enough with tackling that yet.


 Thanks! -- Eric

br,
benny


 Footnotes: 
 [1]  http://orgmode.org/worg/org-contrib/babel/org-babel.php#header-arguments


___
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: Problems using org-babel

2009-10-03 Thread Benjamin Andresen
Hey Keith,

Keith Lancaster klancaster1...@mac.com writes:

 I enabled org-babel according to the instructions on worg, but am
 running into a number of issues which I am guessing are a function of
 my configuration. For example, enabling org-babel completely breaks
 remember mode, giving me a wrong ... argument (sorry - don't have it
 in front of me) error.  Adding a python source block still allows
 exporting, but adding a ruby block causes a wrong... error as well
 when I try to export. I guess the real question is how do I debug
 this? I am relatively new to emacs, and not familiar really with how
 to track some of these issues down.

Create a new file with nothing in it, then start adding org-mode parts.
(The load path, require the org and org-babel). That way you can
guarantee the problem is with org-mode/org-babel and not with some other
part of your setup.

emacs -Q -l newfile.el

If you've done so, incrementally add parts of your old init.el to the
new file and see if something breaks.

That way you find the step that doesn't work.

If you experience problems with the initial step of getting org-mode to
run with an empty init.el file, tell us what versions you're using (M-x
org-version RET) and what exactly you did to cause the error message.
(Alternatively you could also do M-x toggle-debug-on-error RET and post
that.)

br,
benny


___
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-babel: [PATCH] allow emacs-lisp results to be pretty-printed

2009-10-03 Thread Benjamin Andresen
Hey there,

on irc (#org-mode) someone asked how one would go about to insert the
result of a emacs-lisp function without it being transformed into a
org-mode table.

I didn't see any other way, so I wrote a small patch that allows the
parameter :results to accept 'pp'. Is this the right way? And where
should this special parameter be documented?

diff --git a/contrib/babel/lisp/langs/org-babel-emacs-lisp.el b/contrib/babel/lisp/langs/org-babel-emacs-lisp.el
index 39f5cc7..60671ac 100644
--- a/contrib/babel/lisp/langs/org-babel-emacs-lisp.el
+++ b/contrib/babel/lisp/langs/org-babel-emacs-lisp.el
@@ -39,10 +39,14 @@
   Execute a block of emacs-lisp code with org-babel.  This
 function is called by `org-babel-execute-src-block' via multiple-value-bind.
   (message executing emacs-lisp code block...)
-  (save-window-excursion
-(let ((print-level nil) (print-length nil))
-  (eval `(let ,(mapcar (lambda (var) `(,(car var) ',(cdr var))) vars)
-	   ,(read (concat (progn  body 
+  (let ((results (cdr (assoc :results params
+(save-window-excursion
+  (let ((print-level nil) (print-length nil))
+(eval `(let ,(mapcar (lambda (var) `(,(car var) ',(cdr var))) vars)
+ ,(read (concat (progn  (if (string-match pp$ results)
+  (concat (pp  body ))
+  body)
+)
 
 (provide 'org-babel-emacs-lisp)
 ;;; org-babel-emacs-lisp.el ends here

br,
benny
___
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: allow emacs-lisp results to be pretty-printed

2009-10-03 Thread Benjamin Andresen
Benjamin Andresen be...@in-ulm.de writes:

 where should this special parameter be documented?

I would add a page on Worg that is linked from org-babel.org that
contains the following.

I have done this for org-babel-screen.org here:
http://orgmode.org/worg/org-contrib/babel/org-babel-screen.php
(might not be visible yet, because Worg is only exported from git every
hour or so)

Is that a good way to do this?

* Header Arguments
  :PROPERTIES:
  :CUSTOM_ID: header-arguments
  :END:
- results :: supports everything documented
  
[[file:org-babel.org::results%20arguments%20specify%20what%20should%20be%20done][here]]
  as well as
  - pp :: pretty prints results and replaces any previously inserted
  results from code block

br,
benny


___
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: Change the color of the hidestars property

2009-09-26 Thread Benjamin Andresen
Marcelo de Moraes Serpa celose...@gmail.com writes:

 Hello,

 How could I change the color that the hidestarts feature use ? I'm using a
 different theme, and org applies black to the starts to hide it, but the
 background color of this theme is a ton of grey.

Put the point on the black star and execute M-x describe-char RET

It will then show you what face is applied.

In this case, it's `org-hide'. If you follow the hyperlink it will allow
you to customize this face.

A different way would be to use the colortheme[1] package.

 Thanks in advance,

 Marcelo.

br,
benny

Footnotes: 
[1]  http://www.emacswiki.org/emacs/ColorTheme


___
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-babel: interactive terminal support

2009-09-25 Thread Benjamin Andresen
Hey Dan,

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

 Hi Benny,

 This looks very interesting and I think it's extremely likely that we'll
 want to include your code -- thanks very much. Having said that, I'm
 being a bit dense: would you mind expanding a bit on what this currently
 does, and what it has the potential to do?

All it currently does it show you a terminal which gets the source
code block send to. Just like an inferior process.

I've made a gif of the channels.org example from my first mail:
http://github.com/bandresen/org-babel-screen/blob/master/channels.anim.gif

The way I currently see it, it somehow works as an interactive makefile.

An example of a use that I have is that want to extract several frames
out of a video file and convert them to a gif animation.

It's a commented org file with several steps such as:

* find the part you want to extract
#+begin_src screen :session create-gif
  mplayer -ao null -osdlevel 3 /tmp/videofile.avi 
#+end_src
[...snip...]
* convert selected frames to gif
#+begin_src screen :session create-gif
  convert -delay 100 -loop 0 .qiv-select/* animation.gif
#+end_src

I don't know how useful it is to other people, but because it basically
gives you the power over a terminal emulator you could do anything in it
that you can do in a normal terminal. Except better controlled and
documented.

Or one could use a standardized notation for keypresses and let screen
translate them for you. Example:

#+begin_src screen :session vimtutorial
  vimtutor
  85G
  fcx
  EEx
  llx
  ^Vlllx
#+end_src

Which might be useful in some way.

Another thing that might be possible is to simulate an 'expect' like
behavior by using screen's capability to dump the output of commands.
It's certainly possible, but replacing an app like 'expect' is no small
task. :-)

br,
benny


___
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 on spreadsheet formula

2009-09-25 Thread Benjamin Andresen
Hey RC,

If you set the value of D2 to 0 what you want will be achieved.

The table would look like this:

|-+--+--+---|
| No. |P |E | B |
|-+--+--+---|
| |  |  | 0 |
|   1 | 5000 | 2000 |  3000 |
|   2 | 7000 | 1000 |  9000 |
|   3 | 5000 | 1000 | 13000 |
#+TBLFM: $...@-1$4+$2-$3::@2$4=0
 
 That's the interesting part


 Is there a way I can restrict application of the column formula to below the
 horizontal line.

No idea.

 Thanks,
 RC

br,
benny


___
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-babel: interactive terminal support

2009-09-23 Thread Benjamin Andresen
Hey Eric,

Eric Schulte schulte.e...@gmail.com writes:

 Benjamin Andresen be...@in-ulm.de writes:

 So if I understand the purpose is to evaluate source-code blocks in
 Org-mode files which will open terminals in new windows, send shell
 commands to those terminals, and either display information in the
 terminals and possible insert output from those terminals into Org-mode
 buffers?
The first part is correct. It will open different terminals depending on
the amount of sessions specified and run the code in the source-code
blocks.

It's only a one-way street at the moment though, the resulting output is
currently dismissed. (But possible to get, depending on what
shell/config is used. screen's hardcopy.)

 I like the idea, however I can't get it working on my Mac.  I am able to
 pop open new xterms, however nothing seems to make it into or out of
 screen (maybe this is because I all ways have screen running as my
 normal terminal emulator?).

Nope, that shouldn't have anything to do with it. I also have screen
running at all times. It's creating a new screen instance for every
session. The sockets are named org-babel-session-$SESSION.

The problem might be in line 49, because I hard-coded a one second sleep
timer in there to only send the resulting source code block afterward.
(To give xterm and screen a time to spawn.)

That's pretty dirty and I should fix that.

 I don't see where you have /bin/zsh hard-coded...

That's because my mail was sent before I had a look around how other
modes handle parameter. Now it's defaulting to sh but it can be
changed with :cmd

 Thanks! -- Eric


br,
benny


___
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-babel: interactive terminal support

2009-09-22 Thread Benjamin Andresen
Hello,

after seeing org-babel I immediately thought of the eev project by
Eduardo Ochs (http://angg.twu.net/)

Basically I wanted to do what he does in this video:
http://angg.twu.net/eev-current/anim/channels.anim.html

So I wrote a small org-babel gnu screen interface.
Eev does the same with expect but is very line-centric. And GNU Screen
can slurp in whole files. (I guess one could support several backends if
this proves useful)

The translated org-babel syntax looks like this:

* Listen on port 1234
  #+begin_src screen :session receiver :results silent
netcat -l -p 1234
  #+end_src

* Send things to port 1234
  #+begin_src screen :session sender :results silent
{   
 echo hi
 sleep 1
 echo bye 
 sleep 1
} | netcat -c localhost 1234
  #+end_src

I've put the code on github if anyone is interested in this:
http://github.com/bandresen/org-babel-screen

A few things are still hardcoded, like the use of /bin/zsh. If you guys
think this is a worthwhile addition to org-babel, let me know what the
right parameter would be.

HTH,
benny



___
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 version 6.30trans; HTML exporting problem

2009-09-21 Thread Benjamin Andresen
Andrew Stribblehill a...@wompom.org writes:

 [snip]

do you have org-mode/contrib/lisp at the beginning of your load-path?

The error you're seeing seems to be from using an old version of htmlize
(Maybe from a different source?). The one in contrib should work.

HTH,
benny


___
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: Useful utility function: org-sort-multi

2009-08-30 Thread Benjamin Andresen
Hey Carsten,

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

 On Aug 29, 2009, at 3:38 AM, Ryan C. Thompson wrote:

 Hi Ryan,

 this looks interesting, but I am not sure I understand how it works.
 It looks to me that each sorting step will completely re-sort the entire
 list of items, so the final sorting will win in the end.

 Or am I missing something here?

if you have the following list
* Test Sorting
** TODO Charlie
** WAITING Beta
** TODO Alpha
** STARTED Beta
** STARTED Charlie
** TODO Beta
** STARTED Alpha
** WAITING Charlie
** WAITING Alpha

calling org-multi-sort with ?o ?a will sort it like this
* Test Sorting
** TODO Alpha
** TODO Beta
** TODO Charlie
** STARTED Alpha
** STARTED Beta
** STARTED Charlie
** WAITING Alpha
** WAITING Beta
** WAITING Charlie

but just ?a would completely ignore the TODO, STARTED, WAITING order.

Thanks Ryan, pretty useful.

 - Carsten

br,
benny


___
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: Refiling goes to the wrong place

2009-08-27 Thread Benjamin Andresen
Hey,

Bernt Hansen be...@norang.ca writes:

 [snip]

I have the same behavior from time to time. But whenever I try to find a
reproducible scenario it disappears.

It also never happens twice in a row, same as with Bernt.

br,
benny


___
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 and use example

2009-08-26 Thread Benjamin Andresen
Hey Paul,

Paul Menair pmen...@gmail.com writes:

 My problem is this.  I populate the fifth field with c-- c-u c-y.  I
 would be nice if it happened automatically, but that's no big deal.
 However, I've been going through and manually entering the sixth
 field, and that does end up being a hassle.

I whipped something up that should work for you.

You need to evaluate the code below and then the below table will work
for you.

(defun ba/org-timerange (s optional in-min)
  (let* ((re ^\\(.*?\\)--\\(.*?\\)$)
 (start (replace-regexp-in-string re \\1 s))
 (end (replace-regexp-in-string re \\2 s))
 (start-in-min (org-hh:mm-string-to-minutes start))
 (end-in-min (org-hh:mm-string-to-minutes end))
 (diff-in-min (- end-in-min start-in-min)))
(if in-min
diff-in-min
(format %.2f (/ diff-in-min (float 60))

| date | client | desc  | timerange 
 |  H:M | in dec |
|--++---++--+|
| 2009-08-26 Wed | benny  | foo'd | 2009-08-26 Wed 21:55--2009-08-26 Wed 
21:58 | 0:03 |   0.05 |
#+TBLFM: $5='(org-minutes-to-hh:mm-string (ba/org-timerange $4 
t))::$6='(ba/org-timerange $4)

If you're on the table and you press C-u C-c C-c and it should put the
correct info at the respective places.

Now what I recommend is using autocalc instead so you don't have to
worry about doing this. This would require you to change your table to
the following format:

|   | date | client | desc   | timerange
  |  H:M | in dec |
|---+--++++--+|
| # | 2009-08-25 Tue | benny  | foo'd  | 2009-08-25 Tue 20:55--2009-08-25 
Tue 23:58 | 3:03 |   3.05 |
| # | 2009-08-26 Wed | bar| quux'd | 2009-08-26 Wed 22:10--2009-08-26 
Wed 22:14 | 0:04 |   0.07 |
#+TBLFM: $6='(org-minutes-to-hh:mm-string (ba/org-timerange $5 
t))::$7='(ba/org-timerange $5)

The # in the first column achieves this. See (info (org)Advanced features)
for more information.

 Paul

HTH,
benny


___
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: Change of keys to move agenda through time

2009-08-25 Thread Benjamin Andresen
Carsten Dominik carsten.domi...@gmail.com writes:

 Hi,

 we have the proposal to do the following key changes in the agenda:

 1. Make the cursor keys LEFT and RIGHT do normal cursor motion again
 2. Use the keys n and p to switch the agenda to earlier
and later dates.

But n and p are already used to move up and down entries in the
org-agenda.
Where would they go to then?

I personally use M-n and M-p to move earlier/later.

 Should we make this change?  yes or no?

No from me. :-)

br,
benny


___
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: Change of keys to move agenda through time

2009-08-25 Thread Benjamin Andresen
Hey Bastien,

Bastien bastiengue...@googlemail.com writes:

 Benjamin Andresen bandre...@gmail.com writes:
 But n and p are already used to move up and down entries in the
 org-agenda.
 Where would they go to then?

 C-n and C-p, like in any Emacs buffer?

Sure. That's a given. But they seem to be the fallback, IMO.

As Leo wrote: ibuffer, gnus, dired  others all use 'n' for next
line and 'p' for previous line.

And with the recent mark and unmark feature inspired by dired, doing
what it does, seems intuitive as far as emacs goes.

Another example I can think of:
  epa-list-keys uses 'n' and 'p' and 'm' and 'u' for the same things
  as dired and ibuffer.

Basically it's the Principle Of Least Surprise. n, p doing what it
does now falls under it for me, based on all the other software I use. 

br,
benny


___
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: How to measure a project's %complete?

2009-08-18 Thread Benjamin Andresen
Hey Christopher,

Christopher DeMarco dema...@maya.com writes:

 * PROJECT Overhaul personal productivity [50%]
 ** DONE Clean my desk
 ** TODO Learn Org

I copied exactly those 3 lines and put them in foo.bar and pressed C-c
C-t on Learn Org and the [50%] became [100%]

If this doesn't work for you, you might not be on the latest
org-version. The one bundled with emacs23 should definitely be able to
do it.

 Thanks in advance!

HTH,
benny


___
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: How do people do it: lots of tags?

2009-08-13 Thread Benjamin Andresen
Hey Alan,

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

 Working in an 80-90 character line format, I am afraid to use more than a
 few tags, and I try to make them short.  After well over a year, I am still
 a bumbling novice with org-mode, but I'm beginning to have some insight,
 perhaps, into how some things can work.  I like the idea of tags alot, and
 that they can be used to group entries in wide ranging bunches of files.

 How do people get around the line length limitation?  I would appreciate
 learning how others deal with lots of  tags?  I think it's more interesting
 to not limit to a closed system of tags.

This is how I get around the line-length:
  http://orgmode.org/worg/org-hacks.php#sec-13

If that is too involved you can also change the value of
`org-tags-column' and `org-agenda-tags-column' to a bigger value than it
is currently set to for a quick fix.


 Alan

HTH,
benny


___
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: Day workflow: need your opinion

2009-08-04 Thread Benjamin Andresen
Hey Xavier,

Xavier Maillard x...@gnu.org writes:

 Ex:

 a) I doing some non urgent (planned) DBA tasks (call this project A)
 b) someone calls me (interrupting Project A)
 c) I am doing what urgency of b) is needed
 d) when c) is finished, I get back to project A

 At my job, they often rules the retro planning concept which is
 bloat. So how would you manage such situation in org-mode ?

I'm clocked in with the task I'm currently doing. If this is interrupted
I will clock in the new task that has been appointed to me without
clocking out the old task. (You might have to create the interrupting
task before clocking it in.)

After I'm done with the interrupting task, I'll do C-u C-C C-x C-i and
press i which I believe stands for continue the previous interrupting
task.

(I have this bound to F-keys because I clock stuff all the time.)

 Thank you,

 Xavier

Hope that helps,
benny


___
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: Keeping org files under git - trimming the repository

2009-08-04 Thread Benjamin Andresen
Hey Ben,

Ben Alexander b...@alexanderonline.org writes:

  Different people cite different benefits:
 + safety while editing. If a slip of the fingers hits C-k on a folded
 line and you don't notice it for a long time, git allows you to find
 when that happen (git blame) and 'cherry-pick' a patch to bring the
 lost subtree forward in time.

That's the reason I do it.

I have my main laptop where I spend 90% of my time on so syncing is not
the issue for me.

  I added a hook to auto commit every time I saved any org file. My
 simple, small text file of todo items is now a giant git repository.

 At last a question or two: Does this happen to you? What do you do?
 What new git command do I need to learn in order to do it?

I don't quite understand the first question. But I give a shot on the
second question (Hopefully I understood it correctly.):

My setup is that I keep my org files in ~/Org, I then launch a script at
the start of my login session that automatically commits every change
done to a .org* file. (Everything else is git-ignored.)

This is the file that does all the magic. ;-)
,[ org-autocommitd ]
| #!/bin/zsh
| 
| WATCHDIR=~/Org
| cd $WATCHDIR
| 
| inotifywait -m --format '%f' -e close_write $WATCHDIR | \
| while read file; do
|   git add --all
|   git commit --all --message=${file} was saved
| done
`

The idea behind doing this instead of using emacs to auto-save, was so
that when I used other tools than emacs to edit that directory, the
changes would still be saved.
I don't actually do that currently, but the idea of having it tool
agnostic seemed like a good idea at the time.

 -Ben

HTH,
benny


___
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 GPG (EasyPG)

2009-08-02 Thread Benjamin Andresen
Hey everyone,

Maurice Boucher maurice.boucherer...@wanadoo.fr writes:

 Hello,

 Kyle Sexton k...@mocker.org disait le 31/07/2009 que :

 Does this mean you were able to get the agenda view working with
 EasyPG as well?

 In my .emacs, I have :
 ,
 | (require 'epa)
 | (epa-file-enable)
 | (setq epa-file-cache-passphrase-for-symmetric-encryption t)   
 `

Not to sound paranoid. But if you want caching, it's recommended to use
public-key encryption instead of symmetric encryption. gpg-agent is the
preferred way to do this. For more information see here:
(info (pgg) Prerequisites)

Works fine with epa as well.

br,
benny


___
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] How to ignore horizontal lines in tables and references

2009-07-31 Thread Benjamin Andresen
Hello everyone,

I'm having a bit of a problem with tables and references. I try to use
tables + spreadsheet capabilities for data entry while testing certain
things, and one table design that works conceptually for me is the
following:

| Attempt | Start  | End| Success | Wait in 
Min |
|-+++-+-|
|   1 | 2009-07-31 Fri 04:43 | 2009-07-31 Fri 04:44 | No  | 
  1 |
|   2 | 2009-07-31 Fri 04:45 | 2009-07-31 Fri 04:46 | No  | 
  1 |
|   3 | 2009-07-31 Fri 04:48 | 2009-07-31 Fri 04:49 | No  | 
  1 |
|-+++-+-|
| Results ||| 0%  | 
  1 |
#+TBLFM: $5='(ba/org-time-diff-min $2 $3)::@5$4='(ba/find 
Yes|'(@2$...@4$4))::@5$5=vmean(@2$...@4$5);%.1f

The problem I'm having is when my cursor is at @4$1 and I'm pressing RET.
It creates a new row where I can enter new data, as expected.

It will increment the
   @5$5 part to @6$5

Now the problem is when I try to automate the formulas a bit.

If I would instead of
  @5$5=vmean(@2$...@4$5);%.1f
use
  @5$5=vmean(@2$...@-1$5);%.1f
the following message will come up during evaluation:
  Row descriptor -1 used in line line crosses hline

Does anyone have any idea how I can make this work? The problem goes
away when I delete the horizontal line. If my table design is wrong or
there is a better way to do what I'm open to changing it.

Thanks in advance,
benny


___
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: How to ignore horizontal lines in tables and references

2009-07-31 Thread Benjamin Andresen
Hey,

Benjamin Andresen be...@in-ulm.de writes:

 | Attempt | Start  | End| Success | Wait 
 in Min |
 |-+++-+-|
 |   1 | 2009-07-31 Fri 04:43 | 2009-07-31 Fri 04:44 | No  |   
 1 |
 |   2 | 2009-07-31 Fri 04:45 | 2009-07-31 Fri 04:46 | No  |   
 1 |
 |   3 | 2009-07-31 Fri 04:48 | 2009-07-31 Fri 04:49 | No  |   
 1 |
 |-+++-+-|
 | Results ||| 0%  |   
 1 |
 #+TBLFM: $5='(ba/org-time-diff-min $2 $3)::@5$4='(ba/find Yes 
 '(@2$...@4$4))::@5$5=vmean(@2$...@4$5);%.1f

Of course a few minutes after sending the mail, I'm stumbling upon
one(?) answer:
Changing @2$...@4$5 to @2$...@-i$5 works. I'm not entirely sure I
completely understand the reason behind this, but it works for now.

br,
benny


___
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: Vertical split in Emacs 23

2009-07-15 Thread Benjamin Andresen
Hey Paul,

Paul Mead paul.d.m...@gmail.com writes:

 Hi,

 I've recently upgraded to Emacs 23, and I'm not at all impressed with
 the vertical split that it seems to prefer when there's supposedly
 enough buffer width to allow it - the Agenda gets squashed up and things
 like the TODO quick selection menus look terrible.

 Is there a way of changing this back to the old behaviour?

I don't know if this will exactly revert it back to the previous
behavior, but if you change `split-width-threshold' to a bigger number
(e.g. 999) than the default it should be more sensible looking.

 Thanks
 Paul

br,
benny


___
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] Dynamically adjusti tags position

2009-07-08 Thread Benjamin Andresen
hey there,

I wrote a bit of code that allows me to have the tags always at the
utmost right position in the file... I often have windows that are
bigger than the standard 80 characters wide default and I dislike seeing
the tags in the middle of the window.

I started doing this and found out that adjusting the tags every time I
resize a window breaks tracking org-mode files with git. If the last
window is just a bit smaller than last time, the complete line will be
shown as a diff. Therefor hooks are used to reset the column variable to
1 so that git tracking still works.

If anyone wants to use this or want to look over it if I could do this
smarter, I'm very happy.

If the response is positive I'll clean it up a bit and maybe it is worth
a contribution or a worg page. :-)

best regards,
benny

(defcustom ba/org-adjust-tags-column t)
(setq ba/org-adjust-tags-column t)

(defun ba/org-adjust-tags-column-reset-tags ()
  (when (and
 (not (string= (buffer-name) *Remember*))
 (eql major-mode 'org-mode))
(let ((b-m-p (buffer-modified-p)))
  (condition-case nil
  (save-excursion
(goto-char (point-min))
(command-execute 'outline-next-visible-heading)
;; disable (message) that org-set-tags generates
(flet ((message (rest ignored) nil))
  (org-set-tags 1 t))
(set-buffer-modified-p b-m-p))
(error nil)

(defun ba/org-adjust-tags-column-now ()
  (set (make-local-variable 'org-tags-column)
   (- (- (window-width) 3)))
  (ba/org-adjust-tags-column-reset-tags))

(defun ba/org-adjust-tags-column-maybe ()
  (when ba/org-adjust-tags-column
(ba/org-adjust-tags-column-now)))

(defun ba/org-adjust-tags-column-before-save ()
  (when ba/org-adjust-tags-column
 (setq org-tags-column 1)
 (ba/org-adjust-tags-column-reset-tags)))

(defun ba/org-adjust-tags-column-after-save ()
  (ba/org-adjust-tags-column-maybe)
  (set-buffer-modified-p nil))

; automatically align tags on right-hand side
(add-hook 'window-configuration-change-hook
  'ba/org-adjust-tags-column-maybe)
(add-hook 'before-save-hook 'ba/org-adjust-tags-column-before-save)
(add-hook 'after-save-hook 'ba/org-adjust-tags-column-after-save)


___
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: Lisp Link type for Org mode

2009-06-22 Thread Benjamin Andresen
Hey Jonathan,

Jonathan Arkell jonath...@criticalmass.com writes:

 Hey everyone

 I've added a very simple link type to Org. This is descendent from
 Sacha Chua's lisp link plugin for planner, and works the same way.

 This is a great way to make active buttons inside of your org mode
 files.  I am not sure how well it would export however.  I'm okay with
 it going into the org contrib directory, or being added to one or both
 of the contributed lisp eval files.

I think there is already something in org that does it. 
Check (info (org)External links) the linktype is called elisp.

br,
benny


___
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] any use for org-clock.el hooks?

2009-06-21 Thread Benjamin Andresen
Hello Carsten,

I found myself wanting to run actions after I used the clock so I added
hooks to the most commonly actions in regards to clocks.

In case anyone is curious: I want to display the currently clocked in
task in my statusbar, and so I write it to a file and have an inotify
script update the statusbar on modification.

I used to do this via defadvice, but hooks seem cleaner and maybe
someone else wants to do something similar.

Carsten, if you think that not everything deserves a hook I won't have
any hard feelings if you don't apply it. :-)

br,
benny

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 97eb4c6..0922b49 100755
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,14 @@
+2009-06-21  Carsten Dominik  carsten.domi...@gmail.com
+
+	* org-clock.el (org-clock-in-hook): New hook.
+	(org-clock-in): Run `org-clock-in-hook.
+	(org-clock-out-hook): New hook.
+	(org-clock-out): Run `org-clock-out-hook.
+	(org-clock-cancel-hook): New hook.
+	(org-clock-cancel): Run `org-clock-cancel-hook.
+	(org-clock-goto-hook): New hook.
+	(org-clock-goto): Run `org-clock-goto-hook.
+
 2009-06-20  Carsten Dominik  carsten.domi...@gmail.com
 
 	* org.el (org-store-link): Better default description for link to
diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index 780ad3f..2ae56a7 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -452,6 +452,8 @@ Use alsa's aplay tool if available.
   (= 0 (call-process which nil nil nil program-name))
 ))
 
+(defvar org-clock-in-hook nil
+  Hook run when starting the clock.)
 
 (defvar org-clock-mode-line-entry nil
   Information for the modeline about the running clock.)
@@ -571,7 +573,8 @@ the clocking selection, associated with the letter `d'.
 	(org-clock-update-mode-line)
 	(setq org-clock-mode-line-timer
 		  (run-with-timer 60 60 'org-clock-update-mode-line))
-	(message Clock starts at %s - %s ts msg-extra)))
+	(message Clock starts at %s - %s ts msg-extra)
+(run-hooks 'org-clock-in-hook)))
 
 (defun org-clock-mark-default-task ()
   Mark current task as default task.
@@ -701,6 +704,9 @@ line and position cursor in that line.
 	(and (re-search-forward org-property-end-re nil t)
 		 (goto-char (match-beginning 0
 
+(defvar org-clock-out-hook nil
+  Hook run when stopping the current clock.)
+
 (defun org-clock-out (optional fail-quietly)
   Stop the currently running clock.
 If there is no running clock, throw an error, unless FAIL-QUIETLY is set.
@@ -762,7 +768,11 @@ If there is no running clock, throw an error, unless FAIL-QUIETLY is set.
 		  (org-todo org-clock-out-switch-to-state))
 	  (force-mode-line-update)
 	  (message (concat Clock stopped at %s after HH:MM =  org-time-clocksum-format %s) te h m
-		   (if remove  = LINE REMOVED )))
+		   (if remove  = LINE REMOVED ))
+  (run-hooks 'org-clock-out-hook))
+
+(defvar org-clock-cancel-hook nil
+  Hook run when cancelling the current clock.)
 
 (defun org-clock-cancel ()
   Cancel the running clock be removing the start timestamp.
@@ -776,7 +786,11 @@ If there is no running clock, throw an error, unless FAIL-QUIETLY is set.
   (setq global-mode-string
 	(delq 'org-mode-line-string global-mode-string))
   (force-mode-line-update)
-  (message Clock canceled))
+  (message Clock canceled)
+  (run-hooks 'org-clock-cancel-hook))
+
+(defvar org-clock-goto-hook nil
+  Hook run when selecting the currently clocked-in entry.)
 
 (defun org-clock-goto (optional select)
   Go to the currently clocked-in entry, or to the most recently clocked one.
@@ -802,7 +816,8 @@ With prefix arg SELECT, offer recently clocked tasks for selection.
 (org-cycle-hide-drawers 'children)
 (recenter)
 (if recent
-	(message No running clock, this is the most recently clocked task
+	(message No running clock, this is the most recently clocked task))
+(run-hooks 'org-clock-goto-hook)))
 
 
 (defvar org-clock-file-total-minutes nil
___
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] [PATCH] agenda startup: log-mode should be customizable as well

2009-05-13 Thread Benjamin Andresen
Hey there,

I was curious as to why a value such log-mode wasn't customizable
to be run on start-up as follow-mode and clock-report-mode are.

If Carsten thinks this is a good idea, I've attached a patch that may
shave of 5 seconds of him adding it. It applies cleanly to current git
HEAD.

br,
benny

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 7622f6a..e52fdbc 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -628,6 +628,7 @@ Needs to be set before org.el is loaded.
   :group 'org-agenda-startup
   :type 'boolean)
 
+
 (defvar org-agenda-include-inactive-timestamps nil
   Non-nil means, include inactive time stamps in agenda and timeline.)
 
@@ -789,6 +790,12 @@ agenda display.
   :group 'org-agenda-daily/weekly
   :type 'boolean)
 
+(defcustom org-agenda-start-with-log-mode nil
+  The initial value of log-mode in a newly created agenda window.
+  :group 'org-agenda-startup
+  :group 'org-agenda-daily/weekly
+  :type 'boolean)
+
 (defcustom org-agenda-start-with-clockreport-mode nil
   The initial value of clockreport-mode in a newly created agenda window.
   :group 'org-agenda-startup
@@ -1252,7 +1259,7 @@ The following commands are available:
   (unless org-agenda-keep-modes
 (setq org-agenda-follow-mode org-agenda-start-with-follow-mode
  org-agenda-clockreport-mode org-agenda-start-with-clockreport-mode
- org-agenda-show-log nil))
+ org-agenda-show-log org-agenda-start-with-log-mode))
   (easy-menu-change
'(Agenda) Agenda Files
(append
___
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