[Orgmode] Re: Example of thesis in org-mode and LaTeX

2007-12-09 Thread Gour
On Tue, 4 Dec 2007 03:14:11 +0100
"Daniel Clemente" <[EMAIL PROTECTED]> wrote:

>   I started writing it in LyX but after some months I changed to
> org-mode. It was a risky change since org-export-as-latex was still in
> development, but thanks to Bastien all bugs were quickly fixed.

Thank you very much for sharing your experience.

I did two books with LyX and after recently migrating to emacs (from vim) I'm 
more than
enthusiastic to stay as much as possible in emacs OS :-)

Since I want to use org-mode for GTD, writing for latex in it sounds very cool.

Few days ago I was asking what's the 'quality' of muse's latex export, i.e. 
whether it is 
human-readable for further refining in auctex, but  hearing abour your success 
with org-mode 
no need to look further, just the opposite to learn org-mode properly ;)

/me sighs seeing how much to learn to move more into emacs - gnus as mailer is 
still a hard nut :-(


Sincerely,
Gour


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


Re: [Orgmode] inserting files within remember templates

2007-12-09 Thread Adam Spiers
On Sat, Nov 24, 2007 at 02:52:27PM +, Adam Spiers wrote:
> On Wed, Nov 07, 2007 at 09:42:55AM +0100, Carsten Dominik wrote:
> > On 6 Nov 2007, at 11:39 PM, Adam Spiers wrote:
> > > On Tue, Nov 06, 2007 at 04:36:47PM +, Adam Spiers wrote:
> > > > This could easily be accomplished if remember templates allowed  
> > > > syntax such as
> > > > 
> > > > ,--
> > > > | * %T
> > > > | %(shell-command-to-string "grep 'last full' 
> > > > /proc/acpi/battery/BAT0/info")
> > > > `--
> > >
> > > OK, it turns out that this was easy to implement, and I think the
> > > patch is small enough that it could be accepted even though I haven't
> > > got around to sending back the copyright assignment form yet (sorry -
> > > this *will* happen at some point!)
> > 
> > I'll take this patch, thanks.

[snipped]

> Here's a better version.  Differences:

[snipped]

>   - Patches texinfo file.

[snipped]

> diff -r 09b1470ac170 org.texi
> --- a/org.texiWed Oct 31 09:46:35 2007 +
> +++ b/org.texiSat Nov 24 14:39:51 2007 +
> @@ -4378,6 +4378,8 @@ insertion of content:
>  %^g @r{prompt for tags, with completion on tags in target file.}
>  %^G @r{prompt for tags, with completion all tags in all agenda 
> files.}
>  %:keyword   @r{specific information for certain link types, see below}
> +%[pathname] @r{insert the contents of the file given by @code{pathname}}
> +%(sexp) @r{evaluate elisp @code{(sexp)} and replace with the result}
>  @end example
>  
>  @noindent

I just noticed that we both forgot to patch the defcustom with some of
the recent changes!  This should fix it:

diff -r 742454cf3979 org.el
--- a/org.elWed Dec 05 09:48:23 2007 +
+++ b/org.elSun Dec 09 12:18:26 2007 +
@@ -1436,7 +1436,7 @@ a first line starting with a star, to ac
 a first line starting with a star, to act as the org-mode headline.
 Furthermore, the following %-escapes will be replaced with content:
 
-  %^{prompt}  prompt the user for a string and replace this sequence with it.
+  %^{prompt}  prompt the user for a string and replace this sequence with it
   %t  time stamp, date only
   %T  time stamp with date and time
   %u, %U  like the above, but inactive time stamps
@@ -1447,6 +1447,12 @@ Furthermore, the following %-escapes wil
   %i  initial content, the region when remember is called with C-u.
   If %i is indented, the entire inserted text will be indented
   as well.
+  %c  content of the clipboard, or current kill ring head
+  %^g prompt for tags, with completion on tags in target file
+  %^G prompt for tags, with completion all tags in all agenda files
+  %:keyword   specific information for certain link types, see below
+  %[pathname] insert the contents of the file given by `pathname'
+  %(sexp) evaluate elisp `(sexp)' and replace with the result
 
   %?  After completing the template, position cursor here.
 


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


[Orgmode] link descriptions with square parentheses

2007-12-09 Thread Adam Spiers
Is it possible to have a link whose description contains the
characters '[' and/or ']' ?  For example, one might want a link to a
mail on this list to contain the contents of the Subject: header,
which of course includes "[Orgmode]".

If not, would it be easy to add support?


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


[Orgmode] FR: make C-c C-c for storing remember notes optional

2007-12-09 Thread Adam Spiers
Simple feature request:

Could we make it optional whether C-c C-c is required to store a note,
on a per-template basis?  This makes most sense when it is known in
advance that the only things which might need to be changed within the
template are already taken care of via %^{foo} prompts.  So when all
the prompts have been entered, the final  keystroke will store
the note immediately, rather than the user having to type  C-c
C-c.


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


Re: [Orgmode] Re: V5.16b: C-c a e no more functioning

2007-12-09 Thread Bastien
Hi Rainer,

is this problem still happening?  If so, can you resend the backtrace,
keeping it complete?  I can't reproduce it with your config and 5.16b.

Thanks,

Rainer Stengele <[EMAIL PROTECTED]> writes:

> I tried the debug mode and found out that tzhe reasoin lies in my
> custom agenda views:
>
> Debugger entered--Lisp error: (wrong-type-argument listp 88) (let (88
> 45 65 103 101 110 100 97 32 48 32 100 97 121 115 32 100 101 97 100 108
> 105 110 101 32 112 114 101 118 105 101 119) (org-agenda nil "dd"))
> eval((let (88 45 65 103 101 110 100 97 32 48 32 100 97 121 115 32 100
> 101 97 100 108 105 110 101 32 112 114 101 118 105 101 119) (org-agenda
> nil "dd"))) byte-code 

-- 
Bastien


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


Re: [Orgmode] Level specification in refiling target

2007-12-09 Thread Bastien
Wanrong Lin <[EMAIL PROTECTED]> writes:

> I have a line like this (copied from the org release notes)
>
> (setq org-refile-targets '((org-agenda-files . (:level . 2
>
> My intention was to have all headings in level 2 AND level 1 in the
> target list. But it seems only level 2 headings are in the list. Is
> there a way to do it? If not, can we consider adding that? Thanks a
> lot.

This makes sense.

Here is a dumb patch against Org 5.16b that should implement the
expected behavior.  

diff -u /home/guerry/elisp/testing/org-5.16b/ 
/home/guerry/elisp/testing/tmp/org.el
--- /home/guerry/elisp/testing/org-5.16b/org.el 2007-12-04 08:40:13.0 
+
+++ /home/guerry/elisp/testing/tmp/org.el   2007-12-09 21:23:48.0 
+
@@ -13486,7 +13486,7 @@
((eq (car desc) :regexp)
(setq descre (cdr desc)))
((eq (car desc) :level)
-   (setq descre (concat "^\\*\\{" (number-to-string
+   (setq descre (concat "^\\*\\{1," (number-to-string
(if org-odd-levels-only
(1- (* 2 (cdr desc)))
  (cdr desc)))

Diff finished.  Sun Dec  9 21:23:55 2007

I'm not sure it's the right thing to do, though.  Maybe it's better to
let the user define the level as a string of the form "1,2" (for levels
one to two, or "2,5" (for levels 2 to 5) or "5," etc.

-- 
Bastien


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


Re: [Orgmode] [ feature request ] colourful timestamps

2007-12-09 Thread Bastien
Hi Phil,

Phil Jackson <[EMAIL PROTECTED]> writes:

> Something I thought might be nice is highlighting of timestamps
> according to there relativity to time().
>
> For example, at time of writing, <2006-12-11> would be red, <2007-12-03
> Mon 19:00> pink. Perhaps for customisation:
>
> (setq org-timestamp-colour-map
>  '(("<2h" . 'face)
>("<10m" . 'face)))

I like the general idea of having feedback about the proximity of a
deadline or time-stamp.  But I think doing this interactively is better,
since the values like "<2h" "<10m" (in your example) are very likely to
change quite often, no?

In the same spirit, I've written this, which let you check for deadlines
or scheduled items before a date (strings like "+2d" are okay):

--8<---cut here---start->8---
(defun org-check-before-date (date)
  "Check if there are deadlines or scheduled entries before DATE."
  (interactive (list (org-read-date)))
  (let ((case-fold-search nil)
(regexp (concat "\\<\\(" org-deadline-string 
"\\|" org-scheduled-string 
"\\) *<\\([^>]+\\)>"))
(callback
 (lambda () (time-less-p
 (org-time-string-to-time (match-string 2))
 (org-time-string-to-time date)
(message "%d entries before %s"
 (org-occur regexp nil callback) date)))
--8<---cut here---end--->8---

If you want to permanently add this to `org-sparse-trees', here is a
patch against 5.16b.

diff -u /home/guerry/elisp/testing/org-5.16b/ /home/guerry/elisp/testing/tmp/org.el
--- /home/guerry/elisp/testing/org-5.16b/org.el	2007-12-04 08:40:13.0 +
+++ /home/guerry/elisp/testing/tmp/org.el	2007-12-09 22:32:07.0 +
@@ -14433,11 +14433,13 @@
 r  Show entries matching a regular expression"
   (interactive "P")
   (let (ans kwd value)
-(message "Sparse tree: [/]regexp   [t]odo-kwd   [T]ag   [p]roperty  [d]eadlines")
+(message "Sparse tree: [/]regexp  [t]odo-kwd  [T]ag  [p]roperty  [d]eadlines  [b]efore-date")
 (setq ans (read-char-exclusive))
 (cond
  ((equal ans ?d)
   (call-interactively 'org-check-deadlines))
+ ((equal ans ?b)
+  (call-interactively 'org-check-before-date))
  ((equal ans ?t)
   (org-show-todo-tree '(4)))
  ((equal ans ?T)
@@ -17372,6 +17374,20 @@
 	 (org-occur regexp nil callback)
 	 org-warn-days)))
 
+(defun org-check-before-date (date)
+  "Check if there are deadlines or scheduled entries before DATE."
+  (interactive (list (org-read-date)))
+  (let ((case-fold-search nil)
+	(regexp (concat "\\<\\(" org-deadline-string 
+			"\\|" org-scheduled-string 
+			"\\) *<\\([^>]+\\)>"))
+	(callback
+	 (lambda () (time-less-p
+		 (org-time-string-to-time (match-string 2))
+		 (org-time-string-to-time date)
+(message "%d entries before %s"
+	 (org-occur regexp nil callback) date)))
+
 (defun org-evaluate-time-range (&optional to-buffer)
   "Evaluate a time range by computing the difference between start and end.
 Normally the result is just printed in the echo area, but with prefix arg

Diff finished.  Sun Dec  9 22:32:19 2007

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


Re: [Orgmode] Feature Request - Active and inactive links.

2007-12-09 Thread Bastien
Hi Tim,

"Tim O'Callaghan" <[EMAIL PROTECTED]> writes:

> Currently Org mode supports links like:
>  http://www.astro.uva.nl/~dominik
>  file:/home/dominik/images/jupiter.jpg
>  news:comp.emacs
>  etc
>
> I would like to propose the concept of 'Active' links, based on
> the above. The idea being that some links are marked such that
> when Org is building an agenda, it includes these links as if they
> were in the org-agenda-files list.

It's been a while since you posted this message... I think I don't
really understand the core idea here.  Can you elaborate a bit more?
What kind of information do you want to attach to links?  what for?  
in what context should this information be displayed?  processed?

Thanks for providing further details!

-- 
Bastien


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


Re: [Orgmode] Re: Blank lines in literal html

2007-12-09 Thread Wanrong Lin

Bastien wrote:

Hi Wanrong,

Wanrong Lin <[EMAIL PROTECTED]> writes:

  

Finally, I decided to learn some elisp debugging techniques and as a
practice, it seems I found the bug and fixed it with this patch (against
org.el in 5.16b)

@@ -24437,7 +24437,7 @@
  (when (re-search-backward
 "\\(\\)\\([ \t\r\n]*\\)\\=" (- (point) 100) t)
(setq par (match-string 1))
-(replace-match "\\2\n"))
+(replace-match ""))
  (insert line "\n")
  (while (and lines
  (get-text-property 0 'org-protected (car lines)))

I am not completely sure whether this is the right fix, but so far the
output looks OK to me.



Thanks for this.  I think the patch is safe (I'm testing it for two or
three days now) but I cannot predict it will be in any cases.  I guess
Carsten will have a better call on this.

(BTW, the issue your raising here concerns the way the HTML code *looks*
and IMO they are less important than issues regarding the correctness of
the HTML code... Just a thought.)

  


Thanks for testing. Surely the No.1 priority is to have correct HTML 
syntax. But I think how the page looks comes very close as a second 
priority. After all, we use HTML because we want certain look (and 
better navigation).


Wanrong





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


Re: [Orgmode] Re: Blank lines in literal html

2007-12-09 Thread Bastien
Wanrong Lin <[EMAIL PROTECTED]> writes:

> Thanks for testing. Surely the No.1 priority is to have correct HTML
> syntax. But I think how the page looks comes very close as a second
> priority.

I'm not sure we're speaking about the same thing: I was speaking about
the HTML *source code*, not the HTML page as rendered in a browser.  I
think it's okay to be somewhat liberal about source code readability,
but not about exporting in correct HTML.

(Note that if both browsers and webpages where both implementing and
respecting W3C specs, then correct rendering and correct syntax would
always come together.)

-- 
Bastien


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


[Orgmode] Feature Request - Active and inactive links.

2007-12-09 Thread Tim O'Callaghan
On 10/12/2007, Bastien <[EMAIL PROTECTED]> wrote:
> Hi Tim,
>
> "Tim O'Callaghan" <[EMAIL PROTECTED]> writes:
>
> > Currently Org mode supports links like:
> >  http://www.astro.uva.nl/~dominik
> >  file:/home/dominik/images/jupiter.jpg
> >  news:comp.emacs
> >  etc
> >
> > I would like to propose the concept of 'Active' links, based on
> > the above. The idea being that some links are marked such that
> > when Org is building an agenda, it includes these links as if they
> > were in the org-agenda-files list.
>
> It's been a while since you posted this message... I think I
> don't really understand the core idea here.  Can you elaborate a
> bit more?  What kind of information do you want to attach to
> links?  what for?  in what context should this information be
> displayed?  processed?
> Thanks for providing further details!
>

Sorry if i was unclear, I thought my examples would it explain most of
it, my bad.

Here it is in more detail. :)

The core idea - Active links - is a link that specifies a
resource (usually remote) that will be included (and possibly
preprocessed) when you compile an agenda. They should look and
act like normal links, but be handled differently when an agenda
is compiled.

Where this idea came from.

I have a hacked together function that i use (see my rusty elisp
below) that creates org-files from ical URLs. I use this to
include my google calendar and other published events in my
agenda.

With the addition of org-add-link-type (described in Appendix
A-2 in the org manual), i could create a link type that would
convert an ical link to an org file on opening. This is great,
but i could not then auto-include that in buffed file in my
agenda without saving it and adding it to org-agenda-files.

What would be needed would be some kind of flag or indicator
that the link should be processed when creating an agenda
buffer. It would need to be assumed that the link is, or will be
preprocessed into, an org file.

This led me to consider the consequences of an 'Active Link' and
how to make it a more general and flexible concept.

* The Agenda is not passive, it modifies its source files.
= This could be mitigated using meta-tagging of read only
resources. Another more finicky method could be a file of
negative or modification assertions that change or remove a read
only link before inclusion in the Agenda. Possibly a table of
specific org node search links that replace the target with the stored org node.

* The Agenda only processes the org-agenda-files list.
= Let org build the list recursively from active links with one
org-file as the head of the tree. This would have the benefit of
letting you build different agendas based on the first org file
referenced. Note - might need to force read only active links to
be leaf nodes (i.e not recurse into them).

* The Active Link referenced is no longer an agenda item.
= If you remove the org file or its link from the within agenda,
you change the Active Link to an inactive link globally. That
is, in all of the linked files in the current org-agenda files
list.

* What if you open an active link from an org-mode buffer?
= Undecided possibly configurable? I would say open the link in
its natural state.

* What use is a an active link to a remote read-only org file?
= Collaboration. I can think of many scenarios, but the one i
like is where my wife can just update a text file or blog post
or whatever to update my agenda.

* How would you represent an active link so it is obvious?
= An active link could be prefixed by a + sign, possibly with
embedded meta information for the agenda.

Some possible examples:
- read/write remote org file for collaboration (efs/angeftp)
 +file:/[EMAIL PROTECTED]:/home/me/personal.org
- read only remote org file for collaboration in category work
 +work+http://www.astro.uva.nl/~dominik/remote.org
- read only remote ical file of local whats-on information.
+whatson+ical:http://upcoming.yahoo.com/calendar/v2/place/upI5ACueA5szd_8-

The +category+ link prefix idea is because + can be part of a URL.

* Where could you go from here?
= The concept could be extended to allow further integration to
other tools using to-org and from-org pre and post
processing. Using my ical hack for an example, it could possibly
be extended to a read/write WEBDAV link. Say for Outlook or
Sunbird integration.


So thats the idea in more detail, hope it clarifies the idea further...

Tim.

-- Google Calendar hack --
(setq google-ical-org-list
 '(
  ; removed personal links, but left a working public ical link.
  ; each ical link consists of:
  ;("ical link"
  ; "ical link download target file"
  ; "org file created - must be in org-agenda-files")
  ("http://upcoming.yahoo.com/calendar/v2/place/upI5ACueA5szd_8-";
   "~/gettingThingsDone/CalendarSync/UpComing.ics"
   "~/gettingThingsDone/CalendarSync/Upcoming.org")))

(defun toc:goggle-to-org ()
  "get a google calendar and convert it into org dates"
  (interactive)
  (with-t

Re: [Orgmode] Re: Blank lines in literal html

2007-12-09 Thread Wanrong Lin


Bastien wrote:

Wanrong Lin <[EMAIL PROTECTED]> writes:

  

Thanks for testing. Surely the No.1 priority is to have correct HTML
syntax. But I think how the page looks comes very close as a second
priority.



I'm not sure we're speaking about the same thing: I was speaking about
the HTML *source code*, not the HTML page as rendered in a browser.  I
think it's okay to be somewhat liberal about source code readability,
but not about exporting in correct HTML.

(Note that if both browsers and webpages where both implementing and
respecting W3C specs, then correct rendering and correct syntax would
always come together.)

  
Sorry, actually we were talking about different things. Maybe because we 
have different understandings of the bug itself. Just want to clarify 
the bug a little bit.


Actually, the bug is *NOT* concerned about how the HTML code looks, it 
is concerned about how the HTML page look. If I put a segment of HTML 
code in an org file that should display only one blank line, but the 
exported page displays 3 blank lines in a browser, that page has correct 
syntax but wrong content (although the rendering is still correct). 
Because the exported part is bracket in a  ...  section, a 
changed number of blank lines in the HTML code also changes the number 
of displayed blank lines in the browser.















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


[Orgmode] Automatically indent text when return is hit in an org buffer.

2007-12-09 Thread Daniel Pittman
G'day.  I am a fan of `newline-and-indent', and turn it on for most of
the modes I routinely use, since it is almost always what I want done.

org-mode rebinds the "return" key to `org-return', which acts
intelligently in the face of tables -- and calls `newline' hard-coded in
other cases.

I would like to preserve that intelligence, but also to use
`newline-and-indent', so generated this patch to implement my desired
behaviour.

By default this changes nothing: org behaves exactly the same way as it
did previously.


If this isn't the right approach I am happy to rework the patch to
better match the rest of the software.


Finally, while I believe that this is a trivial change and will not need
assignment papers anyway I can note two things:

 * there are copyright assignments from me to the FSF on record already
   for Emacs and constituents, so I don't know if I need a new
   assignment.

 * I am happy to disclaim this if necessary.

Regards,
Daniel
-- 
Daniel Pittman <[EMAIL PROTECTED]>   Phone: 03 9621 2377
Level 4, 10 Queen St, Melbourne Web: http://www.cyber.com.au
Cybersource: Australia's Leading Linux and Open Source Solutions Company


diff --git a/org/org.el b/org/org.el
--- a/org/org.el
+++ b/org/org.el
@@ -555,6 +555,13 @@ and a boolean flag as cdr."
   :type '(list
  (cons (const heading) (boolean))
  (cons (const plain-list-item) (boolean
+
+(defcustom org-return-and-indent nil
+  "Should `org-return' automatically indent the next line?
+Non-nil means, automatically indent the inserted line by calling
+`newline-and-indent' rather than `newline' when return is hit."
+  :group 'org-edit-structure
+  :type 'boolean)
 
 (defcustom org-insert-heading-hook nil
   "Hook being run after inserting a new heading."
@@ -26288,12 +26295,13 @@ Calls `org-table-next-row' or `newline',
 Calls `org-table-next-row' or `newline', depending on context.
 See the individual commands for more information."
   (interactive)
-  (cond
-   ((bobp) (newline))
-   ((org-at-table-p)
-(org-table-justify-field-maybe)
-(call-interactively 'org-table-next-row))
-   (t (newline
+  (let ((newline (if org-return-and-indent #'newline-and-indent #'newline)))
+(cond
+ ((bobp) (funcall newline))
+ ((org-at-table-p)
+  (org-table-justify-field-maybe)
+  (call-interactively 'org-table-next-row))
+ (t (funcall newline)
 
 
 (defun org-ctrl-c-minus ()



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