[O] Remove current heading from refile targets?

2011-07-17 Thread Jason Dunsmore
I noticed that when I go to refile a heading, the heading that I'm
refiling is listed in the refile targets.  If I choose to refile the
heading to itself, the following error is displayed:

org-refile: Cannot refile to position inside the tree or region

When I'm choosing a refile target, the current heading gets in the way.
Would it make sense to remove the current heading from the refile
targets?  I have org-completion-use-ido set to `t', so I'm using the ido
interface to refile.

Regards,
Jason



Re: [O] how to change the headline starter *

2011-07-17 Thread Achim Gratz
Bastien b...@altern.org writes:
 Attached is a patch that replaces instances of outline-regexp 
 by org-outline-regexp.  It also introduces more harmonization.

So that's what you were doing all sunday... ;-)

 I'd be interesed in hearing about feedback.

Looks good, except that Git complains about two whitespace errors — but
that is easily taken care of by M-x delete-trailing-whitespace.


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

SD adaptation for Waldorf rackAttack V1.04R1:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada




Re: [O] Formal description of Org files

2011-07-17 Thread Eric Schulte
Bastien b...@altern.org writes:

 Hi Marcelo,

 Marcelo de Moraes Serpa celose...@gmail.com writes:

 I'm creating a web app that interacts with orgmode files and allows
 you to edit orgmode files on the browser. The edit part is not done.

 Wow, this would be a really useful tool.  Can't wait to test this!


I agree this could be very cool.  In browser editing could make Org-mode
backed collaboration with non-emacs users much more feasible, and could
greatly enhance current Org-mode/git backed wikis.  My only fear is that
you could end up implementing much of Emacs in JS.

Another option for serving Org-mode files could be an Emacs-based
web-server, for example elnode [1], which I just ran across today.


 I'm quite good at Javascript, and I wouldn't mind hacking something
 akin to orgmode elisp code and this will be what I'll do if
 everything else fails, but wouldn't using a grammar be a cleaner and
 more elegant solution?

 Can you tell more about what you mean by grammar?

 Back in february, at FOSDEM, someone asked for a description of the
 org-mode format specification.  This is still something that needs to be
 done.  Any stab at this (on Worg) would be really nice.  You can start
 anywhere (headlines, TODO keywords, etc.)

 If the grammar needs to be described in a specific format (more than
 just a formal description of the various syntactic elements of an Org
 file), let us know.


As I mentioned earlier in this thread, I think any formal expression
would be more useful if could be fed to existing parser-generation tools
to automatically write Org-mode parsers, or perhaps automatically
convert between Org-mode and other document formats.  I'm not sure
however to what degree that is just wishful thinking..

Cheers -- Eric

Footnotes: 
[1]  https://github.com/nicferrier/elnode

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



[O] Represent *everything* in Org-mode

2011-07-17 Thread Karl Voit
Hi!

I need your thoughts and feedback on this idea:

I am thinking of letting student(s) implement a (Python[1]) script
that imports[2] all kinds of data sources to generate simple (and
reduced) Org-mode heading entries and links to the original
information in order to represent the users digital life as complete
as possible.

Imagine, you have got one (additional) «archive.org» (or
«mylife.org_archive»[8]) which contains lots of small entries that
represent many things you are doing on your computer:

  * emails you send and receive
  * tweets you write
  * weblog entries you write
  * usenet postings you send
  * files you are creating (with a datestamp in its filename)
  * bookmarks you save (in delicious?)
  * SVN/git commits you are committing
  * SMS you send and receive (via smartphone)
  * ... and much more 

With this system, you can visit any day in the past to see, what
happened in your (digital) life that time. You can reconstruct
pretty much anything you were thinking, working, ... that day.

If you happen to know MyLifeBits[3] from MS Research, the papers
from Gemmell et al or the book «Total Recall»[4] you already know
what I am writing about: researchers implemented a (MS Windows only)
system to capture your digital life even with digital cameras and
screenshots of your desktop.

With Org-mode and a bunch of «connectors» this should be a fairly
easy job to do. Nothing proprietary here, the amount of data is not
that much as with those binary information from MyLifeBits.

I am thinking about a central management tool that writes the
Org-mode file(s), lets you add tags to specific sources and correct
time zone deltas caused by timestamps of services out of sync with
the time zone you are living at.

Then there are those «connectors»: one will parse through my
maildir[5] to collect sent (and received?) emails in order to
generate something like:

* [[file:/my/maildir/the_email][Urgend: Server just died]]  :email:work:
2010-01-17 Tue 08:12
:PROPERTIES:
:FROM: b...@company.example.com
:END:

Another «connector» parses my monthly backup of tweets[6] in order
to generate entries like:

* [[http://twitter.com/status/0815][I hate dying hardware]]  :tweet:
2010-01-17 Tue 08:15

Parsing a source like «locate» I can filter out files I am putting
an ISO datestamp into and generate:

* [[file:/albums/2010-01-17T08:21_rat.jpg][The rat that ate the \
server cable]]  :file:
2010-01-17 Tue 08:21

With another «connector» I am parsing my weekly delicious[7] backup
and generate entries like following for all my bookmarks:

* [[http://killrats.com][How to kill rodents]]  :delicious:animals:
2010-01-17 Tue 09:35

Without such a combined agenda view, you would possible never know
which different things you were «using» that day when a rat was the
source of a hardware downtime.

This is not a new idea but as far as I know, it was never
implemented that complete outside of MyLifeBits.


So: is there something similar out there? Probably using Org-mode
already?

And: what do *you* think of this idea?


I'd like to have a central tool that manages the connectors as
mentioned above and small and easy to implement connectors for each
data source.


  1. I know that you guys would like to see that in ELISP but here
 at my side is sadly no ELISP knowledge available :-(
  2. Currently, only one-side-import (and no two-side sync) is
 planned.
  3. http://en.wikipedia.org/wiki/MyLifeBitso
  4. http://totalrecallbook.com/ (I'll have to read it soon)
  5. http://en.wikipedia.org/wiki/Maildir
  6. I am using http://grabeeter.tugraz.at/
  7. http://delicious.com
  8. In order to keep daily agenda small/fast and only «Archive mode» complete
-- 
Karl Voit




Re: [O] Bug: Minor Bug: COOKIE_DATA property breaks parent statistics [7.5 (release_7.5.24.g5f0ef)]

2011-07-17 Thread Nicolas Goaziou
Hello,

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

 I've run into a minor bug with cookie statistics.

 The COOKIE_DATA property seems to break parent task statistics when it
 is set to 'recursive'.

 In the org file below task one/two/foo/a has the COOKIE_DATA property
 set to recursive.  Changing the state of task 'a' does not change the
 statistics cookie of the parent task 'foo' when 'a' changes from TODO to
 DONE or DONE to TODO.

 I cannot update the statistics of task 'foo' manually after changing
 task 'a' by hitting C-c # on the 'foo' headline.  If I update one of the
 other tasks under 'foo' then the statistics are updated correctly.

 I think this should update automagically when the state of 'a' changes.

 Regards,
 Bernt

 * TODO one [0/1] [0%]

 ** TODO two [0/3] [0%]

 *** TODO foo [1/4]

  TODO a [3/6]
 :PROPERTIES:
 :COOKIE_DATA: recursive
 :END:

 * TODO a.1

 ** TODO a.1.1

 ** DONE a.1.2
 CLOSED: [2011-03-09 Wed 22:50]
 :LOGBOOK:
 - State DONE   from TODO   [2011-03-09 Wed 22:50]
 :END:

 ** TODO a.1.3
 * DONE a.2
 CLOSED: [2011-03-09 Wed 22:50]
 :LOGBOOK:
 - State DONE   from TODO   [2011-03-09 Wed 22:50]
 :END:

 * DONE a.3
 CLOSED: [2011-03-09 Wed 22:50]
 :LOGBOOK:
 - State DONE   from TODO   [2011-03-09 Wed 22:50]
 :END:

  TODO b
 CLOSED: [2011-03-09 Wed 22:50]
 :LOGBOOK:
 - State DONE   from TODO   [2011-03-09 Wed 22:50]
 :END:

  DONE c
 CLOSED: [2011-03-09 Wed 22:50]
 :LOGBOOK:
 - State DONE   from TODO   [2011-03-09 Wed 22:50]
 :END:

  TODO d

 *** TODO bar

 *** TODO baz

I have pushed a fix in master branch that should solve the problem at
hand. Could you test it a bit and tell me if it does the job?

Regards,

-- 
Nicolas Goaziou



Re: [O] How-to evaluate Java-snippets in org-mode/org-babel?

2011-07-17 Thread Torsten Wagner
Sorry took me a while to test it.
It works great 
Many many thanks for your help.
I found two minor things.
My snippets contain the definition of a package, which in turn end to be a
folder. The tangle function could create folders on demand. Would be useful
for your code too. It works already by creating the folder manually and
simply write...

#+begin_src java classname packagename/classname

in the next step, people might use sessions as equivalent to a package. This
would allow to define multiple classes and the usage of them within a single
execution.

However for now its perfect already. Why not putting it into ob-java.el and
see how its develope.
Totti
On Jul 16, 2011 12:37 AM, Eric Schulte schulte.e...@gmail.com wrote:
 Hi Torsten,

 I've just written the included emacs-lisp function [1], which when added
 to your config should provide for minimal evaluation functionality for
 java code blocks.

 This function drops the body of a code block to a file named after the
 value of the :classname header argument (since java cares about file
 names), it then compiles the file with javac, and executes the resulting
 executable returning the results. See the attached Org-mode file [2]
 which evaluates successfully on my system (after I installed javac).

 I copied the code example and compilation process from [3].

 Please let me know how this works for you, hopefully once we iron out
 the kinks in this function it can serve as the seed for a full java
 mode.

 Cheers -- Eric

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

 Hi Eric,

 You probably don't want to pass the body of a code block to a lisp
 function as quoting will become a nightmare, however passing the name to
 a lisp block may be reasonable.

 I would suggest that rather than implementing this behavior in a code
 block you take a look at starting a ob-java.el file. A partial
 implementation (e.g., only external evaluation, no session evaluation)
 would be a useful contribution, and given the many helper functions and
 examples present in the other ob-* files this would most likely be
 easier than a custom lisp-block implementation.

 o.k. the first round of evaluations is over and it worked out
 o.k. However, there was still rather much handwork to do.
 I tried to get a ob-java.el file together using the template and
 mainly by looking at ob-c.el which I guess comes close what would have
 to be done for java.
 However, my lisp-skills (which are close to zero) are not enough to
 get it working. The main problem was that ob-c.el is working for both
 C and C++ and all this if then else troubles me a bit.

 Basically, I want only tangle the actual code block into a temp
 file. Well temp is not really right, since java demand its file
 structure and file naming. Finally execute it externally by your
 proposed code

 javac -cp . mypackage/myclass.java
 java -cp . mypackage.myclass

 and return the results

 Hmm maybe better to give a real world example (stripped down to make
 it shorter)
 I use now the following way
 /---/
 #+BABEL: :mkdirp t

 * Coursework 1
 ** StudentID1
 #+BEGIN_SRC java
 package foo;
 public class Bar
 {
 private double ans = 0
 public void set(double d){
 ans = d;
 }
 public void print(){
 System.out.println(ans);
 }
 public static void main(String[] argv){
 Bar c = new Bar();
 c.set(100);
 c.print();
 }
 }
 #+end_src

 ** StudentID2
 #+BEGIN_SRC java
 package foo;
 public class Bar
 {
 private double x = 0
 public void set(double in){
 x = in;
 }
 public void print(){
 System.out.println(x);
 }
 public static void main(String[] argv){
 Bar myclass = new Bar();
 myclass.set(100);
 myclass.print();
 }
 }
 #+end_src

 ** Result
 #+srcname: result
 #+begin_src sh :results output
 javac -cp . foo/Bar.java
 java -cp . foo.Bar
 #+end_src

 //


 For now I only added the tangle command to a single code block and
 created the file via C-c C-v t.

 #+BEGIN_SRC java tangle: foo/Bar.java

 Then I rushed down to a shell block result which executed the the
 above commands. I checked the results and started to remove the tangle
 object from one block and added it to the next block. Kind of tiring
 if you have several dozen of blocks.
 Guess you can see from the above example the trouble of having several
 dozen of them and then tangeling them one by one and execute the
 result block ;)

 I tried to make it more easy by giving the shell block a name and call
 it under each java code block. This would save me the time going up
 and down in my file.

 #+call: result()

 However, I noticed that the result update was always done at the first
 appearances of the call , like under the first java code block but not
 at the desired code block?!
 if you fold all together it would look like

 /---/
 #+BABEL: :mkdirp t

 * Coursework 1
 ** StudentID1
 #+BEGIN_SRC java
 #+call: result()

 #+results: result
 

Re: [O] Bug: Org-Babel Mode R Plot Output to LaTeX File [Babel] [7.5]

2011-07-17 Thread Bastien
Hi Sebastien,

Sebastien Vauban wxhgmqzgw...@spammotel.com writes:

 Shouldn't it more appropriate to give that var such a default:

 width=0.9\\linewidth

 10em seems to me much to small in *all* cases, no?

Yes, you're right.  I've just applied a patch changing the default to
what you suggest.  

Thanks!

-- 
 Bastien



[O] Exporting to wiki syntax from org mode

2011-07-17 Thread damitr
Hi,

Is there any option for exporting .org file to a wiki syntax?
If there is none, are there any people working on it?

D

-- 
My cell number is a prime number, is yours?



Re: [O] how to change the headline starter *

2011-07-17 Thread Aankhen
Hi,

On Sat, Jul 16, 2011 at 18:29, Pieter Praet pie...@praet.org wrote:
 On Fri, 15 Jul 2011 12:21:01 +0200, Philipp Haselwarter 
 philipp.haselwar...@gmx.de wrote:
 No need to go all flaming because someone thinks the looks of the
 software matter. TBH I don't see what's wrong with that or in what way
 that's the opposite of efficiency.

 What I considered wrong about it was the OP implying -twice- that a
 frivolous feature request such as this could be marked as being a
 full-caps BUG [1,2].

 Considering all the time and effort Org-mode's selfless developers have
 sacrificed to deliver this mindblowing piece of software to us, this
 could easily be perceived as an insult in my opinion, regardless of
 whether or not it was intentional.

I agree.

 I know that this doesn't justify the tone of my impulsive reply in any
 way whatsoever, and I do apologize for disrupting the serene atmosphere
 which characterizes this list, but... I sent it, and I stand behind it 100%.

 Besides, how could someone who cares about how slick and shiny their
 software looks *possibly* end up using Emacs?

Pretty easy: you see that Emacs massively increases your productivity,
and you use it.  The genius of Emacs lies not in being ugly or being
minimalistic (now that would be something) but in being an amazingly
customizable platform.  Being nice to look at would not in any way
automatically render it useless.

 Abstracting the user interface from the logic is an important paradigm,
 especially for something like org-mode that you want to run on a wide
 range of devices – think 24 monitors vs 3 mobile devices. You don't
 want to have too much of the looks hardcoded.

 Exactly! That is, believe it or not, the whole point.

 What the OP is suggesting effectively nullifies the separation between
 model and view in that it would allow changing Org-mode's outlining
 markup at its very core, potentially leading to a wildgrowth of custom
 markup formats which could hardly be called plain text anymore, not to
 mention the avalanche of PEBCAK-related bug reports it may unleash.

I’m very confused.  Couldn’t the compatibility and standardization
problems be avoided entirely by indicating the character at the top of
the file if it differs from the norm?

And why would, say, changing the headline starter from ‘*’ to ‘+’ make
it any less of a plain text format?  Or, for that matter, changing it
to ‘→’?  These are all valid UTF-8 characters that any Unicode-aware
application is expected to understand and deal with.

 Now if you don't find that to be one of /your/ personal top priorities –
 fine, don't bother. But going all bashing because someone insists on his
 opinion that this is important? I don't see what you're trying to
 achieve here.

 Pretty much since the very beginning, Org-mode has been described as:
  Org is a mode for keeping notes, maintaining TODO lists, and doing
  project planning with a fast and effective plain-text system.

 Seeing as how this description hasn't changed ever since, one can safely
 assume that keeping the markup format sane (i.e. plain-text) and
 consistent (i.e. semi-standardized, so as not to complicate joint
 project planning) is a top priority for the entire Org-mode community.

Re: plain text and standardization, see the above two paragraphs.

 As for my personal priorities: I didn't start using Emacs solely because
 Org-mode *requires* me to, but because I care about getting my work done,
 as efficiently as possible. Mac/Windows-influenced non-features (and
 the code overhead they introduce) will undoubtedly interfere with that.

 IOW, a lack of certain features is an essential feature in and of itself.

Have you looked at Emacs recently? “Minimalistic” is the opposite of
what it is.  The fact that you use it ought to show in itself that
minimalism isn’t what you want.

 I guess what I'm trying to achieve is to keep Org-mode from slowly and
 inconspicuously devolving into something featuring transparent blinking
 3D unicorn overlays with cherries on top. That's a gross exaggeration of
 course (one would hope), but I'm sure you catch my drift.

Certainly.  I still don’t understand how this justifies all the fuss
over a request to change the headline starter.

Aankhen



Re: [O] error writing agenda view to html file

2011-07-17 Thread Rainer Stengele
Am 16.07.2011 19:04, schrieb Bastien:
 Jambunathan K kjambunat...@gmail.com writes:
 
 +(defface org-default
 +  (org-compatible-face 'default nil)
 +  Face used for default text.
 +  :group 'org-faces)

 author   Bastien Guerry b...@altern.org
   Wed, 6 Jul 2011 15:25:29 + (17:25 +0200)
 committerBastien Guerry b...@altern.org
   Wed, 6 Jul 2011 15:25:29 + (17:25 +0200)
 commit   7a88eaec295d50a6e27cc1d6b6f1a725ace01076
 tree 91e803908793a91bb614a775c599dda172c72385tree | snapshot
 parent   c6b22dee33fa418b344fa68bf36bb496db473a89

 Revback your commit to c6b22d level and see if the problem persists.
 
 Yes, doing this will also be useful, on top of letting us know 
 how to reproduce the problem.
 
 Thanks,
 

release_7.5-584-gc6b22
Org-mode version 7.5 (release_7.5.584.gc6b22)
face-attribute: Invalid face


problem is still the same. I hope I did the right thing going back to that rev.
I am not used using git yet. I did:

make clean
git checkout c6b22d


How can I go back to the current development?

Thanks,
Rainer



Re: [O] Exporting to wiki syntax from org mode

2011-07-17 Thread suvayu ali
On Sun, Jul 17, 2011 at 9:51 AM, damitr dam...@gnowledge.org wrote:
 Is there any option for exporting .org file to a wiki syntax?
 If there is none, are there any people working on it?


I think you can do this with one of the org supported export formats
as an intermediary format. Can't recall which one though.

GL

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] Exporting to wiki syntax from org mode

2011-07-17 Thread Jambunathan K
damitr dam...@gnowledge.org writes:

 Hi,

 Is there any option for exporting .org file to a wiki syntax?
 If there is none, are there any people working on it?

Did you search this mailing list.
http://lists.gnu.org/archive/html/emacs-orgmode/

If yes, did you find any answers.


 D

-- 



Re: [O] Exporting to wiki syntax from org mode

2011-07-17 Thread Christian Moe

On 7/17/11 9:51 AM, damitr wrote:

Hi,

Is there any option for exporting .org file to a wiki syntax?
If there is none, are there any people working on it?

D



Start here: http://orgmode.org/worg/org-blog-wiki.html

Yours,
Christian



Re: [O] how to change the headline starter *

2011-07-17 Thread Christian Moe

On 7/17/11 10:08 AM, Aankhen wrote (in response to Pieter Prat):

What the OP is suggesting effectively nullifies the separation between
  model and view in that it would allow changing Org-mode's outlining
  markup at its very core, potentially leading to a wildgrowth of custom
  markup formats which could hardly be called plain text anymore, not to
  mention the avalanche of PEBCAK-related bug reports it may unleash.

I’m very confused.  Couldn’t the compatibility and standardization
problems be avoided entirely by indicating the character at the top of
the file if it differs from the norm?

And why would, say, changing the headline starter from ‘*’ to ‘+’ make
it any less of a plain text format?  Or, for that matter, changing it
to ‘→’?  These are all valid UTF-8 characters that any Unicode-aware
application is expected to understand and deal with.



Fwiw, I disagree: I think this is to confuse syntax with view.

Model = entry with heading
Syntax = *
View = * (colorized)

Compare HTML:

Model = heading, 1st level
Syntax = h1.../h1
View = larger font-size, bold

With CSS, HTML allows you to make headings look like anything you 
want. (Yes, they could even begin with a star!) But noone would 
request the right to write them (h1)...(/h1) or \h1{...} instead, just 
because they don't like the way angle brackets look. Yet that's the 
kind of change that has been discussed in this thread.


In Org-mode, I assume the view could be changed with overlays, at a 
cost in efficiency. If that were implemented, Harven could type stars, 
but see bullets. He should still type stars because they're part of 
the syntax, not of the view.


There is /some/ support for prettifying headlines already: 
[[info:org#Clean view]]


Me, I'm fine with the status quo: This is /not/ a feature request.

Yours,
Christian



[O] Custom agenda view for properties

2011-07-17 Thread Christian Zang
Dear Orgers,

despite carefully reading the manual and trying out some approaches so
far I could not figure out whether or not it is possible to have a
custom agenda view based on a header's properties. E.g. in the agenda
I can easily search for `+REVIEW=weekly` via `C-c a m` to get a list
of all projects that need a weekly review. But is it also possible to
have a custom agenda view for that search, like

(setq org-agenda-custom-commands
'((W Weekly Review
   ((tags +REVIEW=weekly) ;; this does not work...
(stuck )
(todo SDMB) ;; review someday/maybe items
(todo WAIT))) ;; review waiting items
))

?

Thanks for any comment on that; the search on gmane appears to be
currently broken, so I couldn't figure out if someone asked something
similar before.

Best,
Christian



Re: [O] [Orgmode] Deriving mode from org-mode

2011-07-17 Thread Anders Waldenborg
On Tue, Feb 22, 2011 at 12:52:03PM +0100, Bastien wrote:
  It is a personal wiki mode. It automatically narrows to current top level
  heading, adds some extra navigation functions and allows creating links to
  new pages (= top level heading) in a simple way. Hopefully I can clean it
  up a little bit soon and publish it.
 
 That'd be great, thanks!

Here it is, after a slight delay.

 anders
 aw-org-pw.el --- personal wiki major mode derived from org-mode.
;;
;; Copyright (C) 2011 Anders Waldenborg
;;
;; Author: Anders Waldenborg and...@0x63.nu
;; Keywords: outlines, calendar, wp
;; Version: 0.1
;;
;; 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.
;;
;;
;;; 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) (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)
(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.
  (save-restriction
(save-excursion
  (widen)
  (let ((re (aw-org-pw-section-regexp)))
(while (not (or (bobp) (looking-at re)))
  (forward-line -1))
(if (bobp)
aw-org-pw-frontpage-name
  (match-string-no-properties 1))



 Navigation with history


(defun aw-org-pw-back ()
  Goto previously visited section
  (interactive)
  (unless aw-org-pw-breadcrumbs-list
(error Nowhere to go I think...))
  (let ((f (pop aw-org-pw-breadcrumbs-list)))
(aw-org-pw-goto-section-raw (car f))
(setq aw-org-pw-current-section (car f))
(goto-char (+ (point-min) (cdr f)

(defun aw-org-pw-goto-section-raw (name)
  Go to 

[O] Possibly new function to view your notes in chronological order

2011-07-17 Thread Marc-Oliver Ihm
Hello All !

I would like to submit the new function org-find-timestamps for disussion. 
Citing its documentation:


 Find inactive timestamps within a date-range and maybe sort them.

 This function can help to bring the notes, that you take within
 org-mode, into a chronological order, even if they are scattered
 among many different nodes. The result is somewhat like a diary,
 listing your notes for each successive day. Please be aware
 however: This intended usage requires, that you routinely
 insert inactive timestamps into the notes that you write.

 org-find-timstamps works by creating a regular expression to
 match a given range of dates, doing a search for it and
 displaying the results either as a sparse tree or with the help
 of occur. The original buffer is not modified.


I would be grateful to for any comments; please find the defun below.


regards, Marc




(defun org-find-timestamps ()
  Find inactive timestamps within a date-range and maybe sort them.

This function can help to bring the notes, that you take within
org-mode, into a chronological order, even if they are scattered
among many different nodes. The result is somewhat like a diary,
listing your notes for each successive day. Please be aware
however: This intended usage requires, that you routinely
insert inactive timestamps into the notes that you write.

org-find-timstamps works by creating a regular expression to
match a given range of dates, doing a search for it and
displaying the results either as a sparse tree or with the help
of occur. The original buffer is not modified.

  (interactive)
  (let ((working-buffer (get-buffer-create *org-find-timestamps working 
buffer*))
(occur-buffer-name *Occur*)
(occur-header-regex ^[0-9]+ match\\(es\\)?) ;; regexp to match for 
header-lines in *Occur* buffer
first-date 
last-date 
pretty-dates
swap-dates
(days 0) 
date-regex
position-before-year
collect-method
buff
org-buffers)
(save-window-excursion
  ;; temporary buffer for date-manipulations
  (set-buffer working-buffer)
  (erase-buffer)
  ;; ask user for date-range
  (setq first-date (org-read-date nil nil nil Starting date:  nil nil))
  (setq last-date (org-read-date nil nil nil End date:  nil nil))
  ;; swap dates, if required
  (when (string last-date first-date)
(setq swap-dates last-date)
(setq last-date first-date)
(setq first-date swap-dates))
  (setq pretty-dates (concat from  first-date  to  last-date))
  ;; construct list of dates in working buffer
  ;; loop as long we did not reach end-date
  (while (not (looking-at-p last-date))
(end-of-buffer)
;; only look for inactive timestamps
(insert [)
(setq position-before-year (point))
;; Monday is probably wrong, will be corrected below
(insert first-date  Mo]\n) 
(goto-char position-before-year)
;; advance number of days and correct day of week
(org-timestamp-change days 'day) 
(setq days (1+ days))
)
  (end-of-buffer)
  ;; transform constructed list of dates into a single, optimized regex
  (setq date-regex (regexp-opt (split-string (buffer-string) \n t)))
  ;; done with temporary buffer
  (kill-buffer working-buffer)
  )
;; ask user, which buffers to search and how to present results
(setq collect-method 
  (car (split-string (org-icompleting-read Please choose, which 
buffers to search and how to present the matches:  '(multi-occur -- all 
org-buffers, list org-occur -- this-buffer, sparse tree) nil t nil nil 
occur -- this buffer, list)))
  )
;; Perform the actual search
(save-window-excursion
  (cond ((string= collect-method occur)
 (occur date-regex)
 )
((string= collect-method org-occur)
 (if (string= major-mode org-mode)
 (org-occur date-regex)
   (error Buffer not in org-mode))
 )
((string= collect-method multi-occur)
 ;; construct list of all org-buffers
 (dolist (buff (buffer-list))
   (set-buffer buff)
   (if (string= major-mode org-mode)
   (setq org-buffers (cons buff org-buffers
 (multi-occur org-buffers date-regex)))
  )
;; Postprocessing: Optionally sort buffer with results
;; org-occur operates on the current buffer, so we cannot modify its 
results afterwards
(if (string= collect-method org-occur)
(message (concat Sparse tree with matches  pretty-dates))
  ;; switch to occur-buffer and modify it
  (if (not (get-buffer occur-buffer-name))
  (message (concat Did not find any matches  pretty-dates))
(set-buffer occur-buffer-name)
(toggle-read-only)
(goto-char 

Re: [O] Time calculation: vsum?

2011-07-17 Thread Christian Moe

Hi, Michael,

First, I just realized I was part wrong: vsum of time values DOES work 
(sorry, Eric!).



| Task 1 | Task 2 | Task 3 |   Total |
|+++-|
|  35:00 |  35:00 |   4:00 | 1:14:00 |
#+TBLFM: @2$4=vsum($1..$3);T


| Task   |  Time |
|+---|
| Task 1 | 35:00 |
| Task 2 | 35:00 |
| Task 3 |  4:00 |
|+---|
| Total  |  1:14 |
#+TBLFM: @5$2=vsum(@I..@II);T


But in the vertical vsum in the second example above, the right answer 
is misleadingly formatted, so you'd read it as 1 min 14 seconds, not 1 
hr 14 mins.


And I'm still failing to get the right vsum /vertically/ with times 
one hour or above, e.g.:


| Task   |Time |
|+-|
| Task 1 | 1:35:00 |
| Task 2 | 1:35:00 |
| Task 3 | 1:04:00 |
|+-|
| Total  |   3 |
#+TBLFM: @5$2=vsum(@I..@II);T


Meanwhile, Michael, thanks for your elisp solution -- it's more 
compact than mine, and I'll be happy to steal it!


But support for time calculations -- in calc formulas too -- has been 
added in 7.6.


Yours,
Christian

On 7/17/11 2:27 PM, Michael Markert wrote:

Hi Christian,

On 17 Jul 2011, Christian Moe wrote:

Hi,

Time calculations don't seem to work with vsum (or vmean).


|Time |
|-|
| 1:06:00 |
| 0:52:30 |
| 2:00:00 |
|-|
|   3 |
#+TBLFM: @5$1=vsum(@I..@II);T


Am I doing something wrong?


Yes, `vsum' works just on numbers, not times.


