Re: [Orgmode] Re: The way tags are exported in HTML (without colons!) -- no workaround for searches!

2011-02-04 Thread Bastien
Jeff Horn jrhorn...@gmail.com writes:

 2011/2/3 Sébastien Vauban wxhgmqzgw...@spammotel.com:
 What about really adding the colon marker, so that one can easily find tags 
 in
 the exported file?

 Use the CSS content property.

I think the column belongs to Org's internal, so I second Jeff's
proposal here.

-- 
 Bastien

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


[Orgmode] Re: The way tags are exported in HTML (without colons!) -- no workaround for searches!

2011-02-04 Thread Sébastien Vauban
Hi Jeff,

Jeff Horn wrote:
 2011/2/3 Sébastien Vauban wxhgmqzgw...@spammotel.com:
 What about really adding the colon marker, so that one can easily find tags 
 in
 the exported file?

 Use the CSS content property.

 http://www.w3schools.com/Css/pr_gen_content.asp

If you read my post of [2010-11-25 Thu 11:34] in this thread, you'll see I did
try that, but it's not working for the searches:

 * Workaround?

 Maybe adding a colon before and after the tag would help? CSS to the
 rescue:

 #+begin_src
 .tag:before {
 content: :;
 }

 .tag:after {
 content: :;
 }
 #+end_src

 Answer is: no! In the HTML display, we now do well see a :me:, but
 searches on that same string fail to find it.

 * Solution?

 - Really add a colon marker in the exported file (to HTML)

Best regards,
  Seb

-- 
Sébastien Vauban


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


Re: [Orgmode] Re: Small bug in table editing

2011-02-04 Thread Christopher Witte
I tend to disagree. I feel that anything that breaks the semantic
model of enter = insert new line at point is a bug.  Particularly if
it results in the loss of data.  But I can be persuaded otherwise.

Cheers
Chris


