Re: [O] View inherited DEADLINEs in agenda

2011-11-09 Thread Carsten Dominik

On 8.11.2011, at 23:35, Brian van den Broek wrote:

> On 7 November 2011 16:29, Carsten Dominik  wrote:
>> 
>> On Nov 7, 2011, at 1:19 PM, Giovanni Ridolfi wrote:
>> 
>>> Fabrizio Chiarello  writes:
>>> 
>>> 
 I have many tasks with a DEADLINE, and I wish to have their subtasks to
 inherit such DEADLINE. To this aim, I set:
 
  (setq org-use-property-inheritance (quote ("DEADLINE")))
 
>>> 
 The problem is that the agenda only shows deadlines for the tasks that
 define them
>>> 
>>> is DEADLINE  a property that can be inherited?
>> 
>> Deadlines can currently *not* be inherited.  I would probably advice
>> against implementing this because of performance issues that would
>> result for the construction of the agenda.
>> 
>> - Carsten
> 
> 
> Hi all,
> 
> Here's a thought: what about a function which scans a subtree of an
> item that has a deadline and adds that same deadline to any
> descendants that lack a deadline? It seems to me that this would, via
> a one time user intervention, meet the OP's need, without the constant
> overhead  about which Carsten is concerned.

This is a good idea and very easy to do.
The only disadvantage is that any new entries you make
would not get the deadline.  Though, I think, one
could put a function into org-insert-heading-hook
to check for a deadline higher up in the tree and copy it.

- Carsten

> 
> It further occurred to me that invoked without arguments, it would
> prompt the user for each item without deadline, with a prefix
> argument, apply all the deadlines automatically, and, with a numeric
> prefix n, automatically apply the alterations n-levels down.
> 
> Best,
> 
> Brian vdB




Re: [O] About commit named "Allow multi-line properties to be specified in property blocks"

2011-11-09 Thread Rainer M Krug
On Tue, Nov 8, 2011 at 11:53 PM, Eric Schulte wrote:

> > Perhaps inserting an assumed space separator would be more intuitive?
> > If we were to go that way it may be possible to allow variable
> > specifications such as
> >
> > #+PROPERTY: var foo=1 bar=2
> >
> > in which case properties could be easily specified on multiple lines
> > using a default space separator.
> >
> > If this seems like a good way to go I can try to update my previous
> > patch.
> >
>
> I've updated the patch, the newest version is attached.  It results in
> the following behavior.
>

Looks good to me - that leaves just the question, what would hppen when
doing the following:

#+property: var  foo=1
#+property: var+ 2

and

#+property: var  foo="Hello "
#+property: var+ "world"

Thanks,

Rainer


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


-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology,
UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax (F):   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug


Re: [O] [OT] Scanning for archiving

