Re: [O] new exporter, conditional options according to backend

2013-01-20 Thread Nicolas Goaziou
Jambunathan K kjambunat...@gmail.com writes:

 Nicolas Goaziou n.goaz...@gmail.com writes:

 #+begin_src emacs-lisp
 (defun my-options-change-fun (tree backend info)
   (when (org-export-derived-backend-p backend 'e-beamer)
 (plist-put info :with-author nil))
   ;; Don't forget to return tree.
   tree)

 CAVEAT: plist-put can return a different list, at times.

 I don't know enough about implementation of `plist-put' to ascertain
 when it would return a new list.

Since the OP wants to modify the values of _existing properties_ I'm
quite sure the change will happen in place.


Regards,

-- 
Nicolas Goaziou



[O] inherited-tags problem in agenda

2013-01-20 Thread Kiwon Um

Dear org-mode dev team:

From the release_7.9.3, the inherited tags are incorrectly disappeared
from the agenda view. The inherited tags are not shown for the tasks
with DEADLINE in the agenda view.

I checked this problem even at the latest version (git:
3e699dc0327516db5447fbc49101642350e4873a).

This problem is not in the release_7.9.2.

Thanks.

--
Kiwon Um



Re: [O] managing a playlist

2013-01-20 Thread Michael Brand
On Sat, Jan 19, 2013 at 3:07 PM, 42 147 aeus...@gmail.com wrote:
 What's the best way to keep a playlist in org-mode?

 I just want to keep a list of everything I like. Right now my format is:

  Judas Priest
 * Painkiller (1990)
 ** (2) Hell Patrol
 ** (6) Night Crawler
 ** (7) Between the Hammer and the Anvil
  At The Gates
 * Slaughter of the Soul (1995)
 ** (1) Blinded By Fear
 ** (2) Slaughter of the Soul
 ** (3) Cold
 ** (4) Under A Serpent Sun
  Megadeth
 * Killing is My Business (1985)

For what it’s worth, a good way for my requirements:

Since anyway I discover and cherry-pick songs and focus on songs
rather than albums, especially for more recent music, I decided to
move from the common path format “Judas Priest - 1990 Painkiller - 02
Hell Patrol” to the much simpler “Judas Priest - Hell Patrol”. The
album information is moved to _optional_ properties. It allows to add
songs much quicker, without losing the time to find out the album
year, name and track only to be able to insert the new song into the
right path.

The songs are in alphabetical order of its title. Album information
can be left empty and if added later doesn’t disturb the song’s path
and the ordering. I put up with the resulting scattering of albums.
Should I care about this in a rare case of a complete album, a
playlist for the album is perfect. E. g. M3U. Most of the times I have
very few songs per album, often only one.

Songs released more than once like in Best Of albums are not
duplicated. Case by case the properties for the album may be left
empty or contain the first released, the acquired or even several
albums e. g. concatenated in the field value. No concerns anymore also
on how to resolve this with the common path format and with complete
albums.

how the interactive column view in the buffer (C-c C-x C-c) looks like:
#+BEGIN: columnview
| artist - title   | * | year | album   | tr |
|--+---+--+-+|
| * Judas Priest   |   |  | ||
| *** Between the Hammer and the Anvil | 1 | 1990 | Painkiller  | 07 |
| *** Come and Get It  | 5 | 1988 | Ram It Down | 04 |
| *** Hell Patrol  | 4 | 1990 | Painkiller  | 02 |
| * Lou Reed   |   |  | ||
| *** Perfect Day  |   |  | ||
| * The Jolly Boys |   |  | ||
| *** Perfect Day  | 3 |  | ||
#+END:

file content:
#+STARTUP: odd
#+COLUMNS: %30ITEM(artist - title) %1rating(*) %4year %20album %2track(tr)
* Judas Priest
  - [[http://en.wikipedia.org/wiki/Judas_Priest]]
  - [[http://www.judaspriest.com]]
  - bla bla
*** Between the Hammer and the Anvil
:PROPERTIES:
:rating:   1
:year: 1990
:album:Painkiller
:track:07
:END:
- [[http://www.youtube.com/watch?v=Ycte4mmN8l4]]
*** Come and Get It
:PROPERTIES:
:rating:   5
:year: 1988
:album:Ram It Down
:track:04
:END:
*** Hell Patrol
:PROPERTIES:
:rating:   4
:year: 1990
:album:Painkiller
:track:02
:END:
* Lou Reed
*** Perfect Day
:PROPERTIES:
:ID:   d25f4624-7c1d-40b3-8f53-5175696d4254
:END:
- [[http://en.wikipedia.org/wiki/Perfect_Day_(Lou_Reed_song)]]
- covered by:
  - Patti Smith
  - The Jolly Boys: [[id:0a4045c5-428f-4ffd-9e90-ed2558355d11]]
  - for more cover versions see

[[http://en.wikipedia.org/wiki/Perfect_Day_(Lou_Reed_song)#Other_versions]]
* The Jolly Boys
*** Perfect Day
:PROPERTIES:
:ID:   0a4045c5-428f-4ffd-9e90-ed2558355d11
:rating:   3
:discovered: [2010-09-30 Thu]
:END:
- covers Lou Reed: [[id:d25f4624-7c1d-40b3-8f53-5175696d4254]]
- [[file:/podcasts/radio_station/music_show/2010-09-29.mp3::01:09:43]]
  (this link starts the podcast MP3 file at the position where the
  song was played)
- bla bla

Michael



Re: [O] Wish: switch active time-stamps to inactive when CANCELED

2013-01-20 Thread Karl Voit
* Viktor Rosenfeld listuse...@gmail.com wrote:
 Hi,

Hi!

 Karl Voit wrote:

 But still: there are two steps I have to make: (a) mark as canceled
 because I want this CANCELED string attached and (b) add the
 ARCHIVE tag.

 You can set the ARCHIVE tag when switching the TODO state automatically
 using org-todo-state-tags-triggers.

 For example (untestet):

 #+BEGIN_SRC emacs-lisp
 (setq org-todo-state-tags-triggers '((CANCELLED (ARCHIVE . t
 #+END_SRC

Well, I could not find any reason why I do not want this happen in
the same time. So, thanks for this trick - it solves indeed my issue
in a sleek way :-) 

-- 
Karl Voit




Re: [O] new exporter, conditional options according to backend

2013-01-20 Thread Jambunathan K
Nicolas Goaziou n.goaz...@gmail.com writes:

 Jambunathan K kjambunat...@gmail.com writes:

 Nicolas Goaziou n.goaz...@gmail.com writes:

 #+begin_src emacs-lisp
 (defun my-options-change-fun (tree backend info)
   (when (org-export-derived-backend-p backend 'e-beamer)
 (plist-put info :with-author nil))
   ;; Don't forget to return tree.
   tree)

 CAVEAT: plist-put can return a different list, at times.

 I don't know enough about implementation of `plist-put' to ascertain
 when it would return a new list.

 Since the OP wants to modify the values of _existing properties_ I'm
 quite sure the change will happen in place.

Look at example in Elisp manual.  New members seem to get appended.  

List being destructive is explainable if new members were to be added to
the head.  Since this is not the case, I am curious what the
implementation could be ...




 Regards,

-- 



Re: [O] Wish: switch active time-stamps to inactive when CANCELED

2013-01-20 Thread Karl Voit
* Nick Dokos nicholas.do...@hp.com wrote:
 Karl Voit devn...@karl-voit.at wrote:

 Oh, I would have guessed this algorithm overview/principle as well
 :-)

 It is more than an algorithm overview/principle: there are specific
 suggestions in there - which hook to use, the state variable that you
 need to check and the function to toggle the timestamp type are the
 real thing: nothing vaporous about them.

Agreed!

 But unfortunately, I know that little of ELISP, that I am not able
 to implement it by myself :-(

 Time to learn some then - and there is no better way than scratching
 your own itch :-)

Also: agreed! Problem is my workload and ... time.

ELISP is nothing you can learn in a single weekend. I've got the
feeling that this is a task that requires a longer period of time.
It's in SOMEDAY state in my Org along with:

- http://nic.ferrier.me.uk/blog/2012_07/tips-and-tricks-for-emacslisp
- http://cjohansen.no/an-introduction-to-elisp
- https://en.wikipedia.org/wiki/Elisp
- 58min [[https://www.youtube.com/watch?v%3DYMYehD9JD-Yfeature%3Drelated][LISP 
PROGRAMMING INTRODUCTION LECTURE ONE]]
- 9min [[https://www.youtube.com/watch?v%3DM-BFgErib4kfeature%3Drelated][An 
Brief Introduction to LISP - Pt 1, Syntax]] (1/4+)

-- 
Karl Voit




Re: [O] managing a playlist

2013-01-20 Thread 42 147
I appreciate the detailed reply, but org-tables is less tidy and browsable
than my simple hierarchy of nested headings; unless I misunderstood your
instructions. I copy / pasted what you wrote (starting with #+BEGIN) and
enabled interactive column view. But aside from a flashy change of colors
and borders, I don't see an improvement in functionality. What other
commands do you use in this mode when managing playlists? I could very well
be missing something here.


2013/1/20 Michael Brand michael.ch.br...@gmail.com

 On Sat, Jan 19, 2013 at 3:07 PM, 42 147 aeus...@gmail.com wrote:
  What's the best way to keep a playlist in org-mode?
 
  I just want to keep a list of everything I like. Right now my format is:
 
   Judas Priest
  * Painkiller (1990)
  ** (2) Hell Patrol
  ** (6) Night Crawler
  ** (7) Between the Hammer and the Anvil
   At The Gates
  * Slaughter of the Soul (1995)
  ** (1) Blinded By Fear
  ** (2) Slaughter of the Soul
  ** (3) Cold
  ** (4) Under A Serpent Sun
   Megadeth
  * Killing is My Business (1985)

 For what it’s worth, a good way for my requirements:

 Since anyway I discover and cherry-pick songs and focus on songs
 rather than albums, especially for more recent music, I decided to
 move from the common path format “Judas Priest - 1990 Painkiller - 02
 Hell Patrol” to the much simpler “Judas Priest - Hell Patrol”. The
 album information is moved to _optional_ properties. It allows to add
 songs much quicker, without losing the time to find out the album
 year, name and track only to be able to insert the new song into the
 right path.

 The songs are in alphabetical order of its title. Album information
 can be left empty and if added later doesn’t disturb the song’s path
 and the ordering. I put up with the resulting scattering of albums.
 Should I care about this in a rare case of a complete album, a
 playlist for the album is perfect. E. g. M3U. Most of the times I have
 very few songs per album, often only one.

 Songs released more than once like in Best Of albums are not
 duplicated. Case by case the properties for the album may be left
 empty or contain the first released, the acquired or even several
 albums e. g. concatenated in the field value. No concerns anymore also
 on how to resolve this with the common path format and with complete
 albums.

 how the interactive column view in the buffer (C-c C-x C-c) looks like:
 #+BEGIN: columnview
 | artist - title   | * | year | album   | tr |
 |--+---+--+-+|
 | * Judas Priest   |   |  | ||
 | *** Between the Hammer and the Anvil | 1 | 1990 | Painkiller  | 07 |
 | *** Come and Get It  | 5 | 1988 | Ram It Down | 04 |
 | *** Hell Patrol  | 4 | 1990 | Painkiller  | 02 |
 | * Lou Reed   |   |  | ||
 | *** Perfect Day  |   |  | ||
 | * The Jolly Boys |   |  | ||
 | *** Perfect Day  | 3 |  | ||
 #+END:

 file content:
 #+STARTUP: odd
 #+COLUMNS: %30ITEM(artist - title) %1rating(*) %4year %20album %2track(tr)
 * Judas Priest
   - [[http://en.wikipedia.org/wiki/Judas_Priest]]
   - [[http://www.judaspriest.com]]
   - bla bla
 *** Between the Hammer and the Anvil
 :PROPERTIES:
 :rating:   1
 :year: 1990
 :album:Painkiller
 :track:07
 :END:
 - [[http://www.youtube.com/watch?v=Ycte4mmN8l4]]
 *** Come and Get It
 :PROPERTIES:
 :rating:   5
 :year: 1988
 :album:Ram It Down
 :track:04
 :END:
 *** Hell Patrol
 :PROPERTIES:
 :rating:   4
 :year: 1990
 :album:Painkiller
 :track:02
 :END:
 * Lou Reed
 *** Perfect Day
 :PROPERTIES:
 :ID:   d25f4624-7c1d-40b3-8f53-5175696d4254
 :END:
 - [[http://en.wikipedia.org/wiki/Perfect_Day_(Lou_Reed_song)]]
 - covered by:
   - Patti Smith
   - The Jolly Boys: [[id:0a4045c5-428f-4ffd-9e90-ed2558355d11]]
   - for more cover versions see
 [[
 http://en.wikipedia.org/wiki/Perfect_Day_(Lou_Reed_song)#Other_versions]]
 * The Jolly Boys
 *** Perfect Day
 :PROPERTIES:
 :ID:   0a4045c5-428f-4ffd-9e90-ed2558355d11
 :rating:   3
 :discovered: [2010-09-30 Thu]
 :END:
 - covers Lou Reed: [[id:d25f4624-7c1d-40b3-8f53-5175696d4254]]
 - [[file:/podcasts/radio_station/music_show/2010-09-29.mp3::01:09:43]]
   (this link starts the podcast MP3 file at the position where the
   song was played)
 - bla bla

 Michael



Re: [O] Wish: switch active time-stamps to inactive when CANCELED

2013-01-20 Thread Viktor Rosenfeld
Hi,

Karl Voit wrote:

 ELISP is nothing you can learn in a single weekend. I've got the
 feeling that this is a task that requires a longer period of time.
 It's in SOMEDAY state in my Org along with:

I've found that you can pick up enough ELISP on a weekend to start
hacking small snipplets right away. Of course, you'll be very slow in
the beginning, and reverting to message-debugging all the time, but over
time you'll get more proficient. And you get to solve your problems,
which should lead to higher productivity in the long run.

Anyway, thanks for the links.

Cheers,
Viktor



Re: [O] managing a playlist

2013-01-20 Thread Michael Brand
Hi 42 (?)

On Sun, Jan 20, 2013 at 6:35 PM, 42 147 aeus...@gmail.com wrote:
 I appreciate the detailed reply, but org-tables is less tidy and browsable
 than my simple hierarchy of nested headings; unless I misunderstood your
 instructions.

Sorry for the misunderstanding, I try to be more explicit. The table
within the block “columnview” has been generated automatically from
all the entries below “#+END” and was only to give a glimpse of how
column view looks like.

 I copy / pasted what you wrote (starting with #+BEGIN) and
 enabled interactive column view. But aside from a flashy change of colors
 and borders, I don't see an improvement in functionality. What other
 commands do you use in this mode when managing playlists? I could very well
 be missing something here.

For the column view only the lines below “file content:” are
mandatory. With point on the first line, C-c C-x C-c activates the
column view which _adds an overlay to the headings with the values
from some properties_, here mainly the album information for the
songs. Do a few cycles with S-TAB repeated to get a very first
impression. There is much more like editing properties, calculation
etc., see:
http://orgmode.org/org.html#Column-view
http://thread.gmane.org/gmane.emacs.orgmode/5107/focus=5134
http://orgmode.org/worg/org-tutorials/org-column-view-tutorial.html

Michael



[O] Bug: Effort is not displayed in mode line, patch attached [7.9.2 (7.9.2-181-ge8aaca-elpaplus @ /usr/local/share/emacs/24.2/lisp/org/)]

2013-01-20 Thread Vasil S. Diadov

Efforts are not displayed in mode line due to wrong point position
during fetching 'org-effort property of the text.

Patch attached.
diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index 914f5ff..0b3d2fc 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -1226,7 +1226,8 @@ make this the default behavior.)
 			  \\[\\[.*?\\]\\[\\(.*?\\)\\]\\] \\1
 			  (match-string 4)))
 			(t ???)))
-	(setq org-clock-heading (org-propertize org-clock-heading
+(setq org-clock-heading 
+  (org-propertize org-clock-heading
 		'face nil))
 	(org-clock-find-position org-clock-in-resume)
 	(cond
@@ -1241,7 +1242,10 @@ make this the default behavior.)
 	  (setq org-clock-start-time
 		(apply 'encode-time
 			   (org-parse-time-string (match-string 1
-	  (setq org-clock-effort (get-text-property (point) 'org-effort))
+  (setq org-clock-effort 
+(save-excursion
+  (org-back-to-heading t)
+  (get-text-property (point) 'org-effort)))
 	  (setq org-clock-total-time (org-clock-sum-current-item
 	  (org-clock-get-sum-start
 	 ((eq org-clock-in-resume 'auto-restart)
@@ -1261,7 +1265,10 @@ make this the default behavior.)
 		(beginning-of-line 1)
 		(org-indent-line-to (- (org-get-indentation) 2)))
 	  (insert org-clock-string  )
-	  (setq org-clock-effort (get-text-property (point) 'org-effort))
+  (setq org-clock-effort 
+(save-excursion
+  (org-back-to-heading t)
+  (get-text-property (point) 'org-effort)))
 	  (setq org-clock-total-time (org-clock-sum-current-item
 	  (org-clock-get-sum-start)))
 	  (setq org-clock-start-time


[O] Problem exporting code

2013-01-20 Thread Ken Williams
I'm giving a talk tomorrow on org-mode and R, and I'm having an exporting
problem that's tripping me up.

Usually when I export code/output sections to HTML, they get CSS classes
like src-R for R code, src-perl for perl code, example for output.
 But now they're all example.  Has anyone seen this?

Having different classes lets me do stuff like this:
http://article.gmane.org/gmane.emacs.orgmode/46301

Maybe it's the new exporter?  I'm using org-mode 7.9.3d.

I can try downgrading, is there a location for older versions of orgmode?

 -Ken


Re: [O] Problem exporting code

2013-01-20 Thread Ken Williams
Unfortunately, downgrading to 7.8.11 didn't change the behavior - all code
sections are still exported to HTML as class example.

I also see that on one machine, using 7.9.2, I get the desired pre
class=src src-R tag for R code export.  I can't figure out what's making
the difference though.


On Sun, Jan 20, 2013 at 5:44 PM, Ken Williams kena...@gmail.com wrote:

 I'm giving a talk tomorrow on org-mode and R, and I'm having an exporting
 problem that's tripping me up.

 Usually when I export code/output sections to HTML, they get CSS classes
 like src-R for R code, src-perl for perl code, example for output.
  But now they're all example.  Has anyone seen this?

 Having different classes lets me do stuff like this:
 http://article.gmane.org/gmane.emacs.orgmode/46301

 Maybe it's the new exporter?  I'm using org-mode 7.9.3d.

 I can try downgrading, is there a location for older versions of orgmode?

  -Ken



Re: [O] Problem exporting code

2013-01-20 Thread Eric S Fraga

Ken Williams kena...@gmail.com writes:

Unfortunately, downgrading to 7.8.11 didn't change the behavior 
- all code sections are still exported to HTML as class 
example. 

I also see that on one machine, using 7.9.2, I get the desired 
pre class=src src-R tag for R code export.  I can't figure 
out what's making the difference though. 


I'm grasping at straws here, having seldom exported to HTML, but 
have you loaded the languages for babel?


,[ C-h f org-babel-do-load-languages RET ]
| org-babel-do-load-languages is an autoloaded compiled Lisp function in
| `org.el'.
| 
| (org-babel-do-load-languages SYM VALUE)
| 
| Load the languages defined in `org-babel-load-languages'.

`

--
: Eric S Fraga, GnuPG: 0xC89193D8FFFCF67D
: in Emacs 24.3.50.1 and Org release_7.9.3d-826-gbe0d87




Re: [O] Problem exporting code

2013-01-20 Thread Ken Williams
On Sun, Jan 20, 2013 at 9:15 PM, Eric S Fraga e.fr...@ucl.ac.uk wrote:

 Ken Williams kena...@gmail.com writes:

  Unfortunately, downgrading to 7.8.11 didn't change the behavior - all
 code sections are still exported to HTML as class example.
 I also see that on one machine, using 7.9.2, I get the desired pre
 class=src src-R tag for R code export.  I can't figure out what's making
 the difference though.


 I'm grasping at straws here, having seldom exported to HTML, but have you
 loaded the languages for babel?


Yes, I believe that's set up properly, because I can do C-c C-c and it
knows how to run my R sections and return the correct values.  Also, when I
describe org-babel-load-languages, I see:

org-babel-load-languages is a variable defined in `org.el'.
Its value is ((emacs-lisp . t)
 (sh . t)
 (R . t)
 (perl . t))

I'm grasping at straws too, not knowing my way around the elisp code very
well. =)

 -Ken


[O] colorg: Some news!

2013-01-20 Thread François Pinard
Hi to all my Org friends.

ColOrg is a project about real-time collaborative editing of Org files.
Here are some news about its progress, after a second push this
weekend.  It is not usable yet, but a few more steps have been taken.  A
few more ropes are needed to tie it up all together, but not much.

Some details follow.

The ColOrg client (on the Emacs side) acquired code for processing all
commands coming from a ColOrg server.  This includes per-collaborator
colorization of recently inserted text, and notification windows for
transient diagnostics.  To be usable, the client still misses the
association between local buffers and remote resource numbers, so
modifications go where they were meant.  The client should also ask the
server to build completions for existing users or resources.

The ColOrg server (on the Python side) requires more work.  The protocol
has been solidified a bit, but needs some love in the area of returned
values.  The problem of proper command rewriting is now better analyzed,
it looks simpler, but still has to be programmed.  I decided for a naive
approach, and by postponed optimization issues, all dark corners have
been lit, none remain so far that I know.

The Wiki also got some more text.  See https://github.com/pinard/ColOrg.

François



Re: [O] Problem exporting code

2013-01-20 Thread John Hendy
On Sun, Jan 20, 2013 at 10:57 PM, Ken Williams kena...@gmail.com wrote:

 On Sun, Jan 20, 2013 at 9:15 PM, Eric S Fraga e.fr...@ucl.ac.uk wrote:

 Ken Williams kena...@gmail.com writes:

 Unfortunately, downgrading to 7.8.11 didn't change the behavior - all
 code sections are still exported to HTML as class example.
 I also see that on one machine, using 7.9.2, I get the desired pre
 class=src src-R tag for R code export.  I can't figure out what's making
 the difference though.


 I'm grasping at straws here, having seldom exported to HTML, but have you
 loaded the languages for babel?


 Yes, I believe that's set up properly, because I can do C-c C-c and it
 knows how to run my R sections and return the correct values.  Also, when I
 describe org-babel-load-languages, I see:

 org-babel-load-languages is a variable defined in `org.el'.
 Its value is ((emacs-lisp . t)
  (sh . t)
  (R . t)
  (perl . t))

 I'm grasping at straws too, not knowing my way around the elisp code very
 well. =)

Just tried myself on a file lying around with embedded R code, and I
get pre class=src src-R for my src blocks.

Can we back up a bit and have you post a minimal config and sample
file? Perhaps the output of =M-x org-version= as well, just to be sure
on where emacs is pulling org code from? You might have done this; my
apologies if so. Been following the thread from a distance as I didn't
have much experience with html/src code export. Just thought I'd chime
in on things I've been asked to do that usually do help the situation.

With a minimal config (like your load directories and the babel
language definitions above), we can try to replicate a bit better.
Emacs configs get long, so it's really hard to know from user to user
what else might be going on.


Thanks!
John


  -Ken



Re: [O] Problem exporting code

2013-01-20 Thread John Hendy
On Sun, Jan 20, 2013 at 11:36 PM, John Hendy jw.he...@gmail.com wrote:
 On Sun, Jan 20, 2013 at 10:57 PM, Ken Williams kena...@gmail.com wrote:

 On Sun, Jan 20, 2013 at 9:15 PM, Eric S Fraga e.fr...@ucl.ac.uk wrote:

 Ken Williams kena...@gmail.com writes:

 Unfortunately, downgrading to 7.8.11 didn't change the behavior - all
 code sections are still exported to HTML as class example.
 I also see that on one machine, using 7.9.2, I get the desired pre
 class=src src-R tag for R code export.  I can't figure out what's making
 the difference though.


 I'm grasping at straws here, having seldom exported to HTML, but have you
 loaded the languages for babel?


 Yes, I believe that's set up properly, because I can do C-c C-c and it
 knows how to run my R sections and return the correct values.  Also, when I
 describe org-babel-load-languages, I see:

 org-babel-load-languages is a variable defined in `org.el'.
 Its value is ((emacs-lisp . t)
  (sh . t)
  (R . t)
  (perl . t))

 I'm grasping at straws too, not knowing my way around the elisp code very
 well. =)

 Just tried myself on a file lying around with embedded R code, and I
 get pre class=src src-R for my src blocks.

 Can we back up a bit and have you post a minimal config and sample
 file? Perhaps the output of =M-x org-version= as well, just to be sure
 on where emacs is pulling org code from? You might have done this; my
 apologies if so. Been following the thread from a distance as I didn't
 have much experience with html/src code export. Just thought I'd chime
 in on things I've been asked to do that usually do help the situation.

 With a minimal config (like your load directories and the babel
 language definitions above), we can try to replicate a bit better.
 Emacs configs get long, so it's really hard to know from user to user
 what else might be going on.


By the way, I'm on =Org-mode version 7.9.3d
(release_7.9.3d-830-g780b45 @ /home/jwhendy/.elisp/org.git/lisp/)= and
it works for me, so I don't think it's new behavior in 7.9.3. Just
wanted to add that; at least it may save you from trying to hunt down
a magical version that doesn't have the issue :)


John


 Thanks!
 John


  -Ken



Re: [O] Problem exporting code

2013-01-20 Thread Ken Williams
On Sun, Jan 20, 2013 at 10:57 PM, Ken Williams kena...@gmail.com wrote:


 I'm grasping at straws too, not knowing my way around the elisp code very
 well. =)


It looks like the function controlling this behavior is
`org-export-format-source-code-or-example`, in org-exp.el:

(if (string-match pre\\([^]*\\)\n* rtn)
(setq rtn
  (concat
   (if caption
   (concat
div class=\org-src-container\
(format
 label
class=\org-src-name\%s/label
 caption))
 )
   (replace-match
(format pre class=\src src-%s\\n lang)
t t rtn)
   (if caption /div )

So the pre tag gets inserted first, then later gets replaced by pre
class=src src-R ?


Re: [O] colorg: Some news!

2013-01-20 Thread Daimrod
François Pinard pin...@iro.umontreal.ca writes:

 Hi to all my Org friends.

Hi,

 ColOrg is a project about real-time collaborative editing of Org files.
 Here are some news about its progress, after a second push this
 weekend.  It is not usable yet, but a few more steps have been taken.  A
 few more ropes are needed to tie it up all together, but not much.

 Some details follow.

 The ColOrg client (on the Emacs side) acquired code for processing all
 commands coming from a ColOrg server.  This includes per-collaborator
 colorization of recently inserted text, and notification windows for
 transient diagnostics.  To be usable, the client still misses the
 association between local buffers and remote resource numbers, so
 modifications go where they were meant.  The client should also ask the
 server to build completions for existing users or resources.

 The ColOrg server (on the Python side) requires more work.  The protocol
 has been solidified a bit, but needs some love in the area of returned
 values.  The problem of proper command rewriting is now better analyzed,
 it looks simpler, but still has to be programmed.  I decided for a naive
 approach, and by postponed optimization issues, all dark corners have
 been lit, none remain so far that I know.

 The Wiki also got some more text.  See https://github.com/pinard/ColOrg.

That's a really cool project! Do you plan to keep the server in Python?
Or do you think it would be possible to make this in Emacs Lisp only
with Elnode[1] for the server-side?

 François

[1] http://elnode.org/
-- 
Daimrod/Greg


pgpOL4G5oMPlo.pgp
Description: PGP signature


Re: [O] Problem exporting code

2013-01-20 Thread Ken Williams
Thanks John.  Here's a small org file:


#+TITLE: Sample Doc
#+AUTHOR:Ken Williams
#+EMAIL: kena...@gmail.com
#+DATE:  2013-01-21
#+PROPERTY: results output
#+PROPERTY: exports both
#+LATEX_HEADER: \usepackage{amsmath}


#+begin_src R
5+5
#+end_src

#+RESULTS:
: [1] 10


The code gets exported to:


pre class=example
5+5
/pre

pre class=example
[1] 10
/pre


And here's my config:


(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(current-language-environment UTF-8)
 '(global-font-lock-mode t nil (font-lock))
 '(inhibit-splash-screen t)
 '(org-alphabetical-lists t)
 '(org-export-html-postamble nil)
 '(org-export-html-preamble-format (quote ((en p
class=\author\Author: a href=\mailto:%e\;%a/a/p
p class=\date\Date: %d/p

 '(org-src-preserve-indentation t)
 '(show-paren-mode t)
 '(tool-bar-mode nil)
 '(transient-mark-mode t)
 '(user-mail-address kena...@gmail.com))
(custom-set-faces
 ;; custom-set-faces was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(diff-added-face ((t (:foreground green
 '(diff-changed-face ((t (:foreground blue :slant italic :weight bold
 '(diff-removed-face ((t (:foreground red
 )

(setq
   backup-by-copying t  ; don't clobber symlinks
   backup-directory-alist
'((. . /tmp/)))

(add-to-list 'load-path ~/share/emacs/site-lisp/org load-path)
(require 'org-install)
(add-to-list 'auto-mode-alist '(\\.org$ . org-mode))

(global-set-key (kbd M--) 'ess-smart-underscore)

(org-babel-do-load-languages
 'org-babel-load-languages
 '((emacs-lisp . t)
   (sh . t)
   (R . t)
   (perl . t)))

(setq org-export-html-style
style type=\text/css\
!--/*--![CDATA[/*!--*/
  .src { background-color: #F5FFF5; position: relative;
overflow: visible; margin-right: auto; }
  .src:before  { position: absolute; top: -15px; background:
#ff; padding: 1px; border: 1px solid #00; font-size: small; }
  .src-sh:before   { content: 'sh'; }
  .src-bash:before { content: 'sh'; }
  .src-R:before{ content: 'R'; }
  .src-perl:before { content: 'Perl'; }
  .src-java:before { content: 'Java'; }
  .src-sql:before  { content: 'SQL'; }
  .example { background-color: #FFF5F5; }
/*]]*/--
/style)

(setq org-export-babel-evaluate nil)
(setq org-confirm-babel-evaluate nil)


 -Ken


On Sun, Jan 20, 2013 at 11:36 PM, John Hendy jw.he...@gmail.com wrote:

 On Sun, Jan 20, 2013 at 10:57 PM, Ken Williams kena...@gmail.com wrote:
 
  On Sun, Jan 20, 2013 at 9:15 PM, Eric S Fraga e.fr...@ucl.ac.uk wrote:
 
  Ken Williams kena...@gmail.com writes:
 
  Unfortunately, downgrading to 7.8.11 didn't change the behavior - all
  code sections are still exported to HTML as class example.
  I also see that on one machine, using 7.9.2, I get the desired pre
  class=src src-R tag for R code export.  I can't figure out what's
 making
  the difference though.
 
 
  I'm grasping at straws here, having seldom exported to HTML, but have
 you
  loaded the languages for babel?
 
 
  Yes, I believe that's set up properly, because I can do C-c C-c and it
  knows how to run my R sections and return the correct values.  Also,
 when I
  describe org-babel-load-languages, I see:
 
  org-babel-load-languages is a variable defined in `org.el'.
  Its value is ((emacs-lisp . t)
   (sh . t)
   (R . t)
   (perl . t))
 
  I'm grasping at straws too, not knowing my way around the elisp code very
  well. =)

 Just tried myself on a file lying around with embedded R code, and I
 get pre class=src src-R for my src blocks.

 Can we back up a bit and have you post a minimal config and sample
 file? Perhaps the output of =M-x org-version= as well, just to be sure
 on where emacs is pulling org code from? You might have done this; my
 apologies if so. Been following the thread from a distance as I didn't
 have much experience with html/src code export. Just thought I'd chime
 in on things I've been asked to do that usually do help the situation.

 With a minimal config (like your load directories and the babel
 language definitions above), we can try to replicate a bit better.
 Emacs configs get long, so it's really hard to know from user to user
 what else might be going on.


 Thanks!
 John

 
   -Ken



Re: [O] Problem exporting code

2013-01-20 Thread Ken Williams
Argh, forgot my platform details - I'm using:

Either org-mode 7.9.3d or 7.8.11 (same results)
Aquamacs 2.4 (but I saw the same result using Emacs on a Linux box)
Aquamacs is based on GNU Emacs 23.3.50.1.

 -Ken


On Sun, Jan 20, 2013 at 11:36 PM, John Hendy jw.he...@gmail.com wrote:

 On Sun, Jan 20, 2013 at 10:57 PM, Ken Williams kena...@gmail.com wrote:
 
  On Sun, Jan 20, 2013 at 9:15 PM, Eric S Fraga e.fr...@ucl.ac.uk wrote:
 
  Ken Williams kena...@gmail.com writes:
 
  Unfortunately, downgrading to 7.8.11 didn't change the behavior - all
  code sections are still exported to HTML as class example.
  I also see that on one machine, using 7.9.2, I get the desired pre
  class=src src-R tag for R code export.  I can't figure out what's
 making
  the difference though.
 
 
  I'm grasping at straws here, having seldom exported to HTML, but have
 you
  loaded the languages for babel?
 
 
  Yes, I believe that's set up properly, because I can do C-c C-c and it
  knows how to run my R sections and return the correct values.  Also,
 when I
  describe org-babel-load-languages, I see:
 
  org-babel-load-languages is a variable defined in `org.el'.
  Its value is ((emacs-lisp . t)
   (sh . t)
   (R . t)
   (perl . t))
 
  I'm grasping at straws too, not knowing my way around the elisp code very
  well. =)

 Just tried myself on a file lying around with embedded R code, and I
 get pre class=src src-R for my src blocks.

 Can we back up a bit and have you post a minimal config and sample
 file? Perhaps the output of =M-x org-version= as well, just to be sure
 on where emacs is pulling org code from? You might have done this; my
 apologies if so. Been following the thread from a distance as I didn't
 have much experience with html/src code export. Just thought I'd chime
 in on things I've been asked to do that usually do help the situation.

 With a minimal config (like your load directories and the babel
 language definitions above), we can try to replicate a bit better.
 Emacs configs get long, so it's really hard to know from user to user
 what else might be going on.


 Thanks!
 John

 
   -Ken



Re: [O] Problem exporting code

2013-01-20 Thread Eric S Fraga
Ken Williams kena...@gmail.com writes:

 Thanks John.  Here's a small org file:

Data point: this works just fine for me with both old and new
exporters.  And I don't even have R installed on this particular system
(hadn't realised until now ;-).

-- 
: Eric S Fraga, GnuPG: 0xC89193D8FFFCF67D
: in Emacs 24.3.50.1 and Org release_7.9.3d-826-gbe0d87