Re: [Orgmode] Re: Compilation error about org-protecting-blocks

2009-06-14 Thread Carsten Dominik


On Jun 14, 2009, at 9:32 AM, Baoqiu Cui wrote:


Here is a patch to Makefile to fix this (just switch the order of two
directories):

diff --git a/Makefile b/Makefile
index e867e6b..9b48c98 100644
--- a/Makefile
+++ b/Makefile
@@ -29,8 +29,8 @@ infodir = $(prefix)/share/info
# Using emacs in batch mode.

BATCH=$(EMACS) -batch -q -no-site-file - 
eval \
- "(progn (add-to-list (quote load-path) (expand-file-name \"./lisp/ 
\")) \

-(add-to-list (quote load-path) \"$(lispdir)\"))"
+ "(progn (add-to-list (quote load-path) \"$(lispdir)\") \
+ (add-to-list (quote load-path) (expand-file-name \"./lisp/ 
\")))"


# Specify the byte-compiler for compiling org-mode files
ELC= $(BATCH) -f batch-byte-compile

Please let me know if this is a good fix.


Yes.  Applied, thanks.

- Carsten



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




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


[Orgmode] Re: Compilation error about org-protecting-blocks

2009-06-14 Thread Baoqiu Cui
Carsten Dominik  writes:

> On Jun 14, 2009, at 8:22 AM, Baoqiu Cui wrote:
>
>> Hi Carsten,
>>
>> Thanks for the quick fix.  However the problem still exists on my
>> computer (running "GNU Emacs 22.3.1 (i386-apple-darwin9.5.0, Carbon
>> Version 1.6.0) of 2008-10-31 on leopard.local").
>>
>> Here is what I got:
>>
>> 
>> $ pwd
>> /Users/bcui/elisp/org-mode
>> $ make update
>> ...
>> In end of data:
>> org-compat.el:335:1:Warning: the function `add-local-hook' is not
>> known to be
>>defined.
>> Wrote /Users/bcui/elisp/org-mode/lisp/org-compat.elc
>> emacs -batch -q -no-site-file -eval "(progn (add-to-list (quote load- 
>> path) (expand-file-name \"./lisp/\")) (add-to-list (quote load-path)
>> \"/usr/local/share/emacs/site-lisp\"))" -f batch-byte-compile lisp/
>> org-exp.el
>> Source file `/usr/local/share/emacs/site-lisp/org.el' newer than
>> byte-compiled file
>> Source file `/usr/local/share/emacs/site-lisp/org-footnote.el' newer
>> than byte-compiled file
>> Source file `/usr/local/share/emacs/site-lisp/org-agenda.el' newer
>> than byte-compiled file
>>
>> In toplevel form:
>> lisp/org-exp.el:31:1:Error: Symbol's value as variable is void: org- 
>> protecting-blocks
>> make[1]: *** [lisp/org-exp.elc] Error 1
>> make: *** [update] Error 2
>> 
>>
>> In directory "/usr/local/share/emacs/site-lisp/" I have some .el files
>> that are newer than the .elc files, but since I don't use them, I
>> don't
>> think they are related.
>
> Well, something must be wrong here, because in org-exp.el I have
>
> (require 'org)
> (require 'org-agenda)
> (require 'org-exp-blocks); this is line 31
>
> org.el gets loaded before org-exp-blocks...
>

Found the problem.  Some of the old elisp files (for version 6.24) in my
"/usr/local/share/emacs/site-lisp/" were loaded before the versions in
"/Users/bcui/elisp/org-mode".

Here is a patch to Makefile to fix this (just switch the order of two
directories):

diff --git a/Makefile b/Makefile
index e867e6b..9b48c98 100644
--- a/Makefile
+++ b/Makefile
@@ -29,8 +29,8 @@ infodir = $(prefix)/share/info
 # Using emacs in batch mode.
 
 BATCH=$(EMACS) -batch -q -no-site-file -eval \
- "(progn (add-to-list (quote load-path) (expand-file-name \"./lisp/\")) \
-(add-to-list (quote load-path) \"$(lispdir)\"))"
+ "(progn (add-to-list (quote load-path) \"$(lispdir)\") \
+ (add-to-list (quote load-path) (expand-file-name \"./lisp/\")))"
 
 # Specify the byte-compiler for compiling org-mode files
 ELC= $(BATCH) -f batch-byte-compile

Please let me know if this is a good fix.

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


[Orgmode] [PATCH] Fix a DocBook/HTML exporter bug for literal examples

2009-06-14 Thread Baoqiu Cui
Carsten,

Recent changes to respect example indentations introduced a bug in both
DocBook and HTML exporters.  The following example


#+BEGIN_EXAMPLE
Group of lines separated by empty lines:

  Line One.

  Line Two.
  Line Three.

  Line Four.
  Line Five.
#+END_EXAMPLE


is exported to HTML like the following (note that every empty line in
the above example is repeated 3 times):



Lines...



  Line One.



  Line Two.
  Line Three.



  Line Four.
  Line Five.



and to DocBook format like this (empty lines are removed):






Attached please find a patch to fix this problem.

Thanks,
Baoqiu

diff --git a/lisp/org-docbook.el b/lisp/org-docbook.el
index 12f6e8c..8a89675 100644
--- a/lisp/org-docbook.el
+++ b/lisp/org-docbook.el
@@ -653,7 +653,9 @@ publishing directory."
 		(replace-match "\\2\n"))
 	  (insert line "\n")
 	  (while (and lines
-			  (or (not ind) (equal ind (get-text-property 0 'original-indentation (car lines
+			  (or (= (length (car lines)) 0)
+			  (not ind)
+			  (equal ind (get-text-property 0 'original-indentation (car lines
 			  (or (= (length (car lines)) 0)
 			  (get-text-property 0 'org-protected (car lines
 		(insert (pop lines) "\n"))
diff --git a/lisp/org-html.el b/lisp/org-html.el
index bb73f24..77f820e 100644
--- a/lisp/org-html.el
+++ b/lisp/org-html.el
@@ -850,7 +850,9 @@ lang=\"%s\" xml:lang=\"%s\">
 		(replace-match "\\2\n"))
 	  (insert line "\n")
 	  (while (and lines
-			  (or (not ind) (equal ind (get-text-property 0 'original-indentation (car lines
+			  (or (= (length (car lines)) 0)
+			  (not ind)
+			  (equal ind (get-text-property 0 'original-indentation (car lines
 			  (or (= (length (car lines)) 0)
 			  (get-text-property 0 'org-protected (car lines
 		(insert (pop lines) "\n"))
___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] [PATCH] Fix a DocBook/HTML exporter bug for literal examples

2009-06-14 Thread Carsten Dominik

Ahh, the beauty of a patch bug report with the patch attached...

Applied, thanks.

- Carsten
On Jun 14, 2009, at 12:56 PM, Baoqiu Cui wrote:


Carsten,

Recent changes to respect example indentations introduced a bug in  
both

DocBook and HTML exporters.  The following example


#+BEGIN_EXAMPLE
Group of lines separated by empty lines:

 Line One.

 Line Two.
 Line Three.

 Line Four.
 Line Five.
#+END_EXAMPLE


is exported to HTML like the following (note that every empty line in
the above example is repeated 3 times):



Lines...



 Line One.



 Line Two.
 Line Three.



 Line Four.
 Line Five.



and to DocBook format like this (empty lines are removed):






Attached please find a patch to fix this problem.

Thanks,
Baoqiu

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




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


[Orgmode] Alternate Table Row Colors

2009-06-14 Thread Xin Shi
Hello Experts,

I use org-mode to produce a lot of big tables with numbers in them. When I
present these tables by HTML, I found it's hard to keep track which row it
is. I'm wondering if it's possible to implement additional class attribute
to the , such as:



OneFish
TwoFish
RedFish
BlueFish


So, that in the CSS file, it'll be easier to implement the color:


table.sample {
border: 6px inset #8B8378;
-moz-border-radius: 6px;
}
table.sample td {
border: 1px solid black;
padding: 0.2em 2ex 0.2em 2ex;
color: black;
}
table.sample tr.d0 td {
background-color: #FCF6CF;
}
table.sample tr.d1 td {
background-color: #FEFEF2;
}


I borrowed idea from this article:
http://www.somacon.com/p338.php

Thanks!

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


Re: [Orgmode] Alternate Table Row Colors

2009-06-14 Thread Russell Adams
Not that I'm a CSS expert, but it appears you could do this without
changing how Org outputs tables by adding this styling to your CSS.

http://www.zorked.com/css/alternating-table-rows-using-css-only/

Quote:

tr:nth-child(odd) {
background-color: #CC;
}

tr:nth-child(even) {
background-color: #6699FF;
}

Good luck! If you make an example, please post it!

On Sun, Jun 14, 2009 at 03:00:15PM -0400, Xin Shi wrote:
> Hello Experts,
> 
> I use org-mode to produce a lot of big tables with numbers in them. When I
> present these tables by HTML, I found it's hard to keep track which row it
> is. I'm wondering if it's possible to implement additional class attribute
> to the , such as:
> 
> 
> 
> OneFish
> TwoFish
> RedFish
> BlueFish
> 
> 
> So, that in the CSS file, it'll be easier to implement the color:
> 
> 
> table.sample {
>   border: 6px inset #8B8378;
>   -moz-border-radius: 6px;
> }
> table.sample td {
>   border: 1px solid black;
>   padding: 0.2em 2ex 0.2em 2ex;
>   color: black;
> }
> table.sample tr.d0 td {
>   background-color: #FCF6CF;
> }
> table.sample tr.d1 td {
>   background-color: #FEFEF2;
> }
> 
> 
> I borrowed idea from this article:
> http://www.somacon.com/p338.php
> 
> Thanks!
> 
> Xin

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



--
Russell Adamsrlad...@adamsinfoserv.com

PGP Key ID: 0x1160DCB3   http://www.adamsinfoserv.com/

Fingerprint:1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3


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


[Orgmode] using %(sexp) in remember templates

2009-06-14 Thread Shelagh Manton
I'm trying to make a remember template that inserts some text 
automatically.

I read in the manual that %(sexp) would expand in the template. This 
would be what I want, if I've understood the manual aright. 

I made a small function that inserts text (org-csa) and this is the 
template I originally tried.
("CSA" ?C "* TODO %^{topic} %^g\n %t\n %(org-csa) %&" "CSA.org" bottom)

This put 

* TODO %^{topic} %^g
 <2009-06-15 Mon>
  %&

In the remember buffer.

I then tried 

("CSA" ?C "* TODO %^{topic} %^g\n %t\n %^(org-csa) %&" "~/.org/CSA.org" 
bottom)

Which prompted me for a string and added the (org-csa) in the remember 
buffer. (I filled in the various prompts)

* TODO charity ball :July:
 <2009-06-15 Mon>
 (org-csa) 

Have I misunderstood the manual? I thought that the sexp would be 
evaluated in the remember buffer. But neither with the ^ prompt which at 
least made the remember buffer work as expected or without where even the 
other prompts did not work at all, the (org-csa) did not get expanded.

Obviously I can evaluated it in the CSA.org buffer but that is not what I 
want at all. Maybe I should use org-eval? 

Shelagh



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


Re: [Orgmode] using %(sexp) in remember templates

2009-06-14 Thread Nick Dokos
Shelagh Manton  wrote:

> I'm trying to make a remember template that inserts some text 
> automatically.
> 
> I read in the manual that %(sexp) would expand in the template. This 
> would be what I want, if I've understood the manual aright. 
> 
> I made a small function that inserts text (org-csa) and this is the 
> template I originally tried.
> ("CSA" ?C "* TODO %^{topic} %^g\n %t\n %(org-csa) %&" "CSA.org" bottom)
> 
The function should not insert anything into any buffer: it should
*return* what you want to be inserted. For example, the following
minimal .emacs works just fine (after fixing the path appropriately):

,
| (add-to-list 'load-path (expand-file-name "/path/to/org-mode/lisp"))
| (add-to-list 'auto-mode-alist '("\\.\\(org\\|org_archive\\|txt\\)$" . 
org-mode))
| (require 'org-install)
| (global-set-key "\C-cl" 'org-store-link)
| (global-set-key "\C-ca" 'org-agenda)
| 
|  
| (setq org-remember-templates '(("CSA" ?C "* TODO %^{topic} %^g\n %t\n 
%(org-csa) %&" "CSA.org" bottom)))
| (defun org-csa ()
| "foobar")
| (org-remember-insinuate)
| 
| ;
`

HTH,
Nick






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


[Orgmode] Re: using %(sexp) in remember templates

2009-06-14 Thread Shelagh Manton
On Mon, 15 Jun 2009 01:01:57 -0400, Nick Dokos wrote:

> Shelagh Manton  wrote:
> 
>> I'm trying to make a remember template that inserts some text
>> automatically.
>> 
>> I read in the manual that %(sexp) would expand in the template. This
>> would be what I want, if I've understood the manual aright.
>> 
>> I made a small function that inserts text (org-csa) and this is the
>> template I originally tried.
>> ("CSA" ?C "* TODO %^{topic} %^g\n %t\n %(org-csa) %&" "CSA.org" bottom)
>> 
> The function should not insert anything into any buffer: it should
> *return* what you want to be inserted. For example, the following
> minimal .emacs works just fine (after fixing the path appropriately):
> 
> ,
> | (add-to-list 'load-path (expand-file-name "/path/to/org-mode/lisp")) |
> (add-to-list 'auto-mode-alist '("\\.\\(org\\|org_archive\\|txt\\)$" .
> org-mode)) | (require 'org-install)
> | (global-set-key "\C-cl" 'org-store-link) | (global-set-key "\C-ca"
> 'org-agenda) |
> | 
> | (setq org-remember-templates '(("CSA" ?C "* TODO %^{topic} %^g\n %t\n
> %(org-csa) %&" "CSA.org" bottom))) | (defun org-csa ()
> | "foobar")
> | (org-remember-insinuate)
> |
> | ;
> `
> 
> HTH,
> Nick
> 
> 
So my problem is that my function org-csa is inserting text? I will try 
this out.

Ah thanks that works nicely. A conceptual dissonance between returning 
values and inserting text.

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




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