[Orgmode] Re: OrgmodeExport full org-mode to CSV (not tables)

2009-08-24 Thread Simon Mullis
Thanks Wes.  I'll try this...

Cheers

SM

2009/8/24 Wes Hardaker :
>> On Mon, 24 Aug 2009 14:29:33 +0200, Simon Mullis  
>> said:
>
> SM> I'd like an easy way to export this data to an Excel table, or
> SM> better yet, CSV.
>
> org-export-generic can *almost* do this for you by carefully setting the
> header open/close to simply be ", " for opening and a "\n" for closing
> on header 2 (I think; haven't tested it).
>
> But, it won't remove the text: prefix at the beginning of the fields.
> It' be simple to pass the results through sed 's/, [^:]*:/,/g' though.
> --
> \ Wes Hardaker                           http://pontifications.hardakers.net /
>  \_ "In the bathtub of history the truth is harder to hold than /
>       \___ the soap, and much more difficult to find." ___/
>               \_ -- Terry Pratchett __/
>                         \__/
>



-- 
Simon Mullis
_
si...@mullis.co.uk


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: OrgmodeExport full org-mode to CSV (not tables)

2009-08-24 Thread Wes Hardaker
> On Mon, 24 Aug 2009 14:29:33 +0200, Simon Mullis  
> said:

SM> I'd like an easy way to export this data to an Excel table, or
SM> better yet, CSV.

org-export-generic can *almost* do this for you by carefully setting the
header open/close to simply be ", " for opening and a "\n" for closing
on header 2 (I think; haven't tested it).

But, it won't remove the text: prefix at the beginning of the fields.
It' be simple to pass the results through sed 's/, [^:]*:/,/g' though.
-- 
\ Wes Hardaker   http://pontifications.hardakers.net /
 \_ "In the bathtub of history the truth is harder to hold than /
   \___ the soap, and much more difficult to find." ___/
   \_ -- Terry Pratchett __/
 \__/


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Custom agenda question

2009-08-24 Thread Carsten Dominik


On Aug 24, 2009, at 2:21 AM, Manish wrote:
Once you've got your agenda organized right with todo's in order  
etc. then
it's just a little disruptive to go anywhere else for a little extra  
detail to

get some more context.  But I agree agenda should be as compact as
possible.. may be the extra lines could be a toggle switch?


H.

I am not yet convinced, but I have made a little toy implementation
for you and others to try out and commet on.

Please get the latest version and press `E' in the agenda to
toggle the display of a small amount (see variable
`org-agenda-entry-text-maxlines') of text from the entry in
the agenda.

- Carsten



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Anything like org-hide-others/org-close-others?

2009-08-24 Thread Peter Jones
Carsten Dominik  writes:
> S-TAB goes to overview, and `C-c C-r' reveals the location of point.
>
> If you need in on a single key, write a function that calls
> `org-overview' and then `org-reveal'.

Beautiful, thanks!

-- 
Peter Jones - 303-219-0226
pmade inc.  - http://pmade.com



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: time profiling and other meta-analytic commands (was automatic clocking)

2009-08-24 Thread Samuel Wales
By the way, these are wild ideas, not feature requests.  :)


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Accidentally holding down LEFT arrow in Agenda

2009-08-24 Thread Carsten Dominik


On Aug 24, 2009, at 4:04 PM, Daniel Clemente wrote:


El dg, ago 23 2009 a les 20:45, Richard Lewis va escriure:


This is sort of a bug query. Occasionally, I accidentally hold down
the LEFT cursor key in Agenda mode, hoping to move the cursor left,
but forgetting that it actually moves to next week.



 I use org-agenda-clockreport-mode and then I see a table in the  
agenda. Sometimes I accidentally change day after pressing left/ 
right because I wanted to move to the cell to the left/right. I  
should use Tab, but it doesn't work.


This is not a editable table, which is why TAB does not work.



 I would say that it doesn't make sense to change day when the  
cursor is over a clock report table in the agenda. But each person  
may see this differently.


Yes, you might want to do the same customization as Manuel
describes earlier in this thread.

HTH

- Carsten




-- Daniel


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode




___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: Making an org file more readable

2009-08-24 Thread Carsten Dominik


On Aug 24, 2009, at 1:11 PM, PT wrote:


Nick Dokos  hp.com> writes:


You *can* get an empty line between two headers by having two empty  
lines at
the end of the first section: the first empty line is considered  
part of

the section and is folded with it, but the second one remains. E.g.


One more thing for those who don't know this:

I took a look at the relevant part of outline.el and turns out
one empty line is enough if outline-blank-line is set to t.


It's almost perfect. It would be perfect if outline would leave
alone all empty lines after the content, so if I have e.g. two
empty lines there then it would fold non-empty lines only leaving
both empty lines visible, so that I could use as many
empty lines for separation as I want.


Actually, Org pretty much overrules what outline does in this context.

I have just pushed a modification so that you can, after pulling
from git, set org-cycle-separator-lines to a negative number.
If you set it to -N, N empty lines will be required in order
to get a separation.  But, if there are enough empty lines,
all will be shown.

You might want to set this to -1., I like my old value of +2 best.

- Carsten


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Accidentally holding down LEFT arrow in Agenda

2009-08-24 Thread Daniel Clemente
El dg, ago 23 2009 a les 20:45, Richard Lewis va escriure:

> This is sort of a bug query. Occasionally, I accidentally hold down
> the LEFT cursor key in Agenda mode, hoping to move the cursor left,
> but forgetting that it actually moves to next week.
>

  I use org-agenda-clockreport-mode and then I see a table in the agenda. 
Sometimes I accidentally change day after pressing left/right because I wanted 
to move to the cell to the left/right. I should use Tab, but it doesn't work.

  I would say that it doesn't make sense to change day when the cursor is over 
a clock report table in the agenda. But each person may see this differently.


-- Daniel


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Gnus link bug

2009-08-24 Thread Leo
On 2009-08-23 19:32 +0100, Bastien wrote:
> Hi Leo,
>
> Leo  writes:
>
>> I haven't used org to store links from Gnus for almost two years and
>> today I tried it again and found at least one annoying bug.
>>
>> In the summary buffer, calling org-store-link will display the article
>> buffer which is uncalled for. It also causes visual disturbance as well
>> as asks Gnus to download the article while all the information required
>> is already available.
>
> Should be fixed now in git, please try it.

I tried the git version and it worked as expected.

>
>> Possible solution (not real patch):
>>
>> In Gnus summary buffer the header of each article is already downloaded
>> and can be obtained by (gnus-summary-article-header). To get the mid,
>> use (mail-header-id (gnus-summary-article-header)).
>
> I followed your suggestion, but only for when we are in the summary
> buffer, as I found out that the output of `gnus-summary-article-header'
> in the article buffer is not very reliable.

I feel there's something we can simplify. Also the old code for handling
gnus-article-mode moves the cursor around.

So I simplified org-gnus-store-link as follows:

(defun org-gnus-store-link ()
  "Store a link to a Gnus folder or message."
  (cond
   ((eq major-mode 'gnus-group-mode)
(let* ((group (cond ((fboundp 'gnus-group-group-name) ; depending on Gnus
 (gnus-group-group-name)) ; version
((fboundp 'gnus-group-name)
 (gnus-group-name))
(t "???")))
   desc link)
  (when group
(org-store-link-props :type "gnus" :group group)
(setq desc (org-gnus-group-link group)
  link desc)
(org-add-link-props :link link :description desc)
link)))

   ((memq major-mode '(gnus-summary-mode gnus-article-mode))
(let* ((group gnus-newsgroup-name)
   (header (with-current-buffer gnus-summary-buffer
 (gnus-summary-article-header)))
   (extra (mail-header-extra header))
   (from (mail-header-from header))
   (message-id (org-remove-angle-brackets (mail-header-id header)))
   (date (mail-header-date header))
   (to (cdr (assoc 'To extra)))
   (newsgroups (cdr (assoc 'newsgroup extra)))
   (x-no-archive (cdr (assoc 'x-no-archive extra)))
   (subject (mail-header-subject header))
   desc link)
  (org-store-link-props :type "gnus" :from from :subject subject
:message-id message-id :group group :to to)
  (setq desc (org-email-link-description)
link (org-gnus-article-link group newsgroups message-id 
x-no-archive))
  (org-add-link-props :link link :description desc)
  link

I tested this in my Emacs 2009-08-10 with the default Gnus. It seems to
work nicely. Could you test it as well?

Thanks.

Leo

-- 
Emacs uptime: 6 days, 23 hours, 16 minutes, 38 seconds


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Export full org-mode to CSV (not tables)

2009-08-24 Thread Simon Mullis
Hi All,

I now use org-mode for everthing I can.  Unfortunately, the rest of
the world is still stuck in Excel-land.

I have a long and detailed org file for each project arranged as follows:

* Priority 1:
**  Project: 
*** Number: 
*** Key1: 
*** Key2: 
*** Key3: 
* Priority 2:
**  Project: 
*** Number: 
*** Key1: 
*** Key2: 
*** Key3: 

and so on. There are multiple "Projects" per "Priority". There may be
multiple "Numbers" per "Project".

I'd like an easy way to export this data to an Excel table, or better yet, CSV.

So,

Priority,Project, Number, Key1, Key2, Key3
,, , , , ,
,, , , , ,

and so on

Ideally I'd like to do this from within org-mode. (Alternatively I can
just write some quick python (or whatever) to do this for me.)

Any ideas?

Thanks

SM


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: PATCH: proposed improvements to org-src-mode

2009-08-24 Thread Carsten Dominik

Hi Dan,

I am now finally looking at your patch.

A few questions:

On Aug 19, 2009, at 1:03 PM, Dan Davison wrote:


Dan Davison  writes:


Carsten Dominik  writes:


Hi Dan,

thank you for studying and describing these issues, and for  
proposing

a patch.


I have noticed a bug in the patch I proposed: the configuration of the
edit buffer for saving must be done only after C-c ', and not for
example when entering org-src-mode during HTML export. Here's the
revised patch (again, assuming org-edit-src-from-org-mode is a valid
test that C-c ' has just been done).

Dan

--8<---cut here---start->8---
diff --git a/lisp/org-src.el b/lisp/org-src.el
index 2a6c087..6ba58f5 100644
--- a/lisp/org-src.el
+++ b/lisp/org-src.el
@@ -113,7 +113,6 @@ but which mess up the display of a snippet in  
Org exported files.")


(defvar org-src-mode-map (make-sparse-keymap))
(define-key org-src-mode-map "\C-c'" 'org-edit-src-exit)
-(define-key org-src-mode-map "\C-x\C-s" 'org-edit-src-save)
(defvar org-edit-src-force-single-line nil)
(defvar org-edit-src-from-org-mode nil)
(defvar org-edit-src-picture nil)
@@ -168,7 +167,8 @@ the edited version."
(if (boundp 'org-edit-src-overlay)
(org-delete-overlay org-edit-src-overlay)))
  (kill-buffer buffer))
-   (setq buffer (generate-new-buffer "*Org Edit Src Example*"))
+   (setq buffer (generate-new-buffer
+		  (concat "*Org Src " (file-name-nondirectory buffer-file- 
name) "[" lang "]*")))

(setq ovl (org-make-overlay beg end))
(org-overlay-put ovl 'face 'secondary-selection)
(org-overlay-put ovl 'edit-buffer buffer)
@@ -186,8 +186,7 @@ the edited version."
'(display nil invisible nil intangible nil))
(org-do-remove-indentation)
(let ((org-inhibit-startup t))
- (funcall lang-f)
- (org-src-mode))


You are moving the call to org-src-mode only so that you have org-edit- 
src-from-org defined in the hook, right?



+ (funcall lang-f))
(set (make-local-variable 'org-edit-src-force-single-line) single)
(set (make-local-variable 'org-edit-src-from-org-mode) org-mode-p)
(when lfmt
@@ -201,6 +200,7 @@ the edited version."
(org-set-local 'org-edit-src-end-marker end)
(org-set-local 'org-edit-src-overlay ovl)
(org-set-local 'org-edit-src-nindent nindent)
+   (org-src-mode)
(and org-edit-src-persistent-message
 (org-set-local 'header-line-format msg)))
  (message "%s" msg)
@@ -400,12 +400,13 @@ the language, a switch telling of the content  
should be in a single line."

(defun org-edit-src-exit ()
  "Exit special edit and protect problematic lines."
  (interactive)
-  (unless (string-match "\\`*Org Edit " (buffer-name (current- 
buffer)))
-(error "This is not an sub-editing buffer, something is  
wrong..."))

+  (unless org-edit-src-from-org-mode
+(error "This is not a sub-editing buffer, something is  
wrong..."))

  (let ((beg org-edit-src-beg-marker)
(end org-edit-src-end-marker)
(ovl org-edit-src-overlay)
(buffer (current-buffer))
+   (buffer-file-name nil)


What is the above line for?


(nindent org-edit-src-nindent)
code line)
(untabify (point-min) (point-max))
@@ -444,7 +445,6 @@ the language, a switch telling of the content  
should be in a single line."

(switch-to-buffer (marker-buffer beg))
(kill-buffer buffer)
(goto-char beg)
-(org-delete-overlay ovl)


Why are you removing this line?


(delete-region beg end)
(insert code)
(goto-char beg)
@@ -464,6 +464,19 @@ the language, a switch telling of the content  
should be in a single line."

(goto-char (min p (point-max)))
(message (or msg ""

+(defun org-src-mode-configure-edit-buffer ()
+  (when org-edit-src-from-org-mode
+(setq buffer-offer-save t)
+(setq buffer-file-name
+ (concat (buffer-file-name (marker-buffer org-edit-src-beg-marker))
+ "[" (buffer-name) "]"))
+(set (if (featurep 'xemacs) 'write-contents-hooks 'write- 
contents-functions)

+'(org-edit-src-save))
+(org-add-hook 'kill-buffer-hook
+		  '(lambda () (org-delete-overlay org-edit-src-overlay)) nil  
'local)))

+
+(org-add-hook 'org-src-mode-hook 'org-src-mode-configure-edit-buffer)
+
(provide 'org-src)

;; arch-tag: 6a1fc84f-dec7-47be-a416-64be56bea5d8
--8<---cut here---end--->8---



I believe an important addition to your patch would be to

   (set-buffer-modified-p nil)

when entering org-src-mode.  Otherwise, if I exit Emacs and reply "y"  
to all safe-this-buffer questions, then I still get a complaint about  
a buffer with changes


Thanks!




- Carsten



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mai

Re: [Orgmode] Accidentally holding down LEFT arrow in Agenda

2009-08-24 Thread Manuel Hermenegildo

 > Another possibility would be to more the org-agenda-later/earlier from  
 > the cursor keys and put them onto some other keys.  I do sometimes  
 > think myself that it was a mistake to use the Cursor keys for this  
 > functionality..

For what it's worth I personally remap "n" and "p" to move from one
week (day/month/...)  to the other and use "C-n" and "C-p" to move
within a week (day/month/...) as in a normal buffer because for me
this merges better with the rest of the flow in emacs, i.e., I
basically do not use the arrow keys for movement (too far from my
fingers! ;-)).  --Manuel

-- 



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Making an org file more readable

2009-08-24 Thread PT
Nick Dokos  hp.com> writes:
> 
> You *can* get an empty line between two headers by having two empty lines at
> the end of the first section: the first empty line is considered part of
> the section and is folded with it, but the second one remains. E.g.

One more thing for those who don't know this:

I took a look at the relevant part of outline.el and turns out
one empty line is enough if outline-blank-line is set to t.


It's almost perfect. It would be perfect if outline would leave
alone all empty lines after the content, so if I have e.g. two
empty lines there then it would fold non-empty lines only leaving
both empty lines visible, so that I could use as many
empty lines for separation as I want.




___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Accidentally holding down LEFT arrow in Agenda

2009-08-24 Thread Carsten Dominik


On Aug 23, 2009, at 8:45 PM, Richard Lewis wrote:


Hi there,

This is sort of a bug query. Occasionally, I accidentally hold down
the LEFT cursor key in Agenda mode, hoping to move the cursor left,
but forgetting that it actually moves to next week.

This is sort of a nuisance because it renders every week I've
accidentally requested (I think) and takes ages.

I know the best solution is for me to be more careful, but I wonder if
any alterations could be made to (org-agenda-later) (possibly) to
detect multiple calls or something?


You can interrupt the long wait with C-g.

Another possibility would be to more the org-agenda-later/earlier from  
the cursor keys and put them onto some other keys.  I do sometimes  
think myself that it was a mistake to use the Cursor keys for this  
functionality..


- Carsten




___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Gnus link bug

2009-08-24 Thread Christopher Suckling
On Mon, 24 Aug 2009 02:32:38 +0800, Bastien  
wrote:

>
>> I haven't used org to store links from Gnus for almost two years and
>> today I tried it again and found at least one annoying bug.
>>
>> In the summary buffer, calling org-store-link will display the article
>> buffer which is uncalled for. It also causes visual disturbance as well
>> as asks Gnus to download the article while all the information required
>> is already available.
>
> Should be fixed now in git, please try it.
>
>> Possible solution (not real patch):
>>
>> In Gnus summary buffer the header of each article is already downloaded
>> and can be obtained by (gnus-summary-article-header). To get the mid,
>> use (mail-header-id (gnus-summary-article-header)).
>
> I followed your suggestion, but only for when we are in the summary
> buffer, as I found out that the output of `gnus-summary-article-header'
> in the article buffer is not very reliable.
>
>> Could Carsten or Tassilo use that in org-gnus? Thank you.
>
> Please Gnus army test it!
>

Works great:

OS X 10.5.8
Emacs 23.1.50
Gnus v5.13
Org-mode 6.29trans

Best, Christopher


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Accidentally holding down LEFT arrow in Agenda

2009-08-24 Thread Richard Lewis
Hi there,

This is sort of a bug query. Occasionally, I accidentally hold down
the LEFT cursor key in Agenda mode, hoping to move the cursor left,
but forgetting that it actually moves to next week.

This is sort of a nuisance because it renders every week I've
accidentally requested (I think) and takes ages.

I know the best solution is for me to be more careful, but I wonder if
any alterations could be made to (org-agenda-later) (possibly) to
detect multiple calls or something?

Best,
Richard


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode