Re: [O] Commenting a diary sexp line??

2011-07-23 Thread suvayu ali
Hi Memnon,

On Sat, Jul 23, 2011 at 3:15 AM, Memnon Anon
 wrote:
> ,
> | org-agenda-skip-comment-trees is a variable defined in `org-agenda.el'.
> | Its value is t
> |
> | Documentation:
> | Non-nil means skip trees that start with the COMMENT keyword.
> | When nil, these trees are also scanned by agenda commands.
> `
>

Sorry I forgot to respond.

I checked my settings, it is set to the default value: t. It works fine. :)

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] [patch] Re: HTML Postamble is inside Content DIV

2011-07-23 Thread Sebastien Vauban
Hi Bastien,

Bastien wrote:
> thanks a lot for the patch.  
>
> I've just committed a modified version of it:
>
>   
> http://orgmode.org/w/?p=org-mode.git;a=commit;h=2f1fbc58be1dc48621217d666da7bc46c3c5d84e
>
> Putting "preamble", "content" and "postamble" in a new variable
> `org-export-html-divs' (which see).  The old variable
> `org-export-html-content-div' is still here for compatibility 
> reasons, but is not customizable anymore.

Just reviewed it. Very nice addition. Thanks for committing it.

>> Any comment or objection?
>
> One comment: thanks for bringing this up :)

You're welcome!

Best regards,
  Seb

-- 
Sebastien Vauban




[O] Personal wiki

2011-07-23 Thread Anders Waldenborg
Maybe someone else is interested in my "personal wiki" I implemented
on top of org-mode.

It basically adds three things to plain org-mode
* Narrowing
  Makes only current section[*] visible and thus avoids any distraction
  by unrelated things.
* Automatic links of all text matching a section name.
  Much like org-wikinodes, but without camel case.
* Navigation history
  When visiting different sections in the same file history is
  recorded allowing navigation "back" to previous section.

Find the el file attached, and also an example file.

What do you think?

[*] A section is the contents of a first level heading.

 anders
 aw-org-pw.el --- personal wiki major mode derived from org-mode.
;;
;; Copyright (C) 2011 Anders Waldenborg
;;
;; Author: Anders Waldenborg 
;; Keywords: outlines, calendar, wp
;; Version: 0.2
;;
;; This file NOT is part of GNU Emacs.
;;
;; This program is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or (at
;; your option) any later version.
;;
;; This program is distributed in the hope that it will be useful, but
;; WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
;; General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with this program.  If not, see `http://www.gnu.org/licenses/'.
;;
;;
;;; Commentary:
;;
;; This implements the following features on top of org-mode making it
;; feel more like a (personal) wiki:
;;
;;  * Auto narrowing to current section (= first level heading).
;;  * Linking of all section names.
;;  * Creating of new sections when following nonexistant links.
;;  * Recording navigation history and back functionality.
;;
;;
;;; Change Log:
;;
;; 2011-07-23  Anders Waldenborg
;; 0.2 Bugfixes
;; - Fix bug with narrowing going one char to long.
;; - Make aw-org-pw-link-regexp buffer local.
;; - Fix rear-nonstickyness.
;; - Give aw-org-pw-current-section correct capitalization.
;;
;; 2011-07-15  Anders Waldenborg
;; 0.1 Initial release.
;;; Code:


(require 'org)

(defconst aw-org-pw-frontpage-name "StartPage"
  "Fake name created for the section before first heading")



 Random helper functions


(defun aw-truncate-list (l n)
  "Destructivly truncates list l to n elements"
  (let ((e (nthcdr (1- n) l)))
(when e
  (setcdr e nil)))
  l)

(defun aw-org-pw-word-at-point ()
  "Return word at point, or currently marked text if mark is active"
  (interactive)
  (if mark-active
  (buffer-substring-no-properties (point) (mark))
(when (looking-at "\\w")
  (let ((start (save-excursion (while (not (looking-at "\\b\\w")) 
(backward-char)) (point)))
(end (save-excursion (while (not (looking-at "\\w\\b")) 
(forward-char)) (1+ (point)
(buffer-substring-no-properties start end)



 Section navigation


(defun aw-org-pw-section-regexp (&optional pagename)
  "Return a regexp matching page section (or any section if pagename is nil)"
  (format "^\\* *\\(%s\\)$" (if pagename
(regexp-quote pagename)
  "[^*].*")))

(defun aw-org-pw-get-section-region (name)
  "Find (start . end) points of specified section"
  (let ((case-fold-search t)
(search (aw-org-pw-section-regexp name)))
(save-excursion
  (save-restriction
(widen)
(goto-char (point-min))
(aw-org-pw-next-section)
(if (string-equal name aw-org-pw-frontpage-name)
(cons (point-min) (1- (point)))
  (while (not (looking-at search))
(forward-line)
(aw-org-pw-next-section)
(if (eobp)
(error "Section not found")))
  (forward-line)
  (let ((start (point)))
(aw-org-pw-next-section)
(backward-char)
(cons start (point

(defun aw-org-pw-all-sections ()
  "Return a list with all section names"
  (save-restriction
(save-excursion
  (widen)
  (let ((res (list aw-org-pw-frontpage-name))
(re (aw-org-pw-section-regexp)))
(goto-char (point-min))
(while (not (eobp))
  (when (looking-at re)
(setq res (cons (match-string-no-properties 1) res)))
  (forward-line))
res

(defun aw-org-pw-next-section ()
  "Go to next section"
  (let ((re (aw-org-pw-section-regexp)))
(while (not (or (eobp) (looking-at re)))
  (forward-line))
(point)))

(defun aw-org-pw-current-section-name ()
  "Find current section name

This is usually same as the variable aw-org-pw-current-section,
but if navigation has happened by other means (e.g isearch) this
function may be needed to get the correct value."
  (sa

[O] Org Mobile Writing App (a la Epistle/Paragraft)

2011-07-23 Thread tycho garen
I must confess that I've fallen onto the Tablet bandwagon, and despite
the alure of having a more functional mobile-org,I went for an android
tablet (to match the phone, and because I'm not a mac user.) Largely I
think it's great, and while I've got a mobile-org setup that I like
well enough, I found myself saying "wouldn't it rock, if..." a few
times and I just wanted to float the idea with you. 

While I think mobile-org is a great concept for making all of the task
planning and organization features of org more accessible on the go,
it's not quite so good for taking notes and doing the kind of writing
that I spend most of my waking hours doing these days. 

I've been using a really delightful little app called
[Epistle](http://kooklab.com/epistle.html) which renders markdown text
(a fetish of mine that predates org-mode,) that works with dropbox. I
think I learned about this from someone on the list. I suspect it's a
lot like Paragraft for those of you on the otherside.

I've created a little script that links all of my org-files into a
place where Epistle can see them in dropbox
(http://tychoish.com/code/epistle-linker/), and while the rendering
doesn't work, it is nice to be able to read and edit these files. I've
also, as an aside created some procmail and shell glue that takes
emails and inserts them into an org-file so that I can capture stuff
on the go using the email program. That's here: 

http://tychoish.com/code/org-mail/

Wouldn't it be nice to have something like Epistle for org-mode? It
might just render org-mode text to HTML, and frankly that would be
enough for me. Org-indent equivalent, syntax highlighting, and
collapsing trees (probably in that order) might be nice as well, but I
think the key is simple and quick... 

I'm not a developer, so I can't promise to start making an app this
instant if there's interest, but if anyone's bored and thinks this
might be a good idea (or knows of something that might work better for
this.) I'd love to hear about it. 

Cheers,
Sam 

-- 
tycho(ish) @
ga...@tychoish.com
http://tychoish.com/
"don't get it right, get it written" -- james thurber


pgpGZmGiRaDIK.pgp
Description: PGP signature


[O] Question about org-search-view and org-occur-in-agenda-files

2011-07-23 Thread suvayu ali
Hi Orgers,

I know that I can use `org-search-view' or `org-occur-in-agenda-files'
from the agenda to search for some string on all my agenda files. And I
can customise `org-agenda-text-search-extra-files' to include extra text
files.

These search functions are quite powerful in general, so I was wondering
if these functions can be used to do a search restricted to say a list
of files or to org files within a directory. If I could wrap these in my
own functions, even that would be amazingly helpful.

To illustrate a use case, I recently switched research projects[1]. I
keep all my files related to the OLDPROJ under ~/org/OLDPROJ/ and all my
files related to the NEWPROJ under ~/org/NEWPROJ/[2]. Now when I perform
a text search I want to include only the NEWPROJ along with my agenda
files (located in ~/org/). Now I would like to have an interface (either
through the agenda menu or through some interactively called function)
to perform a search _only_ on the OLDPROJ files when necessary. Is that
possible?

Any hints as to how I can achieve this would be amazingly helpful.
Thanks. :)


Footnotes:

[1] I am using the word project rather loosely to describe a
super-project with several sub-projects which are rather significant
by themselves.

[2] These project directories have their own structure based on
sub-projects and other needs.

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] [patch] Re: HTML Postamble is inside Content DIV

2011-07-23 Thread Bastien
Hi Sebastien,

thanks a lot for the patch.  

I've just committed a modified version of it:

  
http://orgmode.org/w/?p=org-mode.git;a=commit;h=2f1fbc58be1dc48621217d666da7bc46c3c5d84e

Putting "preamble", "content" and "postamble" in a new variable
`org-export-html-divs' (which see).  The old variable
`org-export-html-content-div' is still here for compatibility 
reasons, but is not customizable anymore.

> Any comment or objection?

One comment: thanks for bringing this up :)

Best,

-- 
 Bastien



Re: [O] calculation question

2011-07-23 Thread Michael Brand
Hi Jude and Bart

On Tue, Jul 19, 2011 at 10:13, Bastien  wrote:
> Bart Bunting  writes:
>> I have noticed that emacspeak does not read anything done using
>> overlays.  I am presuming the column and row labels are done this way.
>
> Yes, the references are displayed as an overlay.

As an alternative to overlays used by "C-c }" on a table to display
the coordinate grid, I would suggest the attached patch that displays
the coordinates in the table editor "C-c `" like this:

#+begin_src org
#
# Edit field @2$3 and finish with C-c C-c
#
123
#+end_src

It also supports the org-table-follow-field-mode "C-u C-u C-c `" added
by Carsten two months ago:
http://orgmode.org/w/org-mode.git/commitdiff/bffdfeb7fcd6c094d44e754ace7ce28fab81f2ff

Michael


0001-Table-editor-Display-coordinates-of-current-field.patch
Description: Binary data


Re: [O] Referring to ID in other Org-mode file

2011-07-23 Thread Karl Voit
* Memnon Anon  wrote:
> Karl Voit  writes:
>
>> How can I refer to an ID in another Org-mode file (withing the same
>> folder)?
> [...]
>> I was searching in the Org-mode manual but could not find any
>> solution for my problem. Either this is not possible or I could not
>> find the (existing) solution yet.
>
> ,[ (info "(org)Search options") ]
> `

Sorry, I was not searching good enough. Shame on me :-(

In this case, that method is exactly what I need:

file:README.org::*foobar

Since GitHub's interpretation of Org-mode files is not that
perfect I want to avoid drawers containing IDs at all.[1]

The more I am using Org-mode the more I see its beauty :-)

  1. https://github.com/novoid/Memacs
-- 
Karl Voit




Re: [O] Referring to ID in other Org-mode file

2011-07-23 Thread Karl Voit
* suvayu ali  wrote:
> On Sat, Jul 23, 2011 at 5:05 PM, Karl Voit  wrote:
>> I would like you to point to id:foo.org#interesting
>
> This should work:
> [[id:interesting][Description]]

Wow, this worked indeed! I assumed that this would work only within
files of org-agenda-files.

Thanks!

-- 
Karl Voit




Re: [O] Referring to ID in other Org-mode file

2011-07-23 Thread Memnon Anon
Karl Voit  writes:

> How can I refer to an ID in another Org-mode file (withing the same
> folder)?
[...]
> I was searching in the Org-mode manual but could not find any
> solution for my problem. Either this is not possible or I could not
> find the (existing) solution yet.

,[ (info "(org)Search options") ]
|Here is the syntax of the different ways to attach a search to a file
| link, together with an explanation:
| 
|  [[file:~/code/main.c::255]]
|  [[file:~/xx.org::My Target]]
|  [[file:~/xx.org::*My Target]]
!  [[file:~/xx.org::#my-custom-id]]
|  [[file:~/xx.org::/regexp/]]
`

?

Memnon




Re: [O] Crashing bug in spreadsheet

2011-07-23 Thread Bastien
Hi Ken,

 writes:

> Yeah, I get that, but I was hoping a circular reference (or alternatively
> a seemingly invalid reference, since I have no third h-line) would cause
> an error rather than force me to kill Emacs.

Right.  This is now the case.  Thanks for bringing this up.

-- 
 Bastien



Re: [O] Referring to ID in other Org-mode file

2011-07-23 Thread suvayu ali
On Sat, Jul 23, 2011 at 5:05 PM, Karl Voit  wrote:
> I would like you to point to id:foo.org#interesting

This should work:

[[id:interesting][Description]]

-- 
Suvayu

Open source is the future. It sets us free.



[O] Referring to ID in other Org-mode file

2011-07-23 Thread Karl Voit
Hi!

How can I refer to an ID in another Org-mode file (withing the same
folder)?

,[ file:foo.org ]
| * This is interesting
|   :PROPERTIES:
|   :ID: interesting
|   :END:
`

,[ file:bar.org ]
| I would like you to point to id:foo.org#interesting
`

The link like this does not (yet) work. How can I accomplish this?

I was searching in the Org-mode manual but could not find any
solution for my problem. Either this is not possible or I could not
find the (existing) solution yet.

-- 
Karl Voit




[O] Special Characters In Tags

2011-07-23 Thread aditya siram
Hi all,
Are special characters allowed in tags? I have a set of source blocks
that use certain Haskell functions and to the heading I'd like to add
tags with those function names. But the functions are named eg. (&&&)
which won't show up if typed normally. Is there an escape character
that will allow this?
-deech



Re: [O] default PRIORITY

2011-07-23 Thread Michael Brand
Hi all

I would like to bump my previous post, although being aware that
everybody here is volunteer.

Michael

On Sun, Jul 10, 2011 at 13:12, Michael Brand  wrote:
Hi all

It seems to me that there is an inconsistency with the default
PRIORITY in searches and custom agenda blocks of types like "tags" or
"tags-todo".

Assume org-default-priority B and an agenda file
#+begin_src org
 ,* TODO [#C] low prio
 ,* TODO default prio
 ,* TODO [#A] high prio
#+end_src

When org-agenda-custom-commands contains
#+begin_src emacs-lisp
 ("x" "test"
  ((tags-todo
   "PRIORITY<=\"C\"")))
#+end_src
the agenda block looks like this:
TODO [#A] high prio
TODO default prio
TODO [#C] low prio
This is like expected: The item without PRIORITY gets the default B
for sorting from org-get-priority called in org-scan-tags.

When org-agenda-custom-commands contains
#+begin_src emacs-lisp
 ("x" "test"
  ((tags-todo
   "PRIORITY=\"B\"")))
#+end_src
the agenda block is empty. I expected that the item without PRIORITY
matches and is shown because I expect it to get the default B also
when matching. But this is not the case for org-cached-entry-get
called in org-scan-tags at "(eval matching)".

Even worse: The item without PRIORITY is shown with "PRIORITY<\"B\"".
During debugging it seemed to me that this is simply because the item
gets the PRIORITY " " when matching.

Now I am not sure whether I would be able to provide a patch and how
this should be solved: Only in org-scan-tags or better in
org-entry-properties and/or friends like org-entry-get,
org-cached-entry-get and maybe more?

Tested with current release_7.5-416-g27360b1 and Emacs 23.3.1

Michael



Re: [O] Problems getting dropbox support on MobileOrg

2011-07-23 Thread Stephen Eglen
Thank you very much Max!  This works great.  Thanks for your help, and
to Matt Jones for the app.

Stephen

> > see "Dropbox authentication".  Should the "MobileOrg" folder 
> > have been created for me on my Dropbox site?  (It looks like it is
> > automatically created on the iphone app).  Nothing was created, either
> > before or after attempting to sync.  So, I then manually created
> > "MobileOrg" folder, and tried to "Sync" again, but no joy.
> 
> No you need to create the folder from the Emacs side.
> 
> Example setup;
> 
> 1. Install dropbox on your linux/windows box
> 2. Make sure its started (setsid ~/.dropbox-dist/dropboxd)
> 3. mkdir ~/Dropbox/syncdir
> 4. From emacs 
>(setq org-mobile-directory "~/Dropbox/syncdir")
>M-x org-mobile-push
> 5. From Android, Settings -> Configure Synchronizer -> Path
>   /syncdir/index.org
> 
> 6. From Android: Sync & Enjoy
> 
> I recently submitted a few patches for org-mobile android developer,
> that fix a few annoying problems (ie back button resetting the view to
> 1st element), there should be a new version released soon with these fixes.
> 
> 



Re: [O] calculating column averages follow up

2011-07-23 Thread Achim Gratz
Jude DaShiell  writes:
> Thanks, here's what I have now and it almost works.  When I add a new 
> line though the averages don't change until I delete the TBLFM: line and 
> the line with the =vmean(@2..-1) formulas on it then key the formulas in 
> again.  Then the averages do update to reflect new numbers.  That's not 
> a difficulty though, I can easily handle that light work using a sed 
> script.

Nah... I think you would want you table like that:

|   | Date Stamp | Systolic | Diastolic | Pulse |
|---++--+---+---|
|   | [2011-07-19 Tue 02:26] |  138 |92 |   174 |
|   | [2011-07-21 Thu 03:50] |  128 |79 |76 |
|   | [2011-07-20 Wed 04:03] |  130 |85 |74 |
|   | [2011-07-22 Fri 02:33] |  121 |80 |79 |
|   | [2011-07-23 Sat 02:52] |  118 |75 |68 |
|---++--+---+---|
| # | Average|127.0 |  82.2 |  94.2 |
|   ||  |   |   |
#+TBLFM: @>>$3..@>>$5=vmean(@I..II);%.1f

Then you can just add another line, tab into the averages line and
everything updates just the way you want.


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

SD adaptations for Waldorf Q V3.00R3 and Q+ V3.54R2:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada




Re: [O] calculating column averages follow up

2011-07-23 Thread Jude DaShiell
Thanks, here's what I have now and it almost works.  When I add a new 
line though the averages don't change until I delete the TBLFM: line and 
the line with the =vmean(@2..-1) formulas on it then key the formulas in 
again.  Then the averages do update to reflect new numbers.  That's not 
a difficulty though, I can easily handle that light work using a sed 
script.

| Date Stamp | Systalic | Diastalic | Pulse |   |   |   |   |   |   
|   |
|+--+---+---+---+---+---+---+---+---+---|
| [2011-07-19 Tue 02:26] |  138 |92 |74 |   |   |   |   |   |   
|   |
| [2011-07-21 Thu 03:50] |  128 |79 |76 |   |   |   |   |   |   
|   |
| [2011-07-20 Wed 04:03] |  130 |85 |74 |   |   |   |   |   |   
|   |
| [2011-07-22 Fri 02:33] |  121 |80 |79 |   |   |   |   |   |   
|   |
| [2011-07-23 Sat 02:52] |  118 |75 |68 |   |   |   |   |   |   
|   |
|+--+---+---+---+---+---+---+---+---+---|
| Averages   |  127 |  82.2 |  74.2 |   |   |   |   |   |   
|   |
||  |   |   |   |   |   |   |   |   
|   |
#+TBLFM: $2=vmean(@2..-1)::$3=vmean(@2..-1)::$4=vmean(@2..-1)
# Local Variables:
# kept-new-versions: 100
# version-control: t
# End:

-
On Fri, 22 Jul 2011, Nick Dokos wrote:

> Jude DaShiell  wrote:
> 
> > I removed a separator line above averages and removed a row with blank 
> > fields and ran the calculation on this table and it does have a defective 
> > formula but I don't know where the defect is now.
> > 
> > | Date Stamp | Systalic | Diastalic | Pulse |   |   |   |   |   
> > |   |   |
> > |+--+---+---+---+---+---+---+---+---+---|
> > | [2011-07-19 Tue 02:26] |  138 |92 |74 |   |   |   |   |   
> > |   |   |
> > | [2011-07-21 Thu 03:50] |  128 |79 |76 |   |   |   |   |   
> > |   |   |
> > | [2011-07-20 Wed 04:03] |  130 |85 |74 |   |   |   |   |   
> > |   |   |
> > | [2011-07-22 Fri 02:33] |  121 |80 |79 |   |   |   |   |   
> > |   |   |
> > | Averages   |   #ERROR |   |   |   |   |   |   |   
> > |   |   |
> > ||  | - |   |   |   |   |   |   
> > |   |   |
> > ||  |   |   |   |   |   |   |   
> > |   |   |
> > #+TBLFM: $2=vmean(@<..@>)
> > 
> 
> Two problems: 1) you want to set a single cell but the way the formula is 
> written
> makes it a column formula  and 2) the rows as written include the header line 
> and go
> all the way to the bottom - assuming you want the two rows after the 
> "Averages" row,
> you can say
> 
> #+TBLFM: @>>>$2=vmean(@<<..@)
> 
> That says "the third row from the bottom in column two is the mean of the 
> rows in the
> same column, ranging from second from the top to fourth from the bottom".
> 
> I thought I could use references relative to @> (e.g. @>-3) but apparently 
> that's
> not the case:
> 
> #+TBLFM: @>>>$2=vmean(@<<..@>-3)
> 
> does not work for me.
> 
> Nick
> 
>