2011-11-09 Thread Pieter Praet
On Sun, 6 Nov 2011 22:14:54 -0800, TP  wrote:
> On Sun, Nov 6, 2011 at 1:59 PM, Pieter Praet  wrote:
> > On Sat, 5 Nov 2011 16:35:11 -0700, Samuel Wales  
> > wrote:
> >> I used to find that 8-bit 75dpi was legible and small.
> >>
> >
> > True.
> >
> > It all depends on why you're scanning them in the first place.
> >
> > 75dpi is fine when scanning with collaboration/quick-reference in mind,
> > but for archival/backup purposes (i.e. absolute peace of mind when your
> > whole collection of dead trees burns, drowns, or is simply disposed of)
> > or OCR, you'll want to go with 600dpi and beyond.
> 
> One common technique is to always scan 300dpi grayscale (or color) and
> use clever software to upsample to 600dpi b&w (of course somehow
> segmenting scans into "picture" and "text" regions first.
> 

Upsampling defies the first law of thermodynamics?

But seriously, after reading up a bit, I'm convinced :)

Quite a manual process though...  Could you recommend any (FOSS)
software that does this automatically?

> >> What ADF scanners are out there for Linux that have high quality
> >> reliable ADF, [...]
> >
> > I wish I knew...  If anyone on this list can think of a scanner whose
> > ADF doesn't require constant babysitting, I'm betting it won't have a
> > consumer-grade price tag.
> 
> I've heard nice things about the Fujitsu ScanSnap S1500
> (http://www.fujitsu.com/global/services/computing/peripheral/scanners/product/s1500/)
> and S1500M 
> (http://www.fujitsu.com/global/services/computing/peripheral/scanners/product/s1500m/).
> About $450 or so from amazon. The S1300 is about half the price but
> also slower.
> 
> Apparently the S1500's are supported on Linux via Sane
> (http://www.sane-project.org/sane-backends.html#S-FUJITSU). Don't see
> any mention of the S1300 (but it probably also works?).
> 


Peace

-- 
Pieter



Re: [O] problems with mathjax CDN and HTML export

2011-11-09 Thread Christian Moe

On 11/8/11 5:09 PM, Giovanni Ridolfi wrote:

Yes, You're right. It is exported correctly and correctly formatted
if you export only *this* subheading. The subheading "** $$".

But, if you export the whole subtree, from the
"* mathjax test " heading, the equation is
"converted" in HTML format e.g.:α = \frac{1}{L0}

Giovanni


Ah, I see.

The problem is that the "$$" in the subheading is interpreted as an 
unclosed math snippet. (Interesting that it's still exported as a 
heading.) After that, math closes when it should open.


Try closing the subheading: "* $$ $$" and exporting again.

Getting "$$" as a subheading is not quite straightforward, but the 
following will work. Create a user-defined dollar-sign entity (org 
doesn't have one by default):


(setq org-entities-user
   '(("dollar" "\\$" nil "$" "$" "$" "$")))

Now "* \dollar\dollar" should work.

Yours,
Christian






Re: [O] [OT] Scanning for archiving

2011-11-09 Thread Johnny
Apologies for top-posting, but my comment is only inspired by the
conversation and doesn't exactly build on it, so here we go.

I use predominantly pdf in scanning, for one main reason only - it
handles *metadata* nicely (with gscan2pdf). This is nice for searching
later. When playing with DjVu, I didn't find an easy way to amend
metadata - is there any good working method and tools to recommend for
adding metadata for DjVu files?

Thanks.

Pieter Praet  writes:

> On Mon, 7 Nov 2011 18:44:24 +0100, Karl Voit  wrote:
>> Hi!
>> 
>> Inspired by «Total Recall»[3], a book of two MS Research guys, I
>> started life logging on my own two months ago.
>> 
>
> Dammit, that's been on my reading list for almost 2 years now, and
> *still* it isn't available in ebook format.  One would think they'd walk
> their talk [1], no?
>
>> [...]
>> * Pieter Praet  wrote:
>> >
>> > Using PDF for scanned documents results in *huge* files with a seriously
>> > disappointing image quality.  
>> 
>> I can not copy that at all:
>> 
>> ,
>> | vk@gary ~2d % l 2011-11-02_13-22-45.png
>> | -rw--- 1 vk vk 103150 2011-11-02 13:22 2011-11-02_13-22-45.png
>> | vk@gary ~2d % convert 2011-11-02_13-22-45.png 2011-11-02_13-22-45.pdf
>> | vk@gary ~2d % l 2011-11-02_13-22-45.pdf
>> | -rw-r--r-- 1 vk vk 96457 2011-11-07 18:12 2011-11-02_13-22-45.pdf
>> | vk@gary ~2d %
>> `
>> 
>> In this example, the compression of PDF is much better than the
>> original PNG one. PDF is only a container format.
>> 
>
> The conversion to PDF has indeed reduced the filesize, but not for the
> reasons you might think: If you don't explicitly provide ImageMagick's
> `convert' with a compression level (`-quality' option), it will use a
> default of 75%.  Thus I (perhaps incorrectly) infer that you've just
> lost 25% of the image quality for a meager 7% reduction in filesize.
>
>
> I do admit that the whole quality vs. filesize statement I made
> regarding using PDF for scanned documents wasn't entirely correct:
> I cut some corners.
>
> The real issue is that most folks use their scanner software to save
> directly to PDF, and for some reason, scanner software (especially the
> proprietary variety) predominantly uses JPEG compression as default when
> saving to PDF.
>
> JPEG was developed for storing images with smooth transitions and a high
> bit depth (i.e. photographs), not hard transitions and a low bit depth
> (i.e. documents), so you're likely to suffer a noticeable degradation in
> text quality, even when using 1:1 JPEG compression.
>
> You're using PNG compression though, so the whole JPEG deal doesn't apply.
>
> So, that just leaves the neverending stream of PDF security issues :)
>
>> > Consider storing your scans in DjVu format
>> > [1], which was developed specifically for this purpose.
>> 
>> PDF is a common standard whereas DjVu is something I - as an
>> advanced computer user - never faced before in real life. I am not
>> sure whether any of my computers can handle DjVu files at all.
>> 
>
> How about the Million Book Project / Universal Digital Library [2] ?
> Even though every computing device is most likely to support PDF, their
> collection is only available in TIFF and DjVu format.
>
> The list of participants and partners [3] (not to mention the magnitude
> and cost of their undertaking) is reason enough (for me, at least) to
> assume that DjVu is deemed to be rather future-proof.
>
> I'm guessing ISO standardization will be only a matter of time.
>
>> The goals of DjVu sound great but I get everything with PDF too.
>> Although I like the idea of OGG Vorbis, I re-ripped all my CDs using
>> mp3 again because I could not use many music devices or music
>> management software packages.
>> 
>
> Ahhh, VHS vs. Betamax, over and over again...
>
> Companies only succeed in getting everyone stuck with mediocre tools if
> we allow them to.  You don't *need* all devices/software to support the
> superior format.  Just get the ones that do (if there are any...), try
> to enlighten the people in you monkeysphere [4], and then let the free
> market do its work.  Joe Average Consumer will eventually follow (unless
> pornography is at stake, apparently), and the industry will be right on
> his tail.
>
>> I stick to the format *any* computer can handle without special
>> software products. [...]
>
> Somehow this implies that *every* computer is infected with Adobe's
> malware.  I find that rather disconcerting, to be honest :D
>
>> [...] And I do think that I get a higher chance of
>> being able to read my documents twenty years from now.
>> 
>
> For your sake, I hope you're right!
>
>> For scanned images I'd prefer PNG instead but the OS X Software of
>> my OfficeJet offers me the ability to generate PDF files where an
>> OCR software adds a searchable text layer above the scanned text.
>> This is *very* important to me since I am able to do full text
>> search on the content of my archived documents.
>> 
>
> May be a bit less convenient in daily usage, 

Re: [O] org-capture-template: How to correctly capture email addresses?

2011-11-09 Thread Christian Moe

Hi,

If org-contacts-template-email doesn't find an address, it doesn't 
insert a simple text prompt, it inserts a property prompt, which sets 
the property. A property prompt does not need to be positioned in an 
explicit property drawer in the template -- in fact, it looks like 
that will not work.


Removing the EMAIL property and moving the 
"%(org-contacts-template-email)" field out of the property drawer works:


(setq org-capture-templates
 '(("t" "TODO in ~/org/agenda.org -> Tasks" entry (file+headline 
"~/org/agenda.org" "Tasks")

"* TODO %?\nSCHEDULED: %^t\n%U %a")
   ("c" "Contact in ~/org/contacts.org -> Contact" entry 
(file+headline "~/org/contacts.org" "Contact")
"* %?%(org-contacts-template-name) %^g 
%(org-contacts-template-email)

:PROPERTIES:
:URL:
:WORK:
:HOME:
:MOBILE:
:LOCATION:
:BIRTHDAY:
:NOTE:
:END:")))

You still get EMAIL at the end of the property drawer, but the order 
is arbitrary anyway. You could replace the whole properties drawer 
with property prompts:



(setq org-capture-templates
 '(("t" "TODO in ~/org/agenda.org -> Tasks" entry (file+headline 
"~/org/agenda.org" "Tasks")

"* TODO %?\nSCHEDULED: %^t\n%U %a")
   ("c" "Contact in ~/org/contacts.org -> Contact" entry 
(file+headline "~/org/contacts.org" "Contact")

"* %?%(org-contacts-template-name) %^g
%(org-contacts-template-email)
%^{URL}p %^{WORK}p %^{HOME}p %^{MOBILE}p
%^{LOCATION}p %^{BIRTHDAY}p %^{NOTE}p")))

...but then you'd be prompted for everything, each time; you may not 
want that.



Yours,
Christian



[O] Putting new to TODO/note to the beginning of the subtree

2011-11-09 Thread Tom
Is there a way to put a new note to the beginning of the
target subtree (directly under the heading) instead of
inserting after the last item?

I'm looking for something like org-archive-reversed-order, but
for org-remember.

It would be really nice if it could be set separately for subtrees,
because in some cases I want to store the new note as first 
subheading while in case of other trees last is preferred.





Re: [O] Putting new to TODO/note to the beginning of the subtree

2011-11-09 Thread Tommy Kelly
> Is there a way to put a new note to the beginning of the
> target subtree (directly under the heading) instead of
> inserting after the last item?

Would org-reverse-note-order be of any use for this (from the org-remember PDF).

Tommy



Re: [O] Putting new to TODO/note to the beginning of the subtree

2011-11-09 Thread Tom
Tommy Kelly  verilab.com> writes:

> 
> > Is there a way to put a new note to the beginning of the
> > target subtree (directly under the heading) instead of
> > inserting after the last item?
> 
> Would org-reverse-note-order be of any use for this
> (from the org-remember PDF).

Yes, thank you. It seems promising.

The remaining question is: can it be set only for a specific subtree?





Re: [O] Putting new to TODO/note to the beginning of the subtree

2011-11-09 Thread Tommy Kelly
I can't see a way to do that. But if you switched to using org-capture
instead of org-remember, I *think* you can control placement of notes
on at least a per capture template basis, using each template's
:prepend property (http://orgmode.org/org.html#Template-elements).

Tommy

On Wed, Nov 9, 2011 at 10:00 AM, Tom  wrote:
> Tommy Kelly  verilab.com> writes:
>
>>
>> > Is there a way to put a new note to the beginning of the
>> > target subtree (directly under the heading) instead of
>> > inserting after the last item?
>>
>> Would org-reverse-note-order be of any use for this
>> (from the org-remember PDF).
>
> Yes, thank you. It seems promising.
>
> The remaining question is: can it be set only for a specific subtree?
>
>
>
>



-- 
Tommy Kelly
+1 (512) 289-8262
http://www.verilab.com



Re: [O] Putting new to TODO/note to the beginning of the subtree

2011-11-09 Thread Tom
Tommy Kelly  verilab.com> writes:

> 
> I can't see a way to do that. But if you switched to using org-capture
> instead of org-remember, I *think* you can control placement of notes
> on at least a per capture template basis, using each template's
> :prepend property (http://orgmode.org/org.html#Template-elements).
> 

Thanks, I'll check it out. 




Re: [O] Putting new to TODO/note to the beginning of the subtree

2011-11-09 Thread Tommy Kelly
Actually it looks like you can have org-reverse-note-order be a wee
bit selective using a regexp. Customize implies it's only on a per
*file* basis but the doc is a bit unclear when it says:

"Non-nil means store new notes at the beginning of a file or entry.
When nil, new notes will be filed to the end of a file or entry.
This can also be a list with cons cells of regular expressions that
are matched against file names, and values."

I'm wondering what, if anything, is the significance of that "and
values". Seems to suggest you could select based on more than just
file names.

Still, remember seems to be deprecated these days, so capture is
probably a sensible move.

Tommy



Re: [O] [OT] Scanning for archiving

2011-11-09 Thread Karl Voit
(I enjoy the OT discussion here and hope that no one gets upset
because of it on this ML ...)

* Pieter Praet  wrote:
> On Mon, 7 Nov 2011 18:44:24 +0100, Karl Voit  wrote:
>> Hi!
>> 
>> Inspired by «Total Recall»[3], a book of two MS Research guys, I
>> started life logging on my own two months ago.
>
> Dammit, that's been on my reading list for almost 2 years now, and
> *still* it isn't available in ebook format.  One would think they'd walk
> their talk [1], no?

I personally do not want to read a book other than on paper - for
now. Annotating, highlighting and placing different kind of
postit-marks still does not have its digital representations I would
like to see :-(

I recommend [1] mainly because of its chapters upon how to start and
best practices. Previous chapters are future visions and motivation
I do think that we do not need (any more).

Besides the fact that the raw paper cut offers horrible handling
usability it is quite easy and fast to read.

>> | -rw--- 1 vk vk 103150 2011-11-02 13:22 2011-11-02_13-22-45.png
>> | vk@gary ~2d % convert 2011-11-02_13-22-45.png 2011-11-02_13-22-45.pdf
>> | vk@gary ~2d % l 2011-11-02_13-22-45.pdf
>> | -rw-r--r-- 1 vk vk 96457 2011-11-07 18:12 2011-11-02_13-22-45.pdf
>
> The conversion to PDF has indeed reduced the filesize, but not for the
> reasons you might think: If you don't explicitly provide ImageMagick's
> `convert' with a compression level (`-quality' option), it will use a
> default of 75%.  Thus I (perhaps incorrectly) infer that you've just
> lost 25% of the image quality for a meager 7% reduction in filesize.

Ah, thanks for the clarification! This is indeed interesting fact.

Still: I did never recognize any problem with the 75% result though
:-) It is clearly readable and zoomable on screen and produces very
good results when printed out again.

> The real issue is that most folks use their scanner software to save
> directly to PDF, and for some reason, scanner software (especially the
> proprietary variety) predominantly uses JPEG compression as default when
> saving to PDF.

OK, this is interesting (again). So I took a closer look on the
result files my HP OfficeJet is producing when I scan to PDF.

«pdfimages» and «file» shows me that in the PDF files there are
embedded «Netpbm PPM "rawbits" image data» image files.[6] Another
format I was not confronted with until now.

Seems to be a pixel-based compressed and standardized format. This
is fine to me so far. JPEG would be horrible ...

> JPEG was developed for storing images ...

Part of my job was to explain first term students the difference,
advantages and disadvantages regarding to file formats like JPEG and
PNG. I can tell stories ...

> You're using PNG compression though, so the whole JPEG deal doesn't apply.

Oh, this was just an example of how «convert *png *pdf» reduces file
size. (Which was corrected by you.)

I usually scan directly into «searchable PDF» which the HP Scan
offers me. My OfficeJet even allows me to simply put pages onto the
ADF, press (more) buttons (than necessary) on the printer itself and
without any further interaction, the searchable PDF files are placed
into a folder of my choice, using my file name convention containing
a time stamp of the scan process. This is kinda neat :-)

So I do not even need to turn on my TFT for scanning stuff. (My Mac
Mini is on 24/7 anyway.)

> So, that just leaves the neverending stream of PDF security issues :)

I do not publish blacked out PDF files. Or do you mean something
else? 

There is no security related issue that worries me for now. I have
to protect my data anyhow from being accessed by anyone else,
independent of the file formats.

>> > Consider storing your scans in DjVu format
>> > [1], which was developed specifically for this purpose.
>> 
>> PDF is a common standard whereas DjVu is something I - as an
>> advanced computer user - never faced before in real life. I am not
>> sure whether any of my computers can handle DjVu files at all.
>
> How about the Million Book Project / Universal Digital Library [2] ?

Well they are that big that they could even use a proprietary format
on purpose too. With valid arguments. They have different
requirements than I have.

> Even though every computing device is most likely to support PDF, their
> collection is only available in TIFF and DjVu format.

TIFF is a perfectly wide spread standard I would choose for
uncompressed raw data to store to. The automotive industry here is
using TIFF images for many purposes outside of CAD design. I would
not choose TIFF for long time archive format for my personal data.

> I'm guessing ISO standardization will be only a matter of time.

Hope so. Looks like a promising format.

>> Although I like the idea of OGG Vorbis, I re-ripped all my CDs using
>> mp3 again because I could not use many music devices or music
>> management software packages.
>
> Ahhh, VHS vs. Betamax, over and over again...

... and my beloved MiniDisc vs. some other 

Re: [O] [PATCH] Add the ability to archive to the datetree.

2011-11-09 Thread Bernt Hansen
Hi Andrew,

I'm just eyeballing your patch and there's a typo in your last hunk -
see comment inline.

Don't you also need to update the texinfo documentation for this
enhancement?

-Bernt

Andrew Hyatt  writes:

> * org.el (org-archive-location): Add documentation on new datetree
> option.
> * org-archive.el (org-archive-subtree): Add special handling
> of datetree options to archive to datetree.
>
> ---
>  lisp/org-archive.el |   21 +
>  lisp/org.el |7 +++
>  2 files changed, 24 insertions(+), 4 deletions(-)
>
> diff --git a/lisp/org-archive.el b/lisp/org-archive.el
> index 16c35cf..4df6f1e 100644
> --- a/lisp/org-archive.el
> +++ b/lisp/org-archive.el
> @@ -213,13 +213,14 @@ this heading."
>(current-time)))
> category todo priority ltags itags atags
> ;; end of variables that will be used for saving context
> -   location afile heading buffer level newfile-p infile-p visiting)
> +   location afile heading buffer level newfile-p infile-p visiting
> +   datetree-date)
>
>;; Find the local archive location
>(setq location (org-get-local-archive-location)
>   afile (org-extract-archive-file location)
>   heading (org-extract-archive-heading location)
> - infile-p (equal file (abbreviate-file-name afile)))
> + infile-p (equal file (abbreviate-file-name (or afile ""
>(unless afile
>   (error "Invalid `org-archive-location'"))
>
> @@ -230,6 +231,12 @@ this heading."
>   (setq buffer (current-buffer)))
>(unless buffer
>   (error "Cannot access file \"%s\"" afile))
> +  (when (string-match "\\`datetree/" heading)
> + ;; Replace with ***, to represent the 3 levels of headings the
> + ;; datetree has.
> + (setq heading (string-replace-match "\\`datetree/" heading "***"))
> + (setq datetree-date (org-date-to-gregorian
> +  (or (org-entry-get nil "CLOSED" t) time
>(if (and (> (length heading) 0)
>  (string-match "^\\*+" heading))
> (setq level (match-end 0))
> @@ -262,6 +269,9 @@ this heading."
> (goto-char (point-max))
> (insert (format "\nArchived entries from file %s\n\n"
> (buffer-file-name this-buffer
> + (when datetree-date
> +   (org-datetree-find-date-create datetree-date)
> +   (org-narrow-to-subtree))
>   ;; Force the TODO keywords of the original buffer
>   (let ((org-todo-line-regexp tr-org-todo-line-regexp)
> (org-todo-keywords-1 tr-org-todo-keywords-1)
> @@ -285,7 +295,8 @@ this heading."
> ;; Heading not found, just insert it at the end
> (goto-char (point-max))
> (or (bolp) (insert "\n"))
> -   (insert "\n" heading "\n")
> +   ;; datetrees don't need to much spacing
> +   (if datetree-date (insert heading) (insert "\n" heading "\n"))
> (end-of-line 0))
>   ;; Make the subtree visible
>   (show-subtree)
> @@ -296,7 +307,8 @@ this heading."
> (org-end-of-subtree t))
>   (skip-chars-backward " \t\r\n")
>   (and (looking-at "[ \t\r\n]*")
> -  (replace-match "\n\n")))
> +  ;; datetree archives don't need so much spacing.
> +  (replace-match (if datetree-date "\n" "\n\n"
>   ;; No specific heading, just go to end of file.
>   (goto-char (point-max)) (insert "\n"))
> ;; Paste
> @@ -326,6 +338,7 @@ this heading."
> (setq n (concat "ARCHIVE_" (upcase (symbol-name e
> (org-entry-put (point) n v)
>
> +   (widen)
> ;; Save and kill the buffer, if it is not the same buffer.
> (when (not (eq this-buffer buffer))
>   (save-buffer
> diff --git a/lisp/org.el b/lisp/org.el
> index 6ee3b4e..9c80c9c 100644
> --- a/lisp/org.el
> +++ b/lisp/org.el
> @@ -4046,6 +4046,13 @@ Here are a few examples:
>   Archive in file ./basement (relative path), as level 3 trees
>   below the level 2 heading \"** Finished Tasks\".
>
> +\"~/org/datetree.org::datetree/* Finished Tasks\"
> +The \"datetree/\" string is special, signifiying to
^^^
Typo here   signifying

> +archive items to the datetree.  Items are placed in
> +either the CLOSED date of the item, or the current date
> +if there is no CLOSED date.  The heading will be a
> +subentry to the current date.
> +
>  You may set this option on a per-file basis by adding to the buffer a
>  line like



[O] Custom agenda -- running functions, not just setting vars

2011-11-09 Thread Tommy Kelly
I'm trying to set up a custom agenda view such that when I enter my
agenda I get, automatically:

- daily view mode (for today)
- log file mode on
- grid on
- Follow mode on

I can see from the docs how to modify the various variables that
control some of how agendas look. But the above are controlled by
functions and I'm not sure how to have those invoked when I open an
agenda.

I've been messing with org-mode-agenda-hook and
org-agenda-after-show-hook, but I clearly don't know what I'm doing.

Any ideas?

thanks,
Tommy



Re: [O] Custom agenda -- running functions, not just setting vars

2011-11-09 Thread Bernt Hansen
Tommy Kelly  writes:

> I'm trying to set up a custom agenda view such that when I enter my
> agenda I get, automatically:
>
> - daily view mode (for today)
> - log file mode on
> - grid on
> - Follow mode on
>
> I can see from the docs how to modify the various variables that
> control some of how agendas look. But the above are controlled by
> functions and I'm not sure how to have those invoked when I open an
> agenda.
>
> I've been messing with org-mode-agenda-hook and
> org-agenda-after-show-hook, but I clearly don't know what I'm doing.
>
> Any ideas?
>
> thanks,
> Tommy

Something like this:

(setq org-agenda-custom-commands
  (quote (( "x" "Test Agenda" agenda "" 
((org-agenda-start-with-follow-mode t)
 (org-agenda-span 'day)
 (org-agenda-start-with-log-mode t))

but it doesn't handle the grid - I have that on by default by setting 

(setq org-agenda-time-grid (quote ((daily today remove-match)
   #("" 0 16 (org-heading t))
   (830 1000 1200 1300 1500 1700

which you can probably add to the above agenda definition but I didn't
bother.  If there are no items to display on the agenda there is a bug
where the grid is not shown but otherwise I think this works.

Regards,
Bernt



Re: [O] Custom agenda -- running functions, not just setting vars

2011-11-09 Thread Sebastien Vauban
Hi Bernt,

Bernt Hansen wrote:
> Tommy Kelly  writes:
>> I'm trying to set up a custom agenda view such that when I enter my
>> agenda I get, automatically:
>>
>> - daily view mode (for today)
>> - log file mode on
>> - grid on
>> - Follow mode on
>>
>> I can see from the docs how to modify the various variables that
>> control some of how agendas look. But the above are controlled by
>> functions and I'm not sure how to have those invoked when I open an
>> agenda.
>>
>> I've been messing with org-mode-agenda-hook and
>> org-agenda-after-show-hook, but I clearly don't know what I'm doing.
>
> Something like this:
>
> (setq org-agenda-custom-commands
>   (quote (( "x" "Test Agenda" agenda "" 
>   ((org-agenda-start-with-follow-mode t)
>(org-agenda-span 'day)
>(org-agenda-start-with-log-mode t))
>
> but it doesn't handle the grid - I have that on by default by setting 
>
> (setq org-agenda-time-grid (quote ((daily today remove-match)
>  #("" 0 16 (org-heading t))
>  (830 1000 1200 1300 1500 1700
>
> which you can probably add to the above agenda definition but I didn't
> bother.  If there are no items to display on the agenda there is a bug
> where the grid is not shown but otherwise I think this works.

I don't think that's a bug: this seems to be handled -- see parameter
`require-timed' in the doc:

┏┫ C-h v org-agenda-time-grid ┃
┃ org-agenda-time-grid is a variable defined in `org-agenda.el'.
┃ Its value is ((daily today require-timed)
┃  ""
┃  (800 1000 1200 1400 1600 1800 2000 2200))
┃ 
┃ Original value was 
┃ ((daily today require-timed)
┃  ""
┃  (800 1000 1200 1400 1600 1800 2000))
┃ 
┃ 
┃ Documentation:
┃ The settings for time grid for agenda display.
┃ This is a list of three items.  The first item is again a list.  It 
contains
┃ symbols specifying conditions when the grid should be displayed:
┃ 
┃  daily if the agenda shows a single day
┃  weeklyif the agenda shows an entire week
┃  today show grid on current date, independent of daily/weekly 
display
┃  require-timed show grid only if at least one item has a time 
specification
┃ 
┃ The second item is a string which will be placed behind the grid time.
┃ 
┃ The third item is a list of integers, indicating the times that should 
have
┃ a grid line.
┃ 
┃ You can customize this variable.
┃ 
┃ [back]
┗

However, that's not clear to me (yet) what's `remove-match'.

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Custom agenda -- running functions, not just setting vars

2011-11-09 Thread Sebastien Vauban
Answering to myself:

> However, that's not clear to me (yet) what's `remove-match'.

   8:00.. 
  @refile:10:00-11:00 Do this
  12:00.. 
  14:00.. 
  16:00.. 
  Life:   17:20-17:30 Contact
  18:00.. 
  20:00.. 

instead of:

   8:00.. 
  10:00.. 
  @refile:10:00-11:00 Do this
  12:00.. 
  14:00.. 
  16:00.. 
  Life:   17:20-17:30 Contact
  18:00.. 
  20:00.. 

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Custom agenda -- running functions, not just setting vars

2011-11-09 Thread Tommy Kelly
Excellent, that works. Thanks.
Tommy

On Wed, Nov 9, 2011 at 12:18 PM, Bernt Hansen  wrote:
> Tommy Kelly  writes:
>
>> I'm trying to set up a custom agenda view such that when I enter my
>> agenda I get, automatically:
>>
>> - daily view mode (for today)
>> - log file mode on
>> - grid on
>> - Follow mode on
>>
>> I can see from the docs how to modify the various variables that
>> control some of how agendas look. But the above are controlled by
>> functions and I'm not sure how to have those invoked when I open an
>> agenda.
>>
>> I've been messing with org-mode-agenda-hook and
>> org-agenda-after-show-hook, but I clearly don't know what I'm doing.
>>
>> Any ideas?
>>
>> thanks,
>> Tommy
>
> Something like this:
>
> (setq org-agenda-custom-commands
>      (quote (( "x" "Test Agenda" agenda ""
>                ((org-agenda-start-with-follow-mode t)
>                 (org-agenda-span 'day)
>                 (org-agenda-start-with-log-mode t))
>
> but it doesn't handle the grid - I have that on by default by setting
>
> (setq org-agenda-time-grid (quote ((daily today remove-match)
>                                   #("" 0 16 (org-heading t))
>                                   (830 1000 1200 1300 1500 1700
>
> which you can probably add to the above agenda definition but I didn't
> bother.  If there are no items to display on the agenda there is a bug
> where the grid is not shown but otherwise I think this works.
>
> Regards,
> Bernt
>



-- 
Tommy Kelly
+1 (512) 289-8262
http://www.verilab.com



[O] Inactive time stamps along with CLOCK: entries?

2011-11-09 Thread Tommy Kelly
Question for Bernt, but maybe more widely useful.

Bernt, in some of your org-capture-templates, you often include a %U
timestamp as well as clocking in the item in question. for example:

("j" "Journal" entry (file+datetree "~/git/org/diary.org")
   "* %?\n%U\n  %i" :clock-in t :clock-resume t)

Why do you do that extra \n%U? Since the timestamp is going to be
identical to the first entry in the CLOCK: line, and since you can
have/not-have clocking items show up in the agenda, why have both the
:CLOCK line and the timestamp? What else do you get from having a
timestamp that you don't get from the CLOCK: line alone?

thanks,
Tommy



Re: [O] [OT] Scanning for archiving

2011-11-09 Thread Karl Voit
* Karl Voit  wrote:
>
> Inspired by «Total Recall»[3], a book of two MS Research guys, I
> started life logging on my own two months ago.
>
> For this purpose I bought an HP OfficeJet Pro 8500A Plus which costs
> € 250 and has a decent scanner. Is can scan and print full duplex.
> The scanner as a 30 page ADF which is quite reliable when the paper
> was not bend or stapled before.

Addendum: I just ordered a ScanSnap S1500M[4] which was also used by
the authors of «Total Recall». The HP OfficeJet Pro ADF is OK for
occasional scanning. For big scan jobs, the HP Scan software as well
as the ADF reliability is not sufficient I am afraid. Approx. 15-20%
of the pages are not scanned because of multiple pages were scanned
at once. The HP Scan software is not very user friendly: no
visualization of the total sum of scanned pages per job, no
auto-correction of scan skew, no auto delete of empty pages, far too
few keyboard shortcuts for basic functions, ...

Reading quite some product reviews I am confident that the ScanSnap
is able to provide a more reliable and easy to use scan experience
for large scan jobs.

After I scanned all of my current papers, I will probably sell the
ScanSnap and use the scanner of the OfficeJet Pro again.

  4. http://scanners.fcpa.fujitsu.com/scansnapit/scansnap-s1500m.php
-- 
Karl Voit




Re: [O] SOLVED problems with mathjax CDN and HTML export

2011-11-09 Thread Giovanni Ridolfi
Christian Moe  writes:

Hi, Christian,

thank you for cheching again well *MY* mistake
was setting the option: 

:EXPORT_OPTIONS:  H:3 num:nil toc:nil \n:t @:t ::t |:t ^:t f:nil *:t
 tags:nil TeX:t LaTeX:nil
^^
Consequently the LaTeX fragments are "converted" in  HTML format e.g.:

 u(α) = δα =  {\left(
 \left[\frac{-(Δ L+c)}{L0⋅  [...]

Why not, since I set this option? :-(

Sorry for the noise and thank you again for your time,

Giovanni



[O] [BUG] Unable to use TODO(t@!) to track TODO state changes

2011-11-09 Thread Jason Dunsmore
After reading http://orgmode.org/org.html#Tracking-TODO-state-changes, I
expected the "@!" TODO syntax, eg. TODO(t@!), to do the following:

- Log timestamp when entering state
- Add note when entering state

This syntax appears to break the functionality, because it does neither.
The state is changed with no logging or note prompt.  Is this a bug?

I verified that the TODO(t@/!) syntax does work as indicated in the
manual.

- Add note when entering state
- Log timestamp when entering state
- Log timestamp when exiting state

This is with the latest org-mode (commit a4273cbe0e0) and Emacs 23.2.1.

Thanks,
Jason



Re: [O] [PATCH] Add the ability to archive to the datetree.

2011-11-09 Thread Andrew Hyatt
The documentation didn't go into any details about how to specify the
org-archive-location, or what you could do with it,  instead it just
referred to the documentation of that variable.  Still, now that you
mention it, it seemed worthwhile to add  something to the docs, so I
did that.  I'll send another version of the patch now.

On Wed, Nov 9, 2011 at 6:22 AM, Bernt Hansen  wrote:
> Hi Andrew,
>
> I'm just eyeballing your patch and there's a typo in your last hunk -
> see comment inline.
>
> Don't you also need to update the texinfo documentation for this
> enhancement?
>
> -Bernt
>
> Andrew Hyatt  writes:
>
>> * org.el (org-archive-location): Add documentation on new datetree
>> option.
>> * org-archive.el (org-archive-subtree): Add special handling
>> of datetree options to archive to datetree.
>>
>> ---
>>  lisp/org-archive.el |   21 +
>>  lisp/org.el         |    7 +++
>>  2 files changed, 24 insertions(+), 4 deletions(-)
>>
>> diff --git a/lisp/org-archive.el b/lisp/org-archive.el
>> index 16c35cf..4df6f1e 100644
>> --- a/lisp/org-archive.el
>> +++ b/lisp/org-archive.el
>> @@ -213,13 +213,14 @@ this heading."
>>                (current-time)))
>>         category todo priority ltags itags atags
>>         ;; end of variables that will be used for saving context
>> -       location afile heading buffer level newfile-p infile-p visiting)
>> +       location afile heading buffer level newfile-p infile-p visiting
>> +       datetree-date)
>>
>>        ;; Find the local archive location
>>        (setq location (org-get-local-archive-location)
>>           afile (org-extract-archive-file location)
>>           heading (org-extract-archive-heading location)
>> -         infile-p (equal file (abbreviate-file-name afile)))
>> +         infile-p (equal file (abbreviate-file-name (or afile ""
>>        (unless afile
>>       (error "Invalid `org-archive-location'"))
>>
>> @@ -230,6 +231,12 @@ this heading."
>>       (setq buffer (current-buffer)))
>>        (unless buffer
>>       (error "Cannot access file \"%s\"" afile))
>> +      (when (string-match "\\`datetree/" heading)
>> +     ;; Replace with ***, to represent the 3 levels of headings the
>> +     ;; datetree has.
>> +     (setq heading (string-replace-match "\\`datetree/" heading "***"))
>> +     (setq datetree-date (org-date-to-gregorian
>> +                          (or (org-entry-get nil "CLOSED" t) time
>>        (if (and (> (length heading) 0)
>>              (string-match "^\\*+" heading))
>>         (setq level (match-end 0))
>> @@ -262,6 +269,9 @@ this heading."
>>         (goto-char (point-max))
>>         (insert (format "\nArchived entries from file %s\n\n"
>>                         (buffer-file-name this-buffer
>> +     (when datetree-date
>> +       (org-datetree-find-date-create datetree-date)
>> +       (org-narrow-to-subtree))
>>       ;; Force the TODO keywords of the original buffer
>>       (let ((org-todo-line-regexp tr-org-todo-line-regexp)
>>             (org-todo-keywords-1 tr-org-todo-keywords-1)
>> @@ -285,7 +295,8 @@ this heading."
>>                 ;; Heading not found, just insert it at the end
>>                 (goto-char (point-max))
>>                 (or (bolp) (insert "\n"))
>> -               (insert "\n" heading "\n")
>> +               ;; datetrees don't need to much spacing
>> +               (if datetree-date (insert heading) (insert "\n" heading 
>> "\n"))
>>                 (end-of-line 0))
>>               ;; Make the subtree visible
>>               (show-subtree)
>> @@ -296,7 +307,8 @@ this heading."
>>                 (org-end-of-subtree t))
>>               (skip-chars-backward " \t\r\n")
>>               (and (looking-at "[ \t\r\n]*")
>> -                  (replace-match "\n\n")))
>> +                  ;; datetree archives don't need so much spacing.
>> +                  (replace-match (if datetree-date "\n" "\n\n"
>>           ;; No specific heading, just go to end of file.
>>           (goto-char (point-max)) (insert "\n"))
>>         ;; Paste
>> @@ -326,6 +338,7 @@ this heading."
>>                 (setq n (concat "ARCHIVE_" (upcase (symbol-name e
>>                 (org-entry-put (point) n v)
>>
>> +       (widen)
>>         ;; Save and kill the buffer, if it is not the same buffer.
>>         (when (not (eq this-buffer buffer))
>>           (save-buffer
>> diff --git a/lisp/org.el b/lisp/org.el
>> index 6ee3b4e..9c80c9c 100644
>> --- a/lisp/org.el
>> +++ b/lisp/org.el
>> @@ -4046,6 +4046,13 @@ Here are a few examples:
>>       Archive in file ./basement (relative path), as level 3 trees
>>       below the level 2 heading \"** Finished Tasks\".
>>
>> +\"~/org/datetree.org::datetree/* Finished Tasks\"
>> +        The \"datetree/\" string is special, signifiying to
>                                                ^^^
> Typo here                                       signifying
>
>> +        archive items to the datetree.  Items are placed i

[O] [PATCH] Add the ability to archive to the datetree.

2011-11-09 Thread Andrew Hyatt
* org.el (org-archive-location): Add documentation on new datetree
option.
* org-archive.el (org-archive-subtree): Add special handling
of datetree options to archive to datetree.

---
 doc/org.texi|   22 +-
 lisp/org-archive.el |   21 +
 lisp/org.el |7 +++
 3 files changed, 37 insertions(+), 13 deletions(-)

diff --git a/doc/org.texi b/doc/org.texi
index 143b184..128f966 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -6854,16 +6854,20 @@ is invoked, the level 1 trees will be checked.
 @cindex archive locations
 The default archive location is a file in the same directory as the
 current file, with the name derived by appending @file{_archive} to the
-current file name.  For information and examples on how to change this,
+current file name.  You can also choose what heading to file archived
+items under, with the possibility to add them to a datetree in a file.
+For information and examples on how to specify the file and the heading,
 see the documentation string of the variable
-@code{org-archive-location}.  There is also an in-buffer option for
-setting this variable, for example@footnote{For backward compatibility,
-the following also works: If there are several such lines in a file,
-each specifies the archive location for the text below it.  The first
-such line also applies to any text before its definition.  However,
-using this method is @emph{strongly} deprecated as it is incompatible
-with the outline structure of the document.  The correct method for
-setting multiple archive locations in a buffer is using properties.}:
+@code{org-archive-location}.
+
+There is also an in-buffer option for setting this variable, for
+example@footnote{For backward compatibility, the following also works:
+If there are several such lines in a file, each specifies the archive
+location for the text below it.  The first such line also applies to any
+text before its definition.  However, using this method is
+@emph{strongly} deprecated as it is incompatible with the outline
+structure of the document.  The correct method for setting multiple
+archive locations in a buffer is using properties.}:

 @cindex #+ARCHIVE
 @example
diff --git a/lisp/org-archive.el b/lisp/org-archive.el
index 16c35cf..35ef290 100644
--- a/lisp/org-archive.el
+++ b/lisp/org-archive.el
@@ -213,13 +213,14 @@ this heading."
 (current-time)))
  category todo priority ltags itags atags
  ;; end of variables that will be used for saving context
- location afile heading buffer level newfile-p infile-p visiting)
+ location afile heading buffer level newfile-p infile-p visiting
+ datetree-date)

   ;; Find the local archive location
   (setq location (org-get-local-archive-location)
afile (org-extract-archive-file location)
heading (org-extract-archive-heading location)
-   infile-p (equal file (abbreviate-file-name afile)))
+   infile-p (equal file (abbreviate-file-name (or afile ""
   (unless afile
(error "Invalid `org-archive-location'"))

@@ -230,6 +231,12 @@ this heading."
(setq buffer (current-buffer)))
   (unless buffer
(error "Cannot access file \"%s\"" afile))
+  (when (string-match "\\`datetree/" heading)
+   ;; Replace with ***, to represent the 3 levels of headings the
+   ;; datetree has.
+   (setq heading (string-replace-match "\\`datetree/" heading "***"))
+   (setq datetree-date (org-date-to-gregorian
+(or (org-entry-get nil "CLOSED" t) time
   (if (and (> (length heading) 0)
   (string-match "^\\*+" heading))
  (setq level (match-end 0))
@@ -262,6 +269,9 @@ this heading."
  (goto-char (point-max))
  (insert (format "\nArchived entries from file %s\n\n"
  (buffer-file-name this-buffer
+   (when datetree-date
+ (org-datetree-find-date-create datetree-date)
+ (org-narrow-to-subtree))
;; Force the TODO keywords of the original buffer
(let ((org-todo-line-regexp tr-org-todo-line-regexp)
  (org-todo-keywords-1 tr-org-todo-keywords-1)
@@ -285,7 +295,8 @@ this heading."
  ;; Heading not found, just insert it at the end
  (goto-char (point-max))
  (or (bolp) (insert "\n"))
- (insert "\n" heading "\n")
+ ;; datetrees don't need too much spacing
+ (if datetree-date (insert heading) (insert "\n" heading "\n"))
  (end-of-line 0))
;; Make the subtree visible
(show-subtree)
@@ -296,7 +307,8 @@ this heading."
  (org-end-of-subtree t))
(skip-chars-backward " \t\r\n")
(and (looking-at "[ \t\r\n]*")
-(replace-match "\n\n")))
+;; datetree archives don't need s

[O] Formatting clock tables in the agenda

2011-11-09 Thread Tommy Kelly
I have a clock table in my agendas -- I got it there by setting
org-agenda-start-with-clockreport-mode. I'm trying to control its
format. I've tried using org-clock-clocktable-default-properties but
that seems to have no effect. For example, this from my
custom-set-variables:

 '(org-agenda-start-with-clockreport-mode t)
 '(org-clock-clocktable-default-properties (quote (:maxlevel 2 :scope
file :indent t :link t)))

The presence/absence of that second line makes no difference to how my
agenda clocktable looks.

How do I control that particular table's format?

thanks
Tommy



Re: [O] [BUG] Unable to use TODO(t@!) to track TODO state changes

2011-11-09 Thread Giovanni Ridolfi
Jason Dunsmore  writes:

Hi, _Jason, 

> After reading http://orgmode.org/org.html#Tracking-TODO-state-changes,
> I  expected the "@!" TODO syntax, eg. TODO(t@!), to do the following: 
>
> - Log timestamp when entering state
> - Add note when entering state

Well the  TODO(t@!) syntax seems not to be allowed.

It is your expectation, I'd say a feature request ;-)

cheers,
Giovanni

>
> This syntax appears to break the functionality, because it does neither.
> The state is changed with no logging or note prompt.  Is this a bug?
>
> I verified that the TODO(t@/!) syntax does work as indicated in the
> manual.
>
> - Add note when entering state
> - Log timestamp when entering state
> - Log timestamp when exiting state



Re: [O] zotero plain, org-odt, and citations in general

2011-11-09 Thread Ken Williams
Jambunathan K  gmail.com> writes:

>  
> > Basically all that one can do in org-mode at the moment is insert &
> > update citations, and following citation links to the entry in Zotero.
> 
> Can you or someone provide me how such an Org file with citation
> definition and reference looks like?

I'd be very interested in this too.  I've just started to work with Zotero and
I'd assumed that to interface with org-mode I'd have to export as BiBTeX first,
but if I can connect them directly that would be awesome.

 -Ken




Re: [O] zotero plain, org-odt, and citations in general

2011-11-09 Thread Matt Price
attached is a sample odt file with Zotero citations included. It's very
simple, actually, because I think the key to making something like this
work would be to offload as much work as possible to zotero itself -- Erik,
correct me if I'm wrong (quite likely).

Both Erik and Jambunathan have raised questions which I'm not al lthat
competent to answer, but doing my best (and sorry for the lack of quotation
markup, not sure how to paste-as-quote in gmail):


1. Zotero supports many citation stlyes. So Org/Zotero integration could
>   choose one citation style that is widely agreeable for one-off
>   colloboration needs.
>

If that's easier, then sure. Since the Openoffice plugin allows you to
reformat citations easily, then if the import result in active zotero
fields that zotero can work with, it shouldn't be hard for the user to
change the citation format easily.

2. I don't know if importing Zotero stylenames verbatim in to org-odt's
>   style file would "pollute" it - thereby preventing org-odt from
>   getting in to Emacs proper.
>

I think what really matters is getting the zotero id's into the ODT in a
way that allows Zotero to see them later on.  Then the user can reformat in
whatever manner she needs to.

  I am not competent to judge what the copyright and license terms of
  the stylenames used by zotero plugin are. I am seeing that zotero
  itself is AGPL so I believe it is Free as in "Free Software".


I think so -- shouldn't be a license problem w/ emacs.

3. Even if zotero's ODT style cannot be used by the ODT exporter due
>   (2), I can cook up Org's own stlyenames for various citation fields
>   and allow the user to remap Org* stlyenames to say Zotero* stlynames.
>
> I see Org already has some(?) support for bibtex. Can anyone comment on
> bibtex vs zotero? They seem to serve same purpose - citation
> management. Can bibtex be used instead of zotero.
>

For me that wouldn't work, becaue bibtex isn't widely used by humanities
scholars and social scientists. Zotero is, right now, by far the best tool
for us.  Also bibtex has, or at least used to have, significant limitations
on styles that make (made?) it unsuitable for humanities scholars.

I wish I could provide an example org-mode file with zotero references in
it -- erik, I'm having trouble making contact with mozrepl from emacs.
given recent developments in Zotero, it would probably be better to have
zotero.el speak directly to the Zotero server instead of working through
firefox -- do you agree, Erik? But I imagine that is a significant
undertaking.

thanks everyone,
Matt


zotero-demo-file.odt
Description: application/vnd.oasis.opendocument.text


[O] One table column per outline level for columnviews

2011-11-09 Thread Sebastien Vauban
Hello,

Let's say I'm making an estimate for a work, and have this Org file:

#+begin_src org
  #+COLUMNS: %40ITEM(Task) %6Effort(Estim.){:}

  * Development
:PROPERTIES:
:ID:   fc314ab6-5bdc-4a2d-9c2d-d9aece03a864
:END:

  ** Task 1
 :PROPERTIES:
 :Effort:   1:00
 :END:

  ** Task 2

  *** Task 2a
  :PROPERTIES:
  :Effort:   1:00
  :END:

  *** Task 2b
  :PROPERTIES:
  :Effort:   1:00
  :END:
#+end_src

Now, if I want a summary of the work to be done, along with totals, I put
(for example, up to 3 levels):

  #+BEGIN: columnview :hlines 1 :id "fc314ab6-5bdc-4a2d-9c2d-d9aece03a864" 
:maxlevel 3
  | Task  | Estim. |
  |---+|
  | * Development |   3:00 |
  | ** Task 1 |   1:00 |
  | ** Task 2 |   2:00 |
  | *** Task 2a   |   1:00 |
  | *** Task 2b   |   1:00 |
  #+END:

Though, this is hard to read for other people: they think, at first sight,
that the numbers must be added, while they already are summed up.

What I would like is a view like this one:

  #+BEGIN: clocktable :maxlevel 3 :scope file
  Clock summary at [2011-11-09 Wed 16:45]

  | Headline| Time |  |  |
  |-+--+--+--|
  | Total time  | 4:00 |  |  |
  |-+--+--+--|
  | Development | 4:00 |  |  |
  | Task 1  |  | 1:00 |  |
  | Task 2  |  | 2:00 |  |
  | Task 2a |  |  | 1:00 |
  | Task 2b |  |  | 1:00 |
  #+END:

which we get with CLOCK lines:

#+begin_src org
  * Development
:LOGBOOK:
CLOCK: [2011-11-09 Wed 10:00]--[2011-11-09 Wed 11:00] =>  1:00
:END:

  ** Task 1
 :LOGBOOK:
 CLOCK: [2011-11-09 Wed 11:00]--[2011-11-09 Wed 12:00] =>  1:00
 :END:

  ** Task 2

  *** Task 2a
  :LOGBOOK:
  CLOCK: [2011-11-09 Wed 12:00]--[2011-11-09 Wed 13:00] =>  1:00
  :END:

  *** Task 2b
  :LOGBOOK:
  CLOCK: [2011-11-09 Wed 13:00]--[2011-11-09 Wed 14:00] =>  1:00
  :END:
#+end_src

I don't think this is currently possible; but maybe some of you have found
workarounds, or developed something in this direction?

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Formatting clock tables in the agenda

2011-11-09 Thread Niels Giesen
You should probably check org-agenda-clockreport-parameter-plist

On Wed, Nov 9, 2011 at 4:30 PM, Tommy Kelly  wrote:

> I have a clock table in my agendas -- I got it there by setting
> org-agenda-start-with-clockreport-mode. I'm trying to control its
> format. I've tried using org-clock-clocktable-default-properties but
> that seems to have no effect. For example, this from my
> custom-set-variables:
>
>  '(org-agenda-start-with-clockreport-mode t)
>  '(org-clock-clocktable-default-properties (quote (:maxlevel 2 :scope
> file :indent t :link t)))
>
> The presence/absence of that second line makes no difference to how my
> agenda clocktable looks.
>
> How do I control that particular table's format?
>
> thanks
> Tommy
>
>


-- 
http://pft.github.com


Re: [O] About commit named "Allow multi-line properties to be specified in property blocks"

2011-11-09 Thread Eric Schulte
Rainer M Krug  writes:

> On Tue, Nov 8, 2011 at 11:53 PM, Eric Schulte wrote:
>
>> > Perhaps inserting an assumed space separator would be more intuitive?
>> > If we were to go that way it may be possible to allow variable
>> > specifications such as
>> >
>> > #+PROPERTY: var foo=1 bar=2
>> >
>> > in which case properties could be easily specified on multiple lines
>> > using a default space separator.
>> >
>> > If this seems like a good way to go I can try to update my previous
>> > patch.
>> >
>>
>> I've updated the patch, the newest version is attached.  It results in
>> the following behavior.
>>
>
> Looks good to me - that leaves just the question, what would hppen when
> doing the following:
>
> #+property: var  foo=1
> #+property: var+ 2
>

The above is equivalent to,

#+header: :var foo=1 2

which due to interaction with some logic put in place to allow the
specification of un-named variables in call lines results in the
following.

#+property: var  foo=1
#+property: var+ 2

#+begin_src emacs-lisp
  foo
#+end_src

#+results:
: 2

#+begin_src emacs-lisp :var bar=1 2
  bar  
#+end_src

#+results:
: 2

Although generally I would say that both

#+header: :var foo=1 2

and 

#+property: var  foo=1
#+property: var+ 2

are mal-formed variable assignments.

>
> and
>
> #+property: var  foo="Hello "
> #+property: var+ "world"
>

This is exactly analogous to

#+header: :var foo="hello" "world"

which raises the expected error
  ``variable ""world"" must be assigned a default value''

the following alternative however works as expected

#+property: var  foo="Hello
#+property: var+ world"

#+begin_src emacs-lisp
  foo
#+end_src

#+results:
: Hello world

Thanks for these examples, the later did brought to light a small
quoting issue which is fixed in the new attached patch.

Best -- Eric

>From 3be23a3631d108e19d2b8d781077130f1e12bb19 Mon Sep 17 00:00:00 2001
From: Eric Schulte 
Date: Mon, 7 Nov 2011 14:49:42 -0700
Subject: [PATCH] property names ending in plus accumulate

This results in the following behavior.

  #+property: var  foo=1
  #+property: var+ bar=2

  #+begin_src emacs-lisp
(+ foo bar)
  #+end_src

  #+results:
  : 3

  #+begin_src emacs-lisp
(org-entry-get (point) "var" t)
  #+end_src

  #+results:
  : foo=1 bar=2

  * overwriting a file-wide property
:PROPERTIES:
:var:  foo=7
:END:

  #+begin_src emacs-lisp
foo
  #+end_src

  #+results:
  : 7

  #+begin_src emacs-lisp
(org-entry-get (point) "var" t)
  #+end_src

  #+results:
  : foo=7

  * appending to a file-wide property
:PROPERTIES:
:var+:  baz=3
:END:

  #+begin_src emacs-lisp
(+ foo bar baz)
  #+end_src

  #+results:
  : 6

  #+begin_src emacs-lisp
(org-entry-get (point) "var" t)
  #+end_src

  #+results:
  : foo=1 bar=2 baz=3

* lisp/org.el (org-update-property-plist): Updates a given property
  list with a property name and a property value.
  (org-set-regexps-and-options): Use org-update-property-plist.
  (org-entry-get): Use org-update-property-plist.
* testing/examples/property-inheritance.org: Example file for testing
  appending property behavior.
* testing/lisp/test-property-inheritance.el: Tests of appending
  property behavior.
* lisp/ob.el (org-babel-balanced-split): Allow splitting on single
  characters as well as groups of two characters.
  (org-babel-parse-multiple-vars): Split variables on single spaces.
---
 lisp/ob.el|   21 +++---
 lisp/org.el   |   47 +++---
 testing/examples/property-inheritance.org |   36 +
 testing/lisp/test-property-inheritance.el |   61 +
 4 files changed, 143 insertions(+), 22 deletions(-)
 create mode 100644 testing/examples/property-inheritance.org
 create mode 100644 testing/lisp/test-property-inheritance.el

diff --git a/lisp/ob.el b/lisp/ob.el
index d94b4b6..51ae9c4 100644
--- a/lisp/ob.el
+++ b/lisp/ob.el
@@ -1118,17 +1118,24 @@ instances of \"[ \t]:\" set ALTS to '((32 9) . 58)."
   (flet ((matches (ch spec) (or (and (numberp spec) (= spec ch))
 (member ch spec)))
 	 (matched (ch last)
-		  (and (matches ch (cdr alts))
-		   (matches last (car alts)
-(let ((balance 0) (partial nil) (lst nil) (last 0))
-  (mapc (lambda (ch)  ; split on [] or () balanced instances of [ \t]:
+		  (if (consp alts)
+		  (and (matches ch (cdr alts))
+			   (matches last (car alts)))
+		(matches ch alts
+(let ((balance 0) (quote nil) (partial nil) (lst nil) (last 0))
+  (mapc (lambda (ch)  ; split on [], (), "" balanced instances of [ \t]:
 	  (setq balance (+ balance
 			   (cond ((or (equal 91 ch) (equal 40 ch)) 1)
  ((or (equal 93 ch) (equal 41 ch)) -1)
  (t 0
+	  (when (and (equal 34 ch) (not (equal 92 last)))
+		(setq quote (not quote)))
 	  (setq partial (cons ch partial))
-	  (when (and (= balance 0) (matched ch last))
-		(setq lst (cons (apply #'strin

Re: [O] [BUG] Unable to use TODO(t@!) to track TODO state changes

2011-11-09 Thread Jason Dunsmore
Giovanni Ridolfi  writes:

> Jason Dunsmore  writes:
>
> Hi, _Jason, 
>
>> After reading http://orgmode.org/org.html#Tracking-TODO-state-changes,
>> I  expected the "@!" TODO syntax, eg. TODO(t@!), to do the following: 
>>
>> - Log timestamp when entering state
>> - Add note when entering state
>
> Well the  TODO(t@!) syntax seems not to be allowed.
>
> It is your expectation, I'd say a feature request ;-)

I thought it was a bug because each of the special characters is
described in the manual as being an individual feature and it isn't
documented that only certain combinations of features work together.



Re: [O] [BUG] Unable to use TODO(t@!) to track TODO state changes

2011-11-09 Thread suvayu ali
Hi Jason,

On Wed, Nov 9, 2011 at 15:56, Jason Dunsmore  wrote:
> After reading http://orgmode.org/org.html#Tracking-TODO-state-changes, I
> expected the "@!" TODO syntax, eg. TODO(t@!), to do the following:
>
> - Log timestamp when entering state
> - Add note when entering state
>
> This syntax appears to break the functionality, because it does neither.
> The state is changed with no logging or note prompt.  Is this a bug?
>
> I verified that the TODO(t@/!) syntax does work as indicated in the
> manual.
>
> - Add note when entering state
> - Log timestamp when entering state
> - Log timestamp when exiting state
>
> This is with the latest org-mode (commit a4273cbe0e0) and Emacs 23.2.1.
>

I believe the above should be:

- Add note _with timestamp_ when entering state
- Log timestamp when exiting state

That said, you can simply hit C-c C-c to simply log the timestamp
without a note. In other words, '@' is equivalent to '!' + note, so just
enter a blank note. :)

> Thanks,
> Jason
>

HTH

-- 
Suvayu

Open source is the future. It sets us free.



[O] [PATCH] Documentation for "Tracking TODO state changes"

2011-11-09 Thread Jason Dunsmore
suvayu ali  writes:

> Hi Jason,
>
> On Wed, Nov 9, 2011 at 15:56, Jason Dunsmore  wrote:
>> After reading http://orgmode.org/org.html#Tracking-TODO-state-changes, I
>> expected the "@!" TODO syntax, eg. TODO(t@!), to do the following:
>>
>> - Log timestamp when entering state
>> - Add note when entering state
>>
>> This syntax appears to break the functionality, because it does neither.
>> The state is changed with no logging or note prompt.  Is this a bug?
>>
>> I verified that the TODO(t@/!) syntax does work as indicated in the
>> manual.
>>
>> - Add note when entering state
>> - Log timestamp when entering state
>> - Log timestamp when exiting state
>>
>> This is with the latest org-mode (commit a4273cbe0e0) and Emacs 23.2.1.
>>
>
> I believe the above should be:
>
> - Add note _with timestamp_ when entering state
> - Log timestamp when exiting state
>
> That said, you can simply hit C-c C-c to simply log the timestamp
> without a note. In other words, '@' is equivalent to '!' + note, so just
> enter a blank note. :)

Ah, I understand now.  Thanks for the explanation.  Here's a patch to to
the documentation:

--8<---cut here---start->8---
diff --git a/doc/org.texi b/doc/org.texi
index 4a547d0..e1167eb 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -4032,14 +4032,18 @@ also overrule the setting of this variable for a
subtree
 
 Since it is normally too much to record a note for every state,
 Org-mode
 expects configuration on a per-keyword basis for this.  This is
 achieved by
-adding special markers @samp{!} (for a timestamp) and @samp{@@} (for a
 note)
-in parentheses after each keyword.  For example, with the setting
+adding special markers @samp{!} (for a timestamp) or @samp{@@} (for a
 note
+with timestamp) in parentheses after each keyword.  For example, with
 the
+setting
 
 @lisp
 (setq org-todo-keywords
   '((sequence "TODO(t)" "WAIT(w@@/!)" "|" "DONE(d!)" "CANCELED(c@@)")))
 @end lisp
 
+To record a timestamp without a note for TODO keywords configured with
+@samp{@@}, just type @kbd{C-c C-c} to enter a blank note when prompted.
+
 @noindent
 @vindex org-log-done
 you not only define global TODO keywords and fast access keys, but also
--8<---cut here---end--->8---



Re: [O] Inactive time stamps along with CLOCK: entries?

2011-11-09 Thread Bernt Hansen
Tommy Kelly  writes:

> Question for Bernt, but maybe more widely useful.
>
> Bernt, in some of your org-capture-templates, you often include a %U
> timestamp as well as clocking in the item in question. for example:
>
> ("j" "Journal" entry (file+datetree "~/git/org/diary.org")
>"* %?\n%U\n  %i" :clock-in t :clock-resume t)
>
> Why do you do that extra \n%U? Since the timestamp is going to be
> identical to the first entry in the CLOCK: line, and since you can
> have/not-have clocking items show up in the agenda, why have both the
> :CLOCK line and the timestamp? What else do you get from having a
> timestamp that you don't get from the CLOCK: line alone?

Hi Tommy,

The reason I have both is I create capture tasks and notes _fast_ and
remove empty clock lines - so there is no clock line or clock drawer
when I'm done in that that.

The %U is to record when I created the task/note.

-Bernt



Re: [O] [PATCH] Documentation for "Tracking TODO state changes"

2011-11-09 Thread Bernt Hansen
Jason Dunsmore  writes:

> suvayu ali  writes:
>
>> That said, you can simply hit C-c C-c to simply log the timestamp
>> without a note. In other words, '@' is equivalent to '!' + note, so just
>> enter a blank note. :)
>
> Ah, I understand now.  Thanks for the explanation.  Here's a patch to to
> the documentation:
>

Thanks Jason,

The patch looks good to me.

Regards,
Bernt



Re: [O] About commit named "Allow multi-line properties to be specified in property blocks"

2011-11-09 Thread Rainer M Krug
On Wed, Nov 9, 2011 at 5:12 PM, Eric Schulte  wrote:

> Rainer M Krug  writes:
>
> > On Tue, Nov 8, 2011 at 11:53 PM, Eric Schulte  >wrote:
> >
> >> > Perhaps inserting an assumed space separator would be more intuitive?
> >> > If we were to go that way it may be possible to allow variable
> >> > specifications such as
> >> >
> >> > #+PROPERTY: var foo=1 bar=2
> >> >
> >> > in which case properties could be easily specified on multiple lines
> >> > using a default space separator.
> >> >
> >> > If this seems like a good way to go I can try to update my previous
> >> > patch.
> >> >
> >>
> >> I've updated the patch, the newest version is attached.  It results in
> >> the following behavior.
> >>
> >
> > Looks good to me - that leaves just the question, what would hppen when
> > doing the following:
> >
> > #+property: var  foo=1
> > #+property: var+ 2
> >
>
> The above is equivalent to,
>
> #+header: :var foo=1 2
>
> which due to interaction with some logic put in place to allow the
> specification of un-named variables in call lines results in the
> following.
>
> #+property: var  foo=1
> #+property: var+ 2
>
> #+begin_src emacs-lisp
>  foo
> #+end_src
>
> #+results:
> : 2
>
> #+begin_src emacs-lisp :var bar=1 2
>  bar
> #+end_src
>
> #+results:
> : 2
>
> Although generally I would say that both
>
> #+header: :var foo=1 2
>
> and
>
> #+property: var  foo=1
> #+property: var+ 2
>
> are mal-formed variable assignments.
>

True.


>
> >
> > and
> >
> > #+property: var  foo="Hello "
> > #+property: var+ "world"
> >
>
> This is exactly analogous to
>
> #+header: :var foo="hello" "world"
>

Makes sense


>
> which raises the expected error
>  ``variable ""world"" must be assigned a default value''
>
> the following alternative however works as expected
>
> #+property: var  foo="Hello
> #+property: var+ world"
>
> #+begin_src emacs-lisp
>  foo
> #+end_src
>
> #+results:
> : Hello world
>

Lovely - so I can break longer string characters in multiple lines -
brilliant.


>
> Thanks for these examples, the later did brought to light a small
> quoting issue which is fixed in the new attached patch.
>
> Best -- Eric
>
>
>
> >
> > Thanks,
> >
> > Rainer
> >
> >
> >>
> >>
> >> --
> >> Eric Schulte
> >> http://cs.unm.edu/~eschulte/
> >>
> >>
>
> --
> Eric Schulte
> http://cs.unm.edu/~eschulte/
>
>


-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology,
UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax (F):   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug


[O] How to link to a fragment (aka anchor/bookmark) of a local file (e.g. a TiddlyWiki)?

2011-11-09 Thread Christoph LANGE
Dear all,

I know that org-mode supports links to local files via relative file:
URLs, e.g. file:filename.html.  It also supports links to fragments (aka
anchors/bookmarks) in remote files via http: URLs, e.g.
http://www.example.org/filename.html#section2.

Now, is there a way to combine these?  I would like to use something
like file:filename.html#section2 to link to a fragment in a file that is
in the same directory as my org file.  For portability reasons I don't
want to use any other way of linking to that file than a relative file: URL.

Please read on if and only if you are interested in my reasons for
wishing for such a feature :-)

My concrete use case is that before learning about org-mode I managed my
personal knowledge in a TiddlyWiki (http://www.tiddlywiki.com/), and
some of my knowledge I'm still keeping there.  (Why?  See below.)  The
pages ("tiddlers") in a TiddlyWiki can be accessed as fragments of the
TiddlyWiki HTML file, e.g. file:/path/to/tiddly.html#WikiPage.  I have
my TiddlyWiki file in the same directory as my org file and would like
to link to specific pages of it using file:tiddly.html#WikiPage in order
to achieve a tight integration between both knowledge collections.

FYI, and really just FYI, as I don't want to start a flamewar: The one
single thing that I still like better in TiddlyWiki than in org-mode and
that I haven't been able to reproduce in org-mode is that I can organize
my knowledge in a hierarchical and linked way by tagging pages with
other pages.  E.g. I could have a page OrgMode tagged with
ProductivityTool, where ProductivityTool would not merely be a tag, but
the name of another page, which contains general information about such
tools.  That is, to the best of my knowledge, not possible in org-mode,
which treats outline headlines and tags as two completely different things.

Cheers, and thanks in advance for any help,

Christoph

-- 
Christoph Lange, http://www.facebook.com/ch.lange, Skype duke4701



Re: [O] About commit named "Allow multi-line properties to be specified in property blocks"

2011-11-09 Thread Samuel Wales
Hi Eric,

On 2011-11-03, Eric Schulte  wrote:
>>
>> But allowing a top-level :PROPERTIES: drawer with properties
>> whose scope is the entire file looks like a good idea to me.
>>
>
> I don't see what this would add, how would this solve the need for
> multi-line properties, and how would it differ from IMO being uglier
> than a series of #+PROPERTY: lines.

(Your quote is from Bastien, not me.)

The idea the way I put it (which is with a top level entry to hold the
properties drawer) is, as I stated, possibly too radical for the
thread.  Possibly too radical period.  So feel free to ignore it.

However, let me clarify because I think you might misunderstand.

The idea is not to augment syntax, but reduce it.  Or, if backward
compatibility is desired, then reduce the need for future
ambiguous-scope syntax -- which is a currently unresolved problem.

In my view #+ is uglier than existing property syntax -- which has to
exist anyway because it is used for all sorts of things.  You can't
get rid of it.  (And shouldn't.)

The idea is that a single top-level task, marked as such, acts as if
it were a superlevel, and contains ALL information needed for the file
level.

So there will be no need for #+property .

It is consistent syntax with the rest of Org, unlike file-level or
rest-of-file #+ syntax.  It is less ambiguous in scope.  It is clear
what it means.

It is foldable.  It is searchable the same way other entries are searchable.

The agenda can show it if you want it to (unlike #+whatever).

More consistent all the way around IMO.

If I were designing Org from scratch, I probably would not suggest
this.  Instead, I would simply disallow file-level anything.  If you
want that, just use a top-level task.  a/b/c -- you know, normal
outline.  And then export that top level subtree.

To me, and this is admittedly radical, file-level operations should be
deprecated.

But as a compromise, since a lot of people do file-level operations, I
am proposing a dedicated top level place that acts as if it is
hierarchically above everything else even though it is not.  That
allows consistency better than #+property IMO.

I am talking about the stuff at the top of the file (title,
properties, etc.)  Not blocks etc.  Those are reasonable elsewhere.

As for multiple-line properties, you can use the syntax you're
currently discussing to accumulate in the properties drawer, or even
use a syntax to simply allow multiple-line properties in a properties
drawer.  Either way.

Again, probably too radical for this thread, but I wanted to clarify.

Hope that clarifies.

Samuel

-- 
The Kafka Pandemic: http://thekafkapandemic.blogspot.com
===
Bigotry against people with serious diseases is still bigotry.



Re: [O] [BUG] Unable to use TODO(t@!) to track TODO state changes

2011-11-09 Thread Dave Abrahams

on Wed Nov 09 2011, Jason Dunsmore  wrote:

> Giovanni Ridolfi  writes:
>
>> Jason Dunsmore  writes:
>>
>> Hi, _Jason, 
>>
>>> After reading http://orgmode.org/org.html#Tracking-TODO-state-changes,
>>> I  expected the "@!" TODO syntax, eg. TODO(t@!), to do the following: 
>>>
>>> - Log timestamp when entering state
>>> - Add note when entering state
>>
>> Well the  TODO(t@!) syntax seems not to be allowed.
>>
>> It is your expectation, I'd say a feature request ;-)
>
> I thought it was a bug because each of the special characters is
> described in the manual as being an individual feature and it isn't
> documented that only certain combinations of features work together.

There's definitely a bug; either in the manual or code (or both ;->).

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




Re: [O] How to link to a fragment (aka anchor/bookmark) of a local file (e.g. a TiddlyWiki)?

2011-11-09 Thread Samuel Wales
If you search for "ID markers" in the ML archives, you will find a
proposal by me that provides mechanism for this that is non-brittle.

In the meantime maybe you can use the existing brittle mechanism for
search links (see the manual) in combination with a personal special
keyword that you never change.  A possibility anyway.  You might need
to change a hook.



[O] "org-sort" doesn't work properly on active region

2011-11-09 Thread York Zhao
Hi,

When using "org-sort" on a selected region, it doesn't work properly, I expected
it to sort all the headlines in the region, however, not only does the region
get sorted but also, the headlines get sorted are being combinded into one line
which I don't think is correct. Hopefully somebody will take a look on
this issue.


Thanks



Re: [O] outline-demote incorrectly demotes leaf nodes

2011-11-09 Thread Michael Brand
Hi Carsten

Attached is the patch with this changelog:

Completion of remapping for Outline functions

* lisp/org.el Key bindings: remap the Outline functions from
`outline-mode-prefix-map' where possible.

Michael

On Sat, Oct 22, 2011 at 10:15, Michael Brand  wrote:
> On Fri, Oct 21, 2011 at 16:40, Carsten Dominik
>  wrote:
>> Would you like to carefully think about which other functions you
>> might want to have remapped ...
>
> I started to go through the functions that are bound in
> outline-mode-prefix-map to compare their behavior with that of the Org
> equivalents. Now I stumbled upon
> outline/org-forward/backward-same-level. All four doc strings state
> "Stop at the first and last subheadings of a superior heading", but
> the Org ones don't. As I remember, Org "motion on same level" C-c
> C-f/b once stopped. Git bisect shows that this had been the case
> before the "motion on same level" functionality moved into the new
> functions org-forward/backward-same-level with
> http://orgmode.org/w/?p=org-mode.git;a=commitdiff;h=0eaf3cce
> At that time the (error "No following same-level heading")
> disappeared.
>
> I assume that Org mode should still stop as documented and like
> Outline mode. If this is true I'd like to ask you if you could help to
> resolve this. Of course I tried to do it myself but have to admit that
> it would mean too much effort for me to understand what happens before
> and after the commit with the three optimization levels that it
> implements.
>
>> and then prepare a patch?
>
> I'll add the two new pairs from above and probably some more into a
> follow-up to this
> http://orgmode.org/w/?p=org-mode.git;a=commitdiff;h=b2632dc4
> when I'll be finished with going through outline-mode-prefix-map.
From 8de47296168ae9c83a81899046ce79a16136c6ee Mon Sep 17 00:00:00 2001
From: Michael Brand 
Date: Wed, 9 Nov 2011 19:07:45 +0100
Subject: [PATCH] Completion of remapping for Outline functions

* lisp/org.el Key bindings: remap the Outline functions from
`outline-mode-prefix-map' where possible.
---
 lisp/org.el |   36 +++-
 1 files changed, 35 insertions(+), 1 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index 5c4ea33..e24cdae 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -17074,9 +17074,43 @@ (defun org-remove-inline-images ()
 
  Key bindings
 
-;; Remap outline keys
+;; Outline functions from `outline-mode-prefix-map'
+;; that can be remapped in Org:
+(define-key org-mode-map [remap outline-mark-subtree] 'org-mark-subtree)
+(define-key org-mode-map [remap show-subtree] 'org-show-subtree)
+(define-key org-mode-map [remap outline-forward-same-level]
+  'org-forward-same-level)
+(define-key org-mode-map [remap outline-backward-same-level]
+  'org-backward-same-level)
+(define-key org-mode-map [remap show-branches]
+  'org-kill-note-or-show-branches)
 (define-key org-mode-map [remap outline-promote] 'org-promote-subtree)
 (define-key org-mode-map [remap outline-demote] 'org-demote-subtree)
+(define-key org-mode-map [remap outline-insert-heading] 'org-ctrl-c-ret)
+
+;; Outline functions from `outline-mode-prefix-map'
+;; that can not be remapped in Org:
+;; - the column "key binding" shows whether the Outline function is still
+;;   available in Org mode on the same key that it has been bound to in
+;;   Outline mode:
+;;   - "overridden": key used for a different functionality in Org mode
+;;   - else: key still bound to the same Outline function in Org mode
+;; | Outline function   | key binding | Org replacement   |
+;; |+-+---|
+;; | `outline-next-visible-heading' | `C-c C-n'   | still same function   |
+;; | `outline-previous-visible-heading' | `C-c C-p'   | still same function   |
+;; | `show-children'| `C-c C-i'   | visibility cycling|
+;; | `hide-subtree' | overridden  | visibility cycling|
+;; | `outline-up-heading'   | `C-c C-u'   | still same function   |
+;; | `hide-body'| overridden  | no replacement|
+;; | `show-all' | overridden  | no replacement|
+;; | `hide-entry'   | overridden  | visibility cycling|
+;; | `show-entry'   | overridden  | no replacement|
+;; | `hide-leaves'  | overridden  | no replacement|
+;; | `hide-sublevels'   | overridden  | no replacement|
+;; | `hide-other'   | overridden  | no replacement|
+;; | `outline-move-subtree-up'  | `C-c C-^'   | better: org-shiftup   |
+;; | `outline-move-subtree-down'| overridden  | better: org-shiftdown |
 
 ;; Make `C-c C-x' a prefix key
 (org-defkey org-mode-map "\C-c\C-x" (make-sparse-keymap))
-- 
1.6.2.1



Re: [O] Putting new to TODO/note to the beginning of the subtree

2011-11-09 Thread Carsten Dominik

On 9.11.2011, at 11:15, Tommy Kelly wrote:

> Actually it looks like you can have org-reverse-note-order be a wee
> bit selective using a regexp. Customize implies it's only on a per
> *file* basis but the doc is a bit unclear when it says:
> 
> "Non-nil means store new notes at the beginning of a file or entry.
> When nil, new notes will be filed to the end of a file or entry.
> This can also be a list with cons cells of regular expressions that
> are matched against file names, and values."
> 
> I'm wondering what, if anything, is the significance of that "and
> values". Seems to suggest you could select based on more than just
> file names.

No, please read this as

This can also be a list with cons cells of regular expressions (that
are matched against file names) and values.

So each cons cell has a regular expression in the car.  The
cdr is the value that org-reverse-note-order should have in
files matched by that regular expression.

Anyway, you will be much better off by switching to org-capture
which has more capabilities and fine-grained per-template
control.

HTH

- Carsten

> 
> Still, remember seems to be deprecated these days, so capture is
> probably a sensible move.
> 
> Tommy
> 




Re: [O] bug#9695: allowed date range

2011-11-09 Thread Carsten Dominik
I have now merged this patch, a big thanks to the testers
Michael, Eric, and Tassilo.

- Carsten

On 16.10.2011, at 15:45, Michael Brand wrote:

> Hi Carsten
> 
> On Thu, Oct 13, 2011 at 10:27, Carsten Dominik
>  wrote:
>> Furthermore, pressing C-c C-c on
>> a time stamp will fill in or fix the day name.
> 
> Thank you, this is something I always wanted to have for convenience
> instead of using S- + S-.
> 
>> However, I am not sure if this patch is complete, or if it
>> has side effects.  So it would be good if a few people could
>> apply it and test it during their daily work for a few weeks,
>> and then report problems in this thread.
> 
> I started to use this patch too.
> 
> Michael




Re: [O] "org-sort" doesn't work properly on active region

2011-11-09 Thread Nick Dokos
York Zhao  wrote:


> When using "org-sort" on a selected region, it doesn't work properly, I 
> expected
> it to sort all the headlines in the region, however, not only does the region
> get sorted but also, the headlines get sorted are being combinded into one 
> line
> which I don't think is correct. Hopefully somebody will take a look on
> this issue.
> 

Can't reproduce it with Org-mode version 7.7 (release_7.7.513.g2a5877)

Please provide emacs version, org-mode version, an ECM (minimal example file)
and the steps you follow *in detail*.




[O] Fwd: "org-sort" doesn't work properly on active region

2011-11-09 Thread York Zhao
>> When using "org-sort" on a selected region, it doesn't work properly, I 
>> expected
>> it to sort all the headlines in the region, however, not only does the region
>> get sorted but also, the headlines get sorted are being combinded into one 
>> line
>> which I don't think is correct. Hopefully somebody will take a look on
>> this issue.
>>
>
> Can't reproduce it with Org-mode version 7.7 (release_7.7.513.g2a5877)
>
> Please provide emacs version, org-mode version, an ECM (minimal example file)
> and the steps you follow *in detail*.

Thanks for the reply, my emacs version is v23.3.1, I'm using the org-mode from
git, commit "a4273c" (probably the latest).


York



Re: [O] Inactive time stamps along with CLOCK: entries?

2011-11-09 Thread Sebastien Vauban
Hi Bernt and Tommy,

Bernt Hansen wrote:
> Tommy Kelly  writes:
>
>> Question for Bernt, but maybe more widely useful.
>>
>> Bernt, in some of your org-capture-templates, you often include a %U
>> timestamp as well as clocking in the item in question. for example:
>>
>> ("j" "Journal" entry (file+datetree "~/git/org/diary.org")
>>"* %?\n%U\n  %i" :clock-in t :clock-resume t)
>>
>> Why do you do that extra \n%U? Since the timestamp is going to be
>> identical to the first entry in the CLOCK: line, and since you can
>> have/not-have clocking items show up in the agenda, why have both the
>> :CLOCK line and the timestamp? What else do you get from having a
>> timestamp that you don't get from the CLOCK: line alone?
>
> The reason I have both is I create capture tasks and notes _fast_ and
> remove empty clock lines - so there is no clock line or clock drawer
> when I'm done in that that.
>
> The %U is to record when I created the task/note.

Could sorting of entries be another reason: possible with inactive timestamp,
not with first clock line?

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] zotero plain, org-odt, and citations in general

2011-11-09 Thread Christian Moe

Hi,

Is zotero-plain working for others?

I test drove zotero-plain back when it was just developed. Looked 
promising, but I had uneven success with the MozRepl communication, 
possibly something to do with being on an older and slower machine.


Trying it again today (with the most recent zotero-plain, MozRepl and 
moz.el I could find), I press `C-c z i' to insert a citation and 
nothing happens. Well, the Org buffer hangs until I press C-g, and 
except that the *MozRepl* buffer says "Process MozRepl deleted".


Yours,
Christian



Re: [O] "org-sort" doesn't work properly on active region

2011-11-09 Thread York Zhao
> 4) I still cannot reproduce the problem, even with latest git.

It turns out that this was my own configuration problem and not a bug, I
apologize for the false report and appreciate Nick's help.

Thanks,


York



Re: [O] Custom agenda -- running functions, not just setting vars

2011-11-09 Thread Sebastien Vauban
Hi Bernt,

> Bernt Hansen wrote:
>> Tommy Kelly  writes:
>> (setq org-agenda-custom-commands
>>   (quote (( "x" "Test Agenda" agenda "" 
>>  ((org-agenda-start-with-follow-mode t)
>>   (org-agenda-span 'day)
>>   (org-agenda-start-with-log-mode t))
>>
>> but it doesn't handle the grid - I have that on by default by setting 
>>
>> (setq org-agenda-time-grid (quote ((daily today remove-match)
>> #("" 0 16 (org-heading t))
>> (830 1000 1200 1300 1500 1700
>>
>> which you can probably add to the above agenda definition but I didn't
>> bother.  If there are no items to display on the agenda there is a bug
>> where the grid is not shown but otherwise I think this works.
>
> I don't think that's a bug: this seems to be handled -- see parameter
> `require-timed' in the doc:

The problem is well that, if you force the timegrid even when there is no
timed event to show, you'll always have it.

It's nice for the daily agenda view, where one could want it, with or without
timed event foreseen.

It's much less nice for a block view where you have a couple of sub-agendas
(one with appointments only, one with deadlines only, one with scheduled
entries only: you get the timegrid displayed 3 times).

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] "org-sort" doesn't work properly on active region

2011-11-09 Thread York Zhao
> an ECM is a minimal example file: a small org file that shows the problem, as
> small as you can make it and still have it show the problem.

Thanks Nick



Re: [O] Custom agenda -- running functions, not just setting vars

2011-11-09 Thread Sebastien Vauban
>> Bernt Hansen wrote:
>>> Tommy Kelly  writes:
>>> (setq org-agenda-custom-commands
>>>   (quote (( "x" "Test Agenda" agenda "" 
>>> ((org-agenda-start-with-follow-mode t)
>>>  (org-agenda-span 'day)
>>>  (org-agenda-start-with-log-mode t))
>>>
>>> but it doesn't handle the grid - I have that on by default by setting 
>>>
>>> (setq org-agenda-time-grid (quote ((daily today remove-match)
>>>#("" 0 16 (org-heading t))
>>>(830 1000 1200 1300 1500 1700
>>>
>>> which you can probably add to the above agenda definition but I didn't
>>> bother.  If there are no items to display on the agenda there is a bug
>>> where the grid is not shown but otherwise I think this works.
>>
>> I don't think that's a bug: this seems to be handled -- see parameter
>> `require-timed' in the doc:
>
> The problem is well that, if you force the timegrid even when there is no
> timed event to show, you'll always have it.
>
> It's nice for the daily agenda view, where one could want it, with or without
> timed event foreseen.
>
> It's much less nice for a block view where you have a couple of sub-agendas
> (one with appointments only, one with deadlines only, one with scheduled
> entries only: you get the timegrid displayed 3 times).

... then one need to locally set org-agenda-time-grid to nil in the definition
of the custom agenda view.

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Code block evaluation export bug ?

2011-11-09 Thread Eric Schulte
I turns out the problem here is that the table was being parsed for
column headers twice, so the top two rows were both being taken as
column headers.  I've just pushed up a fix.

Best -- Eric

Nick Dokos  writes:

> Thomas S. Dye  wrote:
>
>> Nick Dokos  writes:
>> 
>> > While testing my response to Viktor's question, I ran into a problem.
>> > I used a test file that is slightly modified from a previous post of Tom 
>> > Dye's:
>> >
>> > * R tables
>> >
>> > #+TBLNAME: tbl-1
>> > | column1 | column2 |
>> > |-+-|
>> > |  45 |  34 |
>> > |  77 |  56 |
>> >
>> > #+tblname: tbl-2
>> > | col1 | col2 |
>> > |--+--|
>> > | a| b|
>> > | c| d|
>> >
>> > #+tblname: tbl-3
>> > | c1 | c2 |
>> > |+|
>> > | A  | B  |
>> > | C  | D  |
>> >
>> > #+BEGIN_SRC R :var x=tbl-1 :var y=tbl-2 :var z=tbl-3 :colnames yes 
>> > :exports both :results value
>> > z
>> > #+END_SRC
>> >
>> >
>> >
>> > Evaluating the code block correctly produces the result
>> >
>> > ,
>> > | 
>> > | #+results:
>> > | | c1 | c2 |
>> > | |+|
>> > | | A  | B  |
>> > | | C  | D  |
>> > `
>> >
>> > but exporting (to ascii, PDF, HTML or ODT) chops off the first row of
>> > the result. For example, here
>> > is the ascii:
>> >
>> > ,
>> > | 
>> > |   c1   c2  
>> > |  +
>> > |   CD   
>> > `
>> > ...
>> 
>> Aloha Nick,
>> 
>> I see the same behavior.
>> 
>
> Here's a progress report on this: the call chain is
>
> ,
> | 
> |   org-babel-process-params(((:comments . "") (:shebang . "") (:cache
> | . "no") (:padline . "") (:noweb . "no") (:tangle . "no") (:exports
> | . "both") (:results . "replace value") (:var x (45 34) (77 56))
> | (:var y ("a" "b") ("c" "d")) (:var z ("A" "B") ("C" "D")) (:session
> | . "none") (:rowname-names) (:result-type . value) (:result-params
> | "replace" "value") (:padnewline . "yes") (:hlines . "no") (:colnames
> | . "yes") (:colname-names (x "column1" "column2") (y "col1" "col2")
> | (z "c1" "c2"
> |   ...
> |   (org-babel-exp-in-export-file lang (org-babel-process-params 
> (org-babel-merge-params (nth 2 info) (\` ((:results \, (if silent "silent" 
> "replace")))
> |   ...  
> |   org-babel-exp-results(("R" "z" ((:cache . "no") (:colname-names (x
> | "column1" "column2") (y "col1" "col2") (z "c1" "c2")) (:colnames
> | . "yes") (:comments . "") (:exports . "both") (:hlines . "no")
> | (:noweb . "no") (:padline . "") (:padnewline . "yes")
> | (:result-params "replace" "value") (:result-type . value) (:results
> | . "replace value") (:rowname-names) (:session . "none") (:shebang
> | . "") (:tangle . "no") (:var x (45 34) (77 56)) (:var y ("a" "b")
> | ("c" "d")) (:var z ("A" "B") ("C" "D"))) "" nil 0) block nil
> | "6443d36b0252c9e3192f813429018760bee3c11d")
> |   ...  
> |   org-babel-exp-do-export(("R" "z" ((:cache . "no") (:colname-names
> | (x "column1" "column2") (y "col1" "col2") (z "c1" "c2")) (:colnames
> | . "yes") (:comments . "") (:exports . "both") (:hlines . "no")
> | (:noweb . "no") (:padline . "") (:padnewline . "yes")
> | (:result-params "replace" "value") (:result-type . value) (:results
> | . "replace value") (:rowname-names) (:session . "none") (:shebang
> | . "") (:tangle . "no") (:var x (45 34) (77 56)) (:var y ("a" "b")
> | ("c" "d")) (:var z ("A" "B") ("C" "D"))) "" nil 0) block
> | "6443d36b0252c9e3192f813429018760bee3c11d")
> |   
> |   org-babel-exp-src-block(...)
> | 
> |   org-export-blocks-preprocess()
> |   ...
> |   org-export-preprocess-string(...)
> |   ...
> |   org-export-as-ascii(nil nil nil "*Org ASCII Export*")
> |   org-export-as-ascii-to-buffer(nil)
> |   ...
> |   org-export(nil)
> `
>
> So far, so good: x, y and z are still 2x2 tables. But evaluating the last 
> form, we get
>
> ((:var x (77 56)) (:var y ("c" "d")) (:var z ("C" "D"))
> (:colname-names (x "column1" "column2") (y "col1" "col2") (z "c1"
> "c2")) (:rowname-names) (:result-params "replace" "value" "replace"
> "value") (:result-type . value) (:comments . "") (:shebang . "")
> (:cache . "no") (:padline . "") (:noweb . "no") ...)
>
> The first row of each table has disappeared. Looks like a problem with 
> org-babel-process-params.
> Eric, can you take a look?
>
> Thanks,
> Nick
>

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



Re: [O] FYI: Org mode testing framework, Emacs 23 and 22

2011-11-09 Thread Eric Schulte
Martyn Jago  writes:

> Hi
>
> Brian Wightman  writes:
>
>> On Mon, Oct 24, 2011 at 7:12 AM, Sebastien Vauban
>>  wrote:
>>> For my information, why do you need to test that 2 suites don't run at the
>>> same time?  They only write to temp buffers, no?  Can they conflict?
>>
>> If they do conflict and only one set of tests should run at a time,
>> shouldn't the second set of tests be queued up so it runs when the
>> first is complete?  If this isn't done, I could see a situation where
>> at least one commit remains untested until the next commit.
>>
>> my $0.02;
>> Brian
>
> I would think it would make sense to ensure the newly committed code
> also builds correctly (including info), and why not test back to Emacs
> 22 also (since that is how this thread came about)? I have set up
> something similar, and doing all this takes less than 1 minute on my
> machine.
>
> Incidentally, I added info on running tests on Emacs 22 and 23 to Worg at 
>
> http://orgmode.org/worg/org-tests/index.html
>

These are good points, so the best solution would have two parts, the
first should en-queue each new commit as it is received, and the second
should pop commits off of the queue, run the test suite on that commit
and write the results to an html file.

My first thought for a shell-script solution would use a mkfifo named
pipe, something like the following...

,[setup]
| mkfifo /tmp/org-commits-to-test
`

,[in a post-commit hook]
| echo $COMMIT >> /tmp/org-commits-to-test
`

,[in another constantly-running shell script]
| while true; do
|   for i in $(cat /tmp/org-commits-to-test);do
| cd /testing/repo/location
| git checkout $i
| git reset --hard HEAD
| emacs --batch ...
|   done
| done
`

But I imagine there is likely a better solution.

Best -- Eric

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



Re: [O] bug#9695: allowed date range

2011-11-09 Thread Michael Brand
Hi Carsten

On Wed, Nov 9, 2011 at 19:18, Carsten Dominik  wrote:
> I have now merged this patch,

Thank you. I have still concerns about this, did I somehow miss the answer?:

On Thu, Nov 3, 2011 at 18:22, Michael Brand  wrote:
> I wonder how C-c C-c with a prefix (supported are one to three C-u) on
> a time stamp in a table field is expected to behave. In my opinion it
> should not only adjust the day name but like before also evaluate the
> table formula which it does not now. If the user does not expect and
> check the missing logs of the table calculation update he might
> wrongly assume that it happened and assume that there has been just no
> change.

Michael



Re: [O] library of babel call blocks not invoked on buffer/subtree execute

2011-11-09 Thread Eric Schulte
"Frankel, Rick (CA-CIB)"  writes:

> There is a bug (?) with #+call block: They are not executed on export/
> invocation of org-babel-execute buffer.
>
> There are a couple of reasons for this:
>
>1. org-babel-src-block-regexp, used in org-babel-map-src-blocks
> does not match #+call.
>2. unlike org-babel-execute-maybe, which calls
>   org-babel-lob-execute-maybe if org-babel-execute-src-block-maybe
>   returns nil, org-babel-execute-buffer just calls
>   org-babel-execute-src-block (there is no corresponding
>   unconditional org-babel-lob-execute-src-block).
>
> This seems to be an oversight.
>

Hi Rick,

Indeed this is an oversight.  I've updated `org-babel-execute-buffer'
such that it will now execute call lines as well as code blocks.

Thanks for pointing this out -- Eric

>
> tia,
> rick
> This message and any attachments are intended for the sole use of its 
> addressee.
> If you are not the addressee, please immediately notify the sender and then 
> destroy the message.
> As this message and/or any attachments may have been altered without our 
> knowledge, its content is not legally binding on Crédit Agricole Corporate 
> and Investment Bank.
> All rights reserved.
>
>  
> Ce message et ses pièces jointes sont destinés à l'usage exclusif de leur 
> destinataire.
> Si vous recevez ce message par erreur, merci d'en aviser immédiatement 
> l'expéditeur et de le détruire ensuite.
> Le présent message pouvant être altéré à notre insu, Crédit Agricole 
> Corporate and Investment Bank ne peut pas être engagé par son contenu.
> Tous droits réservés.

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



Re: [O] #+begin_src LaTeX blocks export to literal LaTeX

2011-11-09 Thread Eric Schulte
Michael Bach  writes:

> Just for reference, I found that I need to load `ob-latex.el'.  With
> that it works nicely.
>

While the above works, the preferred way to add support for a language
is using the `org-babel-do-load-languages' function.  See
http://orgmode.org/manual/Languages.html#Languages

Best -- Eric

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



Re: [O] FYI: Org mode testing framework, Emacs 23 and 22

2011-11-09 Thread Samuel Wales
Dunno if this is off-topic for this thread -- but one thing I think
would be really great in the testing framework is the ability to test
visibility.  Looking for ellipses in the wrong places, headlines not
showing, etc.  I have constant issues with folding and elision in Org.
 Is this covered?

-- 
The Kafka Pandemic: http://thekafkapandemic.blogspot.com
===
Bigotry against people with serious diseases is still bigotry.



[O] How to define repeating events that do not show up after there dates are passed?

2011-11-09 Thread Marius Hofert
Hi,

Recently, Jan explained to me the difference about a  and a "SCHEDULED: 
"; see http://osdir.com/ml/emacs-orgmode-gnu/2011-11/msg00200.html

I'm wondering about what is the best way to put in repeating events in 
org-mode. For example, image you visit your friends every Thursday at 16:00. 
Now putting the event in as

TODO Visit friends
SCHEDULED: <2011-11-10 Thu +1w>

Now if I fire up C-c a L, I see that visit/meeting for this Thursday and also 
for the following Thursday. However, it also appears when doing C-c a a on 
Friday, namely as an event that happened in the past (on Thu) and which is 
still scheduled. So for this repeating event, I don't want it to appear on 
Friday as something I forgot on Thursday.
Well, then one shouldn't (?) use SCHEDULED. Okay, so just put it in like this:
  
TODO Visit friends
<2011-11-10 Thu +1w>

Now on Friday it does not appear anymore. However, if I fire up C-c a L it also 
disappeared showing "[... 12 empty days omitted]" although on the Thursdays  
within the 12 days, there's clearly the meeting with the friends So getting 
"12 empty days" is not right, since I actually have a meeting on Thursdays...

How can I put in repeating events so that they show up on C-c a L but they 
shouldn't show up after the corresponding date passed?

Cheers,

Marius


Re: [O] Code block evaluation export bug ?

2011-11-09 Thread Nick Dokos
Eric Schulte  wrote:

> I turns out the problem here is that the table was being parsed for
> column headers twice, so the top two rows were both being taken as
> column headers.  I've just pushed up a fix.
> 

Works fine - thanks!

> Best -- Eric
> 
> Nick Dokos  writes:
> 
> > Thomas S. Dye  wrote:
> >
> >> Nick Dokos  writes:
> >> 
> >> > While testing my response to Viktor's question, I ran into a problem.
> >> > I used a test file that is slightly modified from a previous post of Tom 
> >> > Dye's:
> >> >
> >> > * R tables
> >> >
> >> > #+TBLNAME: tbl-1
> >> > | column1 | column2 |
> >> > |-+-|
> >> > |  45 |  34 |
> >> > |  77 |  56 |
> >> >
> >> > #+tblname: tbl-2
> >> > | col1 | col2 |
> >> > |--+--|
> >> > | a| b|
> >> > | c| d|
> >> >
> >> > #+tblname: tbl-3
> >> > | c1 | c2 |
> >> > |+|
> >> > | A  | B  |
> >> > | C  | D  |
> >> >
> >> > #+BEGIN_SRC R :var x=tbl-1 :var y=tbl-2 :var z=tbl-3 :colnames yes 
> >> > :exports both :results value
> >> > z
> >> > #+END_SRC
> >> >
> >> >
> >> >
> >> > Evaluating the code block correctly produces the result
> >> >
> >> > ,
> >> > | 
> >> > | #+results:
> >> > | | c1 | c2 |
> >> > | |+|
> >> > | | A  | B  |
> >> > | | C  | D  |
> >> > `
> >> >
> >> > but exporting (to ascii, PDF, HTML or ODT) chops off the first row of
> >> > the result. For example, here
> >> > is the ascii:
> >> >
> >> > ,
> >> > | 
> >> > |   c1   c2  
> >> > |  +
> >> > |   CD   
> >> > `
> >> > ...
> >> 
> >> Aloha Nick,
> >> 
> >> I see the same behavior.
> >> 
> >
> > Here's a progress report on this: the call chain is
> >
> > ,
> > | 
> > |   org-babel-process-params(((:comments . "") (:shebang . "") (:cache
> > | . "no") (:padline . "") (:noweb . "no") (:tangle . "no") (:exports
> > | . "both") (:results . "replace value") (:var x (45 34) (77 56))
> > | (:var y ("a" "b") ("c" "d")) (:var z ("A" "B") ("C" "D")) (:session
> > | . "none") (:rowname-names) (:result-type . value) (:result-params
> > | "replace" "value") (:padnewline . "yes") (:hlines . "no") (:colnames
> > | . "yes") (:colname-names (x "column1" "column2") (y "col1" "col2")
> > | (z "c1" "c2"
> > |   ...
> > |   (org-babel-exp-in-export-file lang (org-babel-process-params 
> > (org-babel-merge-params (nth 2 info) (\` ((:results \, (if silent "silent" 
> > "replace")))
> > |   ...  
> > |   org-babel-exp-results(("R" "z" ((:cache . "no") (:colname-names (x
> > | "column1" "column2") (y "col1" "col2") (z "c1" "c2")) (:colnames
> > | . "yes") (:comments . "") (:exports . "both") (:hlines . "no")
> > | (:noweb . "no") (:padline . "") (:padnewline . "yes")
> > | (:result-params "replace" "value") (:result-type . value) (:results
> > | . "replace value") (:rowname-names) (:session . "none") (:shebang
> > | . "") (:tangle . "no") (:var x (45 34) (77 56)) (:var y ("a" "b")
> > | ("c" "d")) (:var z ("A" "B") ("C" "D"))) "" nil 0) block nil
> > | "6443d36b0252c9e3192f813429018760bee3c11d")
> > |   ...  
> > |   org-babel-exp-do-export(("R" "z" ((:cache . "no") (:colname-names
> > | (x "column1" "column2") (y "col1" "col2") (z "c1" "c2")) (:colnames
> > | . "yes") (:comments . "") (:exports . "both") (:hlines . "no")
> > | (:noweb . "no") (:padline . "") (:padnewline . "yes")
> > | (:result-params "replace" "value") (:result-type . value) (:results
> > | . "replace value") (:rowname-names) (:session . "none") (:shebang
> > | . "") (:tangle . "no") (:var x (45 34) (77 56)) (:var y ("a" "b")
> > | ("c" "d")) (:var z ("A" "B") ("C" "D"))) "" nil 0) block
> > | "6443d36b0252c9e3192f813429018760bee3c11d")
> > |   
> > |   org-babel-exp-src-block(...)
> > | 
> > |   org-export-blocks-preprocess()
> > |   ...
> > |   org-export-preprocess-string(...)
> > |   ...
> > |   org-export-as-ascii(nil nil nil "*Org ASCII Export*")
> > |   org-export-as-ascii-to-buffer(nil)
> > |   ...
> > |   org-export(nil)
> > `
> >
> > So far, so good: x, y and z are still 2x2 tables. But evaluating the last 
> > form, we get
> >
> > ((:var x (77 56)) (:var y ("c" "d")) (:var z ("C" "D"))
> > (:colname-names (x "column1" "column2") (y "col1" "col2") (z "c1"
> > "c2")) (:rowname-names) (:result-params "replace" "value" "replace"
> > "value") (:result-type . value) (:comments . "") (:shebang . "")
> > (:cache . "no") (:padline . "") (:noweb . "no") ...)
> >
> > The first row of each table has disappeared. Looks like a problem with 
> > org-babel-process-params.
> > Eric, can you take a look?
> >
> > Thanks,
> > Nick
> >
> 
> -- 
> Eric Schulte
> http://cs.unm.edu/~eschulte/
> 



Re: [O] How to define repeating events that do not show up after there dates are passed?

2011-11-09 Thread Nick Dokos
Marius Hofert  wrote:

> Hi,
> 
> Recently, Jan explained to me the difference about a  and a
> "SCHEDULED: "; see
> http://osdir.com/ml/emacs-orgmode-gnu/2011-11/msg00200.html
> 
> I'm wondering about what is the best way to put in repeating events in
> org-mode. For example, image you visit your friends every Thursday at
> 16:00. Now putting the event in as
> 
> TODO Visit friends
> SCHEDULED: <2011-11-10 Thu +1w>
> 
> Now if I fire up C-c a L, I see that visit/meeting for this Thursday
> and also for the following Thursday. However, it also appears when
> doing C-c a a on Friday, namely as an event that happened in the past
> (on Thu) and which is still scheduled. So for this repeating event, I
> don't want it to appear on Friday as something I forgot on Thursday.
> Well, then one shouldn't (?) use SCHEDULED. Okay, so just put it in
> like this:
>   
> TODO Visit friends
> <2011-11-10 Thu +1w>
> 
> Now on Friday it does not appear anymore. However, if I fire up C-c a
> L it also disappeared showing "[... 12 empty days omitted]" although
> on the Thursdays within the 12 days, there's clearly the meeting with
> the friends So getting "12 empty days" is not right, since I
> actually have a meeting on Thursdays...
> 
> How can I put in repeating events so that they show up on C-c a L but
> they shouldn't show up after the corresponding date passed?
> 

The timeline functionality is, if not obsolete, a second-class citizen in org.
see Carsten's history lesson at

http://thread.gmane.org/gmane.emacs.orgmode/39368/focus=40038

Nick



Re: [O] How to define repeating events that do not show up after there dates are passed?

2011-11-09 Thread Marius Hofert

> The timeline functionality is, if not obsolete, a second-class citizen in org.
> see Carsten's history lesson at
> 
>http://thread.gmane.org/gmane.emacs.orgmode/39368/focus=40038
> 

Very interesting link, thanks Nick.

Cheers,

Marius




Re: [O] FYI: Org mode testing framework, Emacs 23 and 22

2011-11-09 Thread Eric Schulte
Samuel Wales  writes:

> Dunno if this is off-topic for this thread -- but one thing I think
> would be really great in the testing framework is the ability to test
> visibility.  Looking for ellipses in the wrong places, headlines not
> showing, etc.  I have constant issues with folding and elision in Org.
>  Is this covered?

I was talking more about the test framework rather than specific tests
(such as tests for visibility), but I agree that tests of the visibility
of elements would be useful -- although I don't know off the top of my
head what elisp primitives would be most useful for testing visibility.

Best -- Eric

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



Re: [O] About commit named "Allow multi-line properties to be specified in property blocks"

2011-11-09 Thread Sebastien Vauban
Hi Eric,

Eric Schulte wrote:
> Rainer M Krug  writes:
>
>> On Tue, Nov 8, 2011 at 11:53 PM, Eric Schulte wrote:
>>
>>> > Perhaps inserting an assumed space separator would be more intuitive?
>>> > If we were to go that way it may be possible to allow variable
>>> > specifications such as
>>> >
>>> > #+PROPERTY: var foo=1 bar=2
>>> >
>>> > in which case properties could be easily specified on multiple lines
>>> > using a default space separator.
>>> >
>>> > If this seems like a good way to go I can try to update my previous
>>> > patch.
>>>
>>> I've updated the patch, the newest version is attached.  It results in
>>> the following behavior.
>>
>> Looks good to me - that leaves just the question, what would hppen when
>> doing the following:
>>
>> #+property: var  foo=1
>> #+property: var+ 2
>
> The above is equivalent to,
>
> #+header: :var foo=1 2
>
> which due to interaction with some logic put in place to allow the
> specification of un-named variables in call lines results in the
> following.
>
> #+property: var  foo=1
> #+property: var+ 2
> #+begin_src emacs-lisp
>   foo
> #+end_src
>
> #+results:
> : 2
>
> #+begin_src emacs-lisp :var bar=1 2
>   bar  
> #+end_src
>
> #+results:
> : 2
>
> Although generally I would say that both
>
> #+header: :var foo=1 2
>
> and 
>
> #+property: var  foo=1
> #+property: var+ 2
>
> are mal-formed variable assignments.

I was amazed, yesterday, when you told about `foo' becoming `12' (with `1' on
the assignment line and `2' on the continuation), but I'm glad you consider
this as rather ill-formed.

>> and
>>
>> #+property: var  foo="Hello "
>> #+property: var+ "world"
>
> This is exactly analogous to
>
> #+header: :var foo="hello" "world"
>
> which raises the expected error
>   ``variable ""world"" must be assigned a default value''
>
> the following alternative however works as expected
>
> #+property: var  foo="Hello
> #+property: var+ world"
> #+begin_src emacs-lisp
>   foo
> #+end_src
>
> #+results:
> : Hello world

That said, all of these seem excellent trade-off between the different
alternatives that have been discussed and analyzed, and they respect important
aspects: simplicity (intuitive on reading) and powerfulness.

Just perfect!

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] zotero plain, org-odt, and citations in general

2011-11-09 Thread Erik Hetzner
At Wed, 9 Nov 2011 10:28:21 -0500,
Matt Price wrote:
> 
> attached is a sample odt file with Zotero citations included. It's very
> simple, actually, because I think the key to making something like this
> work would be to offload as much work as possible to zotero itself -- Erik,
> correct me if I'm wrong (quite likely).

Hi,

Thanks for the sample ODT file.

I would like to clarify a few issues that have been raised:

zotero-plain consists of 2 very separate parts: emacs/zotero
integration and docutils/zotero integration (zot4rst). zot4rst is far
more advanced.

zot4rst provides extensions for docutils that allow a user to include
zotero citations in reStructuredText documents. For example:

  :xcite:`[@item1, p. 30]` says blah.

When the user employs the zrst2{pdf,odt,...} tools, docutils connects
to a running Firefox instance (using jsbride & a custom zot4rst
Firefox plugin) and uses Zotero to format citations & bibliographies
(in this case, for @item1, p. 30). When generating an ODT file, this
does *not* use the standard OpenOffice/Zotero integration, but rather
uses Zotero to generate HTML citations, transforms the HTML citations
into docutils internal format, and then uses the rst2odt code to
transform that into an ODT document. So while it might be possible to
include the necessary information that make the standard
OpenOffice/Zotero plugin work, it would probably be difficult.

The Emacs/Zotero integration is far less advanced. It uses MozRepl,
which is flaky, and includes code to insert & update & follow links, &
generate citations into org docs. Here is an example link:

  [[zotero://select//0_83KCW6AU][Rediker, Marcus. The Slave Ship: A Human 
History. Viking Adult, 2007.]]

This link can be automatically inserted, and can be followed using C-c
C-o, which selects the item in Zotero.

This is *all* the org-mode integration does at present. This serves my
needs (note-taking) and I probably won’t do any enhancements (patches
are welcome!) Keep in mind that citations are tricky: if you want to
transform org citations into publishable documents you want to be able
to handle footnote & in-text citations (it depends on the style) and
bibliographies. Have a look at the python zot4rst code to get an idea
of what is required. If people want org -> odt transformations, it is
going to be difficult.

I hope that helps!

best, Erik

PS: 

> erik, I'm having trouble making contact with mozrepl from emacs.
> given recent developments in Zotero, it would probably be better to have
> zotero.el speak directly to the Zotero server instead of working through
> firefox -- do you agree, Erik? But I imagine that is a significant
> undertaking.

There really is no Zotero server at the moment. The API at zotero.org
does not support bibliography generation, and the internal server that
Zotero provides locally is not documented.
Sent from my free software system .


Re: [O] zotero plain, org-odt, and citations in general

2011-11-09 Thread Erik Hetzner
At Wed, 09 Nov 2011 20:39:18 +0100,
Christian Moe wrote:
> 
> Hi,
> 
> Is zotero-plain working for others?
> 
> I test drove zotero-plain back when it was just developed. Looked 
> promising, but I had uneven success with the MozRepl communication, 
> possibly something to do with being on an older and slower machine.
> 
> Trying it again today (with the most recent zotero-plain, MozRepl and 
> moz.el I could find), I press `C-c z i' to insert a citation and 
> nothing happens. Well, the Org buffer hangs until I press C-g, and 
> except that the *MozRepl* buffer says "Process MozRepl deleted".

Hi Christian,

It works for me, with MozRepl 1.1beta2, and the latest Zotero plain.

MozRepl communication *is* not very good.

best, Erik
Sent from my free software system .