Re: [O] Per-file attachment directories

2011-09-22 Thread Nick Dokos
Darlan Cavalcante Moreira  wrote:

> 
> I tested here and it didn't work for the bad files as you said. However,
> putting the "Local Variables" at the end of the file worked. In fact, I
> have always written local variables like this at the end of the file,
> although I don't remember if this was because of a restriction of just
> because I'm used to.
> 

There is a restriction (see section 53.3.4.1,  "Specifying File Variables",
in the emacs manual):

,
|Instead of using a `-*-' line, you can define file local variables
| using a "local variables list" near the end of the file.  The start of
| the local variables list should be no more than 3000 characters from
| the end of the file, and must be on the last page if the file is
| divided into pages.
`

Nick


> A good tip is to put them inside a "* File Local Variables" heading so that
> they don't stay inside another heading. You can set the noexport tag to
> avoid exporting this heading.
> 
> Also, you can use the function add-file-local-variable to add a new local
> variable. Notice how this function put the local variables at the end of
> the file.
> 
> --
> Darlan Cavalcante Moreira
> 
> At Wed, 21 Sep 2011 20:29:25 +0200,
> Viktor Rosenfeld  wrote:
> > 
> > Hi,
> > 
> > this works for simple files but breaks silently for my org files. I've
> > narrowed it down to two seemingly unrelated parts and attached two
> > examples below.
> > 
> > - good1.org contains an entry with two tables. When I visit the file,
> >   Emacs asks me to evaluate the local variable. In bad1.org the first
> >   table contains another section with the entry "Rechnungsbeitrag". When
> >   I visit the file, Emacs does not ask me and I can verify that the
> >   local variable is not evaluated by attaching something to the task.
> > 
> > - In bad2.org the offending part is a long LOGBOOK drawer. Removing any
> >   two lines from the drawer makes the example work. In good2.org I've
> >   removed the first two lines.
> > 
> > If it weren't for those bugs, this would fit my needs exactly!
> > 
> > Cheers,
> > Viktor
> > 
> > Darlan Cavalcante Moreira wrote:
> > 
> > > 
> > > One way to do this is to use file variables to change the value of
> > > org-attach-directory. This works particularly well when you use just a few
> > > org files as in your case.
> > > 
> > > For instance, you could put
> > > --8<---cut here---start->8---
> > > # Local Variables:
> > > # org-attach-directory: "~/org/data/personal"
> > > # End:
> > > --8<---cut here---end--->8---
> > > in your personal.org file and 
> > > --8<---cut here---start->8---
> > > # Local Variables:
> > > # org-attach-directory: "~/org/data/work"
> > > # End:
> > > --8<---cut here---end--->8---
> > > in your work.org file.
> > > 
> > > --
> > > Darlan Cavalcante Moreira
> > > 
> > > At Wed, 21 Sep 2011 11:49:39 +0200,
> > > Viktor Rosenfeld  wrote:
> > > > 
> > > > Hi everybody,
> > > > 
> > > > so far I've only used one org file, but it's getting unwieldy and I've
> > > > decided to split it up.
> > > > 
> > > > I'd also like to split up my attachment directory to reduce clutter.
> > > > For example, if I have two org files "personal.org" and "work.org" I
> > > > would like attachments to go into automatically created directories
> > > > below "~/org/data/personal" and "~/org/data/work". If a file has no
> > > > custom attachment directory specified, attachments should be created
> > > > below a default path (same as now).
> > > > 
> > > > Is this possible?
> > > > 
> > > > Thanks,
> > > > Viktor
> > > > 
> > > 
> 



Re: [O] [babel] What is `, (backquote comma)?

2011-09-22 Thread peter . frings

On 21 Sep 2011, at 21:48, Jambunathan K wrote:

> I learnt more about all the strange looking `', creatures by cursorily
> reading the first link and casually looking at the flip-flop diagram
> seen on the second link.
> 
> http://www.lisperati.com/syntax.html
> http://www.lisperati.com/looking.html
> 
> I am surprised that a book that seems so playful could convey a
> fundamental/foundational idea in such simple and succinct terms.

I can heartily recommend the book “Land Of Lisp”, by the same author.


Cheers,
Peter
-- 
You can use an eraser on the drawing table, 
or a sledge hammer on the construction site. 
— Frank Lloyd Wright





Re: [O] Per-file attachment directories

2011-09-22 Thread Viktor Rosenfeld
Hi,

putting the definition at the end of the file appears to work. At least
for two org files of mine which didn't work before. But it's still a
bug that definitions at the beginning are silently ignored for seemingly
unrelated parts, isn't it? I'll post a bug report to the mailing list.

Anyway, thanks for your help!

Cheers,
Viktor

Darlan Cavalcante Moreira wrote:

> 
> I tested here and it didn't work for the bad files as you said. However,
> putting the "Local Variables" at the end of the file worked. In fact, I
> have always written local variables like this at the end of the file,
> although I don't remember if this was because of a restriction of just
> because I'm used to.
> 
> A good tip is to put them inside a "* File Local Variables" heading so that
> they don't stay inside another heading. You can set the noexport tag to
> avoid exporting this heading.
> 
> Also, you can use the function add-file-local-variable to add a new local
> variable. Notice how this function put the local variables at the end of
> the file.
> 
> --
> Darlan Cavalcante Moreira
> 
> At Wed, 21 Sep 2011 20:29:25 +0200,
> Viktor Rosenfeld  wrote:
> > 
> > Hi,
> > 
> > this works for simple files but breaks silently for my org files. I've
> > narrowed it down to two seemingly unrelated parts and attached two
> > examples below.
> > 
> > - good1.org contains an entry with two tables. When I visit the file,
> >   Emacs asks me to evaluate the local variable. In bad1.org the first
> >   table contains another section with the entry "Rechnungsbeitrag". When
> >   I visit the file, Emacs does not ask me and I can verify that the
> >   local variable is not evaluated by attaching something to the task.
> > 
> > - In bad2.org the offending part is a long LOGBOOK drawer. Removing any
> >   two lines from the drawer makes the example work. In good2.org I've
> >   removed the first two lines.
> > 
> > If it weren't for those bugs, this would fit my needs exactly!
> > 
> > Cheers,
> > Viktor
> > 
> > Darlan Cavalcante Moreira wrote:
> > 
> > > 
> > > One way to do this is to use file variables to change the value of
> > > org-attach-directory. This works particularly well when you use just a few
> > > org files as in your case.
> > > 
> > > For instance, you could put
> > > --8<---cut here---start->8---
> > > # Local Variables:
> > > # org-attach-directory: "~/org/data/personal"
> > > # End:
> > > --8<---cut here---end--->8---
> > > in your personal.org file and 
> > > --8<---cut here---start->8---
> > > # Local Variables:
> > > # org-attach-directory: "~/org/data/work"
> > > # End:
> > > --8<---cut here---end--->8---
> > > in your work.org file.
> > > 
> > > --
> > > Darlan Cavalcante Moreira
> > > 
> > > At Wed, 21 Sep 2011 11:49:39 +0200,
> > > Viktor Rosenfeld  wrote:
> > > > 
> > > > Hi everybody,
> > > > 
> > > > so far I've only used one org file, but it's getting unwieldy and I've
> > > > decided to split it up.
> > > > 
> > > > I'd also like to split up my attachment directory to reduce clutter.
> > > > For example, if I have two org files "personal.org" and "work.org" I
> > > > would like attachments to go into automatically created directories
> > > > below "~/org/data/personal" and "~/org/data/work". If a file has no
> > > > custom attachment directory specified, attachments should be created
> > > > below a default path (same as now).
> > > > 
> > > > Is this possible?
> > > > 
> > > > Thanks,
> > > > Viktor
> > > > 
> > > 
> 



[O] [Bug] local variables definition at beginning of file is ignored

2011-09-22 Thread Viktor Rosenfeld
Hi everybody,

in http://thread.gmane.org/gmane.emacs.orgmode/47043 I've posted two
examples of local file definitions at the top of an org file which are
silently ignored for seemingly unrelated parts in the org file. The
definitions work if they are put at the end of the org file. 

This inconsistency is a bug, isn't it? Also, are local variables
documented somewhere? I couldn't find anything in the manual.

Cheers,
Viktor



Re: [O] image active link face

2011-09-22 Thread Sebastien Vauban
Hi Eric S Fraga,

Eric S Fraga wrote:
> I don't display images in my Emacs so cannot verify that this will work
> unfortunately (I don't even know how to get Emacs to display images, for
> that matter...).

For the sake of completeness about this last point, this is some code I have
in my staging area (of my .emacs file):

#+begin_src emacs-lisp
(require 'iimage)

;; This allows for the viewing of images in-line in Org mode
;; documents.
(setq iimage-mode-image-search-path (expand-file-name "~/"))

;; Match org file: links
(add-to-list 'iimage-mode-image-regex-alist
 (cons (concat "\\[\\[file:\\(~?"
   iimage-mode-image-filename-regex
   "\\)\\]")  1))

(defun org-toggle-iimage-in-org ()
  (interactive)
  (let ((turning-on (not iimage-mode)))
(set-face-underline-p 'org-link (not turning-on))
(iimage-mode (or turning-on 0)
#+end_src

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] ODT image export

2011-09-22 Thread Giovanni Ridolfi
Jambunathan K  writes:

Hi, Jambunathan,

I've noticed that in the pdf file, you've sent, the 
second headings:

> * Converter Setup
> ** Install BasicODConverter-0.8.0.oxt 
   ^^^
> *** See contrib/odt/BasicODConverter/ 

does _not_ have a space between the dot "*" and the following word,
i.e. "Install", while it does have for the third i.e. "*** See"
or the fourth heading.

cheers,
Giovanni



[O] [beamer] source code in two column

2011-09-22 Thread zwz
I use org to make presentations for C class.
Sometimes the code is quite long. And I want to arrange it in two column
so that it will be presented in one slide.

I wonder how to do it easily using org-export. 
My current setting just hides the code that beyond the page in one
column.

Best regards,
zwz 




Re: [O] image active link face

2011-09-22 Thread henry atting
Eric S Fraga  writes:

> henry atting  writes:
>
>> When I move the cursor over an image in an org buffer it is
>> `highlighted` means it gets a red frame and a light blue bar at the
>> left side. 
>> This surely can be customized but I cannot find the appropriate face
>> name for it. Any hints?
>
> Move the cursor to the image and type "C-u C-x =" which will give you
> information about the current point.  This information should include
> the face(s) present/active at that point.  You can then click on the
> face to see it and subsequently ask to customise it.
>
> I don't display images in my Emacs so cannot verify that this will work
> unfortunately (I don't even know how to get Emacs to display images, for
> that matter...).
>
> HTH,
> eric

Yes, thanks, it helps. 
The frame around the image can be customized via the cursor face.
To get rid of the bar on the left side apperently is not possible
unless you are willing to forgo using paren match highlighting. It
comes from the underlying link and indicates the matching leftmost
bracket.

henry

-- 
http://literaturlatenight.de



Re: [O] [beamer] source code in two column

2011-09-22 Thread Eric S Fraga
zwz  writes:

> I use org to make presentations for C class.
> Sometimes the code is quite long. And I want to arrange it in two column
> so that it will be presented in one slide.
>
> I wonder how to do it easily using org-export. 
> My current setting just hides the code that beyond the page in one
> column.
>
> Best regards,
> zwz 

I cannot help you directly in that I don't know how to /flow/ text (or
code) from one column to the next.  I don't think it is actually
possible in beamer.

However, it *is* straightforward to flow text from one slide to the next
by simply adding =allowframebreaks= to the beamer environment
arguments.  For instance,

#+begin_src org
*** Code example
:PROPERTIES:
:BEAMER_envargs: [allowframebreaks]
:END:
#+LATEX: {\scriptsize
#+begin_example
   
#+end_example
#+LATEX: }
#+end_src

The slides will automatically be numbered using roman numerals should
more than one slide (aka frame in beamer speak) be required.

I use latex directives to make the font a little smaller to ensure that
lines with within the slide width-wise.

HTH,
eric
-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
: using Org-mode version 7.7 (release_7.7.315.g20e6)



Re: [O] Per-file attachment directories

2011-09-22 Thread Viktor Rosenfeld
Hi Nick,

thanks for the info. That explains the weird behavior I noticed. I
didn't know that local variables were a general Emacs feature.

Cheers,
Viktor

Nick Dokos wrote:

> Darlan Cavalcante Moreira  wrote:
> 
> > 
> > I tested here and it didn't work for the bad files as you said. However,
> > putting the "Local Variables" at the end of the file worked. In fact, I
> > have always written local variables like this at the end of the file,
> > although I don't remember if this was because of a restriction of just
> > because I'm used to.
> > 
> 
> There is a restriction (see section 53.3.4.1,  "Specifying File Variables",
> in the emacs manual):
> 
> ,
> |Instead of using a `-*-' line, you can define file local variables
> | using a "local variables list" near the end of the file.  The start of
> | the local variables list should be no more than 3000 characters from
> | the end of the file, and must be on the last page if the file is
> | divided into pages.
> `
> 
> Nick
> 
> 
> > A good tip is to put them inside a "* File Local Variables" heading so that
> > they don't stay inside another heading. You can set the noexport tag to
> > avoid exporting this heading.
> > 
> > Also, you can use the function add-file-local-variable to add a new local
> > variable. Notice how this function put the local variables at the end of
> > the file.
> > 
> > --
> > Darlan Cavalcante Moreira
> > 
> > At Wed, 21 Sep 2011 20:29:25 +0200,
> > Viktor Rosenfeld  wrote:
> > > 
> > > Hi,
> > > 
> > > this works for simple files but breaks silently for my org files. I've
> > > narrowed it down to two seemingly unrelated parts and attached two
> > > examples below.
> > > 
> > > - good1.org contains an entry with two tables. When I visit the file,
> > >   Emacs asks me to evaluate the local variable. In bad1.org the first
> > >   table contains another section with the entry "Rechnungsbeitrag". When
> > >   I visit the file, Emacs does not ask me and I can verify that the
> > >   local variable is not evaluated by attaching something to the task.
> > > 
> > > - In bad2.org the offending part is a long LOGBOOK drawer. Removing any
> > >   two lines from the drawer makes the example work. In good2.org I've
> > >   removed the first two lines.
> > > 
> > > If it weren't for those bugs, this would fit my needs exactly!
> > > 
> > > Cheers,
> > > Viktor
> > > 
> > > Darlan Cavalcante Moreira wrote:
> > > 
> > > > 
> > > > One way to do this is to use file variables to change the value of
> > > > org-attach-directory. This works particularly well when you use just a 
> > > > few
> > > > org files as in your case.
> > > > 
> > > > For instance, you could put
> > > > --8<---cut here---start->8---
> > > > # Local Variables:
> > > > # org-attach-directory: "~/org/data/personal"
> > > > # End:
> > > > --8<---cut here---end--->8---
> > > > in your personal.org file and 
> > > > --8<---cut here---start->8---
> > > > # Local Variables:
> > > > # org-attach-directory: "~/org/data/work"
> > > > # End:
> > > > --8<---cut here---end--->8---
> > > > in your work.org file.
> > > > 
> > > > --
> > > > Darlan Cavalcante Moreira
> > > > 
> > > > At Wed, 21 Sep 2011 11:49:39 +0200,
> > > > Viktor Rosenfeld  wrote:
> > > > > 
> > > > > Hi everybody,
> > > > > 
> > > > > so far I've only used one org file, but it's getting unwieldy and I've
> > > > > decided to split it up.
> > > > > 
> > > > > I'd also like to split up my attachment directory to reduce clutter.
> > > > > For example, if I have two org files "personal.org" and "work.org" I
> > > > > would like attachments to go into automatically created directories
> > > > > below "~/org/data/personal" and "~/org/data/work". If a file has no
> > > > > custom attachment directory specified, attachments should be created
> > > > > below a default path (same as now).
> > > > > 
> > > > > Is this possible?
> > > > > 
> > > > > Thanks,
> > > > > Viktor
> > > > > 
> > > > 
> > 
> 



Re: [O] [Bug] local variables definition at beginning of file is ignored

2011-09-22 Thread Viktor Rosenfeld
Never mind, Nick Dokos explained the behavior here:
http://thread.gmane.org/gmane.emacs.orgmode/47043/focus=47091

Cheers,
Viktor

Viktor Rosenfeld wrote:

> Hi everybody,
> 
> in http://thread.gmane.org/gmane.emacs.orgmode/47043 I've posted two
> examples of local file definitions at the top of an org file which are
> silently ignored for seemingly unrelated parts in the org file. The
> definitions work if they are put at the end of the org file. 
> 
> This inconsistency is a bug, isn't it? Also, are local variables
> documented somewhere? I couldn't find anything in the manual.
> 
> Cheers,
> Viktor



Re: [O] [beamer] source code in two column

2011-09-22 Thread zwz
Eric S Fraga  writes:

> zwz  writes:
>
>> I use org to make presentations for C class.
>> Sometimes the code is quite long. And I want to arrange it in two
> column
>> so that it will be presented in one slide.
>>
>> I wonder how to do it easily using org-export. 
>> My current setting just hides the code that beyond the page in one
>> column.
>>
>> Best regards,
>> zwz 
>
> I cannot help you directly in that I don't know how to /flow/ text (or
> code) from one column to the next.  I don't think it is actually
> possible in beamer.
>
> However, it *is* straightforward to flow text from one slide to the next
> by simply adding =allowframebreaks= to the beamer environment
> arguments.  For instance,
>
> #+begin_src org
> *** Code example
> :PROPERTIES:
> :BEAMER_envargs: [allowframebreaks]
> :END:
> #+LATEX: {\scriptsize
> #+begin_example
>
> #+end_example
> #+LATEX: }
> #+end_src
>
> The slides will automatically be numbered using roman numerals should
> more than one slide (aka frame in beamer speak) be required.
>
> I use latex directives to make the font a little smaller to ensure that
> lines with within the slide width-wise.
>
> HTH,
> eric
It is a nice workaround.
But here in my org file, I have to put the "allowframebreaks" in level
two headlines (probably because of my setting #+BEAMER_FRAME_LEVEL: 2), 
otherwise it does not take effect.




Re: [O] [beamer] source code in two column

2011-09-22 Thread Eric S Fraga
zwz  writes:
> It is a nice workaround.
> But here in my org file, I have to put the "allowframebreaks" in level
> two headlines (probably because of my setting #+BEAMER_FRAME_LEVEL: 2), 
> otherwise it does not take effect.

Ah, sorry, I forgot that I have =oddlevelsonly= set so =***= means a
second level heading for me, not a third level.  Apologies for the confusion!

But glad that the workaround is useful.

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
: using Org-mode version 7.7 (release_7.7.315.g20e6)



[O] problem with orgstruct mode in message composition

2011-09-22 Thread Eric S Fraga
Hello,

I am having a very specific problem with orgstruct mode (well,
orgstruct++ to be precise) when writing emails.

I have recently moved to using /evil/ for all my text writing in
Emacs.  This is a vi emulator, a very good one that is currently under
intense development.  I know this may sound blasphemous but I *much*
prefer vi's modal approach than emacs's modeless operation, partly
because of RSI problems and the need to avoid key chording.  But emacs
is what I live in...

Be that as it may, evil works very well generally with org.

However, in =Message= buffers, I cannot now access the usual binding for
fill-paragraph, M-q.  I get the following error message:

: orgstruct-error: This key has no function outside structure elements

when in a simple paragraph (not a list item or table).  Evil itself has
no problems with me invoking M-q in any other buffer so I think it is
somehow an interaction between evil and orgstruct++.  Even if I try

 M-: (set-local-key "\M-q" 'fill-paragraph) RET

while in a message buffer, I get the same error!

 M-x fill-paragraph RET

works, however, so it's not a problem with fill-paragraph itself.  In
fact, the bindings in org.el for orgstruct mode indicate that M-q should
invoke this function...  in going through the code, I cannot see
why the error is happening.

Can anybody advise on how to figure out what is going on?

Apologies for the long email.

Thanks,
eric

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
: using Org-mode version 7.7 (release_7.7.315.g20e6)



Re: [O] FYI: Org mode testing framework, Emacs 23 and 22

2011-09-22 Thread Eric Schulte
>
>>
>> >
>> > F test-ob-exp/org-babel-exp-src-blocks/w-no-file
>> > Testing export from buffers which are not visiting any file.
>> > (wrong-type-argument stringp nil)
>> >
>> > F test-ob-exp/org-babel-exp-src-blocks/w-no-headers
>> > Testing export without any headlines in the org-mode file.
>> > (wrong-type-argument stringp nil)
>> >
>> > F test-ob-lob/export-lob-lines
>> > Test the export of a variety of library babel call lines.
>> > (wrong-type-argument stringp nil)
>> >
>>
>> I have no idea what could be going wrong with these executions, would it
>> be difficult to generate backtraces for these failures?
>
> No, its really easy (as expected w/ Emacs): Section on interactive
> debugging ERT mentions "b" to create the backtrace.
>
> In case of w-no-file and w-no-headers `org-todo-line-regexp' is bound
> to nil, in export-lob-lines `org-maybe-keyword-time-regexp' is bound
> to nil. Backtraces are attached.
>

So,

Could it be that for some reason using Emacs22 all variable whose values
are set in `org-set-regexps-and-options' immediately following

  ;; Compute the regular expressions and other local variables

in org.el are somehow not having their values set?  I assume that
Org-mode simply wouldn't work on Emacs22 if this was generally the case,
so could there be something about the way that you are loading Org-mode?

Maybe explicitly adding a call to this function to the Emacs22
configuration would fix these test errors?

Hope this is helpful, please let me know if I'm miss understanding the
test results.

Thanks -- Eric

>
> Best,
>   -- David
> --
> OpenPGP... 0x99ADB83B5A4478E6
> Jabber dmj...@jabber.org
> Email. dm...@ictsoc.de
>
>
>

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



Re: [O] Bug: unable to open link unless `...from-string' [7.7 (release_7.7.292.g0d4e8.dirty)]

2011-09-22 Thread Dave Abrahams

on Thu Sep 22 2011, David Maus  wrote:

>> > The link escaping was changed in November 2010, maybe the link in
>> > question is an old one?
>>
>> Yep.
>
> Good. This explains it.

I think it's unfortunate that link escaping should have been changed in
a backward-incompatible way.  Seems like the "right" thing to do would
have been to add a fallback to the old interpretation if the new one
failed.

-- 
Dave Abrahams
BoostPro Computing
http://www.boostpro.com



Re: [O] bug: org-mouse broken

2011-09-22 Thread Nicolas Goaziou
Hello,

Samuel Wales  writes:

> To reproduce load org-mouse and mouse-1 in the stars:
>
> *** will say no links instead of cycle
> click in the stars
> * more no links instead of cycle
> more
> * more with links will do menu instead of cycle
> http://google.com/whatever
> http://google.com
> * more

Could you try the following patch to see if it fixes your problem? It
encompasses much more than a fix for this bug, so I would also
appreciate if you could watch for abnormal behaviour while using it.

Regards,

-- 
Nicolas Goaziou
>From 328ef800314fc7f1a31c7111e396fe1a877b735e Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou 
Date: Thu, 25 Aug 2011 01:58:29 +0200
Subject: [PATCH] Provide more consistent regexps for headlines

* lisp/org-agenda.el (org-search-view): simplify regexp.
(org-agenda-get-todos): use new format string.
* lisp/org-archive.el (org-archive-all-done): simplify regexp.
* lisp/org-ascii.el (org-export-as-ascii): more accurate regexp.
* lisp/org-colview-xemacs.el (org-columns-capture-view): use new
  format string and new string.
* lisp/org-colview.el (org-columns-capture-view): use new format
  string and new string.
* lisp/org-docbook.el (org-export-as-docbook): more accurate
  regexp. Also use new regexp to match generic headlines.
* lisp/org-exp.el (org-export-protect-quoted-subtrees): more accurate
  regexp. Also use new regexp to match generic headlines.
* lisp/org-html.el (org-export-as-html): more accurate regexp. Also
  use new regexp to match generic headlines.
* lisp/org-mouse.el (org-mouse-match-todo-keyword): removed unused
  and now erroneous function.
* lisp/org.el (org-heading-regexp, org-heading-keyword-regexp-format):
  new variables.
(org-set-regexps-and-options): create regexps according to the
following rule: use spaces only to separate elements from an headline,
while allowing mixed tabs and spaces for any indentation job.
(org-nl-done-regexp, org-looking-at-done-regexp): removed variables.
(org-set-font-lock-defaults): fontify again headlines with a keyword
and no other text. Use new format strings.
(org-get-heading, org-toggle-comment, org-prepare-agenda-buffers,
org-toggle-fixed-width-section): use new format string.
(org-todo): more accurate regexps.
(org-point-at-end-of-empty-headline): simplify regexp.

This patch attempts to reduce the number of hard-coded headlines, by
providing two format strings and one generic string to cover most of
the cases of headline construction.
---
 lisp/org-agenda.el |   35 +
 lisp/org-archive.el|2 +-
 lisp/org-ascii.el  |4 +-
 lisp/org-colview-xemacs.el |5 +-
 lisp/org-colview.el|5 +-
 lisp/org-docbook.el|7 +-
 lisp/org-exp.el|6 +-
 lisp/org-html.el   |7 +-
 lisp/org-mouse.el  |7 --
 lisp/org.el|  188 +---
 10 files changed, 146 insertions(+), 120 deletions(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index b1fa5f5..28c5d44 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -3868,7 +3868,7 @@ in `org-agenda-text-search-extra-files'."
 (if (not regexps+)
 	(setq regexp org-outline-regexp-bol)
   (setq regexp (pop regexps+))
-  (if hdl-only (setq regexp (concat "^" org-outline-regexp ".*?"
+  (if hdl-only (setq regexp (concat org-outline-regexp-bol " .*?"
 	regexp
 (setq files (org-agenda-files nil 'ifmode))
 (when (eq (car org-agenda-text-search-extra-files) 'agenda-archives)
@@ -4574,18 +4574,21 @@ the documentation of `org-diary'."
 		  'help-echo
 		  (format "mouse-2 or RET jump to org file %s"
 			  (abbreviate-file-name buffer-file-name
-	 (regexp (concat "^\\*+[ \t]+\\("
-			 (if org-select-this-todo-keyword
-			 (if (equal org-select-this-todo-keyword "*")
- org-todo-regexp
-			   (concat "\\<\\("
-   (mapconcat 'identity
-		  (org-split-string
-		   org-select-this-todo-keyword "|") "\\|")
- "\\)\\>"))
-			   org-not-done-regexp)
-			 "[^\n\r]*\\)"))
-	 marker priority category category-pos tags todo-state ee txt beg end)
+	 (regexp (format org-heading-keyword-regexp-format
+			 (cond
+			  ((and org-select-this-todo-keyword
+(equal org-select-this-todo-keyword "*"))
+			   org-todo-regexp)
+			  (org-select-this-todo-keyword
+			   (concat "\\("
+   (mapconcat 'identity
+	  (org-split-string
+	   org-select-this-todo-keyword
+	   "|")
+	  "\\|") "\\)"))
+			  (t org-not-done-regexp
+	 marker priority category tags todo-state
+	 ee txt beg end)
 (goto-char (point-min))
 (while (re-search-forward regexp nil t)
   (catch :skip
@@ -4597,11 +4600,11 @@ the documentation of `org-diary'."
 	(goto-char (1+ beg))
 	(or org-agenda-todo-list-sublevels (org-end-of-subtree 'invisible))
 	(throw :skip nil)))
-	(goto-char (match-beginning 1))
+	(goto-char (match-beginning 2))
 	(setq marker (org-

Re: [O] [Bug] local variables definition at beginning of file is ignored

2011-09-22 Thread Nick Dokos
Viktor Rosenfeld  wrote:

> Hi everybody,
> 
> in http://thread.gmane.org/gmane.emacs.orgmode/47043 I've posted two
> examples of local file definitions at the top of an org file which are
> silently ignored for seemingly unrelated parts in the org file. The
> definitions work if they are put at the end of the org file. 
> 
> This inconsistency is a bug, isn't it? Also, are local variables
> documented somewhere? I couldn't find anything in the manual.
> 

No, it's not. Did you see my reply to Darlan's mail last night?

Nick




Re: [O] [Bug] local variables definition at beginning of file is ignored

2011-09-22 Thread Nick Dokos
Nick Dokos  wrote:

> Viktor Rosenfeld  wrote:
> 
> > Hi everybody,
> > 
> > in http://thread.gmane.org/gmane.emacs.orgmode/47043 I've posted two
> > examples of local file definitions at the top of an org file which are
> > silently ignored for seemingly unrelated parts in the org file. The
> > definitions work if they are put at the end of the org file. 
> > 
> > This inconsistency is a bug, isn't it? Also, are local variables
> > documented somewhere? I couldn't find anything in the manual.
> > 
> 
> No, it's not. Did you see my reply to Darlan's mail last night?
> 

Sorry, I jumped the gun: I should have read further in the list.

Nick




Re: [O] bug: org-mouse broken

2011-09-22 Thread Michael Brand
Hi Nicolas

The file name 0001-Provide-more-consistent-regexps-for-headlines.patch
made me curious and I take the opportunity to support such an effort
by testing this patch on release_7.7-316-gdecd722. I found the issue
that "* TODO task" setting to done with "C-c C-t d" leads to "* DONE
TODO task".

Michael



Re: [O] bug: org-mouse broken

2011-09-22 Thread Nicolas Goaziou
Hello,

Michael Brand  writes:

> The file name 0001-Provide-more-consistent-regexps-for-headlines.patch
> made me curious and I take the opportunity to support such an effort
> by testing this patch on release_7.7-316-gdecd722.

Great! Thank you for testing it.

> I found the issue that "* TODO task" setting to done with "C-c C-t d"
> leads to "* DONE TODO task".

Indeed. This is fixed in the following patch. Please disregard the
previous one.

Regards,

-- 
Nicolas Goaziou
>From 2925d1ee4d8c18c4ef6eba761149fff52d63cbd6 Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou 
Date: Thu, 25 Aug 2011 01:58:29 +0200
Subject: [PATCH] Provide more consistent regexps for headlines

* lisp/org-agenda.el (org-search-view): Simplify regexp.
(org-agenda-get-todos): Use new format string.
* lisp/org-archive.el (org-archive-all-done): Simplify regexp.
* lisp/org-ascii.el (org-export-as-ascii): More accurate regexp.
* lisp/org-colview-xemacs.el (org-columns-capture-view): Use new
  format string and new string.
* lisp/org-colview.el (org-columns-capture-view): Use new format
  string and new string.
* lisp/org-docbook.el (org-export-as-docbook): More accurate
  regexp.  Also use new regexp to match generic headlines.
* lisp/org-exp.el (org-export-protect-quoted-subtrees): More accurate
  regexp.  Also use new regexp to match generic headlines.
* lisp/org-html.el (org-export-as-html): More accurate regexp.  Also
  use new regexp to match generic headlines.
* lisp/org-mouse.el (org-mouse-match-todo-keyword): Removed unused
  and now erroneous function.
* lisp/org.el (org-heading-regexp, org-heading-keyword-regexp-format):
  New variables.
(org-set-regexps-and-options): Create regexps according to the
following rule: use spaces only to separate elements from an headline,
while allowing mixed tabs and spaces for any indentation job.
(org-nl-done-regexp, org-looking-at-done-regexp): Removed variables.
(org-set-font-lock-defaults): Fontify again headlines with a keyword
and no other text.  Use new format strings.
(org-get-heading, org-toggle-comment, org-prepare-agenda-buffers,
org-toggle-fixed-width-section): Use new format string.
(org-todo): More accurate regexps.
(org-point-at-end-of-empty-headline): Simplify regexp.
(org-insert-heading): Headline can sometimes be nil.

This patch attempts to reduce the number of hard-coded headlines, by
providing two format strings and one generic string to cover most of
the cases of headline construction.
---
 lisp/org-agenda.el |   35 +
 lisp/org-archive.el|2 +-
 lisp/org-ascii.el  |4 +-
 lisp/org-colview-xemacs.el |5 +-
 lisp/org-colview.el|5 +-
 lisp/org-docbook.el|7 +-
 lisp/org-exp.el|6 +-
 lisp/org-html.el   |7 +-
 lisp/org-mouse.el  |7 --
 lisp/org.el|  189 +---
 10 files changed, 147 insertions(+), 120 deletions(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index b1fa5f5..28c5d44 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -3868,7 +3868,7 @@ in `org-agenda-text-search-extra-files'."
 (if (not regexps+)
 	(setq regexp org-outline-regexp-bol)
   (setq regexp (pop regexps+))
-  (if hdl-only (setq regexp (concat "^" org-outline-regexp ".*?"
+  (if hdl-only (setq regexp (concat org-outline-regexp-bol " .*?"
 	regexp
 (setq files (org-agenda-files nil 'ifmode))
 (when (eq (car org-agenda-text-search-extra-files) 'agenda-archives)
@@ -4574,18 +4574,21 @@ the documentation of `org-diary'."
 		  'help-echo
 		  (format "mouse-2 or RET jump to org file %s"
 			  (abbreviate-file-name buffer-file-name
-	 (regexp (concat "^\\*+[ \t]+\\("
-			 (if org-select-this-todo-keyword
-			 (if (equal org-select-this-todo-keyword "*")
- org-todo-regexp
-			   (concat "\\<\\("
-   (mapconcat 'identity
-		  (org-split-string
-		   org-select-this-todo-keyword "|") "\\|")
- "\\)\\>"))
-			   org-not-done-regexp)
-			 "[^\n\r]*\\)"))
-	 marker priority category category-pos tags todo-state ee txt beg end)
+	 (regexp (format org-heading-keyword-regexp-format
+			 (cond
+			  ((and org-select-this-todo-keyword
+(equal org-select-this-todo-keyword "*"))
+			   org-todo-regexp)
+			  (org-select-this-todo-keyword
+			   (concat "\\("
+   (mapconcat 'identity
+	  (org-split-string
+	   org-select-this-todo-keyword
+	   "|")
+	  "\\|") "\\)"))
+			  (t org-not-done-regexp
+	 marker priority category tags todo-state
+	 ee txt beg end)
 (goto-char (point-min))
 (while (re-search-forward regexp nil t)
   (catch :skip
@@ -4597,11 +4600,11 @@ the documentation of `org-diary'."
 	(goto-char (1+ beg))
 	(or org-agenda-todo-list-sublevels (org-end-of-subtree 'invisible))
 	(throw :skip nil)))
-	(goto-char (match-beginning 1))
+	(goto-char (match-beginning 2))
 	(setq marker (org-agenda-new

Re: [O] bug: org-mouse broken

2011-09-22 Thread Michael Brand
On Thu, Sep 22, 2011 at 20:25, Nicolas Goaziou  wrote:
> Indeed. This is fixed in the following patch. Please disregard the
> previous one.

Works now, thanks.

Michael



[O] Bug: File Links [6.33x]

2011-09-22 Thread Edward N. Lewis
To: emacs-orgmode@gnu.org
Subject: Bug: File Links [6.33x]
From: ed.le...@enlewis.com (Edward N. Lewis)
--text follows this line--
 

Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See
 
  
http://orgmode.org/manual/Feedback.html#Feedback
 
Your bug report will be posted to the Org-mode mailing list.

 
Links to external pdf files do not work in org-mode. Links do not export
properly
into PDF files. Links to web addresses and other file types such as text
files work fine, however.
 
To reproduce: create a link in your org file in any form,
e.g. [[file:/full_path/whatever.pdf]],
[[file:/full_path/whatever.pdf][Label for file]], file:whatever.pdf.
 
1) The link will not work from within org-mode.
2) The link will not be properly formatted when viewed in a PDF viewer
such as Adobe Acrobat Professional. To make the link work, the link's
properties have to be manually edited from within Adobe Acrobat/
 
Emacs  : GNU Emacs 23.2.1 (i386-redhat-linux-gnu, GTK+ Version 2.24.4)
 of 2011-05-23 on x86-05.phx2.fedoraproject.org
Package: Org-mode version 6.33x
 
current state:
==
(setq
 org-export-with-sub-superscripts '{}
 org-export-latex-date-format "%B %d, %Y"
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-export-preprocess-hook '(org-export-blocks-preprocess)
 org-tab-first-hook '(org-hide-block-toggle-maybe)
 org-src-mode-hook '(org-src-mode-configure-edit-buffer)
 org-confirm-shell-link-function 'yes-or-no-p
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
org-cycle-show-empty-lines
org-optimize-window-after-visibility-change)
 org-export-latex-classes '(("article"
"

\\documentclass[12pt]{article}\n\\setlength{\\parindent}{0pt}\n\\renewcomman
d{\\familydefault}{\\sfdefault}"
("  \\section{%s}" . " 
\\section*{%s}")
("  \\subsection{%s}" . "
 \\subsection*{%s}")
("  \\subsubsection{%s}" . "
 \\subsubsection*{%s}")
("  \\paragraph{%s}" . "
 \\paragraph*{%s}")
("  \\subparagraph{%s}" . "
 \\subparagraph*{%s}"))
   ("report"
"

\\documentclass[11pt]{report}\n\\usepackage[utf8]{inputenc}\n\\usepackage[T1
]{fontenc}\n\\usepackage{graphicx}\n\\usepackage{longtable}\n\\usepackage{hy
perref}"
("  \\part{%s}" . " 
\\part*{%s}")
("  \\chapter{%s}" . " 
\\chapter*{%s}")
("  \\section{%s}" . " 
\\section*{%s}")
("  \\subsection{%s}" . "
 \\subsection*{%s}")
("  \\subsubsection{%s}" . "
 \\subsubsection*{%s}"))
   ("book"
"

\\documentclass[11pt]{book}\n\\usepackage[utf8]{inputenc}\n\\usepackage[T1]{
fontenc}\n\\usepackage{graphicx}\n\\usepackage{longtable}\n\\usepackage{hype
rref}"
("  \\part{%s}" . " 
\\part*{%s}")
("  \\chapter{%s}" . " 
\\chapter*{%s}")
("  \\section{%s}" . " 
\\section*{%s}")
("  \\subsection{%s}" . "
 \\subsection*{%s}")
("  \\subsubsection{%s}" . "
 \\subsubsection*{%s}"))
   )
 org-mode-hook '(#[nil "\300\301\302\303\304$\207"
 [org-add-hook change-major-mode-hook org-show-block-all
  append local]
 5]
   )
 org-confirm-elisp-link-function 'yes-or-no-p
 org-occur-hook '(org-first-headline-recenter)
 )
-- 
Edward N. Lewis, PE
PO Box 611
Worthington, MA  01098-0611
USA
+1 413-238-0109
  ed.le...@enlewis.com

 
Edward N. Lewis, PE
PO Box 611
Worthington, MA  01098-0611
USA
+1 413-238-0109
ed.le...@enlewis.com
 
 


Re: [O] Bug: File Links [6.33x]

2011-09-22 Thread Nick Dokos
Edward N. Lewis  wrote:


> Links to external pdf files do not work in org-mode. Links do not export 
> properly
> into PDF files. Links to web addresses and other file types such as text 
> files work fine, however.
>  
> To reproduce: create a link in your org file in any form,
> e.g. [[file:/full_path/whatever.pdf]],
> [[file:/full_path/whatever.pdf][Label for file]], file:whatever.pdf.
>  
> 1) The link will not work from within org-mode.
> 2) The link will not be properly formatted when viewed in a PDF viewer
> such as Adobe Acrobat Professional. To make the link work, the link's
> properties have to be manually edited from within Adobe Acrobat/
>  
> Emacs  : GNU Emacs 23.2.1 (i386-redhat-linux-gnu, GTK+ Version 2.24.4)
>  of 2011-05-23 on x86-05.phx2.fedoraproject.org
> Package: Org-mode version 6.33x
>  

I cannot reproduce this with Org-mode version 7.7
(release_7.7.311.g0c099), so I'd suspect your 6.33 (which is quite old,
but unfortunately still ships with older versions of emacs). If you are
at all serious about using org-mode, you probably need to install the
7.7 release (or if you are willing to live on the edge, clone the git
repository and enjoy all the up-to-date features - and some breakages,
but ime, breakages get fixed quickly).

Nick




Re: [O] Feature Requests: `org-refile-targets'

2011-09-22 Thread Dave Abrahams

on Wed Sep 14 2011, Dave Abrahams  wrote:

> Hi all,
>
> I have two related feature requests:
>
> 1. The ability to refile based on properties.  I have a bunch of items
>with a :CATEGORY: entry in their property drawer.  I would like such
>items always to be refile targets.  So I'd like, perhaps, a regexp
>for property matching, e.g. "\\`:CATEGORY:.*"
>
> 2. In-buffer settings for `org-refile-targets'.  What makes an
>appropriate target in one file may not be a good target in another,
>and I want to be able to distribute the file with it refiling options
>built-in.
>
> I can live without #2, since I can always use Emacs' file-local
> variables to set `org-refile-targets', but #1 feels more urgent.

Actually, I can't live without #2.  Setting a file-local variable works
fine until I am in the agenda, because the setting doesn't get
translated to the agenda buffer(!)

-- 
Dave Abrahams
BoostPro Computing
http://www.boostpro.com




[O] Problems with pdf export (and bibtex) after upgrading to TeXLive-2011 on Lion

2011-09-22 Thread Tony Ware
After upgrading to Lion and TeXLive-2011, I found my pdflatex export
was no longer working (in that it would only call pdflatex once, and
would not run bibtex). Having spent a couple of hours finding a
solution, I thought I should share to perhaps save some others the
trouble.

I had to do two things to fix the problem:
1) set my org-latex-to-pdf-process variable to ("pdflatex -interaction
batchmode -output-directory %o %b" "bibtex %b" "pdflatex -interaction
batchmode -output-directory %o %b" "pdflatex -interaction batchmode
-output-directory %o %b").
Using
-interaction nonstopmode
(which I was in my previous setting) no longer seemed to work - the
whole thing seemed to exit after the first call to pdflatex, so that
subsequent commands were not executed.
2) add the line
openout_any=r
(or openout_any=a)
to the file
/usr/local/texlive/2011/texmf.cnf.
Apparently, the default is openout_any=p, where the p stands for
'paranoid', and as a result bibtex refuses to write the .blg file.

Cheers,

Tony Ware
-- 
http://www.math.ucalgary.ca/~aware



Re: [O] Problems with pdf export (and bibtex) after upgrading to TeXLive-2011 on Lion

2011-09-22 Thread suvayu ali
On Fri, Sep 23, 2011 at 12:44 AM, Tony Ware  wrote:
> After upgrading to Lion and TeXLive-2011, I found my pdflatex export
> was no longer working (in that it would only call pdflatex once, and
> would not run bibtex). Having spent a couple of hours finding a
> solution, I thought I should share to perhaps save some others the
> trouble.
>
> I had to do two things to fix the problem:
> 1) set my org-latex-to-pdf-process variable to ("pdflatex -interaction
> batchmode -output-directory %o %b" "bibtex %b" "pdflatex -interaction
> batchmode -output-directory %o %b" "pdflatex -interaction batchmode
> -output-directory %o %b").
> Using
> -interaction nonstopmode
> (which I was in my previous setting) no longer seemed to work - the
> whole thing seemed to exit after the first call to pdflatex, so that
> subsequent commands were not executed.
> 2) add the line
> openout_any=r
> (or openout_any=a)
> to the file
> /usr/local/texlive/2011/texmf.cnf.
> Apparently, the default is openout_any=p, where the p stands for
> 'paranoid', and as a result bibtex refuses to write the .blg file.
>

Maybe this is relevant:



> Cheers,
>
> Tony Ware

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] Bug: File Links [6.33x]

2011-09-22 Thread David Maus
At Thu, 22 Sep 2011 18:07:25 -0400,
Nick Dokos wrote:
>
> Edward N. Lewis  wrote:
>
>
> > Links to external pdf files do not work in org-mode. Links do not export 
> > properly
> > into PDF files. Links to web addresses and other file types such as text 
> > files work fine, however.
> >
> > To reproduce: create a link in your org file in any form,
> > e.g. [[file:/full_path/whatever.pdf]],
> > [[file:/full_path/whatever.pdf][Label for file]], file:whatever.pdf.
> >
> > 1) The link will not work from within org-mode.
> > 2) The link will not be properly formatted when viewed in a PDF viewer
> > such as Adobe Acrobat Professional. To make the link work, the link's
> > properties have to be manually edited from within Adobe Acrobat/
> >
> > Emacs  : GNU Emacs 23.2.1 (i386-redhat-linux-gnu, GTK+ Version 2.24.4)
> >  of 2011-05-23 on x86-05.phx2.fedoraproject.org
> > Package: Org-mode version 6.33x
> >
>
> I cannot reproduce this with Org-mode version 7.7
> (release_7.7.311.g0c099), so I'd suspect your 6.33 (which is quite old,
> but unfortunately still ships with older versions of emacs). If you are
> at all serious about using org-mode, you probably need to install the
> 7.7 release (or if you are willing to live on the edge, clone the git
> repository and enjoy all the up-to-date features - and some breakages,
> but ime, breakages get fixed quickly).

I cannot reproduce it with

GNU Emacs 23.2.1 (i486-pc-linux-gnu, GTK+ Version 2.20.0) of 2010-12-11 on 
raven, modified by Debian

Org-mode version 6.33f (release_6.33f)

neither. The minimal Emacs initfile used:

,
| (add-to-list 'load-path "~/projects/org-mode/org-mode/lisp")
| (add-to-list 'load-path "~/projects/org-mode/org-mode/contrib/lisp")
| (add-to-list 'load-path "~/projects/org-mode/org-mode/testing/")
| (require 'org-install)
| (require 'org)
`

If I use C-c C-o on the links Org starts my PDF viewer (xpdf 3.02), if
I export the document with the link to PDF and open the result with
xpdf the exported link works, too.

What exactly happens if you try to open the link and which properties
do you have to modify to make the exported link working?

Best,
  -- David
--
OpenPGP... 0x99ADB83B5A4478E6
Jabber dmj...@jabber.org
Email. dm...@ictsoc.de


pgpBeGJfMiNML.pgp
Description: PGP signature