On 3 February 2011 19:27, Achim Gratz strom...@nexgo.de wrote:
 Christopher Witte ch...@witte.net.au writes:
 and then decided I wanted to go back and put a horizontal line after
 the heading.  So I want to the start of the line after the heading and
 entered |-

 Not really a bug...anything past '|-' is considered garbage.
 Try 'C-c -' instead, or open a new line when you enter '|-'.


 Achim.
 --
 +[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+

 Factory and User Sound Singles for Waldorf rackAttack:
 http://Synth.Stromeko.net/Downloads.html#WaldorfSounds


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


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


[Orgmode] Re: Fontification of blocks

2011-02-04 Thread Sébastien Vauban
Hi,

As spotted by Eric Fraga:

Sébastien Vauban wrote:
 --- a/lisp/org-faces.el
 +++ b/lisp/org-faces.el
 @@ -1,6 +1,6 @@
  ;;; org-faces.el --- Face definitions for Org-mode.
  
 -;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010
 +;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
  ;;   Free Software Foundation, Inc.
  
  ;; Author: Carsten Dominik carsten at orgmode dot org
 @@ -511,6 +511,16 @@ follows a #+DATE:, #+AUTHOR: or #+EMAIL: keyword.
:group 'org-faces
:version 22.1)
  
 +(defface org-block-background
 +  '((t (:background #EA)))
 +  Face used for the source block background.)
 +
 +(org-copy-face 'org-meta-line 'org-block-begin-line
 +  Face used for the line delimiting the begin of source blocks.)
 +
 +(org-copy-face 'org-meta-line 'org-block-begin-line
 +  Face used for the line delimiting the end of source blocks.)
 +
  (defface org-verbatim
(org-compatible-face 'shadow
  'class color grayscale) (min-colors 88) (background light))

you should read the following at the 2nd =org-copy-face= command:

 +(org-copy-face 'org-meta-line 'org-block-end-line
 +  Face used for the line delimiting the end of source blocks.)

ie, s/begin/end/

I guess it worked for me (I restarted completely Emacs for the test), as that
face is defined in my color-theme now. So, it was created anyway.

Corrected patch is attached to this post.

Best regards,
  Seb

-- 
Sébastien Vauban
diff --git a/lisp/org-faces.el b/lisp/org-faces.el
index c237a0e..2e9d2a3 100644
--- a/lisp/org-faces.el
+++ b/lisp/org-faces.el
@@ -1,6 +1,6 @@
 ;;; org-faces.el --- Face definitions for Org-mode.
 
-;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010
+;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
 ;;   Free Software Foundation, Inc.
 
 ;; Author: Carsten Dominik carsten at orgmode dot org
@@ -511,6 +511,16 @@ follows a #+DATE:, #+AUTHOR: or #+EMAIL: keyword.
   :group 'org-faces
   :version 22.1)
 
+(defface org-block-background
+  '((t (:background #EA)))
+  Face used for the source block background.)
+
+(org-copy-face 'org-meta-line 'org-block-begin-line
+  Face used for the line delimiting the begin of source blocks.)
+
+(org-copy-face 'org-meta-line 'org-block-end-line
+  Face used for the line delimiting the end of source blocks.)
+
 (defface org-verbatim
   (org-compatible-face 'shadow
 'class color grayscale) (min-colors 88) (background light))
diff --git a/lisp/org.el b/lisp/org.el
index 8acf5a9..70fda86 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -1,6 +1,6 @@
 ;;; org.el --- Outline-based notes management and organizer
 ;; Carstens outline-mode for keeping track of everything.
-;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010
+;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
 ;;   Free Software Foundation, Inc.
 ;;
 ;; Author: Carsten Dominik carsten at orgmode dot org
@@ -5146,16 +5146,19 @@ will be prompted for.
 	; for end_src
 	  (cond
 	   ((and lang org-src-fontify-natively)
-		(org-src-font-lock-fontify-block lang block-start block-end))
+		(org-src-font-lock-fontify-block lang block-start block-end)
+(overlay-put (make-overlay beg1 block-end)
+ 'face 'org-block-background))
 	   (quoting
-		(add-text-properties beg1 (+ end1 1) '(face
-		   org-block)))
+		(add-text-properties beg1 (+ end1 1) '(face org-block)))
 	; end of source block
 	   ((not org-fontify-quote-and-verse-blocks))
 	   ((string= block-type quote)
-		(add-text-properties beg1 end1 '(face org-quote)))
+		(add-text-properties beg1 (1+ end1) '(face org-quote)))
 	   ((string= block-type verse)
-		(add-text-properties beg1 end1 '(face org-verse
+		(add-text-properties beg1 (1+ end1) '(face org-verse
+  	  (add-text-properties beg beg1 '(face org-block-begin-line))
+  	  (add-text-properties (1+ end) (1+ end1) '(face org-block-end-line))
 	  t))
 	   ((member dc1 '(title: author: email: date:))
 	(add-text-properties
@@ -5171,7 +5174,7 @@ will be prompted for.
 	   ((not (member (char-after beg) '(?\  ?\t)))
 	;; just any other in-buffer setting, but not indented
 	(add-text-properties
-	 beg (match-end 0)
+	 beg (1+ (match-end 0))
 	 '(font-lock-fontified t face org-meta-line))
 	t)
 	   ((or (member dc1 '(begin: end: caption: label:
___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: Column view and subtask overview interaction

2011-02-04 Thread Bastien
Hi James and Bernt,

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

 ** [1/5[1/5[1/5[1/5[1/5[1/5]5]
 *** STARTED Service Catalog Definition
 :Barbara:
 *** DONE Application Inventory
 :Brian:Chris:
 - State DONE   from TODO   [2010-12-02 Thu 22:52]
 *** TODO Policies
 :Barbara:
 *** STARTED Projects In Flight
 :All:
 *** TODO Future Projects
 :All:

 When I first ran into this earlier today I had manipulated about 30
 subtasks clobbering 5 different parent tasks before I noticed when I
 exited column view. I think I'm more frustrated by not knowing enough
 to help find a fix.

 I can confirm this behaviour and it existed all the way back to at least
 release 4.76.  I didn't try anything older than that.

I just pushed a fix for this.

In column view, when a todo-state change triggered an update of the todo
statistics, org-update-parent-todo-statistics was not able to update the
stats cookie correctly.

Thanks to James for the precise report and to you for the confirmation!

-- 
 Bastien

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


Re: [Orgmode] Re: Repeating TODO are shown every day in the agenda

2011-02-04 Thread Bastien
Bastien bastien.gue...@wikimedia.fr writes:

 Detlef Steuer detlef.ste...@gmx.de writes:

 And if this is not currently possible, that would be a welcome
 addition to org-mode's features!  I definitely have use cases for such
 a setting.

 The attached patch implements it.

I've now merged this change.

Thanks for those who tested it!

-- 
 Bastien

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


Re: [Orgmode] [OT] Taskwarrior, nice GTD-oriented CLI thing

2011-02-04 Thread Eric S Fraga
John Hendy jw.he...@gmail.com writes:

[...]

 Perhaps a nice tradeoff would be to get something from the command line that
 could work with one's remember template via the command line. This is

yes, using org-capture does help a lot and combining this with
emacsclient does give the ability to do command line capturing quite nicely.

 these kinds of notes... faster than (for me) Ctrl+Alt+E (emacs), C-x C-f
 file.org, M-S- (eof), type * whatever, C-c C-t, C-x C-s, C-c C-x.

I think this is much more convoluted than you need; if you have
org-capture set up appropriately, the following would be equivalent:

Ctrl+Alt+E (emacs), C-c c X whatever, C-c C-c, C-c C-x !

where X would be the specific capture task to perform (such as t for
todo etc).

 Imagine being able to pop open a terminal and type '$ org-todo call so and
 so on friday ~/org/task.org' and be done :)

I can already do:

: emacsclient -e '(org-capture nil t)'

to invoke my todo capture template.  I have not yet figured out if one
could automatically specify the text to go with any particular capture
template, however.  A quick look at the code didn't help me.


-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
: using Org-mode version 7.4 (release_7.4.308.g809b5)

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


[Orgmode] More entries able to export to icalendar format

2011-02-04 Thread Niels Giesen

When exporting to icalendar format, not all of the %%(diary-* )
style entries are supported.  

It concerns the functions =icalendar--convert-float-to-ical= and
=icalendar--convert-date-to-ical= in icalendar.el. 

I took a stab at ameliorating =icalendar--convert-float-to-ical=, and
would like your early comments before going further.

Some issues arised when implementing:

1. What start date should be used? It now uses todays date, and
   EXDATEs that date again when it does not conform to the given rule.
   This means that when updating a calendar via this method, all past
   days are lost. This is probably what I would want, as I would be
   more interested in the reminders than in history. An alternative
   might be to set a date in the past, e.g. 1-1-1970. I believe there
   is no way in the diary entry itself to set start and end days for
   this. In the comments in =icalendar.el= it says
   #+begin_src emacs-lisp
 ;;   Please note:
 ;; - Diary entries which have a start time but no end time are assumed to
 ;;   last for one hour when they are exported.
 ;; - Weekly diary entries are assumed to occur the first time in the first
 ;;   week of the year 2000 when they are exported.
 ;; - Yearly diary entries are assumed to occur the first time in the year
 ;;   1900 when they are exported.
   #+end_src
   It seems all options are a bit arbitrary. Too bad one cannot
   specify the start (and end) date in the sexp itself.
2. I do not see a way in the icalendar specs to implement the day
   argument to =diary-float=.
3. UIDs are generated by icalendar.el while we probably would like to
   use the UIDs org-mode generates, as that would allow
   synchronization. This problem holds true for other already working
   diary-* entries as well. To tackle this, I also hacked at
   =org-print-icalendar-entries= to add the UID as a text property and
   =icalendar--create-uid= to read it out if existing. Although it
   works, it does feel kinda hackish.
4. Above UID solution leaves a problem when there are multiple
   timestamps set for an entry. For instance, part my job is to act
   as a helpdesk every week on wednesday *and* on each third thursday
   of the month (yes, sad sad me), so I like an entry like
   #+begin_src org
 ,** Helpdesk
 ,  :PROPERTIES:
 ,  :ID:   4705-5861-79a741ea-8408-c3236f5a472b
 ,  :END:
 ,  2011-02-02 wo +1w
 ,  %%(diary-float t 4 3)
   #+end_src
  To overcome this problem one could
   - use two separate entries (ugly, but effective and easy
 (out-of-the-box), also probably the best way to go for a two-way
 sync),
   - find some way to merge ical entries with the same UID, or
   - add something (an index or so for each date entry) to the UID
   - 
5. I wouldn't know if or how to accomodate for timezones.

As I have been doing my hacks via litterate programming style in an
org-mode file, true patches are lacking at the moment. I hope you'll
excuse me the ensuing longevity of this post.

I am interested in your thoughts, especially on how this may best work
with a two-way sync system.

The function that started it: =icalendar--convert-float-to-ical=

#+begin_src emacs-lisp :tangle yes
  (defun icalendar--convert-float-to-ical (nonmarker entry-main)
Convert float diary entry to icalendar format -- partially unsupported!

FIXME! DAY from diary-float yet unimplemented.

NONMARKER is a regular expression matching the start of non-marking
entries.  ENTRY-MAIN is the first line of the diary entry.
(if (string-match (concat nonmarker
  %%\\((diary-float \\([^)]+\\))\\s-*\\(.*?\\)\\) 
?$)
  entry-main)
(with-temp-buffer
  (insert (match-string 1 entry-main))
  (goto-char (point-min))
  (let* ((sexp (read (current-buffer)))
 (month (nth 1 sexp))
 (dayname (nth 2 sexp))
 (n (nth 3 sexp))
 (day (nth 4 sexp))
 (summary (buffer-substring (point) (point-max
(list sexp month dayname n day summary)

(when day
  (progn
(icalendar--dmsg diary-float %s entry-main)
(error Don't know if or how to implement day in 
`diary-float')))
  
(list (concat
   ;;Start today:
   \nDTSTART;
   VALUE=DATE:
   (format-time-string %Y%m%d (current-time))
   ;;BUT remove today if diary-float
   ;;expression does not hold true for today:
   (when
   (null (let ((date (calendar-current-date)))
   (diary-float month dayname n)))
 (concat 
  \nEXDATE;
  VALUE=DATE:
  (format-time-string %Y%m%d (current-time
   \nRRULE:
 

Re: [Orgmode] Bug: startup hidestars also hides the point (square at point) [6.33x]

2011-02-04 Thread Arne Babenhauserheide
Hi Bastien, 

On Wednesday 02 February 2011 23:54:40 Bastien wrote:
 Arne Babenhauserheide arne_...@yahoo.de writes:
  Situation: A file with #+STARTUP: hidestars
  
  Expected: The first stars are hidden, but the marker which shows the
  point is visible (since the variable only says hide *stars*).
  
  Real result: The stars are hidden, but when the point is on any of the
  hidden stars, I don't see the marker which shows the point.
  
  Problem: Due to the point being inivisible, I often stumble through the
  file, because I don't know where the point is.
 
 I can't reproduce this with a recent version of Org (7.0).  I suggest
 you upgrade and report if this persists.

Thanks for doublechecking. I now tested it again, and this only happens when 
used in a shell (i.e. in a KDE Konsole) where the point does not blink. 

I use org 7.4

Best wishes, 
Arne

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


[Orgmode] org-git-link does not support locational information within file

2011-02-04 Thread Gregor Kappler
Hi org-moders,

I started using orgmode a while ago - and it revoluzionized my
workflow.  I could not keep up with my work without it!  Thanks for
the most versatile tool I ever used and still learn!

I recently found out about org-git-link 
(http://orgmode.org/worg/org-contrib/org-git-link.html), 
and realized it would be near perfect for my research usecase:

** Use Case: Project workflow with moving files, linked to in orgmode
1. Often projects do not arrive with a defined structure: In the
   initial phase I might get several data files and other documents -
   with little to no long-term specification.  Often it is unclear
   whether the files will evolve into some bigger coauthoring project
   involving data analyzes.
2. Consequently, in the initial phase of a project, my file management
   often is messy.  Only within my org files the structure is kept
   clean, respectively is evolving into an appropriate structure.  (I
   heavily use orgmode linking of files and mails.)  Also, (nearly)
   all files are kept in git.
3. I might be tidying file system folders several times during a
   project.
   1. This breaks links.
   2. I thought storing links to revisions of files would solve broken
  links, as links to moved files can be recovered with git.

I guess this might be a scenario some fellow org-moders are facing?

** Shortcomings of git-link in current org HEAD
Yet, org-git-link currently is too greedy for my daily use:
 1. they kill org-links for org headings, if the org files are
versioned in a git repository (and all of mine are!) and
 2. they kill in-file-search information for versioned non-org files.

** My ugly hack
My intermediate solution is to remove/add the git-link hook as
appropriate with
(add-hook 'org-store-link-functions 'org-git-store-link)
(remove-hook 'org-store-link-functions 'org-git-store-link)

** Proposal of a better solution
I think a better solution for me would be:
 1. use org-git-store-link.
 2. use git versioned files transparently, i.e. org-git-store-link
should support search (org-ids and text files) in linked git
revisions of files.
 3. define an interactive function that can update the revision
information of a link at mark to the current branch head of the
file (so I can update all links to new FS folder structure.)


I am still lame at elisp - so my implementation skills are
limited. With the great work in org-git-link all backend stuff seems
there, only needing more glue. Any hints how to achieve this would be
very welcome!


Thanks, Gregor


-- 
--

Dr. Gregor Kappler

Fakultät für Psychologie 
Institut für Entwicklungspsychologie und 
Psychologische Diagnostik
http://www.univie.ac.at/Psychologie

Universität Wien
Liebiggasse 5
A-1010 Wien
mail: gregor.kapp...@univie.ac.at
tel: +43 1 4277 47866

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


Re: [Orgmode] Automatically folding latex environment

2011-02-04 Thread Marvin Doyley
Thanks,

This works like a charm

cheers
M

On Thu, Feb 3, 2011 at 9:22 AM, Bastien bastien.gue...@wikimedia.fr wrote:

 Marvin Doyley marvin...@gmail.com writes:

  Is there a way to tell org to fold Latex environments (i.e., #
  +begin_latex  #+end_latex) automatically at start-up ?

 Yes.

  (setq org-hide-block-startup t)

 Or set this in an Org buffer:

  #+STARTUP: hideblocks

 This is a FAQ, I've added an entry to Worg/org-faq.org.

 HTH,

 --
  Bastien

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


[Orgmode] window rearrangements when exporting to pdf

2011-02-04 Thread Stephen Eglen
I've found the following odd behaviour in windows being re-arranged
within a frame.  It is not bothering me too much (yet), but I thought
I'd report it in case others see it.

If I start emacs, and maximise it on my desktop machine, it is wide
enough to allow two full windows side-by-side (i.e. left-to-right) when
I do C-x 3.

(window-width) reports 103 in each window.

If I view say *scratch* in my left window, and an org buffer in the
right window, then do C-c C-e, the org buffer is then shown in the
left window, and the temp buffer (*Org Export/Publishing Help*) appears
in the right window.  So, the org buffer temporarily switches from left
to right.  When I then hit say 'd' to complete the export (to tex-pdf),
the original window configuration (*scratch* in left, org in right)
returns.

Is this desired behaviour?  It seems a little odd that the org buffer
would be pushed temporarily into a different window whilst the help is
displayed.  I would expect the help buffer to appear in the left window.
(If I start with the org buffer in the left window, the temp
buffer appears in the right window, as expected.)



(emacs-version)
GNU Emacs 23.2.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.20.0)
 of 2010-05-24 on maps

My guess would be that org-fit-window-to-buffer is doing this.

Stephen

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


[Orgmode] [PATCH] make export dispatcher go away promptly

2011-02-04 Thread Dan Davison
Following on from Stephen's recent post, a
thing-that-slightly-bothers-me is the way the export dispatcher window
doesn't go away until export is complete. I've briefly looked at the
code twice now and it wasn't obvious to me why the save-window-excursion
(line 941 org-exp.el) wasn't already doing what I wanted. However, the
change below seems to have the effect I wanted. While this particular
solution may be a hack, I wonder whether people would prefer its
behaviour? E.g. try exporting this:

#+title: title

#+begin_src sh :exports results
sleep 5  echo hello
#+end_src

export can often take several seconds and it's nice to be able to zone
out looking at your org document rather than the dispatcher window.

Modified lisp/org-exp.el
diff --git a/lisp/org-exp.el b/lisp/org-exp.el
index 13fa549..3d291e2 100644
--- a/lisp/org-exp.el
+++ b/lisp/org-exp.el
@@ -963,6 +963,7 @@ value of `org-export-run-in-background'.
  (setq r1 (read-char-exclusive)))
  (error No enclosing node with LaTeX_CLASS or EXPORT_FILE_NAME)
  )
+(redisplay)
 (and bpos (goto-char bpos))
 (setq r2 (if ( r1 27) (+ r1 96) r1))
 (unless (setq ass (assq r2 cmds))


(I see that (sit-for .0001) is used in a couple of places in Org for
this effect, so maybe that should be used instead.)

Dan



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


[Orgmode] silent evaluation during export

2011-02-04 Thread Andreas Leha
Hi all,

I have several code blocks that must be evaluated during export, but
silently, i.e. I do not want code/output/anything to appear in the export.

How do I achieve this?  The obvious :export none also disables evaluation.

Regards,
Andreas



smime.p7s
Description: S/MIME Cryptographic Signature
___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: [OT] Taskwarrior, nice GTD-oriented CLI thing

2011-02-04 Thread Matt Lundin
Torsten Wagner torsten.wag...@gmail.com writes:

 Actually, this comes down to the point which was discussed already
 sometimes. Creating a org-mode API which could be accessed from
 CLI-tools was well as from other programs (Thunderbird and Firfox
 plugins come to my mind but Conky and other programs might use it to
 extract data from org-mode too.)

+1 

Perhaps the python parsers discussed in previous threads would provide a
nice starting point. Though one might require something that could parse
org-files a bit more quickly. :)

I imagine one problem here would be potential IO conflicts if one has
org files open in emacs and simultaneously trieds to access them from
the command line, API, etc.

- Matt



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


[Orgmode] Re: window rearrangements when exporting to pdf

2011-02-04 Thread Lawrence Mitchell
Stephen Eglen wrote:

[...]


 (emacs-version)
 GNU Emacs 23.2.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.20.0)
  of 2010-05-24 on maps

 My guess would be that org-fit-window-to-buffer is doing this.

It seems more likely that the call to delete-other-windows in
org-export is the cause of the problem.  Can you try removing it
to see what happens.  I presume it is there in case you have an
Org buffer and /many/ other small buffers, in that case you don't
want to pop up the help message in one of the small buffers,
because you might not see it all.


Lawrence
-- 
Lawrence Mitchell we...@gmx.li


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


[Orgmode] Re: inline code block results

2011-02-04 Thread Andreas Leha
Hi all,

just found out: the inline block works when I explicitly state :results
replace.

So both questions from the previous email collapse to: why is that
necessary?

Regards,
Andreas



Am 04.02.2011 17:13, schrieb Andreas Leha:
 Hi all,

 I have two questions:

 (1)  How do I get resuts from code block evaluation (e.g. a single
 number) inline into text during (LaTeX-)export?  Something like:  We use
 a level of #+call: getLevel()

 (2)  Why do these two subheadings produce different output during
 (LaTeX-)export?
 * Test
 ** Normal source code block
The number is
#+srcname: success_parameter_one
#+begin_src R :session :results value :exports results
  tmp - rnorm(1)
#+end_src

 ** Inline source code block
The number is src_R[:session :results value :exports results]{tmp -
 rnorm(1)}


 Thanks in advance!
 Andreas

   

-- 
Andreas Leha

Universitätsmedizin Göttingen
Abteilung Medizinische Statistik
Humboldtallee 32
37073 Göttingen

Tel: +49 (0)551 39-10710
Fax: +49 (0)551 39-4995

http://www.ams.med.uni-goettingen.de/amsneu/leha.html



University Medical Center Göttingen
Department for Medical Statistics
Humboldtallee 32
37073 Göttingen
Germany

Phone: +49 (0) 551 39-10710
Fax: +49 (0) 551 39-4995

http://www.ams.med.uni-goettingen.de/amsneu/leha-en.html




smime.p7s
Description: S/MIME Cryptographic Signature
___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] [babel] How to kill two birds with one stone?

2011-02-04 Thread Sébastien Vauban
#+TITLE: Document a shell script as separate blocks
#+DATE:  2011-02-04
#+LANGUAGE:  en_US

* Abstract

When writing shell scripts, I'd like to kill *two* birds with one Babel stone:

- Be able to *execute the script in situ*, so that I get a copy of the results
  stored in (and versioned with) my documentation.

- Be able to *chain the code blocks*, so that I tangle a natural script into
  a file for later execution.

I guess I currently miss some points in order to reach that goal in a clean
way. Could you give me advice on how to get a step further down the route?

* Sample code

For the sake of clarity, let's take a simple problem: I'd like to generate a
DOT graph of links between all files from a directory tree.

The procedure:

1. (Recursively) list all files inside the directory.

2. For each file, (recursively) search for its name referenced in all the
   files.

3. Generate a DOT representation of the link between files.

** List all files under current directory

#+srcname: dw-file-tree
#+begin_src sh :results output
cd ~/Some-Project-Dir
find . -type f -print | grep -v .svn | head -n 5
#+end_src

#+results: dw-file-tree
#+begin_example
./.cvsignore
./charge_dim
./charge_fct
./compte
./controle_config
#+end_example

Here, I voluntary limit the number of results to the first 5 files, for the
compactness of this example. This sample does not include any file from
subdirectories, but it doesn't matter.

** Search recursively for anything about a file

Search through all files (ignoring =.svn= directories) for any reference to
filename given as parameter.

#+srcname: search-files-pointing-to-this-file
#+begin_src sh :results output :var f=charge_dim
cd ~/Some-Project-Dir
find . -not \( -name .svn -prune \) -type f -print0 |\
xargs -0 grep -i --files-with-matches $f
#+end_src

#+results: search-files-pointing-to-this-file
#+begin_example
./.cvsignore
./charge_dim
./compte
./IFP/Chrg_dim
./IFP/Chrg_dim.avant_simple_recovery_mode_2008_03_12
./principal.env
./29Aalst/Chrg_dim
./29Aalst/Chrg_dim_interactif
./29Aalst/Publ_dim_interactif
#+end_example

HERE, I'M GIVING A FILENAME AS DEFAULT VALUE OF =f= IN ORDER TO SEE A SAMPLE
RESULTS.

** Convert to a DOT representation

For every file pointing to the file given in parameter, generate an arrow
(edge) in DOT representation.

#+srcname: dot-arrow-from-files-pointing-to-this-file
#+begin_src sh :results output :var f=charge_dim :var 
data=search-files-pointing-to-this-file
for i in $(echo $data); do echo $(basename $i) - $f; done
#+end_src

#+results: dot-arrow-from-files-pointing-to-this-file
#+begin_example
.cvsignore - charge_dim
charge_dim - charge_dim
compte - charge_dim
Chrg_dim - charge_dim
Chrg_dim.avant_simple_recovery_mode_2008_03_12 - charge_dim
principal.env - charge_dim
Chrg_dim - charge_dim
Chrg_dim_interactif - charge_dim
Publ_dim_interactif - charge_dim
#+end_example

HERE, I'M WORKING GIVING ONCE AGAIN THE SAME DEFAULT VALUE FOR TESTING (AND
DOCUMENTATION) PURPOSE.

* Problem

All of the above nicely answer my first goal (Be able to execute the script
in situ, so that I get a copy of the results stored in my documentation).

It does not allow for the second one: *how to chain the calls together*?

For example, just for chaining steps 2 and 3 (the easier to chain, I think),
I'd like to be able to write something like this:

#+srcname: search-links-and-generate-dot-arrow
#+begin_src sh :results output :var f=charge_dim :var 
data=search-files-pointing-to-this-file :noweb yes
for i in (
search-files-pointing-to-this-file);
do echo $(basename $i) - $f; done
#+end_src

#+results: search-links-and-generate-dot-arrow

But it yields an error:

#+begin_src text :eval no
sh: line 14: syntax error near unexpected token `('
sh: line 14: `for i in ('
#+end_src

Note, in the latter code block, that I did not even tried to really chain
steps 2 and 3: I'm rewriting step 3, including step 2 inside it.

*I certainly miss a smarter way* to achieve the above.

Quite important as well, is that the tangled file seems natural to read (for
someone that would not read it from the Org file). This means we would have to
minimize the use of echo and tee commands, among others -- but that's a
nice to have.

Do you see my point?

Do you have ideas on how to go that way?

Best regards,
  Seb

-- 
Sébastien Vauban


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


[Orgmode] Re: silent evaluation during export

2011-02-04 Thread Dan Davison
Andreas Leha andreas.l...@med.uni-goettingen.de writes:

 Hi all,

 I have several code blocks that must be evaluated during export, but
 silently, i.e. I do not want code/output/anything to appear in the export.

 How do I achieve this?  The obvious :export none also disables evaluation.

Hi Andreas,

:exports results :results silent

Dan




 Regards,
 Andreas

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

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


[Orgmode] Preview link to text file inline?

2011-02-04 Thread Piter_
Hi all.
Preview link to text file inline? Is it possible in orgmode?
Thanks.
Petro

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


Re: [Orgmode] [OT] Taskwarrior, nice GTD-oriented CLI thing

2011-02-04 Thread Christopher Allan Webber
Dbus bindings?

Torsten Wagner torsten.wag...@gmail.com writes:

 Hi Marcelo,

 Emacs can run as a dameon and as that you could access it via
 emacsclient. What is needed is a nice interface to allow to send
 simple requests to insert and fetch data from org-mode. Some of the
 org-mode function might do this already, however, I guess a decent
 layer which hides the complex org-mode routines and provides simple to
 use in- and output functions might be more effective.

 Greetings

 Totti

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


-- 
퓒퓱퓻퓲퓼퓽퓸퓹퓱퓮퓻 퓐퓵퓵퓪퓷 퓦퓮퓫퓫퓮퓻

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


[Orgmode] inline code block results

2011-02-04 Thread Andreas Leha
Hi all,

I have two questions:

(1)  How do I get resuts from code block evaluation (e.g. a single
number) inline into text during (LaTeX-)export?  Something like:  We use
a level of #+call: getLevel()

(2)  Why do these two subheadings produce different output during
(LaTeX-)export?
* Test
** Normal source code block
   The number is
   #+srcname: success_parameter_one
   #+begin_src R :session :results value :exports results
 tmp - rnorm(1)
   #+end_src

** Inline source code block
   The number is src_R[:session :results value :exports results]{tmp -
rnorm(1)}


Thanks in advance!
Andreas



smime.p7s
Description: S/MIME Cryptographic Signature
___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] silent evaluation during export

2011-02-04 Thread Erik Iverson

Andreas,

This may help, but I'm not sure what language you're using.
I was using in this discussion.

http://www.mail-archive.com/emacs-orgmode@gnu.org/msg29333.html

The upshot from that thread was that by including a :session
argument, you guarantee that the code runs on export.

--Erik

Andreas Leha wrote:

Hi all,

I have several code blocks that must be evaluated during export, but
silently, i.e. I do not want code/output/anything to appear in the export.

How do I achieve this?  The obvious :export none also disables evaluation.

Regards,
Andreas





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


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


Re: [Orgmode] iimage and eps?

2011-02-04 Thread Piter_
I have activated iimode as desribed here:
http://orgmode.org/worg/org-configs/org-config-examples.html
It works with png images but does not work with eps. May be it should not :(
Thanks.
Petro.

On Wed, Feb 2, 2011 at 11:54 AM, Bastien bastien.gue...@wikimedia.fr wrote:
 Hi Piter,

 Piter_ x.pi...@gmail.com writes:

 Can I display eps images using iimage trick?

 Please give us more information: what did you try?  How did it fail?

 Thanks,

 --
  Bastien


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


[Orgmode] Re: Small bug in table editing

2011-02-04 Thread Achim Gratz
Christopher Witte ch...@witte.net.au writes:
 I tend to disagree. I feel that anything that breaks the semantic
 model of enter = insert new line at point is a bug.

Then don't use org-mode tables, because enter has different (and at
least to me) more useful semantics there.


Achim.
-- 
+[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+

DIY Stuff:
http://Synth.Stromeko.net/DIY.html


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


[Orgmode] Re: silent evaluation during export

2011-02-04 Thread Andreas Leha
Hi Dan,

thanks.  That's what I was looking for.  Works perfectly.

Cheers,
Andreas


Am 04.02.2011 17:25, schrieb Dan Davison:
 Andreas Leha andreas.l...@med.uni-goettingen.de writes:

   
 Hi all,

 I have several code blocks that must be evaluated during export, but
 silently, i.e. I do not want code/output/anything to appear in the export.

 How do I achieve this?  The obvious :export none also disables evaluation.
 
 Hi Andreas,

 :exports results :results silent

 Dan



   
 Regards,
 Andreas

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




smime.p7s
Description: S/MIME Cryptographic Signature
___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] [PATCH] make export dispatcher go away promptly

2011-02-04 Thread Carsten Dominik


On Feb 4, 2011, at 4:05 PM, Dan Davison wrote:


Following on from Stephen's recent post, a
thing-that-slightly-bothers-me is the way the export dispatcher window
doesn't go away until export is complete. I've briefly looked at the
code twice now and it wasn't obvious to me why the save-window- 
excursion

(line 941 org-exp.el) wasn't already doing what I wanted. However, the
change below seems to have the effect I wanted. While this particular
solution may be a hack, I wonder whether people would prefer its
behaviour? E.g. try exporting this:

#+title: title

#+begin_src sh :exports results
sleep 5  echo hello
#+end_src

export can often take several seconds and it's nice to be able to zone
out looking at your org document rather than the dispatcher window.

Modified lisp/org-exp.el
diff --git a/lisp/org-exp.el b/lisp/org-exp.el
index 13fa549..3d291e2 100644
--- a/lisp/org-exp.el
+++ b/lisp/org-exp.el
@@ -963,6 +963,7 @@ value of `org-export-run-in-background'.
  (setq r1 (read-char-exclusive)))
	  (error No enclosing node with LaTeX_CLASS or  
EXPORT_FILE_NAME)

  )
+(redisplay)
(and bpos (goto-char bpos))
(setq r2 (if ( r1 27) (+ r1 96) r1))
(unless (setq ass (assq r2 cmds))


Looks good to me.

- Carsten




(I see that (sit-for .0001) is used in a couple of places in Org for
this effect, so maybe that should be used instead.)

Dan



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



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


[Orgmode] Re: inline code block results

2011-02-04 Thread Dan Davison
Andreas Leha andreas.l...@med.uni-goettingen.de writes:

 Hi all,

 just found out: the inline block works when I explicitly state :results
 replace.

 So both questions from the previous email collapse to: why is that
 necessary?

 Regards,
 Andreas



 Am 04.02.2011 17:13, schrieb Andreas Leha:
 Hi all,

 I have two questions:

 (1)  How do I get resuts from code block evaluation (e.g. a single
 number) inline into text during (LaTeX-)export?  Something like:  We use
 a level of #+call: getLevel()

 (2)  Why do these two subheadings produce different output during
 (LaTeX-)export?
 * Test
 ** Normal source code block
The number is
#+srcname: success_parameter_one
#+begin_src R :session :results value :exports results
  tmp - rnorm(1)
#+end_src

 ** Inline source code block
The number is src_R[:session :results value :exports results]{tmp -
 rnorm(1)}

Hi Andreas,

This is a bug, thanks. They should both produce the number (and no code)
in the exported material.

It bisects to d0ca215105 which is a recent commit re-working export of
inline- and regular src blocks. I believe the fix may be as below but
I'll let Eric S check that.

Note that in your inline src block :results value and :exports results
are usually unnecessary, as they are the default values for inline src
blocks.

Dan

diff --git a/lisp/ob.el b/lisp/ob.el
index b899410..3fecbbd 100644
--- a/lisp/ob.el
+++ b/lisp/ob.el
@@ -297,7 +297,7 @@ specific header arguments as well.)
   Default arguments to use when evaluating a source block.)
 
 (defvar org-babel-default-inline-header-args
-  '((:session . none) (:results . silent) (:exports . results))
+  '((:session . none) (:results . replace) (:exports . results))
   Default arguments to use when evaluating an inline source block.)
 
 (defvar org-babel-current-buffer-properties nil





 Thanks in advance!
 Andreas

   

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


[Orgmode] Re: inline code block results

2011-02-04 Thread Andreas Leha
Hi Dan,

Thanks for looking into this and for providing a patch that fast!

Andreas


Am 04.02.2011 18:11, schrieb Dan Davison:
 Andreas Leha andreas.l...@med.uni-goettingen.de writes:

   
 Hi all,

 just found out: the inline block works when I explicitly state :results
 replace.

 So both questions from the previous email collapse to: why is that
 necessary?

 Regards,
 Andreas



 Am 04.02.2011 17:13, schrieb Andreas Leha:
 
 Hi all,

 I have two questions:

 (1)  How do I get resuts from code block evaluation (e.g. a single
 number) inline into text during (LaTeX-)export?  Something like:  We use
 a level of #+call: getLevel()

 (2)  Why do these two subheadings produce different output during
 (LaTeX-)export?
 * Test
 ** Normal source code block
The number is
#+srcname: success_parameter_one
#+begin_src R :session :results value :exports results
  tmp - rnorm(1)
#+end_src

 ** Inline source code block
The number is src_R[:session :results value :exports results]{tmp -
 rnorm(1)}
   
 Hi Andreas,

 This is a bug, thanks. They should both produce the number (and no code)
 in the exported material.

 It bisects to d0ca215105 which is a recent commit re-working export of
 inline- and regular src blocks. I believe the fix may be as below but
 I'll let Eric S check that.

 Note that in your inline src block :results value and :exports results
 are usually unnecessary, as they are the default values for inline src
 blocks.

 Dan

 diff --git a/lisp/ob.el b/lisp/ob.el
 index b899410..3fecbbd 100644
 --- a/lisp/ob.el
 +++ b/lisp/ob.el
 @@ -297,7 +297,7 @@ specific header arguments as well.)
Default arguments to use when evaluating a source block.)
  
  (defvar org-babel-default-inline-header-args
 -  '((:session . none) (:results . silent) (:exports . results))
 +  '((:session . none) (:results . replace) (:exports . results))
Default arguments to use when evaluating an inline source block.)
  
  (defvar org-babel-current-buffer-properties nil



   

 Thanks in advance!
 Andreas

   
   

-- 
Andreas Leha

Universitätsmedizin Göttingen
Abteilung Medizinische Statistik
Humboldtallee 32
37073 Göttingen

Tel: +49 (0)551 39-10710
Fax: +49 (0)551 39-4995

http://www.ams.med.uni-goettingen.de/amsneu/leha.html



University Medical Center Göttingen
Department for Medical Statistics
Humboldtallee 32
37073 Göttingen
Germany

Phone: +49 (0) 551 39-10710
Fax: +49 (0) 551 39-4995

http://www.ams.med.uni-goettingen.de/amsneu/leha-en.html




smime.p7s
Description: S/MIME Cryptographic Signature
___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] silent evaluation during export

2011-02-04 Thread Andreas Leha
Hi Erik,

thanks for the pointer to that discussion which also answeres my
question.  I should have seen this.

- Andreas

Am 04.02.2011 17:48, schrieb Erik Iverson:
 Andreas,

 This may help, but I'm not sure what language you're using.
 I was using in this discussion.

 http://www.mail-archive.com/emacs-orgmode@gnu.org/msg29333.html

 The upshot from that thread was that by including a :session
 argument, you guarantee that the code runs on export.

 --Erik

 Andreas Leha wrote:
 Hi all,

 I have several code blocks that must be evaluated during export, but
 silently, i.e. I do not want code/output/anything to appear in the
 export.

 How do I achieve this?  The obvious :export none also disables
 evaluation.

 Regards,
 Andreas



 

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

-- 
Andreas Leha

Universitätsmedizin Göttingen
Abteilung Medizinische Statistik
Humboldtallee 32
37073 Göttingen

Tel: +49 (0)551 39-10710
Fax: +49 (0)551 39-4995

http://www.ams.med.uni-goettingen.de/amsneu/leha.html



University Medical Center Göttingen
Department for Medical Statistics
Humboldtallee 32
37073 Göttingen
Germany

Phone: +49 (0) 551 39-10710
Fax: +49 (0) 551 39-4995

http://www.ams.med.uni-goettingen.de/amsneu/leha-en.html




smime.p7s
Description: S/MIME Cryptographic Signature
___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Add-hook or org-defkey?

2011-02-04 Thread Nathan Neff
I've seen both of these methods used to define/re-define keys
in org-agenda mode:

--- hook-way -
(add-hook 'org-agenda-mode-hook
 '(lambda ()
(define-key org-agenda-mode-map w 'org-agenda-refile)
))

--- another way 

(org-defkey org-agenda-mode-map w 'org-agenda-refile)

Is there an advantage to using one way versus the other?

Seems like the second way is simpler.

Thanks,
--Nate

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


[Orgmode] Go to today in Calendar

2011-02-04 Thread Nathan Neff
I just found that you can press . in the Calendar to jump to today's date.

This saves me a gazillion keypresses, especially when you have a one-key mapping
to schedule something in agenda mode.  I have s mapped in agenda
mode to schedule,
so I just press s . Enter.

Thanks,
--Nate

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


[Orgmode] Re: [babel] How to kill two birds with one stone?

2011-02-04 Thread Dan Davison
Hi Seb,

Cool post. I hope someone has some good ideas in this thread. Some quick
responses / questions below.

 #+TITLE: Document a shell script as separate blocks
 #+DATE:  2011-02-04
 #+LANGUAGE:  en_US

 * Abstract

 When writing shell scripts, I'd like to kill *two* birds with one Babel stone:

 - Be able to *execute the script in situ*, so that I get a copy of the results
   stored in (and versioned with) my documentation.

 - Be able to *chain the code blocks*, so that I tangle a natural script into
   a file for later execution.

 I guess I currently miss some points in order to reach that goal in a clean
 way. Could you give me advice on how to get a step further down the route?

 * Sample code

 For the sake of clarity, let's take a simple problem: I'd like to generate a
 DOT graph of links between all files from a directory tree.

So if file a.org contains

-
jhasg
[[file:b.org]]
[[file:c.org]]
hbjgv
-

then you want an arrow from node a to node b and from node a to node c, right?


 The procedure:

 1. (Recursively) list all files inside the directory.

 2. For each file, (recursively) search for its name referenced in all the
files.

 3. Generate a DOT representation of the link between files.

 ** List all files under current directory

 #+srcname: dw-file-tree
 #+begin_src sh :results output
 cd ~/Some-Project-Dir
 find . -type f -print | grep -v .svn | head -n 5
 #+end_src

 #+results: dw-file-tree
 #+begin_example
 ./.cvsignore
 ./charge_dim
 ./charge_fct
 ./compte
 ./controle_config
 #+end_example

 Here, I voluntary limit the number of results to the first 5 files, for the
 compactness of this example. This sample does not include any file from
 subdirectories, but it doesn't matter.

 ** Search recursively for anything about a file

 Search through all files (ignoring =.svn= directories) for any reference to
 filename given as parameter.

 #+srcname: search-files-pointing-to-this-file
 #+begin_src sh :results output :var f=charge_dim
 cd ~/Some-Project-Dir
 find . -not \( -name .svn -prune \) -type f -print0 |\
 xargs -0 grep -i --files-with-matches $f
 #+end_src

 #+results: search-files-pointing-to-this-file
 #+begin_example
 ./.cvsignore
 ./charge_dim
 ./compte
 ./IFP/Chrg_dim
 ./IFP/Chrg_dim.avant_simple_recovery_mode_2008_03_12
 ./principal.env
 ./29Aalst/Chrg_dim
 ./29Aalst/Chrg_dim_interactif
 ./29Aalst/Publ_dim_interactif
 #+end_example

 HERE, I'M GIVING A FILENAME AS DEFAULT VALUE OF =f= IN ORDER TO SEE A SAMPLE
 RESULTS.

 ** Convert to a DOT representation

 For every file pointing to the file given in parameter, generate an arrow
 (edge) in DOT representation.

 #+srcname: dot-arrow-from-files-pointing-to-this-file
 #+begin_src sh :results output :var f=charge_dim :var 
 data=search-files-pointing-to-this-file
 for i in $(echo $data); do echo $(basename $i) - $f; done
 #+end_src

 #+results: dot-arrow-from-files-pointing-to-this-file
 #+begin_example
 .cvsignore - charge_dim
 charge_dim - charge_dim
 compte - charge_dim
 Chrg_dim - charge_dim
 Chrg_dim.avant_simple_recovery_mode_2008_03_12 - charge_dim
 principal.env - charge_dim
 Chrg_dim - charge_dim
 Chrg_dim_interactif - charge_dim
 Publ_dim_interactif - charge_dim
 #+end_example

 HERE, I'M WORKING GIVING ONCE AGAIN THE SAME DEFAULT VALUE FOR TESTING (AND
 DOCUMENTATION) PURPOSE.

 * Problem

 All of the above nicely answer my first goal (Be able to execute the script
 in situ, so that I get a copy of the results stored in my documentation).

 It does not allow for the second one: *how to chain the calls together*?

 For example, just for chaining steps 2 and 3 (the easier to chain, I think),
 I'd like to be able to write something like this:

 #+srcname: search-links-and-generate-dot-arrow
 #+begin_src sh :results output :var f=charge_dim :var 
 data=search-files-pointing-to-this-file :noweb yes
 for i in (
 search-files-pointing-to-this-file);
 do echo $(basename $i) - $f; done
 #+end_src

Don't forget about C-c C-v C-v `org-babel-expand-src-block' when
debugging this problem. I've started using that a lot.

My shell scripting may be too weak to help here. (Which is one point,
I'd be tempted to bail out to another language on this one) What exactly
are you doing there? Executing the code from the other block in a
subshell and using the stdout as the set to loop over? You're sure you
don't want parentheses search-files-pointing-to-this-file() ? Or $(
... ) / backticks ? How are you going to pass arguments to the
search-files-pointing src block?


 #+results: search-links-and-generate-dot-arrow

 But it yields an error:

 #+begin_src text :eval no
 sh: line 14: syntax error near unexpected token `('
 sh: line 14: `for i in ('
 #+end_src

 Note, in the latter code block, that I did not even tried to really chain
 steps 2 and 3: I'm rewriting step 3, including step 2 inside it.

 *I certainly miss a smarter way* to achieve the above.

I think a relevant 

Re: [Orgmode] Add-hook or org-defkey?

2011-02-04 Thread suvayu ali
On Fri, Feb 4, 2011 at 9:32 AM, Nathan Neff nathan.n...@gmail.com wrote:
 I've seen both of these methods used to define/re-define keys
 in org-agenda mode:

 --- hook-way -
 (add-hook 'org-agenda-mode-hook
             '(lambda ()
                (define-key org-agenda-mode-map w 'org-agenda-refile)
 ))

 --- another way 

 (org-defkey org-agenda-mode-map w 'org-agenda-refile)

 Is there an advantage to using one way versus the other?

 Seems like the second way is simpler.

As far as I know if you are using the proper keymap (as in this case),
there is no difference. I would prefer the 2nd way.


 Thanks,
 --Nate

-- 
Suvayu

Open source is the future. It sets us free.

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


[Orgmode] Re: adding new plain lists item changes previous one it it ends in a number on a single lijne followed by a dot

2011-02-04 Thread Gregor Zattler
Hi Nicolas,

* Nicolas Goaziou n.goaz...@gmail.com [02. Feb. 2011]:
 Gregor Zattler writes:
 
 adding a new list item via M-RET (org-insert-heading) may change
 text in a previous list item, if this ends in a number on a single
 line followed by a dot:
 
 --- 
 - Several astonishing things happened in 
   2007. 
 - And then there was another item. 
 - X
 ---
 
 Note that  2007. has changed to  1. in line 2.
 
 Yes, and unfortunately, I don't see any solution here. It isn't really
 a bug: a line starting with white space, followed by a number sticked
 to a dot is exactly the definition, regexp wise, of a list item (as
 explained in `org-plain-list-ordered-item-terminator' doc-string).

I understand that blank-number-dot starts a plain list item.
But in my example the numbered list would be second level whilst
the unordered list would be first level (of indentation).
Org-mode rightly inserts a dash but why does it fiddle with
another list item of different (second) level when inserting an
new first level item?  Is this necessary to in order to insert
the next dashed item?  

That's different to your example:

 As a side-note, this problem isn't specific to recent versions of Org.
 For example, in 6.33, use M-RET at X in the following example:
 
 --- 
 - Several astonishing things happened in 
   2007. And then there was another item.X
 ---

I see the problem but here the cursor is at a second level item.
Therefore it is not astonishing that org-mode produces another
one with M-RET.


In my case I could see the change of 2007. to 1.  because
it was so near it was also on the display.  But this may happen
with list items which are not displayed and therefore one would
not recognise the damage... 



 There are two workarounds I can think of, at the moment:
 
 1. Use (setq org-plain-list-ordered-item-terminator ?)). But that will
affect every ordered list.

I'll do this.  Thank you and the other commentators for your help.

Ciao; Gregor

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


Re: [Orgmode] Can't get org-export-html-style-extra to work

2011-02-04 Thread Christian Moe

Hi, Bastien,

Thanks for taking this up -- I had forgotten I reported it. :)

No, whatever the problem was, it seems to be gone now. The snippet 
below now works as expected.


Yours,
Christian



On 2/3/11 7:34 PM, Bastien wrote:

Hi Christian,

Christian Moe writes:


What am I doing wrong in the following example?

--
#+TITLE: Test

Some *bold* text.

Evaluate this:
(setq org-export-html-style-extra styleb {color: red;}/style)
--

With org-export-html-style-extra set as above, I expect the exported
HTML source to include the style, and the bolded text to be red, but
this does not happen. Isn't the variable supposed to work this way?


I'm not able to reproduce this.  Do you still have this problem?




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


[Orgmode] Re: window rearrangements when exporting to pdf

2011-02-04 Thread Stephen Eglen

 My guess would be that org-fit-window-to-buffer is doing this.

 It seems more likely that the call to delete-other-windows in
 org-export is the cause of the problem.  Can you try removing it
 to see what happens.  I presume it is there in case you have an
 Org buffer and /many/ other small buffers, in that case you don't
 want to pop up the help message in one of the small buffers,
 because you might not see it all.


Thanks Lawrence -- you were right!  If I comment out that call to
(delete-other-windows) in org-export, all works just nicely.  



Stephen



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


[Orgmode] formated result from matlab code?

2011-02-04 Thread Piter_
Hi all
I try to output some formated text using matlab source code block.
for example

--example1-cut--
#+begin_src matlab :output file :file fit_parameters.txt
  ki1=fopen('fit_parameters.txt','w');
  fprintf(ki1,'   Fit of the blabla \n ')
  fprintf(ki1,'   amplitude: %.3g, uM  \n',1)
  fprintf(ki1,'   T*amplitude:   %.3g, uM  \n',1)
  fprintf(ki1,'   Rsquare  adjusted  %.3g \n'   ,0.99)
  fclose(ki1);
#+end_src
--cut--

but as result I get a file with single 0.


And this example works well.

--example2 cut--
#+begin_src matlab :output file :file chart.tiff
  figure
  plot(rand(1,10))
  print -dtiff chart.tiff
#+end_src
--cut--
I have think I don't understand something basic.

Or maybe someone can explain me how to get formated output in results
slimilar to output below:
#+results:
   amplitude: 8.05, uM
   T*amplitude:   8.02, uM
   T+amplitude:   0.0368, uM
   k(triplet decay):  1.66e+05
   k(triplet to heme c):  4.13e+06
   k(heme c to triplet):  4.54e+06
   k(heme c to groung):   183


Thanks
Petro.

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


Re: [Orgmode] [OT] Taskwarrior, nice GTD-oriented CLI thing

2011-02-04 Thread Marcelo de Moraes Serpa
Must be something that is really cross-platform. Don't forget there
are OSX and Windows users around!

On Fri, Feb 4, 2011 at 10:22 AM, Christopher Allan Webber
cweb...@dustycloud.org wrote:
 Dbus bindings?

 Torsten Wagner torsten.wag...@gmail.com writes:

 Hi Marcelo,

 Emacs can run as a dameon and as that you could access it via
 emacsclient. What is needed is a nice interface to allow to send
 simple requests to insert and fetch data from org-mode. Some of the
 org-mode function might do this already, however, I guess a decent
 layer which hides the complex org-mode routines and provides simple to
 use in- and output functions might be more effective.

 Greetings

 Totti

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


 --
 퓒퓱퓻퓲퓼퓽퓸퓹퓱퓮퓻 퓐퓵퓵퓪퓷 퓦퓮퓫퓫퓮퓻


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


[Orgmode] multiple agenda buffers

2011-02-04 Thread suvayu ali
Hi Orgers,

I was wondering whether it was possible to have multiple agenda buffers
at the same time. My use case is when I want to look for two differnt
but related things, or when I want to search while having my daily (or
weekly) agenda visible. I found references in the archives[fn:1] stating
that it was not possible at the time. Has the situation changed?

Renaming the buffer before calling the next agenda command seems to work
at first glance, but it breaks things like updating the buffer with ~g~.
It ends up updating the newest agenda buffer instead of the buffer where
the command was called.

Thanks a lot.

Footnotes:
[fn:1] http://www.mail-archive.com/emacs-orgmode@gnu.org/msg20407.html

-- 
Suvayu

Open source is the future. It sets us free.

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


[Accepted] [Orgmode] make export dispatcher go away promptly

2011-02-04 Thread Bastien Guerry
Patch 582 (http://patchwork.newartisans.com/patch/582/) is now Accepted.

Maintainer comment: none

This relates to the following submission:

http://mid.gmane.org/%3Cm1oc6rq1q8.fsf%40gmail.com%3E

Here is the original message containing the patch:

 Content-Type: text/plain; charset=utf-8
 MIME-Version: 1.0
 Content-Transfer-Encoding: 7bit
 Subject: [Orgmode] make export dispatcher go away promptly
 Date: Fri, 04 Feb 2011 20:05:35 -
 From: Dan Davison dandavis...@gmail.com
 X-Patchwork-Id: 582
 Message-Id: m1oc6rq1q8@gmail.com
 To: emacs-orgmode@gnu.org
 
 Following on from Stephen's recent post, a
 thing-that-slightly-bothers-me is the way the export dispatcher window
 doesn't go away until export is complete. I've briefly looked at the
 code twice now and it wasn't obvious to me why the save-window-excursion
 (line 941 org-exp.el) wasn't already doing what I wanted. However, the
 change below seems to have the effect I wanted. While this particular
 solution may be a hack, I wonder whether people would prefer its
 behaviour? E.g. try exporting this:
 
 #+title: title
 
 #+begin_src sh :exports results
 sleep 5  echo hello
 #+end_src
 
 export can often take several seconds and it's nice to be able to zone
 out looking at your org document rather than the dispatcher window.
 
   Modified lisp/org-exp.el
 
 
 (I see that (sit-for .0001) is used in a couple of places in Org for
 this effect, so maybe that should be used instead.)
 
 Dan
 
 
 diff --git a/lisp/org-exp.el b/lisp/org-exp.el
 index 13fa549..3d291e2 100644
 --- a/lisp/org-exp.el
 +++ b/lisp/org-exp.el
 @@ -963,6 +963,7 @@ value of `org-export-run-in-background'.
 (setq r1 (read-char-exclusive)))
 (error No enclosing node with LaTeX_CLASS or EXPORT_FILE_NAME)
 )
 +(redisplay)
  (and bpos (goto-char bpos))
  (setq r2 (if ( r1 27) (+ r1 96) r1))
  (unless (setq ass (assq r2 cmds))
 

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


Re: [Orgmode] [PATCH] make export dispatcher go away promptly

2011-02-04 Thread Bastien
Dan Davison dandavis...@gmail.com writes:

 Following on from Stephen's recent post, a
 thing-that-slightly-bothers-me is the way the export dispatcher window
 doesn't go away until export is complete. I've briefly looked at the
 code twice now and it wasn't obvious to me why the save-window-excursion
 (line 941 org-exp.el) wasn't already doing what I wanted. However, the
 change below seems to have the effect I wanted. While this particular
 solution may be a hack, I wonder whether people would prefer its
 behaviour? E.g. try exporting this:

 #+title: title

 #+begin_src sh :exports results
 sleep 5  echo hello
 #+end_src

 export can often take several seconds and it's nice to be able to zone
 out looking at your org document rather than the dispatcher window.

I applied this patch, thanks!

-- 
 Bastien

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


Re: [Orgmode] [BUG] adding new plain lists item changes previous one it it ends in a number on a single lijne followed by a dot

2011-02-04 Thread Christian Moe

On 2/3/11 3:09 PM, Nicolas Goaziou wrote:

Hello,


Christian Moe writes:



Numbers at the beginning of the line inadvertently starting a list
item is a bug.


You call it a bug, but it is actually the Org definition of a numbered
item. This is in the manual. Though, I think I understand what you
mean: this definition can lead to surprising results. But the user is
warned in the documentation.


I'm sorry, that was silly of me, and I take it back. You and Achim 
Gratz are both right. If it follows from the specification, and the 
manual warns about it, it's not a bug.  I'm usually the first to point 
that out to others... don't know what got into me.





It means you can mess up your exported document (it doesn't just
happen at M-RET) by just writing a perfectly normal text, and there
is no easy-to-remember escape. (I really don't like the
invisible-space workaround -- it's hard to remember how to insert
it, and it's a bizarre trick to have to tell newcomers.)



ReStructuredText provides a backslash-escape for this, even though
its more rigid structure reduces the chances of the error happening.
Could we borrow that trick, or would it conflict with something
else?


I don't follow you here. Inserting a non-breaking space (it was only
an example, by the way) is an unacceptable trick to tell to newcomers
but adding a backslash in front of numbers isn't? It looks the same to
me.


Sorry I put it that way, that wasn't helpful. Backslash too was just 
an example. In this case, an example of a typical escape character 
that's right there on my keyboard. I'm not saying it looks better than 
what you get with `C-q 240' or similar, but it's easy to remember.



As long as Org cannot tell between an ordered item and a number at the
end of a sentence, those problems will persist. And I can't see any
non-hackish solution about it.


Absolutely.


We can always change `org-plain-list-ordered-item-terminator' default
value to the safer ?), though.


As you've pointed out, there's a setting for us to tweak if we want 
this, and changing the default would probably cause greater annoyances 
for more people. So I'm not urging that.


I'll try to make friends with the invisible non-breaking space.
:)

Yours,
Christian

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


Re: [Orgmode] iimage and eps?

2011-02-04 Thread Bastien
Hi Piter,

Piter_ x.pi...@gmail.com writes:

 I have activated iimode as desribed here:
 http://orgmode.org/worg/org-configs/org-config-examples.html
 It works with png images but does not work with eps. May be it should
 not :(

Maybe you can try to customize image-file-name-extensions so that it
includes .eps.  I did not test that, no guaranty it works.

-- 
 Bastien

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


Re: [Orgmode] Can't get org-export-html-style-extra to work

2011-02-04 Thread Bastien
Christian Moe m...@christianmoe.com writes:

 No, whatever the problem was, it seems to be gone now. The snippet
 below now works as expected.

Great, thanks for confirming!

-- 
 Bastien

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


Re: [Orgmode] Bug: startup hidestars also hides the point (square at point) [6.33x]

2011-02-04 Thread Bastien
Hi Arne,

Arne Babenhauserheide arne_...@yahoo.de writes:

 Thanks for doublechecking. I now tested it again, and this only happens when 
 used in a shell (i.e. in a KDE Konsole) where the point does not blink. 

Well, I had this problem before but I don't know how to handle it.

-- 
 Bastien

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


Re: [Orgmode] Re: Fontification of blocks

2011-02-04 Thread Eric S Fraga
Sébastien Vauban wxhgmqzgw...@spammotel.com writes:

[...]

 Corrected patch is attached to this post.

which appears to work just fine!  Thanks.
-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
: using Org-mode version 7.4 (release_7.4.311.ga9d2.dirty)

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


[Orgmode] managing a shared project using org-mobile ?

2011-02-04 Thread Rémi Letot
Hello,

I have been using org-mode for quite some times, and mobile-org (the
android version) for a much shorter time. So first of all I want to
thank all involved contributors: THANK YOU ALL !!!

Now to my problem: I use org-mode for managing... well, for managing my
life :-) But now I have a project that needs collaboration with a
partner. I naturally thought about org-mode for management, and
particularly mobile-org since we are both android users. 

But how can I share one org file between two users, and more importantly
between two mobile-org instances ?

Thanks for your input,
-- 
Rémi


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


Re: [Orgmode] [OT] Taskwarrior, nice GTD-oriented CLI thing

2011-02-04 Thread Eric Schulte
Mark Elston m_els...@comcast.net writes:

 On 2/3/2011 8:03 PM, Torsten Wagner wrote:
 Hi Marcelo,

 Emacs can run as a dameon and as that you could access it via
 emacsclient. What is needed is a nice interface to allow to send simple
 requests to insert and fetch data from org-mode. Some of the org-mode
 function might do this already, however, I guess a decent layer which
 hides the complex org-mode routines and provides simple to use in- and
 output functions might be more effective.


 There is also PyOrgMode which can probably be developed as an
 intermediary between the two.  I, for one, find Python *much* more
 approachable than elisp... :)


The only problem here is that you will invariably begin re-implementing
the entirety of Org-mode in python.  I think that an emacsclient backend
exposing an Org-mode api is the best bet, then a Python wrapper around
such a backend could be appropriate for writing the front-end interface.

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


Re: [Orgmode] [OT] Taskwarrior, nice GTD-oriented CLI thing

2011-02-04 Thread Eric Schulte
I think such a shell-script wrapper around an emacs-client or emacs
batch Org-mode instance sounds like a very nice idea -- and not overly
difficult to implement.

Here is a quick approach to implementing the org agenda example you
suggested below [1] notice that the script is structured to dispatch on
the first command, currently only agenda is implemented but it
shouldn't be difficult to add others.

Also, rather than a single org script like the one attached which
dispatches based on its first argument, we could go the git path i.e.,
we can have org-agenda and org-add in the same way that git has git-log
and git-push.

Best -- Eric

Torsten Wagner torsten.wag...@gmail.com writes:

 Hi Marcelo,

 A CLI client would be nice, but IMHO, I don't think it would be faster
 than the operating org from emacs; perhaps for a couple of basic
 stuff, but I think that depends strongly on personal tastes.

 For me the most nicest part to have a CLI interface to org-mode would
 be the fact that I could use all the command line magic instantaneous.
 E.g.,

 git log -n1 | org add Remember to check the last commit

 could end up in

 * Remember to check the last commit

 commit b9de5f08ba0833d2b1912d02335667e8e6cc17b
 Author: User Foo f...@bar.com
 Date:   Mon Dec 20 14:50:05 2010 -1000

 This comment might fixes the bug Totti was dealing with


 or a simple

 ls | org add The files I have not processed so fare

 could end up in

 * The files I have not processed so fare

 file1
 file2
 file6
 file11

 and a

 org agenda next | xargs awesome-client notifyme({})

 could create a pop up in my window manager (awesome wm) informing me
 about the next appointment in my agenda.

 Even more into hardware details,
 a udev-rule could be used to send a certain command to org-mode
 whenever a specific USB-stick is inserted in the computer.
 People who like to clock there work might love this feature.

 There are actually hundreds of possible nice combinations...


 All the best

 Totti




 Marcelo.

 On Thu, Feb 3, 2011 at 7:14 PM, Torsten Wagnertorsten.wag...@gmail.com  
 wrote:
 Hi,

 maybe someone should contact the devs there and invite them (to come to this
 email list and/or vice versa).
 There is really some beauty in the idea to use dead simple command line
 tools to getting things fast and quickly done. On the other hand org-mode
 has so many useful functions.
 It would be a very nice integration for both sides to settle down on a way
 to import/export data from each other seamlessly.
 I work often with a shell and this would allow people to use the command
 line whenever they just need to do to something quickly and switching to
 emacs and org-mode if they need editor capabilities.

 Greetings

 Totti

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



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

Footnotes: 
[1]  org script
#!/bin/sh
# -*- mode: shell-script -*-
# org --- Calls Org-mode from the command line:
#
# Author: Eric Schulte
#
# Usage:
#
#   1. update ORGINSTALL and ORGCONFIG to point to your local
#  org-install.el and your local org-mode configuration
#  (for things like org-agenda-files)
#
#   2. make this file executable
#
#   3. run one of the following commands
#
#  org agenda fmt   ## where fmt is one of txt, html, ps or ics
#  no other commands yet...
#
ORGINSTALL=~/emacs/src/org/lisp/org-install.el
ORGCONFIG=~/emacs/eschulte-org.el

## wrappers for the eval command sent to Emacs
ORGSTARTUPOPEN=$(cat EOF )
(progn
  (add-to-list 'load-path (expand-file-name ~/emacs/src/org/lisp/))
  (add-to-list 'load-path (expand-file-name ~/emacs/src/org/contrib/lisp/))
  (require 'org)(require 'org-exp)
EOF
ORGSTARTUPCLOSE=)

## dispatch on the first command -- currently only agenda is supported
case $1 in
agenda) # write the agenda to stdout in format of $2
FILLER=$(cat EOF )
;; function definitions -- could be placed in org-mode/contrib
(defun org-agenda-to-string (fmt)
  (let ((tmp-file (make-temp-file org-tmp nil (concat . fmt)))
output)
(save-window-excursion
  (org-batch-agenda a)
  (org-write-agenda tmp-file))
(with-temp-buffer
  (insert-file-contents-literally tmp-file)
  (setq output (buffer-string)))
(delete-file tmp-file)
output))
(org-agenda-to-string $2)
EOF
;;
*)
echo unknown;;
esac

# Notice the use of `princ' to write to STDOUT and use of
# `with-output-to-temp-buffer' command to ensure nothing else is
# written to STDOUT.
EL=$(cat EOF )
$ORGSTARTUPOPEN
(princ (with-output-to-temp-buffer *trash* $FILLER))
$ORGSTARTUPCLOSE
EOF

# echo $EL ## testing
emacs -Q --batch -l $ORGINSTALL -l $ORGCONFIG --eval $EL 2 

Re: [Orgmode] Re: Fontification of blocks

2011-02-04 Thread Eric Schulte
Hi Seb,

This looks very nice, I am now able to turn fontification on and off as
expected using your three new faces.  I've just committed your patch
with one minor change (not having the block background face set by
default).

Maybe it would be worth a worg post about how to use these faces with
some example settings...

Thanks -- Eric

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

 Hi,

 As spotted by Eric Fraga:

 Sébastien Vauban wrote:
 --- a/lisp/org-faces.el
 +++ b/lisp/org-faces.el
 @@ -1,6 +1,6 @@
  ;;; org-faces.el --- Face definitions for Org-mode.
  
 -;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010
 +;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
  ;;   Free Software Foundation, Inc.
  
  ;; Author: Carsten Dominik carsten at orgmode dot org
 @@ -511,6 +511,16 @@ follows a #+DATE:, #+AUTHOR: or #+EMAIL: keyword.
:group 'org-faces
:version 22.1)
  
 +(defface org-block-background
 +  '((t (:background #EA)))
 +  Face used for the source block background.)
 +
 +(org-copy-face 'org-meta-line 'org-block-begin-line
 +  Face used for the line delimiting the begin of source blocks.)
 +
 +(org-copy-face 'org-meta-line 'org-block-begin-line
 +  Face used for the line delimiting the end of source blocks.)
 +
  (defface org-verbatim
(org-compatible-face 'shadow
  'class color grayscale) (min-colors 88) (background light))

 you should read the following at the 2nd =org-copy-face= command:

 +(org-copy-face 'org-meta-line 'org-block-end-line
 +  Face used for the line delimiting the end of source blocks.)

 ie, s/begin/end/

 I guess it worked for me (I restarted completely Emacs for the test), as that
 face is defined in my color-theme now. So, it was created anyway.

 Corrected patch is attached to this post.

 Best regards,
   Seb

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


[Orgmode] Re: inline code block results

2011-02-04 Thread Eric Schulte
Dan Davison dandavis...@gmail.com writes:

 Andreas Leha andreas.l...@med.uni-goettingen.de writes:

 Hi all,

 just found out: the inline block works when I explicitly state :results
 replace.

 So both questions from the previous email collapse to: why is that
 necessary?

 Regards,
 Andreas



 Am 04.02.2011 17:13, schrieb Andreas Leha:
 Hi all,

 I have two questions:

 (1)  How do I get resuts from code block evaluation (e.g. a single
 number) inline into text during (LaTeX-)export?  Something like:  We use
 a level of #+call: getLevel()

 (2)  Why do these two subheadings produce different output during
 (LaTeX-)export?
 * Test
 ** Normal source code block
The number is
#+srcname: success_parameter_one
#+begin_src R :session :results value :exports results
  tmp - rnorm(1)
#+end_src

 ** Inline source code block
The number is src_R[:session :results value :exports results]{tmp -
 rnorm(1)}

 Hi Andreas,

 This is a bug, thanks. They should both produce the number (and no code)
 in the exported material.

 It bisects to d0ca215105 which is a recent commit re-working export of
 inline- and regular src blocks. I believe the fix may be as below but
 I'll let Eric S check that.

 Note that in your inline src block :results value and :exports results
 are usually unnecessary, as they are the default values for inline src
 blocks.


Yes,

I've just applied this change.  Note that the variables like
`org-babel-default-*-header-args' are intended for users to customize in
their local config, so don't shy away from changing the default settings
locally.

I think I set the default to silent thinking that whenever I would
interactively execute an inline code block, I would want to see the
results in the message area, rather than actually insert them inline.

Best -- Eric


 Dan

 diff --git a/lisp/ob.el b/lisp/ob.el
 index b899410..3fecbbd 100644
 --- a/lisp/ob.el
 +++ b/lisp/ob.el
 @@ -297,7 +297,7 @@ specific header arguments as well.)
Default arguments to use when evaluating a source block.)
  
  (defvar org-babel-default-inline-header-args
 -  '((:session . none) (:results . silent) (:exports . results))
 +  '((:session . none) (:results . replace) (:exports . results))
Default arguments to use when evaluating an inline source block.)
  
  (defvar org-babel-current-buffer-properties nil





 Thanks in advance!
 Andreas

   

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


Re: [Orgmode] Embedded code

2011-02-04 Thread Eric Schulte
Ido Magal i...@idomagal.com writes:

 On Fri, Jan 21, 2011 at 18:05, Eric Schulte schulte.e...@gmail.com wrote:


 There are a variety of ways to convert lists to strings, look at the
 `format' function for printing any elisp value to a string.  You can
 also use something like the following to convert a list to a string

 #+begin_src emacs-lisp
  (mapconcat (lambda (el) (format %S el)) '(1 2 3 4 5 6) \t)
 #+end_src

 ...


 You can use the inline code syntax for very small blocks, e.g.


 I've proceeded with my little project using the dynamic block, since it
 seems that this is what it was designed for. I wrote the following bit of
 code and would appreciate answers to a couple of questions.

 #+begin_src emacs-lisp :results silent
 (defun flatten-string-with-links (str)
   (let* ((newstr str))
 ; find [[link][desc]] and replace with 'desc.
 (setq newstr (replace-regexp-in-string
 \\[\\[[^\\[]+\\]\\[[^//[]+\\]\\]
 (lambda (s) (save-match-data
  (nth 2 (split-string s [\]\[]+ newstr))
 ; find [[link]] and replace with 'link.
 (setq newstr (replace-regexp-in-string \\[\\[[^\\[]+\\]\\]
 (lambda(s) (save-match-data
   (nth 1 (split-string s [\]\[]+ newstr))
   newstr))

 (defun org-dblock-write:tagged (params)
   (insert (mapconcat 'identity
  (org-map-entries
   (lambda()
  (let* (link desc innerlink)
   (setq desc (nth 4 (org-heading-components)))
   (setq desc (flatten-string-with-links desc))
   (setq link (concat file:
  (abbreviate-file-name (buffer-file-name (buffer-base-buffer)))
  ::
  (org-make-org-heading-search-string)))
   (org-make-link-string link desc)))
  (plist-get params :tag)
 (plist-get params :scope))
   \n)))
  #+end_src

 * example   :links:
 ** not a link
 ** [[http://google.com][link]]
 ** some text.[[http://google.com][link]]
 ** [[http://google.com]]
 ** some text. [[http://google.com][link]]. more text.
 [[http://google.com][link]].
 final text.
 ** [[
 http://www.knifecenter.com/kc_new/store_detail.html?s%3DAOBSHARP][brokenlink]]

 #+BEGIN: tagged :tag links
 #+END


 Q1: I've tried to leverage as much built-in org functionality as possible,
 but deeply suspect that I'm overlooking some,

Yes, it is certainly worth-while to look for existing org-* functions, I
am still often finding myself re-implementing existing functions.

 since agendas do much of this work.  Is there a simpler solution than
 mine?

So your goal is to write a bunch of links into the Org-mode file
following the code block?  A couple of suggestions...
- don't call `insert' from your code block, rather output a string and
  let Babel handle the insert for you

- it looks like you are doing a good job of using existing link
  functions, however in addition to searching for functions with org and
  link in their names with C-h f org-link TAB you can try looking for
  org variables (thinking existing org regular expressions) with
  something like C-h v org-link TAB


 Q2: The link generated for the last item (broken link) does not work.
  Removing the % from the URL fixes it.  This seems to be a bug
 in org-make-org-heading-search-string?  Or am I misusing it?


I have no idea, I haven't used these functions.


 Any help would be greatly appreciated.

Hope this helps.  Best -- Eric

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


Re: [Orgmode] Re: The way tags are exported in HTML (without colons!) -- no workaround for searches!

2011-02-04 Thread Christian Moe
This bookmarklet finds an Org tags in exported HTML in Firefox, at 
least (just a proof of concept). To try it just copy-paste the whole 
thing into the address field.


javascript:
t=window.prompt(Tag?, );
e=document.getElementsByClassName(t);
for(i=0;ie.length;i++)
   {e[i].scrollIntoView(true);
if(! window.confirm(Next?))
{break;}
   }
void(0);

Probably not what you wanted, but fun anyway.
:)

CM


On 2/4/11 9:41 AM, Sébastien Vauban wrote:

Hi Jeff,

Jeff Horn wrote:

2011/2/3 Sébastien Vaubanwxhgmqzgw...@spammotel.com:

What about really adding the colon marker, so that one can easily find tags in
the exported file?


Use the CSS content property.

 http://www.w3schools.com/Css/pr_gen_content.asp


If you read my post of [2010-11-25 Thu 11:34] in this thread, you'll see I did
try that, but it's not working for the searches:


* Workaround?

Maybe adding a colon before and after the tag would help? CSS to the
rescue:

#+begin_src
.tag:before {
 content: :;
}

.tag:after {
 content: :;
}
#+end_src

Answer is: no! In the HTML display, we now do well see a :me:, but
searches on that same string fail to find it.

* Solution?

- Really add a colon marker in the exported file (to HTML)


Best regards,
   Seb





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


Re: [Orgmode] [OT] Taskwarrior, nice GTD-oriented CLI thing

2011-02-04 Thread Mark Elston

On 2/4/2011 11:16 AM, Eric Schulte wrote:

Mark Elstonm_els...@comcast.net  writes:


On 2/3/2011 8:03 PM, Torsten Wagner wrote:

Hi Marcelo,

Emacs can run as a dameon and as that you could access it via
emacsclient. What is needed is a nice interface to allow to send simple
requests to insert and fetch data from org-mode. Some of the org-mode
function might do this already, however, I guess a decent layer which
hides the complex org-mode routines and provides simple to use in- and
output functions might be more effective.



There is also PyOrgMode which can probably be developed as an
intermediary between the two.  I, for one, find Python *much* more
approachable than elisp... :)



The only problem here is that you will invariably begin re-implementing
the entirety of Org-mode in python.  I think that an emacsclient backend
exposing an Org-mode api is the best bet, then a Python wrapper around
such a backend could be appropriate for writing the front-end interface.



I suppose that depends on what the CLI would have to do.  This
discussion was about how to transfer data between the two frameworks.
You wouldn't have to implement all of org-mode in python to read through
an org-mode file, though I admit some sections would be more difficult
than others (org-babel stuff, for example).

I have found that the kind of stuff I would like to transfer from org to
something else (and vice versa) is pretty simple most of the time.  The
more complex org-files are not calendar/agenda kinds of things but
documents I use org to manage as I write (class notes/handouts/etc).  My
calendar/agenda stuff is reasonably simple and could pretty easily be
parsed by most languages that have some support for parsing (built-in,
or library/tool support a la yacc/lex, etc.).  Other people might have
more significant requirements, I suppose.

Mark

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


[Orgmode] Re: [babel] How to kill two birds with one stone?

2011-02-04 Thread Sébastien Vauban
Hi Dan,

Myself quickly reacting on this...

Dan Davison wrote:
 Cool post. I hope someone has some good ideas in this thread.

Thanks. Once solved, this one (and many more experiments I'm jotting down)
could become case studies on Worg, or so.

 Some quick responses / questions below.

 #+TITLE: Document a shell script as separate blocks
 #+DATE:  2011-02-04
 #+LANGUAGE:  en_US

 * Abstract

 When writing shell scripts, I'd like to kill *two* birds with one Babel 
 stone:

 - Be able to *execute the script in situ*, so that I get a copy of the 
 results
   stored in (and versioned with) my documentation.

 - Be able to *chain the code blocks*, so that I tangle a natural script 
 into
   a file for later execution.

 I guess I currently miss some points in order to reach that goal in a clean
 way. Could you give me advice on how to get a step further down the route?

 * Sample code

 For the sake of clarity, let's take a simple problem: I'd like to generate a
 DOT graph of links between all files from a directory tree.

 So if file a.org contains

 -
 jhasg
 [[file:b.org]]
 [[file:c.org]]
 hbjgv
 -

 then you want an arrow from node a to node b and from node a to node c, right?

Exactly. Though, this is not limited to Org files, but any file (and any
filename) in fact...

 The procedure:

 1. (Recursively) list all files inside the directory.

 2. For each file, (recursively) search for its name referenced in all the
files.

 3. Generate a DOT representation of the link between files.

 ** List all files under current directory

 #+srcname: dw-file-tree
 #+begin_src sh :results output
 cd ~/Some-Project-Dir
 find . -type f -print | grep -v .svn | head -n 5
 #+end_src

 #+results: dw-file-tree
 #+begin_example
 ./.cvsignore
 ./charge_dim
 ./charge_fct
 ./compte
 ./controle_config
 #+end_example

 Here, I voluntary limit the number of results to the first 5 files, for the
 compactness of this example. This sample does not include any file from
 subdirectories, but it doesn't matter.

 ** Search recursively for anything about a file

 Search through all files (ignoring =.svn= directories) for any reference to
 filename given as parameter.

 #+srcname: search-files-pointing-to-this-file
 #+begin_src sh :results output :var f=charge_dim
 cd ~/Some-Project-Dir
 find . -not \( -name .svn -prune \) -type f -print0 |\
 xargs -0 grep -i --files-with-matches $f
 #+end_src

 #+results: search-files-pointing-to-this-file
 #+begin_example
 ./.cvsignore
 ./charge_dim
 ./compte
 ./IFP/Chrg_dim
 ./IFP/Chrg_dim.avant_simple_recovery_mode_2008_03_12
 ./principal.env
 ./29Aalst/Chrg_dim
 ./29Aalst/Chrg_dim_interactif
 ./29Aalst/Publ_dim_interactif
 #+end_example

 HERE, I'M GIVING A FILENAME AS DEFAULT VALUE OF =f= IN ORDER TO SEE A SAMPLE
 RESULTS.

 ** Convert to a DOT representation

 For every file pointing to the file given in parameter, generate an arrow
 (edge) in DOT representation.

 #+srcname: dot-arrow-from-files-pointing-to-this-file
 #+begin_src sh :results output :var f=charge_dim :var 
 data=search-files-pointing-to-this-file
 for i in $(echo $data); do echo $(basename $i) - $f; done
 #+end_src

 #+results: dot-arrow-from-files-pointing-to-this-file
 #+begin_example
 .cvsignore - charge_dim
 charge_dim - charge_dim
 compte - charge_dim
 Chrg_dim - charge_dim
 Chrg_dim.avant_simple_recovery_mode_2008_03_12 - charge_dim
 principal.env - charge_dim
 Chrg_dim - charge_dim
 Chrg_dim_interactif - charge_dim
 Publ_dim_interactif - charge_dim
 #+end_example

 HERE, I'M WORKING GIVING ONCE AGAIN THE SAME DEFAULT VALUE FOR TESTING (AND
 DOCUMENTATION) PURPOSE.

 * Problem

 All of the above nicely answer my first goal (Be able to execute the script
 in situ, so that I get a copy of the results stored in my documentation).

 It does not allow for the second one: *how to chain the calls together*?

 For example, just for chaining steps 2 and 3 (the easier to chain, I think),
 I'd like to be able to write something like this:

 #+srcname: search-links-and-generate-dot-arrow
 #+begin_src sh :results output :var f=charge_dim :var 
 data=search-files-pointing-to-this-file :noweb yes
 for i in (
 search-files-pointing-to-this-file);
 do echo $(basename $i) - $f; done
 #+end_src

 Don't forget about C-c C-v C-v `org-babel-expand-src-block' when
 debugging this problem. I've started using that a lot.

 My shell scripting may be too weak to help here. (Which is one point,
 I'd be tempted to bail out to another language on this one)

That's another point. Once written in Bash scripts, I'd be interested (and I
think it is very interesting from a Babel point of view) to see the same
functionality implemented in other languages.

 What exactly are you doing there? Executing the code from the other block in
 a subshell and using the stdout as the set to loop over?

I'm not especially wanting to try executing the code block in a subshell. Yes
for the in situ execution 

[Orgmode] Solved the problem of org-capture apparently not working

2011-02-04 Thread Charles Cave
In early January I posted what I thought was a bug report with org-capture.

I found that capturing to a date-tree didn't always work and in one file the 
capture was written to the wrong place.

Well, the problem was with the data!  One of my headings began with 2011.

The tree looked something like this (edited)

* 2010
** 2010-12 December
*** 2010-12-05 Sunday
 A heading
 2011 Actions  -- this caused the problem
 Another heading
...
*** 2010-12-06 Monday
...
...


In 2011 when I captured into this file's date-tree, 
org-capture found the headline 2011 Actions which matched the algorithm
and the captured item appeared at the end of the headings at that level.

My suggestion to eliminate the problem is to modify the org-capture algorithm
so years have to match beginning of line + one asterisk + one space + the year

Similarly, months could match beginning of line + two asterisks + one space + 
the year + hyphen + month number + space + Monthname.But the chance of this 
format heading appearing outside a date-tree would be very low.

Charles
 


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


Re: [Orgmode] org-scan-tags

2011-02-04 Thread Ilya Shlyakhter
Thanks for catching this, Carsten!

This could perhaps be fixed by doing a full lookup of the tags up the
hierarchy, rather than relying on the cached tags.
This is more expensive, but if fewer entries actually have to be
looked at (because the search only stops at TODO entries),
it might be faster overall.

One general way to speed up searches would be to move as much work as
possible into Emacs' built-in regexp matcher.
When parsing a search expression, right now it is parsed into an elisp
form that is evaluated at each entry and says
whether the entry matches.   Each clause of a search expression could
instead be parsed into an elisp form _and_ a regexp,
such that matching the regexp would be a necessary (but not
sufficient) condition for the entry to match.
E.g. if looking for entries with property PROP equal to 1, you could
construct a regexp that would match only that.
Some things aren't expressible in regexp language so they'd still have
to be checked in lisp.  And tag lookups could not use the
cache.   But if most of the filtering is done by Emacs' regexp
matcher, and only a bit of lisp filtering on top of that,
overall searches might be faster.

On Thu, Feb 3, 2011 at 11:37 AM, Bastien bastien.gue...@wikimedia.fr wrote:
 Carsten Dominik carsten.domi...@gmail.com writes:

 OK, here is an example where it really does fail:


 * heading
 ** one                                                        :tag1:
 *** two
 *** two                                                              :tag2:
 *** TODO two                                                         :tag2:
 *** two                                                              :tag2:


 Fold up the tree, then do

 C-c / m +tag1/! RET

 This should find the TODO two, but it does not, because the
 new regexp moves right past the one line and so tag1 is
 overlooked.

 Right, thanks for the detailed example.  I reverted the commit,
 it should be fine again.

 --
  Bastien


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


[Orgmode] Re: [Accepted] Re: Bug: Jumping to a date in the agenda changes view back to 'day' [7.4 (release_7.4.80.g0e5e5)]

2011-02-04 Thread Matt Lundin
Bastien Guerry b...@altern.org writes:

 Patch 543 (http://patchwork.newartisans.com/patch/543/) is now Accepted.

 * org-agenda.el (org-agenda-list): Use org-agenda-current-span as a
 possible default span if it is set.
 
 Signed-off-by: Julien Danjou jul...@danjou.info
 ---
  lisp/org-agenda.el |5 -
  1 files changed, 4 insertions(+), 1 deletions(-)
 
 diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
 index 0cd620c..0d695b5 100644
 --- a/lisp/org-agenda.el
 +++ b/lisp/org-agenda.el
 @@ -3450,7 +3450,10 @@ given in `org-agenda-start-on-weekday'.
(setq org-agenda-last-arguments (list include-all start-day span))
(org-compile-prefix-format 'agenda)
(org-set-sorting-strategy 'agenda)
 -  (let* ((span (org-agenda-ndays-to-span (or span org-agenda-ndays 
 org-agenda-span)))
 +  (let* ((span (org-agenda-ndays-to-span (or span
 + org-agenda-current-span
 + org-agenda-ndays
 + org-agenda-span)))
   (today (org-today))
   (sd (or start-day today))
   (ndays (org-agenda-span-to-ndays span sd))
 -- 

This patch breaks custom commands --- i.e., if one binds org-agenda-span
in a custom command, it seems to be overridden by the span of whatever
agenda command one last called (i.e., org-agenda-current-span).

Steps to replicate:

1. (setq org-agenda-span 'day)

2. M-x org-agenda-list

3. Check the value of org-agenda-current-span = day

4. Call the following custom command:

(setq org-agenda-custom-commands
  '((c Calendar agenda 
 ((org-agenda-span 'week)
  (org-agenda-start-on-weekday 0)   
  (org-agenda-time-grid nil)
  (org-agenda-entry-types '(:timestamp :sexp))
  (org-agenda-prefix-format  %-12:t )
  (org-deadline-warning-days 0)
  (org-agenda-include-all-todo nil)
  (org-agenda-repeating-timestamp-show-all t)
  

This results in only a day view because org-agenda-current-span is still
'day.

Best,
Matt

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


[Orgmode] Re: Question on org-mode adding extra blank line

2011-02-04 Thread Bernt Hansen
Umesh P N umesh.p.n...@gmail.com writes:

 Hi,

 Sometimes (I don't know when), when I press M-return (org-meta-return) at the 
 end of a heading, the next heading
 line (at the same level) is added after a blank line rather than on the next 
 line.  Looks like it is a feature and
 not a bug. 

 Like this.

 * heading 1  (I press M-return here.)

 * heading 2

 I expected

 * heading 1  (I press M-return here.)
 * heading 2

 instead.

 When does this happen, and how can I control that?

 My gtd configurations below:

 # -*- mode: org; -*-
 # 2011-Q1.org: org-mode data for Umesh Nair for 2011 Q1
 #+STARTUP: overview
 #+STARTUP: hidestars
 #+STARTUP: odd
 #+TITLE: Work GTD file for 2011 Q1 (Umesh Nair)
 #+OPTIONS: toc:nil H:3
 #+TAGS: ICU4C(c) ICU4J(j) CLDR(C) III(i) Documentation(d) OCR(o) READING(r) 
 PHONE(p)
 #+TAGS: EMAIL(e) INTERVIEW(I) TODAY(t)
 #+TAGS: Q1(1) Q2(2) Q3(3) Q4(4) NOW(n) LATER(l)

 Thanks,

 - Umesh

Hi Umesh,

This is controlled by the variable org-blank-before-new-entry.  Normally
this is set to 'auto' by default to try to make the following entry for
lists and headings the same as the current one -- if it has a blank line
then the next entry will also.

You can customize this variable to always or never include blank lines
before new entries.

HTH,
Bernt

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


[Orgmode] Hints for scheduling using Agenda

2011-02-04 Thread Nathan Neff
I'm starting to use column mode in the Agenda, where the estimated
effort for each TODO item is shown.  The sums of the estimated
effort is totaled for each day.  I like this feature, and want to use it
to determine when to schedule TODO items.

Does anyone else use column mode in the Agenda to find time slots to
for scheduling?

My quandry is this:  I use the agenda to show me the TODO items that aren't
scheduled -- but if I'm already using the agenda to show me the upcoming week
and the open time-slots, then I have to bounce back and forth between
the agenda views.

This is workable, but I wanted to see if anyone has a better method
for scheduling
items for the upcoming week.

Thanks in advance,
--Nate

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


[Orgmode] Re: indentation bug related to preceding :PROPERTIES: line

2011-02-04 Thread Bernt Hansen
Nicolas Goaziou n.goaz...@gmail.com writes:

 Hello,

 Rainer Stengele writes:

 Hi all,

 I have found an indentation bug:
 
 Pressing TAB on the :END: closing the :LOGBOOK: indents it to the
 same level as the :PROPERTIES: string above.

 I cannot reproduce it in development version. What version are you using?

Hi Rainer,

I can't reproduce this either.  Does it happen with a minimal emacs
setup for you?  Maybe there is something in your custom emacs setup that
is triggering this behaviour.

Regards,
Bernt

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


Re: [Orgmode] Solved the problem of org-capture apparently not working

2011-02-04 Thread Puneeth Chaganti
Hi,

On Sat, Feb 5, 2011 at 6:02 AM, Charles Cave charles.c...@gmail.com wrote:
[..]
 My suggestion to eliminate the problem is to modify the org-capture algorithm
 so years have to match beginning of line + one asterisk + one space + the year

 Similarly, months could match beginning of line + two asterisks + one space +
 the year + hyphen + month number + space + Monthname.    But the chance of 
 this
 format heading appearing outside a date-tree would be very low.

org-datetree currently checks if a buffer has an entry with a DATE_TREE
property (any value), and if it finds one, the date tree will become a
subtree under that entry.

This change would break that feature.

-- Puneeth

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


Re: [Orgmode] Choosing css for Worg

2011-02-04 Thread Jeff Horn
There was some recent discussion of using multiple stylesheets on
Worg. I'm a fan of implementing something on the server. In the
meantime, I ran across Stylebot and thought it might be useful for
both creating and using (and sharing!) custom style sheets for Worg.
It's a Chrome extension to interactively create user style sheets,
share them, or select others' sheets:

http://thechangelog.com/post/3105212029/stylebot-adapt-the-web-s-appearance

On Thu, Feb 3, 2011 at 9:48 AM, Jason Dunsmore
emacs-orgm...@dunsmor.com wrote:
 Jambunathan K kjambunat...@gmail.com writes:

 Emacswiki has a nice and easy way to choose CSS for the page it
 renders. Look for `use it' links in the below page.

 http://www.emacswiki.org/emacs/CSS

 Is there anything similar for org/worg pages?

 Hi Jambunathan,

 You can use a browser extension for this:
 https://addons.mozilla.org/en-US/firefox/addon/style-sheet-chooser-ii/
 https://chrome.google.com/extensions/detail/daodklicmmjhcacgkjpianadkdkbkbce

 Also, see the recent discussion:
 http://thread.gmane.org/gmane.emacs.orgmode/31506/focus=36462

 It doesn't look like there are alternate style sheets for non-Worg pages
 on orgmode.org, but you can probably use a browser extension to
 customize those as well.

 Regards,
 Jason

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




-- 
Jeffrey Horn
http://www.failuretorefrain.com/jeff/

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


Re: [Orgmode] [PATCH] Solved the problem of org-capture apparently not working

2011-02-04 Thread Puneeth Chaganti
Hi,

On Sat, Feb 5, 2011 at 9:57 AM, Puneeth Chaganti puncha...@gmail.com wrote:
 Hi,

 On Sat, Feb 5, 2011 at 6:02 AM, Charles Cave charles.c...@gmail.com wrote:
 [..]
 My suggestion to eliminate the problem is to modify the org-capture algorithm
 so years have to match beginning of line + one asterisk + one space + the 
 year

 Similarly, months could match beginning of line + two asterisks + one space +
 the year + hyphen + month number + space + Monthname.    But the chance of 
 this
 format heading appearing outside a date-tree would be very low.

 org-datetree currently checks if a buffer has an entry with a DATE_TREE
 property (any value), and if it finds one, the date tree will become a
 subtree under that entry.

 This change would break that feature.


Attached is a patch that fixes this, by using the
org-datetree-base-level variable. More details in the commit message.

@Bastien,

I didn't get the time to configure and use git-send-email. I am
sending a patch obtained using git-format-patch. So, you will have to
use git-am to apply this. (of course, if this seems good enough :))

-- Puneeth


0001-Fix-regex-for-finding-datetree-year-subtree.patch
Description: Binary data
___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode