[O] Flexible plain list bullets

2012-04-18 Thread Mark E. Shoulson

  
  
Attached is a patch that adds a customization variable for
  setting which characters you can use as bullets in plain lists. 
  Unicode has all kinds of pretty characters like ❧ or ☞ that would
  be good for bullets, why limit ourselves to just [-+*]?
The variable's "set" function sets associated other related
  variables, regular expressions using it, treating "*" specially
  since it isn't a plain-list bullet at the beginning of a line. 
  Care is taken that the character "-" does not wind up in the
  middle of the character range (but there isn't special processing
  for "]", and maybe there should be).
I put in some example sets to choose from in the customization
  menu, though they probably will not be usable since I understand
  Org-mode still has to support emacs versions that don't support
  Unicode.
Please take a look, see if it's worth adding, tell me what else I
  need to do if necessary.  Thanks!


~mark

  

>From 5db3081b9487c09b17c7accfcf1b25f45002aa13 Mon Sep 17 00:00:00 2001
From: Mark Shoulson 
Date: Wed, 18 Apr 2012 20:55:41 -0400
Subject: [PATCH] Lists: enable customization for arbitrary characters for
 plain list bullets

* lisp/org-list.el (org-list-bulletcharlist): new custom variable
to set a list of characters for use as the bullets in plain lists.
Entails a few other variables set along with it.
---
 lisp/org-list.el |   67 +
 1 files changed, 57 insertions(+), 10 deletions(-)

diff --git a/lisp/org-list.el b/lisp/org-list.el
index 882ce3d..c751d1f 100644
--- a/lisp/org-list.el
+++ b/lisp/org-list.el
@@ -360,17 +360,60 @@ specifically, type `block' is determined by the variable
   "Regex corresponding to the end of a list.
 It depends on `org-empty-line-terminates-plain-lists'.")
 
-(defconst org-list-full-item-re
-  (concat "^[ \t]*\\(\\(?:[-+*]\\|\\(?:[0-9]+\\|[A-Za-z]\\)[.)]\\)\\(?:[ \t]+\\|$\\)\\)"
-	  "\\(?:\\[@\\(?:start:\\)?\\([0-9]+\\|[A-Za-z]\\)\\][ \t]*\\)?"
-	  "\\(?:\\(\\[[ X-]\\]\\)\\(?:[ \t]+\\|$\\)\\)?"
-	  "\\(?:\\(.*\\)[ \t]+::\\(?:[ \t]+\\|$\\)\\)?")
+;; There shouldn't really have to be two different values here, since
+;; they need to be changed in sync...
+
+(defvar org-list-bullet-re)
+(defvar org-list-bullet-chars)
+(defvar org-list-full-item-re nil
   "Matches a list item and puts everything into groups:
 group 1: bullet
 group 2: counter
 group 3: checkbox
 group 4: description tag")
 
+(defcustom org-list-bulletcharlist '(?+ ?- ?*)
+  "Characters used as unordered plain list bullets.
+If nil, defaults to (?- ?+ ?*), i.e. hyphen, plus, and *.  If * is present,
+it only matches when not at the beginning of the line (it must be preceded
+by whitespace).
+
+Using letters as bullet characters is not recommended, as they also get
+interpreted as ordered lists."
+  :group 'org-plain-lists
+  :type '(choice (const nil)
+		 (const :tag "(+ - *)" '(?+ ?- ?*))
+		 (const :tag "(+ - * ‣)" '(?+ ?- ?* ?‣))
+		 (const :tag "(☞ ❦ ❧ ❥)" '(?☞ ?❦ ?❧ ?❥))
+		 (repeat character))
+  :set (lambda (name val)
+  	 (let* ((val (or val '(?- ?+ ?*)))
+  		;; - mustn't be in the middle!  Place it in front.
+  		(val (if (member ?- val)
+			 (cons ?- (remove ?- val))
+		   val))
+  		(star-p (member ?* val))
+  		(val (remove ?* val)))
+	   (setq org-list-bullet-chars 
+		 (concat (eval `(string ,@val))
+			 (when star-p "*")))
+	   (setq org-list-full-item-re
+		 (concat "^[ \t]*\\(\\(?:[" org-list-bullet-chars "]"
+			 "\\|\\(?:[0-9]+\\|[A-Za-z]\\)[.)]\\)\\(?:[ \t]+\\|$\\)\\)"
+			 "\\(?:\\[@\\(?:start:\\)?\\([0-9]+\\|[A-Za-z]\\)\\][ \t]*\\)?"
+			 "\\(?:\\(\\[[ X-]\\]\\)\\(?:[ \t]+\\|$\\)\\)?"
+			 "\\(?:\\(.*\\)[ \t]+::\\(?:[ \t]+\\|$\\)\\)?"))
+  	   ;; * is a special case
+  	   (setq org-list-bullet-re 
+  		 (concat 
+  		  "\\(?:"
+  		  (when star-p "[[:blank:]]+\\*")
+  		  (when (and star-p val) "\\|")
+  		  "[[:blank:]]*["
+  		  (when val (eval `(string ,@val)))
+  		  "]\\)")))
+  	 (set name val)))
+
 (defun org-item-re ()
   "Return the correct regular expression for plain lists."
   (let ((term (cond
@@ -379,8 +422,8 @@ group 4: description tag")
 	   ((= org-plain-list-ordered-item-terminator ?.) "\\.")
 	   (t "[.)]")))
 	(alpha (if org-alphabetical-lists "\\|[A-Za-z]" "")))
-(concat "\\([ \t]*\\([-+]\\|\\(\\([0-9]+" alpha "\\)" term
-	"\\)\\)\\|[ \t]+\\*\\)\\([ \t]+\\|$\\)")))
+(concat "\\(" org-list-bullet-re "\\|[ \t]*\\(\\(\\([0-9]+" alpha "\\)" term
+	"\\)\\)\\)\\([ \t]+\\|$\\)")))
 
 (defsubst org-item-beginning-re ()
   "Regexp matching the beginning of a plain list item."
@@ -2229,7 +2272,7 @@ is an integer, 0 means `-', 1 means `+' etc.  If WHICH is
 		 (t (org-trim bullet
;; Compute list of possible bullets, depending on context.
 	   (bullet-list
-	(append '("-" "+" )
+	(append (mapcar 'char-to-string (string-to-list org-list-bullet-chars))

Re: [O] [beamer] What is the easiest way to inject latex code between block environments?

2012-04-18 Thread Mikhail Titov
> -Original Message-
> From: emacs-orgmode-bounces+mlt=gmx...@gnu.org [mailto:emacs-orgmode-
> bounces+mlt=gmx...@gnu.org] On Behalf Of Mikhail Titov
> Sent: Tuesday, April 17, 2012 11:46 PM
> To: John Hendy
> Cc: emacs-orgmode@gnu.org
> Subject: Re: [O] [beamer] What is the easiest way to inject latex code
between
> block environments?
> 
> >>> I would like to explicitly define heights for columns that contain
blocks
> to be able to use \vfill [1] in-between blocks. And here comes the
problem. I
> kind of need to inject

Here is the dirty hack if someone else is also making posters with orgmode &
beamerposter.
Unfortunately I know AWK better than elisp so don't condemn me :-) It does a
perfect job for me. I don't know if can be hooked to pipe through before
writing TeX output.

8<--
--->8-
#!/usr/bin/awk -f
# Post-process orgmode output before final call to pdflatex while using
beamerposter

BEGIN {
end_block = 0   # 1 if previous line was \end{block}
columns = 0 # 1 if probably \vbox will be needed, 2 if
it is needed
RS = "\r\n" # I'm on Windows
height = ".98\\textheight"   # FIXME
}

/^\\frametitle{.+}$/ { next}# frametitle removal from the only frame

/^\\begin{columns}/ { columns = 1 }
/^\\begin{column}/ && columns { columns = 2 }

/^%% .+/ && columns == 2 { print "\\vbox to " height " {%"; columns = 0 } #
we rely on orgmode comments :(

/^\\end{block}$/ { end_block = 1 }

/^\\begin{block}/ && end_block { print "\\vfill"; end_block = 0 }

/^\\end{column}$/ && end_block { print "}%"; columns = 1; end_block = 0 }

{ print }
8<--
--->8-

Mikhail




[O] Question about adding to inherited properties

2012-04-18 Thread Bill Wishon
Hi Org-mode Community,

I can't get the example in section 7.1 of the org-mode manual to work as I
expect.  Perhaps someone can help me see what I'm doing wrong.

I tried creating this buffer:

* CD collection
** Classic
 :PROPERTIES:
 :GENRES: Classic
 :END:
*** Goldberg Variations
 :PROPERTIES:
 :Title:Goldberg Variations
 :Composer: J.S. Bach
 :Artist:   Glen Gould
 :Publisher: Deutsche Grammophon
 :NDisks:   1
 :GENRES+:   Baroque
 :END:

Then I set the org-use-property-inheritance variable to include GENRES.

Then I wrote the following function

(defun bill-test (property)
  "print all inheirited properties"
  (interactive "MProperty: ")
  (message (concat property " = " (org-entry-get (point) property t

Which prints "GENRES = Baroque" when I run it with the point on Goldberg
Variations, based on the manual I expected this to print "GENRES = Classic
Baroque”.

While I think they should all do the same thing, I also tried the following
ways of calling org-entry-get just in case all with the same result.
(org-entry-get (point) property 'selective)
(org-entry-get nil property t)
(org-entry-get nil property 'selective)

I'm using org-version 7.8.09 on Windows with emacs "GNU Emacs 23.3.1
(i386-mingw-nt6.1.7601) of 2011-03-10 on 3249CTO".

Any pointers about what I'm doing wrong would be great.

Thanks,
~>Bill


Re: [O] org-list-demote-modify-bullet and alphabetic/numerical bullets

2012-04-18 Thread Brian van den Broek
On 19 April 2012 00:57, Brian van den Broek
 wrote:
> On 18 April 2012 13:03, Nicolas Goaziou  wrote:
>> Hello,
>>
>> Brian van den Broek  writes:
>>
>>> I have (setq org-alphabetical-lists t) in my .emacs. I am trying to
>>> set org-list-demote-modify-bullet to cycle on demoting between bullets
>>> of the form  -/+ and 1./A.
>>>
>>> (setq org-list-demote-modify-bullet
>>>        '(("+" . "-") ("-" . "+") ))
>>> accomplishes the -/+ cycling just fine.
>>>
>>> (setq org-list-demote-modify-bullet
>>>        '(("+" . "-") ("-" . "+") ("1." . "A.") ("A." . "1.")))
>>> has, however, no effect on numerical nor alphabetic bullets, nor do either 
>>> of
>
> 
>
>> This should be fixed in master now.  Could you confirm this?
>>
>> Thanks for reporting the problem.
>>
>>
>> Regards,
>>
>> --
>> Nicolas Goaziou
>
>
> Thanks for your attention to this, Nicholas.
>
> The situation is improved, though not entirely fixed. However, the
> problem may well be on my end. I tried a few settings and wasn't able
> to get quite the expected behaviour; I may simply not understand the
> required syntax for org-list-demote-modify-bullet.


Gah! It *was* operator error. I must have read it through 10 times
before sending. Just as the gmail "Undo" window closed, I saw it.

I was missing the '.' seperating the bullets. I had

   '(("+" . "-") ("-" . "+") ("1." . "A.") ("A."  "1.") )

when I needed

   '(("+" . "-") ("-" . "+") ("1." . "A.") ("A." . "1.") )

Sorry for the noise and thanks for the fix!

Sheepishly,

Brian vdB



Re: [O] org-list-demote-modify-bullet and alphabetic/numerical bullets

2012-04-18 Thread Brian van den Broek
On 18 April 2012 13:03, Nicolas Goaziou  wrote:
> Hello,
>
> Brian van den Broek  writes:
>
>> I have (setq org-alphabetical-lists t) in my .emacs. I am trying to
>> set org-list-demote-modify-bullet to cycle on demoting between bullets
>> of the form  -/+ and 1./A.
>>
>> (setq org-list-demote-modify-bullet
>>        '(("+" . "-") ("-" . "+") ))
>> accomplishes the -/+ cycling just fine.
>>
>> (setq org-list-demote-modify-bullet
>>        '(("+" . "-") ("-" . "+") ("1." . "A.") ("A." . "1.")))
>> has, however, no effect on numerical nor alphabetic bullets, nor do either of



> This should be fixed in master now.  Could you confirm this?
>
> Thanks for reporting the problem.
>
>
> Regards,
>
> --
> Nicolas Goaziou


Thanks for your attention to this, Nicholas.

The situation is improved, though not entirely fixed. However, the
problem may well be on my end. I tried a few settings and wasn't able
to get quite the expected behaviour; I may simply not understand the
required syntax for org-list-demote-modify-bullet.

I should also mention that I am a coward and thus don't live on the
bleeding edge. After cloning the git repo and setting up a temporary
.emacs pointing for org mode to the master branch,
M-x org-version reports:
Org-mode version 7.8.09 (release_7.8.09.236.gdbc6f)
This seems to me to confirm I have the HEAD of master as of an hour or
so ago, but it is best if more competent eyes verify this.

My minimal .emacs:
; /home/brian/code/foreign/org-mode is where my git clone lives
(setq load-path (cons "/home/brian/code/foreign/org-mode/lisp" load-path))
(setq load-path (cons "/home/brian/code/foreign/org-mode/contrib/lisp"
load-path))

(add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))

(global-set-key "\C-cl" 'org-store-link)
(global-set-key "\C-cc" 'org-capture)
(global-set-key "\C-ca" 'org-agenda)
(global-set-key "\C-cb" 'org-iswitchb)

(setq org-directory "/home/brian/docs/org")

(setq org-default-notes-file "~/docs/org/inbox.org")

(setq org-alphabetical-lists t)

; In the comments below, "n" and "A" stand for
; arbitrary number and alpha characters in bullets
(setq org-list-demote-modify-bullet
;   '(("+" . "-") ("-" . "+") ("1." . "A.") ("A." "1.") )
;   Works demoting n. --> A.; fails A. --> n. with
;   Wrong type argument: stringp, ("1.")

   '(("+" . "-") ("-" . "+") ("1." . "A.") ("A" "1") )
;   Works for n. --> A. However, A. --> A.

;   '(("+" . "-") ("-" . "+") ("1" . "A") ("A" "1") )
;   n. --> n. rather than to A.
)

I used a simple org file containing only:

- foo
  + bar
- baz


1. spam
   A. ham
   B. eggs


for my tests. With the version of org-list-demote-modify-bullet active
above, demoting "B. eggs" yields "A. eggs" one level indented whereas
what is desired is "1. eggs". As noted in the comments, the earlier
commented version yields a Wrong type argument error and the item "B.
eggs" remains in place, unchanged.

Thanks for the (at least) partial progress. Is the rest my error? If
so, what setting ought I to use?

Best,

Brian vdB



Re: [O] starting agenda gives: "Selecting deleted buffer"

2012-04-18 Thread Max Mikhanosha
At Wed, 18 Apr 2012 16:22:01 +0200,
Rainer Stengele wrote:
> 
> After deleting all buffers and then trying to start any agenda (for example 
> C-a a) I get this error message:
> 
> Debugger entered--Lisp error: (error "Selecting deleted buffer")
>   org-compile-prefix-format(agenda)
>   org-agenda-list(nil)
>   call-interactively(org-agenda-list)
>   (let ((org-agenda-span (quote day)) (org-agenda-start-with-log-mode t) 
> (org-agenda-overriding-header "Today's Agenda  + Prio A todos "))
> (call-interactively (quote org-agenda-list)))
>   (let ((org-agenda-sorting-strategy (quote (time-up priority-down 
> todo-state-up (let ((org-agenda-span (quote day))
> (org-agenda-start-with-log-mode t) (org-agenda-overriding-header "Today's 
> Agenda  + Prio A todos ")) (call-interactively (quote
> org-agenda-list
>   eval((let ((org-agenda-sorting-strategy (quote (time-up priority-down 
> todo-state-up (let ((org-agenda-span (quote day))
> (org-agenda-start-with-log-mode t) (org-agenda-overriding-header "Today's 
> Agenda  + Prio A todos ")) (call-interactively (quote
> org-agenda-list)
>   org-let2(((org-agenda-sorting-strategy (quote (time-up priority-down 
> todo-state-up ((org-agenda-span (quote day))
> (org-agenda-start-with-log-mode t) (org-agenda-overriding-header "Today's 
> Agenda  + Prio A todos ")) (call-interactively (quote
> org-agenda-list)))
>   org-agenda-run-series("agenda - no (!) todos - sorted prio up - 1 day" 
> (((agenda "prio ABC agenda" ((org-agenda-span (quote day))
> (org-agenda-start-with-log-mode t) (org-agenda-overriding-header "Today's 
> Agenda  + Prio A todos "))) (alltodo "todos Prio A+B"
> ((org-agenda-skip-function (lambda nil (or (org-agenda-skip-entry-if ... 
> "\\=.*\\[#A\\|#B\\]") (org-agenda-skip-entry-if ... ...)))
> ((org-agenda-sorting-strategy (quote (time-up priority-down 
> todo-state-up))
>   byte-code("\306\307   \232\203
> 
> Can anybody confirm this is a bug?
> 

Is this with git master version, that includes sticky changes?

This is really weird, only place this error can come from is from
(with-current-buffer org-agenda-buffer) inside of
`org-compile-prefix-format', but there is no code path through
`org-agenda' -> `org-prepare-agenda' that does not set
org-agenda-buffer variable.

I just updated to latest master, and I can't reproduce it.

Could it be that you somehow forgot to recompile .elc files?

Regards,
  Max




Re: [O] Bug? "v r" in agenda crashes

2012-04-18 Thread Noorul Islam Kamal Malmiyoda
On Wed, Apr 18, 2012 at 7:50 PM, Rainer Stengele
 wrote:
> Hi!
>
> Org-mode version 7.8.09 (release_7.8.09.221.g72128)
>
> Being in my agenda (non stiocky or sticky doesn't matter) I press "v r" and 
> get this error:
>
>
> Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
>  org-babel-header-arg-expand()
>  run-hook-with-args-until-success(org-babel-header-arg-expand)
>  org-cycle((4))
>  org-set-startup-visibility()
>  org-mode()
>  org-get-clocktable(:maxlevel 4 :narrow 80! :indent t :tstart 734611 :tend 
> 734612 :scope agenda)
>  apply(org-get-clocktable (:maxlevel 4 :narrow 80! :indent t :tstart 734611 
> :tend 734612 :scope agenda))
>  org-agenda-list(nil)
>  call-interactively(org-agenda-list)
>  (let ((org-agenda-span (quote day)) (org-agenda-start-with-log-mode t) 
> (org-agenda-overriding-header "Today's Agenda  + Prio A todos "))
> (call-interactively (quote org-agenda-list)))
>  (let ((org-agenda-sorting-strategy (quote (time-up priority-down 
> todo-state-up (let ((org-agenda-span (quote day))
> (org-agenda-start-with-log-mode t) (org-agenda-overriding-header "Today's 
> Agenda  + Prio A todos ")) (call-interactively (quote
> org-agenda-list
>  eval((let ((org-agenda-sorting-strategy (quote (time-up priority-down 
> todo-state-up (let ((org-agenda-span (quote day))
> (org-agenda-start-with-log-mode t) (org-agenda-overriding-header "Today's 
> Agenda  + Prio A todos ")) (call-interactively (quote
> org-agenda-list)
>  org-let2(((org-agenda-sorting-strategy (quote (time-up priority-down 
> todo-state-up ((org-agenda-span (quote day))
> (org-agenda-start-with-log-mode t) (org-agenda-overriding-header "Today's 
> Agenda  + Prio A todos ")) (call-interactively (quote
> org-agenda-list)))
>  org-agenda-run-series("agenda - no (!) todos - sorted prio up - 1 day" 
> (((agenda "prio ABC agenda" ((org-agenda-span (quote day))
> (org-agenda-start-with-log-mode t) (org-agenda-overriding-header "Today's 
> Agenda  + Prio A todos "))) (alltodo "todos Prio A+B"
> ((org-agenda-skip-function (lambda nil (or (org-agenda-skip-entry-if ... 
> "\\=.*\\[#A\\|#B\\]") (org-agenda-skip-entry-if ... ...)))
> ((org-agenda-sorting-strategy (quote (time-up priority-down 
> todo-state-up))
>  eval((org-agenda-run-series "agenda - no (!) todos - sorted prio up - 1 day" 
> (quote (((agenda "prio ABC agenda" ((org-agenda-span (quote
> day)) (org-agenda-start-with-log-mode t) (org-agenda-overriding-header 
> "Today's Agenda  + Prio A todos "))) (alltodo "todos Prio A+B"
> ((org-agenda-skip-function (lambda nil ...) ((org-agenda-sorting-strategy 
> (quote (time-up priority-down todo-state-up
>  (let nil (eval org-agenda-redo-command))
>  eval((let nil (eval org-agenda-redo-command)))
>  org-let(nil (eval org-agenda-redo-command))
>  org-agenda-redo()
>  org-agenda-clockreport-mode(nil)
>  call-interactively(org-agenda-clockreport-mode)
>  org-agenda-view-mode-dispatch()
>  call-interactively(org-agenda-view-mode-dispatch nil nil)
>
> I do not use babel at all.
>
> regards,
>
> Rainer

Works for me. May be you need to provide minimal setup with which this
can be reproduced.

Org-mode version 7.8.08 (release_7.8.07.219.gf1887)
GNU Emacs 24.0.93.1 (i686-pc-linux-gnu, GTK+ Version 2.20.1)
 of 2012-02-14 on noman

Thanks and Regards
Noorul



Re: [O] a turn-key org-mode for newbies?

2012-04-18 Thread Eric Schulte
Keith Gunderson  writes:

> Is there a package or download that can allow a new non-emacs user to
> immediately engage with org-mode?  That is, install and configure both
> emacs and org-mode plus make some guesses about how a new user would
> initially want to use org-mode. 
>
>
> I am not an emacs newbie, so I can spearhead an effort if
> necessary. Though I am eagerly working to rid myself of org-mode
> newbie status.
>
> I have some relatives that could really benefit from org-mode... who doesn't?
>
>
> Here's some of what I'm thinking:
>
> * Installation
> ** Emacs
> ** Packages
> *** org-mode
> * Configuration
> ** Load path
> ** org file directory and basic files established
> *** journal.org
> *** projects.org
> *** notes.org
> *** personal.org
> ** CUA
> * Extras
> ** Easy buffer switching via keyboard
> ** shortcuts for spreadsheet copy/pasting
>
> Thanks Carsten and fellow org-moders,
> Keith

An emacs-wide pre-made config system which could be relevant is my fork
of the Emacs starter kit [1] which is build entirely using Emacs Lisp
configuration embedded in Org-mode files.  This does have a minimal
pre-built Org-mode setup [2].  Perhaps the Org-mode specific portion of
this starter kit could be expanded into what you're after (even using
your outline above directly).  Note that this requires Emacs24 to work
"out of the box".

Although, a simpler system based off a single Org-mode file may be
preferable.  Note that after the impending release of Emacs24 it will be
possible to place both the Emacs Lisp and the prose documentation of
such a tool in a single Org-mode file which should simplify distribution
and maintenance of such a system.

Best,

Footnotes: 
[1]  http://eschulte.github.com/emacs24-starter-kit/

[2]  http://eschulte.github.com/emacs24-starter-kit/starter-kit-org.html

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



[O] a turn-key org-mode for newbies?

2012-04-18 Thread Keith Gunderson
Is there a package or download that can allow a new non-emacs user to 
immediately engage with org-mode?  That is, install and configure both emacs 
and org-mode plus make some guesses about how a new user would initially want 
to use org-mode.  


I am not an emacs newbie, so I can spearhead an effort if necessary. Though I 
am eagerly working to rid myself of org-mode newbie status.

I have some relatives that could really benefit from org-mode... who doesn't?


Here's some of what I'm thinking:

* Installation
** Emacs
** Packages
*** org-mode
* Configuration
** Load path
** org file directory and basic files established
*** journal.org
*** projects.org
*** notes.org
*** personal.org
** CUA
* Extras
** Easy buffer switching via keyboard
** shortcuts for spreadsheet copy/pasting

Thanks Carsten and fellow org-moders,
Keith

Re: [O] [bug] void-variable org-special-blocks-line when exporting to HTML

2012-04-18 Thread Sebastien Vauban
Hi Bastien,

Bastien wrote:
> "Sebastien Vauban"  writes:
>
>> I'm not out of the blue yet... I still can't understand why:
>>
>> - you were unable to reproduce it?
>>   What's the difference between you and me? ;-)
>>   I mean why does Org behave differently between us?
>>
>> - nobody else seemed hit by this?
>>   I'm surprised by the absence of reactions while HTML export was completely
>>   failing for a couple of days. Once again, why only me?
>>
>> - this wasn't trapped by the ERT test suite?
>>   There are a lot of HTML exports done in the tests. Why did they succeed?
>>
>> Have you hints on this?
>
> I guess that's because not everybody uses org-special-blocks.el as a
> module.

By "using org-special-blocks.el as a module", if you mean "having a line such
as":

(add-to-list 'org-modules 'org-special-blocks)

I did not have one either.

I just had:

(require 'org-special-blocks)

But, IIUC, that's more or less equivalent:

- being in `org-modules' means that the package will be required[1] many times
  before trying to do different operations (such as inserting a link, etc.),

  and that there is a protection mechanism in case the package can't be loaded

- being explicitly required in my .emacs does only try to load it once.

Apart from that, I don't see differences.

> The ERT suite doesn't make any test against this.

Well against exporting HTML. But I did not realize that I was more or less the
only one in the world ;-) to load `org-special-blocks'[2] while exporting to 
HTML.

This must explain that. Case is closed.

Best regards,
  Seb

Footnotes:

[1] Though, really only loaded once.

[2] And I must admit I maybe have used it once or twice, not more... Though, I
still find it an interesting feature.

-- 
Sebastien Vauban




Re: [O] broken link in online docs

2012-04-18 Thread Bastien
Hi Brian,

Brian van den Broek  writes:

>  has a link "(see  href="../calc/index.html#Top">Calc)" that yields a 404.
>
> I know patches are preferred, but I don't know to what the link ought
> to point, so cannot fix the issue myself.

The problem is that the link is correct in the Info version of the
manual and wrong in the HTML version of the manual.  I don't know how 
to specify a HTML reference that will be different from the Info one.
Using @uref{} does not help here.

As such cases are rare, I suggest making a redirection from

http://orgmode.org/calc/index.html#Top

to 

http://www.delorie.com/gnu/docs/calc/calc_toc.html

Jason, can you set this up?

-- 
 Bastien



Re: [O] org-program-exists vs executable-find

2012-04-18 Thread Sebastien Vauban
Hi Bastien,

Bastien wrote:
> "Sebastien Vauban"  writes:
>
>> While browsing the Org code, I've found the function `org-program-exists':
>>
>> #+begin_src emacs-lisp
>>   (defun org-program-exists (program-name)
>> "Checks whenever we can locate program and launch it."
>> (if (member system-type '(gnu/linux darwin))
>> (= 0 (call-process "which" nil nil nil program-name
>> #+end_src
>>
>> It is used 3 times in `org-clock.el', nowhere else.
>
> The name `org-program-exists' is actually misleading, it should be
> `org-executable-call' instead, while still checking if the executable exists
> before calling it.

Nope, the name is not misleading. The documentation string is false -- what I
hadn't noticed, btw.

That function just checks if the executable can be found; it does _not_ call
it afterward.

On Linux and Mac OS, it just calls "which + ", no more...
On Windows, it simply fails immediately (even if the program could be found).

>> On the contrary, `executable-find' is used 10 times in the Org code base
>> (in 4 different libraries).
>>
>> Shouldn't we better use `executable-find' everywhere, instead of
>> `org-program-exists' (which, btw, fails on Windows systems, even when they
>> have the Cygwin `which' at their disposal)?
>>
>> I'm ready to submit a patch for this.
>
> Please submit a patch using `executable-find' in `org-executable-call'.
> ̀executable-find' takes care of (gnu/linux|darwin-windows). Also add an alias
> org-program-exists -> org-executable-call in case people are using
> org-program-exists in their programs.

Best regards,
  Seb

-- 
Sebastien Vauban




[O] starting agenda gives: "Selecting deleted buffer"

2012-04-18 Thread Rainer Stengele
Hi all!

Org-mode version 7.8.09 (release_7.8.09.221.g72128)

After deleting all buffers and then trying to start any agenda (for example C-a 
a) I get this error message:

Debugger entered--Lisp error: (error "Selecting deleted buffer")
  org-compile-prefix-format(agenda)
  org-agenda-list(nil)
  call-interactively(org-agenda-list)
  (let ((org-agenda-span (quote day)) (org-agenda-start-with-log-mode t) 
(org-agenda-overriding-header "Today's Agenda  + Prio A todos "))
(call-interactively (quote org-agenda-list)))
  (let ((org-agenda-sorting-strategy (quote (time-up priority-down 
todo-state-up (let ((org-agenda-span (quote day))
(org-agenda-start-with-log-mode t) (org-agenda-overriding-header "Today's 
Agenda  + Prio A todos ")) (call-interactively (quote
org-agenda-list
  eval((let ((org-agenda-sorting-strategy (quote (time-up priority-down 
todo-state-up (let ((org-agenda-span (quote day))
(org-agenda-start-with-log-mode t) (org-agenda-overriding-header "Today's 
Agenda  + Prio A todos ")) (call-interactively (quote
org-agenda-list)
  org-let2(((org-agenda-sorting-strategy (quote (time-up priority-down 
todo-state-up ((org-agenda-span (quote day))
(org-agenda-start-with-log-mode t) (org-agenda-overriding-header "Today's 
Agenda  + Prio A todos ")) (call-interactively (quote
org-agenda-list)))
  org-agenda-run-series("agenda - no (!) todos - sorted prio up - 1 day" 
(((agenda "prio ABC agenda" ((org-agenda-span (quote day))
(org-agenda-start-with-log-mode t) (org-agenda-overriding-header "Today's 
Agenda  + Prio A todos "))) (alltodo "todos Prio A+B"
((org-agenda-skip-function (lambda nil (or (org-agenda-skip-entry-if ... 
"\\=.*\\[#A\\|#B\\]") (org-agenda-skip-entry-if ... ...)))
((org-agenda-sorting-strategy (quote (time-up priority-down todo-state-up))
  byte-code("\306  \307   \232\203

Can anybody confirm this is a bug?

Rainer




[O] Bug? "v r" in agenda crashes

2012-04-18 Thread Rainer Stengele
Hi!

Org-mode version 7.8.09 (release_7.8.09.221.g72128)

Being in my agenda (non stiocky or sticky doesn't matter) I press "v r" and get 
this error:


Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
  org-babel-header-arg-expand()
  run-hook-with-args-until-success(org-babel-header-arg-expand)
  org-cycle((4))
  org-set-startup-visibility()
  org-mode()
  org-get-clocktable(:maxlevel 4 :narrow 80! :indent t :tstart 734611 :tend 
734612 :scope agenda)
  apply(org-get-clocktable (:maxlevel 4 :narrow 80! :indent t :tstart 734611 
:tend 734612 :scope agenda))
  org-agenda-list(nil)
  call-interactively(org-agenda-list)
  (let ((org-agenda-span (quote day)) (org-agenda-start-with-log-mode t) 
(org-agenda-overriding-header "Today's Agenda  + Prio A todos "))
(call-interactively (quote org-agenda-list)))
  (let ((org-agenda-sorting-strategy (quote (time-up priority-down 
todo-state-up (let ((org-agenda-span (quote day))
(org-agenda-start-with-log-mode t) (org-agenda-overriding-header "Today's 
Agenda  + Prio A todos ")) (call-interactively (quote
org-agenda-list
  eval((let ((org-agenda-sorting-strategy (quote (time-up priority-down 
todo-state-up (let ((org-agenda-span (quote day))
(org-agenda-start-with-log-mode t) (org-agenda-overriding-header "Today's 
Agenda  + Prio A todos ")) (call-interactively (quote
org-agenda-list)
  org-let2(((org-agenda-sorting-strategy (quote (time-up priority-down 
todo-state-up ((org-agenda-span (quote day))
(org-agenda-start-with-log-mode t) (org-agenda-overriding-header "Today's 
Agenda  + Prio A todos ")) (call-interactively (quote
org-agenda-list)))
  org-agenda-run-series("agenda - no (!) todos - sorted prio up - 1 day" 
(((agenda "prio ABC agenda" ((org-agenda-span (quote day))
(org-agenda-start-with-log-mode t) (org-agenda-overriding-header "Today's 
Agenda  + Prio A todos "))) (alltodo "todos Prio A+B"
((org-agenda-skip-function (lambda nil (or (org-agenda-skip-entry-if ... 
"\\=.*\\[#A\\|#B\\]") (org-agenda-skip-entry-if ... ...)))
((org-agenda-sorting-strategy (quote (time-up priority-down todo-state-up))
  eval((org-agenda-run-series "agenda - no (!) todos - sorted prio up - 1 day" 
(quote (((agenda "prio ABC agenda" ((org-agenda-span (quote
day)) (org-agenda-start-with-log-mode t) (org-agenda-overriding-header "Today's 
Agenda  + Prio A todos "))) (alltodo "todos Prio A+B"
((org-agenda-skip-function (lambda nil ...) ((org-agenda-sorting-strategy 
(quote (time-up priority-down todo-state-up
  (let nil (eval org-agenda-redo-command))
  eval((let nil (eval org-agenda-redo-command)))
  org-let(nil (eval org-agenda-redo-command))
  org-agenda-redo()
  org-agenda-clockreport-mode(nil)
  call-interactively(org-agenda-clockreport-mode)
  org-agenda-view-mode-dispatch()
  call-interactively(org-agenda-view-mode-dispatch nil nil) 

I do not use babel at all.

regards,

Rainer




Re: [O] org-program-exists vs executable-find

2012-04-18 Thread Bastien
Hi Sébastien,

"Sebastien Vauban"  writes:

> While browsing the Org code, I've found the function `org-program-exists':
>
> #+begin_src emacs-lisp
>   (defun org-program-exists (program-name)
> "Checks whenever we can locate program and launch it."
> (if (member system-type '(gnu/linux darwin))
> (= 0 (call-process "which" nil nil nil program-name
> #+end_src
>
> It is used 3 times in `org-clock.el', nowhere else.

The name `org-program-exists' is actually misleading, it should be
`org-executable-call' instead, while still checking if the executable
exists before calling it.

> On the contrary, `executable-find' is used 10 times in the Org code base (in
> 4 different libraries).
>
> Shouldn't we better use `executable-find' everywhere, instead of
> `org-program-exists' (which, btw, fails on Windows systems, even when they
> have the Cygwin `which' at their disposal)?
>
> I'm ready to submit a patch for this.

Please submit a patch using `executable-find' in `org-executable-call'.
̀executable-find' takes care of (gnu/linux|darwin-windows).  Also add an
alias org-program-exists -> org-executable-call in case people are using 
org-program-exists in their programs.

Thanks!

-- 
 Bastien



[O] org-program-exists vs executable-find

2012-04-18 Thread Sebastien Vauban
Hello,

While browsing the Org code, I've found the function `org-program-exists':

#+begin_src emacs-lisp
  (defun org-program-exists (program-name)
"Checks whenever we can locate program and launch it."
(if (member system-type '(gnu/linux darwin))
(= 0 (call-process "which" nil nil nil program-name
#+end_src

It is used 3 times in `org-clock.el', nowhere else.

On the contrary, `executable-find' is used 10 times in the Org code base (in
4 different libraries).

Shouldn't we better use `executable-find' everywhere, instead of
`org-program-exists' (which, btw, fails on Windows systems, even when they
have the Cygwin `which' at their disposal)?

I'm ready to submit a patch for this.

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] org-list-demote-modify-bullet and alphabetic/numerical bullets

2012-04-18 Thread Nicolas Goaziou
Hello,

Brian van den Broek  writes:

> I have (setq org-alphabetical-lists t) in my .emacs. I am trying to
> set org-list-demote-modify-bullet to cycle on demoting between bullets
> of the form  -/+ and 1./A.
>
> (setq org-list-demote-modify-bullet
>'(("+" . "-") ("-" . "+") ))
> accomplishes the -/+ cycling just fine.
>
> (setq org-list-demote-modify-bullet
>'(("+" . "-") ("-" . "+") ("1." . "A.") ("A." . "1.")))
> has, however, no effect on numerical nor alphabetic bullets, nor do either of
>
> (setq org-list-demote-modify-bullet
>'(("+" . "-") ("-" . "+") ("1." . "-") ))
>
> and
>
> (setq org-list-demote-modify-bullet
>'(("+" . "-") ("-" . "+") ("1" . "-") ))
>
> affect numerical bullets, so I doubt that it is that alphabetical
> bullets are the problem.
>
> Is there a way to do what I am trying to effect?

This should be fixed in master now.  Could you confirm this?

Thanks for reporting the problem.


Regards,

-- 
Nicolas Goaziou



[O] radiotables in LaTeX-document: export numbers from orgtbl with commas as decimal separators instead of periods; with MWE and lisp-code

2012-04-18 Thread AW
Dear all,

I'd like to use radiotables inside a LaTeX-document. Here is a minimal working 
example:

---
\documentclass[pagesize, ngerman, fontsize=12pt]{scrartcl}
\usepackage[T1]{fontenc}\usepackage[utf8]{inputenc}
\usepackage{babel, comment, array, booktabs}


\title{Sicherheitsbestellung}
\subtitle{gag}
\begin{document}
\maketitle

\begin{tabular}{p{0.25\linewidth}p{0.5\linewidth}}%\toprule
  Bezeichnung & Betrag \\
% BEGIN RECEIVE ORGTBL Kaufpreis
Kaufpreis & 10.00 \\
Darlehen & -5000.00 \\
Summe & 95000.00 \\
% END RECEIVE ORGTBL Kaufpreis
\bottomrule
\end{tabular}
\begin{comment}
#+ORGTBL: SEND Kaufpreis orgtbl-to-latex :splice t :skip 0
| Kaufpreis | 10.00 |
| Darlehen  |  -5000.00 |
| Summe |  95000.00 |
#+TBLFM: @3$2=@1$2+@2$2;%.2f

\end{comment}
\end{document}
---

I would like to have the LaTeX table with commas as decimal separators instead 
of periods, e.g.: 

»Kaufpreis & 10,00\\« or even better 
»Kaufpreis & 100\,000,00\\«. 

To avoid misunderstandigs: The change of all periods to commas should take 
place when the org-table is »transfered« to the LaTeX table, not earlier!

I found a suggestion by Carsten Dominik here: 
http://permalink.gmane.org/gmane.emacs.orgmode/42000

---
(add-hook 'org-export-preprocess-hook
  'org-use-comma-in-exported-tables)

(defun org-use-comma-in-exported-tables ()
  (goto-char (point-min))
  (while (re-search-forward "\\([0-9]\\)\\.\\([0-9]\\)" nil t)
(org-if-unprotected
 (when (save-match-data (org-at-table-p))
   (replace-match "\\1,\\2" t nil)
---

I put that into my .emacs, restarted Emacs, but no result.
I'm using Emacs 23.3 and Org-mode version 7.8.02. Please bear in mind that I'm 
may have made strange mistake, because I do neither have experience with 
radiotables nor understand lisp.

Any help would be appreciated, thanks in advance.

Kind regards,

Alexander




Re: [O] [PATCH] Add autoload cookie for function org-table-iterate-buffer-tables

2012-04-18 Thread Sebastien Vauban
Hi Bastien,

Bastien wrote:
> "Sebastien Vauban"  writes:
>>
>>  * org-table.el (org-table-iterate-buffer-tables): Autoload
>>  function.
>
> I finally accepted this in master. I reviewed org-table.el for other
> candidates and found `org-table-recalculate-buffer-tables', which is also
> autoloaded now.

I confirm the patch is OK. Thanks.

> Thanks for bringing this up,

In the same vein, I found `org-update-all-dblocks', for which I propose a
patch hereafter.

I've scanned the 121 occurrences of `(interactive)' in `org.el' to look for
extra potential candidates to the autoloading, but did not find any useful
ones. Hence, just this one to add:

>From 3df73c03d9a8c56189cbe91ec752bcc3269536ca Mon Sep 17 00:00:00 2001
From: Sebastien Vauban 
Date: Wed, 18 Apr 2012 11:12:00 +0200
Subject: [PATCH 3/3] Add autoload cookie for org-update-all-dblocks

2012-04-18  Sebastien Vauban  

* org.el (org-update-all-dblocks): Autoload function.

---
 lisp/org.el |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index 170ddc9..5473a20 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -11075,6 +11075,7 @@ Error if there is no such block at point."
   (goto-char pos)
   (error "Not in a dynamic block"
 
+;;;###autoload
 (defun org-update-all-dblocks ()
   "Update all dynamic blocks in the buffer.
 This function can be used in a hook."
-- 
1.7.9

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] [bug] org-table-iterate-buffer-tables breaks source code blocks

2012-04-18 Thread Sebastien Vauban
Hi Bastien,

Bastien wrote:
> "Sebastien Vauban"  writes:
>
>> When running `org-table-iterate-buffer-tables' over a file containing
>> source code blocks, these can be broken by the recalculate process: *pipe
>> signs are inserted in source code blocks*.
>
> Fixed in master, thanks.

I confirm it's fixed now.

Thanks a lot!

Best regards,
  Seb

-- 
Sebastien Vauban