Re: [O] new exporter

2012-06-27 Thread Achim Gratz
Achim Gratz writes:
> Nicolas Goaziou writes:
>> That may not solve the problem, but could at least simplify it.
>
> The problem can be demonstrated with just this code snippet in place of
> org-export.el:
[...]
> So it might be a bit easier to solve now (I hope).

This code snippet has at last after revealed where the problem is: the
function call to (current-buffer) gets unquoted, when it clearly needs
to be in the expansion.  The literal expansion of the buffer content
into the compiled bytecode is similarly explained by an unquoting of
(buffer-string).  Here's a patch that seems to fix the compilation
(without changelog and everything because I think you may want to check
the rest of the new exporters for similar constructs).

--8<---cut here---start->8---
 contrib/lisp/org-export.el |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/contrib/lisp/org-export.el b/contrib/lisp/org-export.el
index 7e82050..8776086 100644
--- a/contrib/lisp/org-export.el
+++ b/contrib/lisp/org-export.el
@@ -2475,9 +2475,9 @@ (defmacro org-export-with-current-buffer-copy (&rest body)
 
 Point is at buffer's beginning when BODY is applied."
   (org-with-gensyms (original-buffer offset buffer-string overlays)
-`(let ((,original-buffer ,(current-buffer))
+`(let ((,original-buffer (current-buffer))
   (,offset ,(1- (point-min)))
-  (,buffer-string ,(buffer-string))
+  (,buffer-string (buffer-string))
   (,overlays (mapcar
   'copy-overlay (overlays-in (point-min) (point-max)
(with-temp-buffer
-- 
1.7.10.4
--8<---cut here---end--->8---


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

Waldorf MIDI Implementation & additional documentation:
http://Synth.Stromeko.net/Downloads.html#WaldorfDocs




Re: [O] Is Org mode gonna break on emacs 24.50.1x ?

2012-06-27 Thread Bastien
Achim Gratz  writes:

> Vladimir Lomov writes:
>> I don't know if I understand what I do but I changed several `flet' to
>> `labels' (I read `cl.el' and they go consequently).
>
> The problem really is (or really was, it should be fixed) in Emacs
> trunk.  

Yes, apparently this has been fixed.

http://lists.gnu.org/archive/html/emacs-devel/2012-06/msg00515.html

Baptiste, can you confirm?

-- 
 Bastien



Re: [O] Is Org mode gonna break on emacs 24.50.1x ?

2012-06-27 Thread Achim Gratz
Vladimir Lomov writes:
> I don't know if I understand what I do but I changed several `flet' to
> `labels' (I read `cl.el' and they go consequently).

The problem really is (or really was, it should be fixed) in Emacs
trunk.  Getting rid of unneccesary flet's would be nice on general
principle since flet does a couple of scary things, but we need to stay
backward compatible.  I don't know if labels is avilable (and works the
same) in XEmacs or in any Emacs before version 24...


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

DIY Stuff:
http://Synth.Stromeko.net/DIY.html




Re: [O] How to turn off font-lock-mode per file

2012-06-27 Thread Nick Dokos
Enda  wrote:

> Thanks, I already read that section of the manual.
> 
> I know I can turn on font-lock-mode for any file with
> # -*- mode: font-lock; -*-
> even though it is the default, the manual does not specify how to turn off a 
> mode.
> 
> (I know C-u -1 M-x font-lock-mode always disables font lock mode, but I do 
> not know how do this in
> the file.)
> 

Then you must not have read this portion:

,
|Do not use the `mode' keyword for minor modes.  To enable or disable
| a minor mode in a local variables list, use the `eval' keyword with a
| Lisp expression that runs the mode command (*note Minor Modes::).  For
| example, the following local variables list enables Eldoc mode (*note
| Lisp Doc::) by calling `eldoc-mode' with no argument (calling it with
| an argument of 1 would do the same), and disables Font Lock mode (*note
| Font Lock::) by calling `font-lock-mode' with an argument of -1.
| 
|  ;; Local Variables:
|  ;; eval: (eldoc-mode)
|  ;; eval: (font-lock-mode -1)
|  ;; End:
`

Nick

> Best wishes,
> 
> Enda
> 
> 
> From: Nick Dokos 
> To: Enda 
> Cc: "emacs-orgmode@gnu.org" 
> Sent: Wednesday, June 27, 2012 5:43 PM
> Subject: Re: [O] How to turn off font-lock-mode per file
> 
> Enda  wrote:
> 
> > How do you turn off font-lock-mode per file (an org file)?
> >
> 
> A lot of your questions are emacs questions and you could find the
> answers in the emacs manual, e.g. this exact question is answered in
> sec.48.2.4.1, "Specifying File Variables", of the emacs manual:
> 
> (info "(emacs) Specifying File Variables")
> 
> Nick
> 
> 
> 
> Alternatives:
> 
> 



Re: [O] How to turn off font-lock-mode per file

2012-06-27 Thread Enda
Thanks, I already read that section of the manual.

I know I can turn on font-lock-mode for any file with
# -*- mode: font-lock; -*-
even though it is the default, the manual does not specify how to turn off a 
mode.

(I know C-u -1 M-x font-lock-mode always disables font lock mode, but I do not 
know how do this in the file.)


Best wishes,

Enda



 From: Nick Dokos 
To: Enda  
Cc: "emacs-orgmode@gnu.org"  
Sent: Wednesday, June 27, 2012 5:43 PM
Subject: Re: [O] How to turn off font-lock-mode per file
 
Enda  wrote:

> How do you turn off font-lock-mode per file (an org file)?
> 

A lot of your questions are emacs questions and you could find the
answers in the emacs manual, e.g. this exact question is answered in
sec.48.2.4.1, "Specifying File Variables", of the emacs manual:

(info "(emacs) Specifying File Variables")

Nick

Re: [O] org-icalendar-alarm-time in org file as an #+OPTION

2012-06-27 Thread Nick Dokos
Enda  wrote:

> There are #+OPTIONs, etc. in Org-mode, either "C-h v enable-local-variables" 
> or pressing '!' after I
> am warned about the potentially dangerous local variable in order that I am 
> not warned again about
> that particular local variable is not ideal. Having an #+OPTION, etc to set 
> org-icalendar-alarm-time
> per file is on my wishlist.
> 

C-h v enable-local-variables just gives you the docstring for
the variable - I'm not sure what you thought it did.

Nick




Re: [O] How to turn off font-lock-mode per file

2012-06-27 Thread Darlan Cavalcante Moreira

Add a file local variable.

"M-x add-file-local-variable"
Write "mode" for the variable and "font-lock-mode" for its value (without
quotes).

I tested this and it worked.

--
Darlan

At Wed, 27 Jun 2012 09:01:52 -0700 (PDT),
Enda  wrote:
> 
> [1  ]
> How do you turn off font-lock-mode per file (an org file)?
> 
> 
> Best wishes,
> 
> Enda
> [2  ]
> 



Re: [O] org-icalendar-alarm-time in org file as an #+OPTION

2012-06-27 Thread Enda
There are #+OPTIONs, etc. in Org-mode, either "C-h v enable-local-variables" or 
pressing '!' after I am warned about the potentially dangerous local variable 
in order that I am not warned again about that particular local variable is not 
ideal. Having an #+OPTION, etc to set org-icalendar-alarm-time per file is on 
my wishlist.


Best wishes,

Enda



 From: Nick Dokos 
To: Enda  
Cc: "emacs-orgmode@gnu.org"  
Sent: Wednesday, June 27, 2012 5:38 PM
Subject: Re: [O] org-icalendar-alarm-time in org file as an #+OPTION
 
Enda  wrote:

> http://orgmode.org/manual/iCalendar-export.html
> 
> In Org options, I can set org-icalendar-alarm-time to '5' and when I export 
> the org file as an ical
> file, and then import the ical file into a calendar application, I get 
> notified by the alarm of the
> calendar application five minutes before the event (which was in the org 
> file). Is there a way of
> setting org-icalendar-alarm-time to '5' locally instead of globally?
> 
> # -*- org-icalendar-alarm-time: 5  -*-
> works, but I get a warning when I open the file.
> 

I'm guessing you have local file variables disabled (the default).
Try

    C-h v enable-local-variables

Nick

> Best wishes,
> 
> Enda
> 
> 
> From: Bastien 
> To: Enda 
> Cc: "emacs-orgmode@gnu.org" 
> Sent: Wednesday, June 6, 2012 7:30 PM
> Subject: Re: org-icalendar-alarm-time in org file as an #+OPTION
> 
> Hi Enda,
> 
> Enda  writes:
> 
> > Is there is way to have to have org-icalendar-alarm-time in an org
> > file as an #+OPTION?
> 
> What would do `org-icalendar-alarm-time'?
> 
> --
> Bastien
> 
> 
> 
> Alternatives:
> 
> 

Re: [O] How to turn off font-lock-mode per file

2012-06-27 Thread Nick Dokos
Enda  wrote:

> How do you turn off font-lock-mode per file (an org file)?
> 

A lot of your questions are emacs questions and you could find the
answers in the emacs manual, e.g. this exact question is answered in
sec.48.2.4.1, "Specifying File Variables", of the emacs manual:

(info "(emacs) Specifying File Variables")

Nick



Re: [O] org-icalendar-alarm-time in org file as an #+OPTION

2012-06-27 Thread Nick Dokos
Enda  wrote:

> http://orgmode.org/manual/iCalendar-export.html
> 
> In Org options, I can set org-icalendar-alarm-time to '5' and when I export 
> the org file as an ical
> file, and then import the ical file into a calendar application, I get 
> notified by the alarm of the
> calendar application five minutes before the event (which was in the org 
> file). Is there a way of
> setting org-icalendar-alarm-time to '5' locally instead of globally?
> 
> # -*- org-icalendar-alarm-time: 5  -*-
> works, but I get a warning when I open the file.
> 

I'm guessing you have local file variables disabled (the default).
Try

C-h v enable-local-variables

Nick

> Best wishes,
> 
> Enda
> 
> 
> From: Bastien 
> To: Enda 
> Cc: "emacs-orgmode@gnu.org" 
> Sent: Wednesday, June 6, 2012 7:30 PM
> Subject: Re: org-icalendar-alarm-time in org file as an #+OPTION
> 
> Hi Enda,
> 
> Enda  writes:
> 
> > Is there is way to have to have org-icalendar-alarm-time in an org
> > file as an #+OPTION?
> 
> What would do `org-icalendar-alarm-time'?
> 
> --
> Bastien
> 
> 
> 
> Alternatives:
> 
> 



[O] local-set-key: Key sequence C-c SPC a starts with non-prefix key C-c SPC

2012-06-27 Thread Giacomo M
Dear all,
I'm getting the error in the subject when trying to export an .org file,
e.g. to HTML or LATEX.
who would be so kind to explain me what's happening?
Thanks,

Giacomo


Re: [O] MobileOrg - Symbol's value as variable is void: org-agenda-filter

2012-06-27 Thread Nick Dokos
Enda  wrote:

> MobileOrg -> Push files and views (C-c C-x RET p)
> 
> *Backtrace*
> 
> Debugger entered--Lisp error: (void-variable org-agenda-filter)
>   org-mobile-push()
>   call-interactively(org-mobile-push nil nil)
> 
> Best wishes,
> 

OK - thanks. But in the meantime, Simon Thum pointed out that the
reason is that the variable has been renamed:

,
| See
| 
| commit 71089b7e3b00736f854d6e95a52229853262e12a
| Author: Bastien Guerry 
| Date:   Wed Jan 4 16:37:59 2012 +0100
| 
| org-mobile.el (org-mobile-push): Use `org-agenda-tag-filter'.
| 
| * org-mobile.el (org-mobile-push): Use `org-agenda-tag-filter'
| instead of the obsolete `org-agenda-filter'.
| 
| Thanks to Charles Sebold for reporting this.
| 
| Cheers,
| 
| Simon
`

Nick

> Enda
> 
> 
> From: Nick Dokos 
> To: Enda 
> Cc: "emacs-orgmode@gnu.org" 
> Sent: Friday, June 22, 2012 5:06 PM
> Subject: Re: [O] MobileOrg - Symbol's value as variable is void: 
> org-agenda-filter
> 
> Enda  wrote:
> 
> > MobileOrg -> Push files and views (C-c C-x RET p)
> > Symbol's value as variable is void: org-agenda-filter
> >
> > Why am getting this error?: Symbol's value as variable is void: 
> > org-agenda-filter
> >
> 
> M-x toggle-debug-on error
> 
> try it again and when you get the error, send the backtrace.
> 
> Nick
> 
> 
> 
> Alternatives:
> 
> 



Re: [O] org-export-as-html-batch backup file

2012-06-27 Thread Nick Dokos
Enda  wrote:

> When I run:
> emacs --batch --visit=index.org --funcall org-export-as-html-batch
> 
> If index.html already exists a backup file index.html~ is created,
> however when I export as html within Emacs no backup file is
> created. How do I prevent a backup file being created in the above
> scenario?
> 

Try

emacs --batch --visit=foo.org --eval '(setq backup-inhibited t)' --funcall 
org-export-as-html-batch

Nick

> Best wishes,
> 
> Enda
> 
> 
> 
> Alternatives:
> 
> 



[O] move multiple lines of text at the same time

2012-06-27 Thread Enda
Say I have two lines of text like so, and I want to move both of them
at the same time, could there be a C-u 2 M-down in order to do this.


Best wishes,

Enda

[O] first level heading = category

2012-06-27 Thread Enda
In an org file, I want the category of each item (and subitems) to be
the name of the first level heading, is there a way to do this without
setting the category for each heading like so?:

* Web
  :PROPERTIES:
  :CATEGORY: Web
  :END:
** Web1
** Web2
* Holiday
  :PROPERTIES:
  :CATEGORY: Holiday
  :END:
** Holiday1
** Holiday2


Best wishes,

Enda


P.S. In the org manual on page 95, there is

* Birthdays and similar stuff
#+CATEGORY: Holiday
%%(org-calendar-holiday) ; special function for holiday names
#+CATEGORY: Ann
%%(org-anniversary 1956 5 14)6 Arthur Dent is %d years old
%%(org-anniversary 1869 10 2) Mahatma Gandhi would be %d years old

Is using #+CATEGORY: like this depreciated according to the footnote
on page 101 of the org manual?

Re: [O] MobileOrg - Symbol's value as variable is void: org-agenda-filter

2012-06-27 Thread Enda
MobileOrg -> Push files and views (C-c C-x RET p)

*Backtrace*

Debugger entered--Lisp error: (void-variable org-agenda-filter)
  org-mobile-push()
  call-interactively(org-mobile-push nil nil)


Best wishes,

Enda



 From: Nick Dokos 
To: Enda  
Cc: "emacs-orgmode@gnu.org"  
Sent: Friday, June 22, 2012 5:06 PM
Subject: Re: [O] MobileOrg - Symbol's value as variable is void: 
org-agenda-filter
 
Enda  wrote:

> MobileOrg -> Push files and views (C-c C-x RET p)
> Symbol's value as variable is void: org-agenda-filter
> 
> Why am getting this error?: Symbol's value as variable is void: 
> org-agenda-filter
> 

M-x toggle-debug-on error

try it again and when you get the error, send the backtrace.

Nick

[O] org-export-icalendar-this-file tmp file

2012-06-27 Thread Enda
When I run 
M-x org-export-icalendar-this-file
on a file, in the *Messages* buffer, it says:

Saving file /tmp/orgics3698Kdg...
Wrote /tmp/orgics3698Kdg
Saving file ~/file.ics...
Wrote ~/file.ics

Does the tmp file need to be created since one is not needed for other
exports?


Best wishes,

Enda

[O] How to turn off font-lock-mode per file

2012-06-27 Thread Enda
How do you turn off font-lock-mode per file (an org file)?


Best wishes,

Enda


[O] org-export-as-html-batch backup file

2012-06-27 Thread Enda
When I run:
emacs --batch --visit=index.org --funcall org-export-as-html-batch

If index.html already exists a backup file index.html~ is created,
however when I export as html within Emacs no backup file is
created. How do I prevent a backup file being created in the above
scenario?


Best wishes,

Enda

[O] org-icalendar-alarm-time in org file as an #+OPTION

2012-06-27 Thread Enda
http://orgmode.org/manual/iCalendar-export.html



In Org options, I can set org-icalendar-alarm-time to '5' and when I export the 
org file as an ical file, and then import the ical file into a calendar 
application, I get notified by the alarm of the calendar application five 
minutes before the event (which was in the org file). Is there a way of setting 
org-icalendar-alarm-time to '5' locally instead of globally?

# -*- org-icalendar-alarm-time: 5  -*-
works, but I get a warning when I open the file.


Best wishes,

Enda




 From: Bastien 
To: Enda  
Cc: "emacs-orgmode@gnu.org"  
Sent: Wednesday, June 6, 2012 7:30 PM
Subject: Re: org-icalendar-alarm-time in org file as an #+OPTION
 
Hi Enda,

Enda  writes:

> Is there is way to have to have org-icalendar-alarm-time in an org
> file as an #+OPTION?

What would do `org-icalendar-alarm-time'?

-- 
Bastien

Re: [O] Is Org mode gonna break on emacs 24.50.1x ?

2012-06-27 Thread Eric Schulte
This looks to be a bug in the most recent version of Emacs.
http://thread.gmane.org/gmane.emacs.devel/151211

Vladimir Lomov  writes:

> Hello,
> ** Achim Gratz [2012-06-26 06:52:19 +0200]:
>
>> Baptiste Fouques writes:
>>> * lisp/emacs-lisp/cl.el (flet): Don't autoload.
>
>>> Makes  my  org not  working  in  several  places (babel,  coupling  with
>>> remenber,  …).  I  think  that the  point in  using  'flet' has  appears
>>> several times in this group. It seems to become more crucial here.
>
>> All the files using flet (and other cl macros) should have an
>
>>   (eval-when-compile (require 'cl))
>
>> before first use, so whether or not flet is autoloaded should be a moot
>> point.  If they don't, it's a bug in org.  If they do and it still
>> doesn't work, the bug may be in org, but more likely in Emacs.
>
> I don't know if I understand what I do but I changed several `flet' to
> `labels' (I read `cl.el' and they go consequently).
>
> I post small patch that works for me, if it is ok (and I don't mess all
> around) I can change all other `flet' (but I can't check them all).
>
>> Regards,
>> Achim.
>
> Thanks again Achim, you point me in right direction (to change function
> :).
>
> P.S. Patch is bziped though it is small enough.
>
> ---
> WBR, Vladimir Lomov

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



Re: [O] Is Org mode gonna break on emacs 24.50.1x ?

2012-06-27 Thread Vladimir Lomov
Hello,
** Achim Gratz [2012-06-26 06:52:19 +0200]:

> Baptiste Fouques writes:
>> * lisp/emacs-lisp/cl.el (flet): Don't autoload.

>> Makes  my  org not  working  in  several  places (babel,  coupling  with
>> remenber,  …).  I  think  that the  point in  using  'flet' has  appears
>> several times in this group. It seems to become more crucial here.

> All the files using flet (and other cl macros) should have an

>   (eval-when-compile (require 'cl))

> before first use, so whether or not flet is autoloaded should be a moot
> point.  If they don't, it's a bug in org.  If they do and it still
> doesn't work, the bug may be in org, but more likely in Emacs.

I don't know if I understand what I do but I changed several `flet' to
`labels' (I read `cl.el' and they go consequently).

I post small patch that works for me, if it is ok (and I don't mess all
around) I can change all other `flet' (but I can't check them all).

> Regards,
> Achim.

Thanks again Achim, you point me in right direction (to change function
:).

P.S. Patch is bziped though it is small enough.

---
WBR, Vladimir Lomov

-- 
If you look good and dress well, you don't need a purpose in life.
-- Robert Pante, fashion consultant


flet-labels.patch.bz2
Description: BZip2 compressed data