Could this be made to work?

Here's a elisp function that does what you want (assuming it's
hours:minutes:seconds -- if not tweak the numbers):

#+begin_src elisp
(defun h-m-s-vsum (times)
   (loop for (h m s) in (mapcar (lambda (time)
 (mapcar #'string-to-int
 (split-string time : 'omit-nulls)))
times)
collect (+ (* 3600 h) (* 60 m) s) into seconds
finally (return (let* ((second-sum (apply #'+ seconds))
   (seconds (let ((s (% second-sum 60)))
  (decf second-sum s)
  s))
   (minutes (let ((m (% second-sum 3600)))
  (decf second-sum m)
  (truncate (/ m 60
   (hours (/ second-sum 3600)))
  (format %s:%s:%s hours minutes seconds)
#+end_src elisp

The table has to be

|Time |
|-|
| 1:06:00 |
| 0:52:30 |
| 2:00:00 |
|-|
| 3:58:30 |
#+TBLFM: @5$1='(h-m-s-vsum '(@I..@II))

Hope that helps.
Maybe there is an easier way. I hope there is ;)

Michael





Re: [O] how to change the headline starter *

2011-07-17 Thread Marcus Klemm
Pieter Praet pieter at praet.org writes:

 What the OP is suggesting effectively nullifies the separation between
 model and view ...

I'm sorry, but this is just plain wrong. The whole problem is that in
orgmode there is no real separation between model and view.

Any normal interactive application reads its data from one or multiple
file formats, transforms them to an internal representation, applies
operations to this internal representation and transforms it again for
the display. One can easily change the file format, internal
representation or appearance without changing the other.

In orgmode, it's basicly all one and the same. The model is the same as
the file format, with some additional run-time-information such as which
parts of the document are visible. And the view is the same as the model,
with some fontification. That's why changing the appearance of the
headlines would mean to change the model and--in the end--the file format
as well. Which, as you correctly stated, would create a lot of new
problems.

Ciao, Marcus




[O] calculation question

2011-07-17 Thread Jude DaShiell
When an org table like:
|---| time stamp | systalic | diastalic | pulse |
|-
| # | [2011-07-13 Wed 04:15] | 134 | 89 | 80 |

gets used and I want to calculate averages for systalic and diastalic and 
do that in the #+TBLFM: line do I use $2 and $3 for systalic and diastalic 
or do I use $3 and $4 because of the marker column?  





Re: [O] Calendar-like view of the org-agenda

2011-07-17 Thread SAKURAI Masashi
At Wed, 13 Jul 2011 21:55:09 +0200,
Tassilo Horn wrote:
 :
 Sebastien Vauban
 wxhgmqzgw...@spammotel.com writes:
 :
  - I was hoping `r' to redraw the grid, after I've changed Emacs frame size. 
  It
does not seem to be the case. Could that be foreseen?  I've seen you 
  already
all the available space, when drawing the grid for the first time.
 
 I've implemented that in my fork.
 
  http://github.com/tsdh/emacs-calfw
 
 Masashi, feel free to pull if you think it's ok.

Thank you so much for many advice and patches. I pulled and merged it.

My master branch of calfw [https://github.com/kiwanami/emacs-calfw]
has been added following improvements from v1.0:

- Improved navigation keymaps.
- Remove display text properties because images screw the table layout.
- Add defcustoms for line drawing chars.
- Added cfw:org-agenda-schedule-args variable to limit the schedule items. 
- Schedule items in a day are sorted by time.
- SPC key is bound to org-agenda with day view.
- Range items are displayed by a band.

I will continue to improve calfw and org integration.
Please check it and let me know any ideas.

Thank you,
--
SAKURAI, Masashi (family, given)
m.saku...@kiwanami.net



Re: [O] Custom agenda view for properties

2011-07-17 Thread Christian Zang
Hi Memnon,

2011/7/17 Memnon Anon gegendosenflei...@googlemail.com:
 despite carefully reading the manual and trying out some approaches so
 far I could not figure out whether or not it is possible to have a
 custom agenda view based on a header's properties.

 The manual is great, but its always a good idea to also check out
 Worg. In this case, have a look at:

 http://orgmode.org/worg/org-tutorials/org-custom-agenda-commands.html#sec-3

            ((tags +REVIEW=weekly) ;; this does not work...

             (tags +REVIEW=\weekly\) ;; not tested, but should do

It does, thanks a lot! Totally forgot about checking worg on that.

 Should such an example be in the manual (node (org) Storing searches ) ?

 Thanks for any comment on that; the search on gmane appears to be
 currently broken, so I couldn't figure out if someone asked something
 similar before.

 Yes. Not sure whats happening there, but several people saw that
 already.

 When gmane is non functional (this is the first time in years this
 happened for me, though),

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

 come in handy.

Great tip as well, thanks!

Cheers,
Christian



Re: [O] Makefile restructuring

2011-07-17 Thread Achim Gratz

The ./doc directory is now also handled via a sub-make invocation.
Feature-wise the user part should be complete now.

I've also patched org.el to provide a placeholder to record which
orgmode version has been installed and the installer will patch the
installed file with that so that org-version can show it.  Currently
uses perl to do that, I'll probably change to sed since I don't want to
require perl for installation.

Some small patches so that changes to the build system do not get
recorded in Emacs' ChangeLog.


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

Wavetables for the Terratec KOMPLEXER:
http://Synth.Stromeko.net/Downloads.html#KomplexerWaves




Re: [O] Calendar-like view of the org-agenda

2011-07-17 Thread Rasmus
Hi,

Thank a bunch for Calfw. It is great. 

 - Add defcustoms for line drawing chars.
 - Added cfw:org-agenda-schedule-args variable to limit the schedule items. 

Is is somehow possible to change the font family used in Calfw windows
only? Using my regular font, Monofur, the table gets screwed when using
Unicode characters for line drawing. If I switch to e.g. Terminus
everything looks properly.

Thus, I'd like something like 
#+begin_src emacs-lisp
(set-frame-parameter (selected-frame) 'font Terminus-11)
#+end_sry
But very local (i.e. only in 'this' particular windows). 

For some reason, changeing the font family for Calfw's line drawing
affects all of Emacs.

Thanks,
Rasmus

-- 
Sent from my Emacs




Re: [O] Calendar-like view of the org-agenda

2011-07-17 Thread Rasmus
Rasmus ras...@gmx.us writes:

 Is is somehow possible to change the font family used in Calfw windows
 only?

Hardly perfect, the following let me change the font used in Calfw
sessions. It seems rather fragile, though as it only seems to work with
`:height 90'. Obviously there is a more fundamental problem that I ought
to address. 

#begin_src emacs-lisp
(add-hook 'cfw:calendar-mode-hook
  '(lambda ()
;; (local-set-key (kbd q) 'kill-this-buffer)
 (buffer-face-set '(:family monofur :height 90))
))

(setq cfw:fchar-junction ?╋
  cfw:fchar-vertical-line ?┃
  cfw:fchar-horizontal-line ?━
  cfw:fchar-left-junction ?┣
  cfw:fchar-right-junction ?┫
  cfw:fchar-top-junction ?┯
  cfw:fchar-top-left-corner ?┏
  cfw:fchar-top-right-corner ?┓)
#+end_src

–Rasmus

-- 
Sent from my Emacs




Re: [O] ODT Charset/Encoding issues (was question about ODT export behavior)

2011-07-17 Thread Jambunathan K

Hello Renzo  Christian

Thanks for the test files and sharing your views on this issue. With the
attached patch I can export the test files successfully.

The attached patch ensures that component xml files created by the odt
exporter are always utf-8 encoded. This is irrespective of the coding
system used by the Org buffer.

Jambunathan K.

From 1ec1e3c9248387ab2daabe7b9c7cc4a3c42b4998 Mon Sep 17 00:00:00 2001
From: Jambunathan K kjambunat...@gmail.com
Date: Mon, 18 Jul 2011 00:26:41 +0530
Subject: [PATCH] org-odt: Correctly export iso-8859-1 files with non-ascii chars

* contrib/lisp/org-odt.el (org-odt-get): Set
CODING-SYSTEM-FOR-WRITE and CODING-SYSTEM-FOR-SAVE to 'utf-8
irrespective of buffer-file-coding-system.

Fixes issue reported by Renzo Been in the following post.
http://lists.gnu.org/archive/html/emacs-orgmode/2011-07/msg00795.html
---
 contrib/lisp/org-odt.el |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/contrib/lisp/org-odt.el b/contrib/lisp/org-odt.el
index f3a4067..bd2ea33 100644
--- a/contrib/lisp/org-odt.el
+++ b/contrib/lisp/org-odt.el
@@ -1380,6 +1380,8 @@ MAY-INLINE-P allows inlining it as an image.
 (PLAIN-TEXT-MAP '(( . amp;) ( . lt;) ( . gt;)))
 (TABLE-FIRST-COLUMN-AS-LABELS nil)
 (FOOTNOTE-SEPARATOR (org-lparse-format 'FONTIFY , 'superscript))
+(CODING-SYSTEM-FOR-WRITE 'utf-8)
+(CODING-SYSTEM-FOR-SAVE 'utf-8)
 (t (error Unknown property: %s  what
 
 (defun org-odt-parse-label (label)
-- 
1.7.2.3




 Hi Jambunathan,

 See comments below.

 Ciao,
 Renzo
 P.S. I'm on a camping-site right now, so I do not have good Internet access...

 On 16 July 2011 22:13, Jambunathan K kjambunat...@gmail.com wrote:

 Renzo

 I just want to add one point that I did not find in the org-manual.  I 
 tested
 some of my org-files and exported them to the OpenOffice format. When I 
 tried to
 open these documents in OpenOffice, they were corrupt and could not be 
 opened.

 I soon found out why. If you want to export an org-mode file to .odt, you 
 need
 to explicitly set the file encoding to UTF-8 (I usually use iso-8859-1 
 encoding
 for my files), like:
 #-*- mode: org; coding: utf-8; -*-
 After that OpenOffice could open the files without any problems.

 I use English for communication and I have to admit that I have zero
 understanding of things like character sets, encodings etc.

 As for communicating; I'm from the border regions of The Netherlands, Belgium
 and Germany... And therefore I'm multilingual, and often need to type words
 with accents.

 Thanks for the above note. I surely see is a bug but my poor
 understanding prevents me from quantifying it further.

 Well... I would not really see it as a bug... As long as it is mentioned in 
 the
 documentation, that org-file encoding's other then utf-8 could result in 
 corrupt
 output-files.

 Could you please send me a minimal iso-8859-1 test.org file and the
 associated corrupted test.odt file? I will look in to this issue.

 See attachment. I can only send you the org file, because I do not have access
 to a working Emacs at the moment...

 1. Do you have any specific requirement on how the component xml files
   be encoded? A cursory look at the odt exporter suggests that it could
   actually be emitting xml files in iso-8859-1 format while wrongly
   claiming UTF-8 encoding as below

 --8---cut here---start-8---
 ?xml version=1.0 encoding=UTF-8?
 --8---cut here---end---8---

 2. Should the xml file be always ejected in UTF-8 irrespective of how
   the original Org file is encoded.

 Yes that would seem a good solution to me... If the odt-exporter checks the
 files encoding, and then changes the encoding to utf-8 (maybe using a 
 temporary
 buffer?) before the actual exporting, then there would be no further
 problems...

 As for the idea that the OpenOffice xml can actually be in another encoding
 than utf-8; I do not know how much work that would be for you, to implement in
 the odt-exporter. It might be to much effort...
 Also I don't know if such an OpenOffice document will open with no problems in
 all OpenOffice applications.

 [Notes to Self]
 [Notes from odbook]

 Para 3 of http://books.evc-cit.info/odbook/apa.html#appc-11-fm2xml
 says

 --8---cut here---start-8---
 OpenDocument files are always encoded in UTF-8.
 --8---cut here---end---8---

 Para 2 of
 http://books.evc-cit.info/odbook/apa.html#xml-other-char-encodings-section
 says

 --8---cut here---start-8---
 XML 1.0 allows a document to be encoded in any character set registered
 with the Internet Assigned Numbers Authority (IANA). European documents
 are commonly encoded in one of the ISO Latin character sets, such as
 ISO-8859-1. Japanese documents commonly use Shift-JIS, and Chinese
 documents use GB2312 and Big 5.
 --8---cut 

Re: [O] how to change the headline starter *

2011-07-17 Thread Bastien
Attached is a patch that replaces instances of outline-regexp 
by org-outline-regexp.  It also introduces more harmonization.

I'd be interesed in hearing about feedback.

Thanks!

From 942c0ffbc04cef5a8158c274397b51284d944c43 Mon Sep 17 00:00:00 2001
From: Bastien Guerry b...@altern.org
Date: Sun, 17 Jul 2011 21:17:08 +0200
Subject: [PATCH] Don't use `outline-regexp' anymore.

Use `org-outline-regexp' instead or `outline-regexp'.  Also use the
new defconst `org-outline-regexp-bol' to match `org-outline-regexp'
at the beginning of line.

* org.el (org-outline-regexp-bol): New defconst.
(org-outline-level, org-set-font-lock-defaults, org-cycle)
(org-overview, org-content, org-flag-drawer)
(org-first-headline-recenter, org-insert-todo-heading)
(org-map-region, org-move-subtree-down, org-paste-subtree)
(org-kill-is-subtree-p, org-context-p, org-refile)
(org-refile-new-child, org-toggle-comment, org-todo)
(org-add-planning-info, org-add-log-setup, org-scan-tags)
(org-set-tags, org-insert-property-drawer)
(org-prepare-agenda-buffers, org-preview-latex-fragment)
(org-speed-command-default-hook, org-check-for-hidden)
(org-toggle-item, org-toggle-heading)
(org-indent-line-function, org-set-autofill-regexps)
(org-fill-paragraph, org-toggle-fixed-width-section)
(org-yank-generic, org-yank-folding-would-swallow-text)
(org-first-sibling-p, org-goto-sibling)
(org-goto-first-child, org-show-entry): Use
`org-outline-regexp' and `org-outline-regexp-bol'.

* org-remember.el (org-remember-handler): Use
`org-outline-regexp-bol'.

* org-mouse.el (org-mouse-match-todo-keyword, org-mode-hook)
(org-mouse-move-tree, org-mouse-transform-to-outline): Use
`org-outline-regexp' and `org-outline-regexp-bol'.

* org-macs.el (org-with-limited-levels)
(org-get-limited-outline-regexp): Use `org-outline-regexp'.

* org-indent.el (org-indent-outline-re)
(org-indent-refresh-section, org-indent-refresh-to): Use
`org-outline-regexp' and `org-outline-regexp-bol'.

* org-html.el (org-export-as-html): Use
`org-outline-regexp-bol'.

* org-footnote.el (org-footnote-at-definition-p)
(org-footnote-normalize): Use `org-outline-regexp' and
`org-outline-regexp-bol'.

* org-exp.el (org-export-preprocess-string): Don't redefine
`outline-regexp'.

* org-docbook.el (org-export-as-docbook): Use
`org-outline-regexp-bol'.

* org-colview.el (org-columns, org-columns-compute): Use
`org-outline-regexp' and `org-outline-regexp-bol'.

* org-colview-xemacs.el (org-columns, org-columns-compute):
Use `org-outline-regexp-bol'.

* org-clock.el (org-clock-insert-selection-line)
(org-clock-in, org-clock-out, org-dblock-write:clocktable):
Use `org-outline-regexp' and `org-outline-regexp-bol'.

* org-ascii.el (org-export-as-ascii)
(org-export-ascii-push-links): Use `org-outline-regexp' and
`org-outline-regexp-bol'.

* org-archive.el (org-archive-to-archive-sibling)
(org-archive-all-done): Use `org-outline-regexp' and
`org-outline-regexp-bol'.

* org-agenda.el (org-agenda, org-search-view)
(org-agenda-list-stuck-projects, org-agenda-get-timestamps)
(org-agenda-get-progress, org-agenda-get-blocks): Use
`org-outline-regexp' and `org-outline-regexp-bol'.
---
 lisp/org-agenda.el |   16 ---
 lisp/org-archive.el|4 +-
 lisp/org-ascii.el  |6 ++-
 lisp/org-clock.el  |8 ++--
 lisp/org-colview-xemacs.el |4 +-
 lisp/org-colview.el|4 +-
 lisp/org-docbook.el|2 +-
 lisp/org-exp.el|1 -
 lisp/org-footnote.el   |9 ++-
 lisp/org-html.el   |2 +-
 lisp/org-indent.el |6 +-
 lisp/org-macs.el   |4 +-
 lisp/org-mouse.el  |   10 ++--
 lisp/org-remember.el   |2 +-
 lisp/org.el|  115 ++--
 15 files changed, 100 insertions(+), 93 deletions(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 4209b45..8583193 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -2263,7 +2263,7 @@ Pressing `' twice means to restrict to the current subtree or region
 	   ((eq type 'todo-tree)
 		(org-check-for-org-mode)
 		(org-let lprops
-		  '(org-occur (concat ^ outline-regexp [ \t]*
+		  '(org-occur (concat ^ org-outline-regexp [ \t]*
   (regexp-quote match) \\
 	   ((eq type 'occur-tree)
 		(org-check-for-org-mode)
@@ -3873,7 +3873,7 @@ in `org-agenda-text-search-extra-files'.
 	regexps+))
 (setq regexps+ (sort regexps+ (lambda (a b) ( (length a) (length b)
 (if (not regexps+)
-	(setq regexp (concat ^ org-outline-regexp))
+	(setq regexp org-outline-regexp-bol)
   (setq regexp (pop regexps+))
   (if hdl-only (setq regexp (concat ^ org-outline-regexp .*?
 	regexp
@@ -4311,9 +4311,11 @@ of what a project is and how to check if it stuck, customize the variable
 			  \\)\\))
 	 (tags (nth 2 org-stuck-projects))
 	 (tags-re (if (member * tags)
-		  (org-re ^\\*+ .*:[[:alnum:]_@#%]+:[ \t]*$)
+		  (org-re (concat org-outline-regexp-bol
+