[O] [bug] void-function org-babel-named-data-regexp-for-name

2011-12-02 Thread Sebastien Vauban
Hello,

When exporting a document containing calls to code blocks located in my LOB
(here: `vc-indicator'), I have -- with latest Org version -- a new problem (I
mean, it wasn't there a couple of days ago):

  Debugger entered--Lisp error: (void-function 
org-babel-named-data-regexp-for-name)

It seems to me that there is a missing (require 'ob) in org-export (?).

Loading manually `ob.el' does solve that particular problem.

Best regards,
Seb

#+begin_src text
Debugger entered--Lisp error: (void-function 
org-babel-named-data-regexp-for-name)
  (org-babel-named-data-regexp-for-name ref)
  (let ((src-rx (org-babel-named-src-block-regexp-for-name ref)) (res-rx 
(org-babel-named-data-regexp-for-name ref))) (or (re-search-forward src-rx nil 
t) (re-search-forward res-rx nil t) (setq id (org-babel-ref-goto-headline-id 
ref)) (setq lob-info (cdr (assoc (intern ref) org-babel-library-of-babel)
  (if (let ((src-rx (org-babel-named-src-block-regexp-for-name ref)) (res-rx 
(org-babel-named-data-regexp-for-name ref))) (or (re-search-forward src-rx nil 
t) (re-search-forward res-rx nil t) (setq id (org-babel-ref-goto-headline-id 
ref)) (setq lob-info (cdr (assoc (intern ref) org-babel-library-of-babel) 
(unless (or lob-info id) (goto-char (match-beginning 0))) (error reference 
'%s' not found in this buffer ref))
  (save-restriction (widen) (goto-char (point-min)) (if (let ((src-rx 
(org-babel-named-src-block-regexp-for-name ref)) (res-rx 
(org-babel-named-data-regexp-for-name ref))) (or (re-search-forward src-rx nil 
t) (re-search-forward res-rx nil t) (setq id (org-babel-ref-goto-headline-id 
ref)) (setq lob-info (cdr (assoc (intern ref) org-babel-library-of-babel) 
(unless (or lob-info id) (goto-char (match-beginning 0))) (error reference 
'%s' not found in this buffer ref)) (cond (lob-info (setq type (quote lob))) 
(id (setq type (quote id))) ((and (looking-at org-babel-src-name-regexp) 
(save-excursion (forward-line 1) (or (looking-at org-babel-src-block-regexp) 
(looking-at org-babel-multi-line-header-regexp (setq type (quote 
source-block))) (t (while (not (setq type (org-babel-ref-at-ref-p))) 
(forward-line 1) (beginning-of-line) (if (or (= (point) (point-min)) (= (point) 
(point-max))) (error reference not found) (let ((params (append args 
(quote ((:results . silent)) (setq result (case type (results-line 
(org-babel-read-result)) (table (org-babel-read-table)) (list 
(org-babel-read-list)) (file (org-babel-read-link)) (source-block 
(org-babel-execute-src-block nil nil (if org-babel-update-intermediate nil 
params))) (lob (org-babel-execute-src-block nil lob-info params)) (id 
(org-babel-ref-headline-body) (if (symbolp result) (format %S result) (if 
(and index (listp result)) (org-babel-ref-index-list index result) result)))
  (let ((case-fold-search t) type args new-refere new-header-args new-referent 
result lob-info split-file split-ref index index-row index-col id) (when (and 
(string-match \\[\\([^\\[]+\\)\\]$ ref) (let ((str (substring ref 0 
(match-beginning 0 (= (org-count 40 str) (org-count 41 str (setq index 
(match-string 1 ref)) (setq ref (substring ref 0 (match-beginning 0 (when 
(string-match ^\\(.+?\\)\\(\\[\\(.*\\)\\]\\|\\(\\)\\)(\\(.*\\))$ ref) (setq 
new-refere (match-string 1 ref)) (setq new-header-args (match-string 3 ref)) 
(setq new-referent (match-string 5 ref)) (when ( (length new-refere) 0) (when 
( (length new-referent) 0) (setq args (mapcar (lambda (ref) (cons :var ref)) 
(org-babel-ref-split-args new-referent (when ( (length new-header-args) 0) 
(setq args (append (org-babel-parse-header-arguments new-header-args) args))) 
(setq ref new-refere))) (when (string-match ^\\(.+\\):\\(.+\\)$ ref) (setq 
split-file (match-string 1 ref)) (setq split-ref (match-string 2 ref)) 
(find-file split-file) (setq ref split-ref)) (save-restriction (widen) 
(goto-char (point-min)) (if (let ((src-rx 
(org-babel-named-src-block-regexp-for-name ref)) (res-rx 
(org-babel-named-data-regexp-for-name ref))) (or (re-search-forward src-rx nil 
t) (re-search-forward res-rx nil t) (setq id (org-babel-ref-goto-headline-id 
ref)) (setq lob-info (cdr (assoc ... org-babel-library-of-babel) (unless 
(or lob-info id) (goto-char (match-beginning 0))) (error reference '%s' not 
found in this buffer ref)) (cond (lob-info (setq type (quote lob))) (id (setq 
type (quote id))) ((and (looking-at org-babel-src-name-regexp) (save-excursion 
(forward-line 1) (or (looking-at org-babel-src-block-regexp) (looking-at 
org-babel-multi-line-header-regexp (setq type (quote source-block))) (t 
(while (not (setq type (org-babel-ref-at-ref-p))) (forward-line 1) 
(beginning-of-line) (if (or (= ... ...) (= ... ...)) (error reference not 
found) (let ((params (append args (quote (...) (setq result (case type 
(results-line (org-babel-read-result)) (table (org-babel-read-table)) (list 
(org-babel-read-list)) (file (org-babel-read-link)) (source-block 

[O] [bug] Code blocks (in a LOB) are not ingested anymore

2011-12-02 Thread Sebastien Vauban
#+TITLE: ECM for code blocks not being ingested anymore
#+DATE:  2011-12-02
#+PROPERTY:  eval yes

* Overview

Ingesting a LOB file does not load its code blocks anymore -- as if the file
was empty, or if there were no code blocks at all in it!

* Test case

** How many blocks?

There is 1 block in this file. That's what this code block should answer.

#+begin_src emacs-lisp :exports results
(org-babel-lob-ingest (buffer-file-name))
#+end_src

#+results:
: 0

While a couple of days ago, it correctly answered 1, now it answers 0 as
you can see/test.

** Block to be found

#+name: defvar-now
#+begin_src sql
DECLARE @now smalldatetime
-- implementation is not important in this context!
#+end_src

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] delete, add new row

2011-12-02 Thread henry atting
Jonathan Leech-Pepin jonathan.leechpe...@gmail.com writes:

 I'm not sure as to the reason why it does so, but based on your
 example, the formula is referencing the specific cell itself, rather
 than the relative position of the cell.  If you change your formula to
 use a relative reference, it will continue to work even when you add,
 remove and move the rows.

 #+TBLFM: @2$3..@$3=vmean(@I$2..@0$2);%.1f 
 or
 #+TBLFM: @2$3..@$3=vmean(@$2..@0$2);%.1f
 will both provide you with the result you seem to be looking for.  The
 former uses your (first) horizontal line as the starting point,
 whereas the latter uses the 2nd row from the top.

 Regards,
 Jonathan

 On Thu, Dec 1, 2011 at 12:42, henry atting nsmp...@online.de wrote:

 Suppose I have this table:
 
 | month | expenses | average |
 |---+--+-|
 |     1 |       20 |         |
 |     2 |       30 |    25.0 |
 |     3 |       40 |    30.0 |
 #+TBLFM: @3$3..@$3=vmean(@2$2..@0$2);%.1f
 
 Then I want to delete the second row and add a new one at the
 bottom.
 If I do so I get `#ERROR' on every recalculation.
 
 | month | expenses | average |
 |---+--+-|
 |     2 |       30 |  #ERROR |
 |     3 |       40 |  #ERROR |
 |     4 | 50       |  #ERROR |
 #+TBLFM: @2$3..@$3=vmean(@INVALID$2..@0$2);%.1f
 
 If I push the second row to the bottom the
 result is as if the last row is still the second one.
 
 | month | expenses | average |
 |---+--+-|
 |     2 |       30 |    30.0 |
 |     3 |       40 |    30.0 |
 |     1 |       20 |    20.0 |
 #+TBLFM: @2$3..@$3=vmean(@4$2..@0$2);%.1f
 

Ah, I see the problem; and thanks, it works fine now.

henry

-- 
http://literaturlatenight.de



Re: [O] [PATCH] customize latex table export

2011-12-02 Thread Niels Giesen
Hi Christophe,

Could you provide us with a minimal example of how this new functionality
can be used?

I am trying to test it and see if there are any conflicts with my patch of
late to supports the booktabs package @
http://patchwork.newartisans.com/patch/1016/  (aside from one of the two
patches not applying without some minor human intervention around line
1998).

Besides that, it would in general be good to have an example for
documentation purposes.

On Tue, Nov 29, 2011 at 6:44 PM, Christophe Rhodes cs...@cantab.net wrote:

 Carsten Dominik carsten.domi...@gmail.com writes, a long time ago:

  On May 19, 2011, at 2:34 PM, Christophe Rhodes wrote:
 
  To produce documents in something approaching my organization's house
  style, I need to be able to style the headers of tables.  It's nice that
  orgtbl has the functionality for this, but the call to orgtbl-to-latex
  has a hard-coded list of parameters with no possibility for extension.
  With the attached patch, I am able to put e.g.
 
  #+BIND: org-export-latex-tables-orgtbl-extra-parameters (:hfmt
 \\multicolumn{1}{c}{\\bf\\color{white}\\cellcolor{blue}%s})
 
  in the header of my document, and tables throughout the document all
  pick up this style.
 
  I daresay that this is not the optimal way of doing things; while this
  solves my immediate problem there is likely to be a more general way of
  doing things.
 
  would it be better to be able to set these parameters on a per-table
 basis with ATTR_LaTeX ?
  Would you like to try to prepare a patch to this effect?

 Find attached a patch to this effect.  It is the combination of two
 changes which I consider tiny: one is the support for hfmt itself as an
 ATTR_LaTeX attribute; the other is the consolidation of the
 word-matching on the attributes into local macros, which I needed
 because my use case (as above) includes the string multicolumn, which
 was otherwise confusing the attribute parser into thinking that I needed
 a table* LaTeX environment.

 Please let me know if this suits better.



 Christophe




-- 
http://pft.github.com


Re: [O] [PATCH] customize latex table export

2011-12-02 Thread Christophe Rhodes
Niels Giesen niels.gie...@gmail.com writes:

 Could you provide us with a minimal example of how this new functionality
 can be used?

Sure, sorry.  Here we go:

--- start here ---
#+TITLE: Example of using hfmt
#+AUTHOR: Christophe Rhodes

* Introduction
  This document shows the use of the =hfmt= tag in =#+LaTeX_ATTR=
  lines to customize table headings.  Analgous functionality is
  available in HTML export by customizing the style of =th= tags.
* Example table

#+ATTR_LaTeX: hfmt=\multicolumn{1}{c}{\textbf{%s}}
| table   | headings  |
|-+---|
| body| cells |
| have| unchanged |
| formatting. |   |
---  end here  ---

 I am trying to test it and see if there are any conflicts with my patch of
 late to supports the booktabs package @
 http://patchwork.newartisans.com/patch/1016/  (aside from one of the two
 patches not applying without some minor human intervention around line
 1998).

Apart from the code conflict itself, I don't see why it shouldn't work:
this patch only changes the export of individual cells, while the
booktabs one alters the export of lines :-).  Your patch took the
approach I originally took too, with a customization variable; Carsten
(in May, aeons ago) suggested that an attribute might be preferable,
which is why I've reworked it in this way.  (It might be sensible for my
patch to have a configuration variable so that there could be a
document-wide default, too; I don't know whether it would be sensible
for yours to be customizeable using ATTR_LaTeX...

 Besides that, it would in general be good to have an example for
 documentation purposes.

I hope this helps,

Christophe




Re: [O] Editing using emacs-lisp after export

2011-12-02 Thread John Rakestraw
Hi, Rajat --

-Original Message-
  From: John Rakestraw [mailto:li...@johnrakestraw.com] 
  Sent: mercredi 30 novembre 2011 21:48
  To: Mukherjee,Rajat,LAUSANNE,Clinical Operations
  Cc: emacs-orgmode@gnu.org
  Subject: Re: [O] Editing using emacs-lisp after export

  Hi, Rajat --

   I use org-mode to generate documents with latex and R codes. I also
   use some R function (package: Hmisc) to generate latex tables. One
   of the functions produces a blank line with-in the table environment
   which causes a fatal error in the .tex file. Is there a way that I
   can use emacs-lisp commands like replace-string from within the
   .org file to act on the .tex file that is exported or other
   #+options: for export that will do this edit without having to
   open the .tex file? Thank you for your help.

  I definitely don't consider myself a guru, but I had a similar
  problem. I built a function that finds and removes the empty line and
  then added this via add-hook to org-export-latex-final-hook. I suspect
  one of the real gurus can suggest a better way to do this, but this
  works for me.

  Here's my code that you can adapt as necessary.

  (defun remove-line-from-exam.tex ()

  (if (search-forward-regexp \\documentclass\[[0-9]+pt]{exam} nil t nil)
  (while (re-search-forward question\n\n nil t)
(replace-match question\n

  (add-hook 'org-export-latex-final-hook (function
  remove-line-from-exam.tex))

 Hi John,
 Many thanks for the hint. I tried something similar, it works when I
 export (using L) to temporary buffer but not when I use the usual [l] or
 [d] export options. Is there a different hook that needs to be used
 here? Many thanks.

My set-up works when I export to pdf (using the [d] export option).
Perhaps you could post your adaptation and someone can figure out why your
function doesn't work. 

--John
-- 
John Rakestraw



Re: [O] M-RET and C-RET

2011-12-02 Thread Michael Brand
Hi all

Now that I use M-RET more often when editing lists I was about trying
to make a patch to remove what seems to me an inconsistency between
headings and list items. But after I have read the docstrings of
org-insert-item and org-list-insert-item the current behavior seems so
intentional that I must have just missed some good reasons. Which are
they?

With

#+begin_src org
  ,*** abc
  ,*** def
  ,- ghi
  ,- jkl
#+end_src

M-RET on e or on k splits the line, ok. M-RET on the first *
(here also C-RET) or on - inserts a line above, ok. M-RET on d
inserts a line _below_ (and C-RET _below_ the end of the whole entry),
ok. M-RET on j inserts a line above but I expected it below. If I
want a line above I would move the point to - before doing M-RET
like I do on a heading where I move to the first * to get the insert
above.

Changing to the behavior expected by me would make it possible to add
a new list item below the last one in a list (a very frequent task)
without caring about configuring org-M-RET-may-split-line away from
its default. I configured it to nil for headline and item only to be
able to insert a new list item below the current with M-RET where I am
forced to be on or at right of k which by default splits which I
want only in very rare cases. And one should not be invited to avoid
M-RET and edit lists with - and TAB as illustrated in the thread
org-list-indent-offset only works partially:
http://thread.gmane.org/gmane.emacs.orgmode/47954

Another inconsistency in my view: Since M-RET inserts above when on
- or before I would like to see M-RET and C-RET also insert above
when on the last * (or single visible * when hidestars) or before,
not only on the first * of the line.

Michael

On Sat, Nov 26, 2011 at 20:53, sindikat sindi...@mail36.net wrote:
 You can use M-RET-may-split-line, to make it respect content in lists,

 more or less. I would guess the reason that they are different is to be
 able to always easily start a new heading.
 This is very helpful, thank you. But how to make it so M-RET will:
 1. not split line;
 2. add new list item while on plain list;
 AND
 3. add new heading after content of the current heading?
 Maybe there should be a variable in addition to 'org-M-RET-may-split-line'
 such as 'org-M-RET-add-after-content'.
 [...]



Re: [O] [bug] Symbol's function definition is void: org-pop-to-buffer-same-window

2011-12-02 Thread Kenny Meyer
According to this discussion on the mailing list,
http://comments.gmane.org/gmane.emacs.orgmode/48571 , this is a known
bug.

I fixed this by loading org-compat after requiring org-mode from
git, just like Sebastian said.

--
Kenny Meyer



On Thu, Dec 1, 2011 at 12:05 PM, Nick Dokos nicholas.do...@hp.com wrote:
 Nick Dokos nicholas.do...@hp.com wrote:

 Kenny Meyer knny.m...@gmail.com wrote:

  I am getting the same message here upon calling various org-functions
  (e.g.: org-drill, org-submit-bug-report), since I have compiled
  org-mode from git, but I am not sure where exactly the error was
  introduced.
 
   Explicitly Loading `org-compat' does cure this problem...
  Requiring org-compat does not fix that here.
  Can you tell me where exactly you loaded org-compat?
 
  Org-mode version 7.7 (release_7.7.617.gb1f2)
  GNU Emacs 24.0.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.2.0) of 
  2011-09-29
 
  --
  Kenny Meyer
 

 IIRC, the cure for macro problems like this is to


 Sorry - I thought it was a macro but it isn't. Nevertheless,
 the note below still stands.

 Nick

       make clean
       make

 (alternatively, make clean and just use uncompiled code). There might be
 something missing to cause it, but I don't think so in this case: I
 tried a minimal .emacs with the same version as above (Org-mode version
 7.7 (release_7.7.617.gb1f2) and I can start, goto the active clock and
 stop it with no errors.

 Nick


 
 
  On Thu, Dec 1, 2011 at 9:51 AM, Sebastien Vauban
  wxhgmqzgw...@spammotel.com wrote:
   Hello,
  
   In conditions which I consider unchanged (I speak of my emacs config 
   file),
   with the latest Org-mode version, I now have the message:
  
      let*: Symbol's function definition is void: 
   org-pop-to-buffer-same-window
  
   when doing, for example, `C-c C-x C-j' to jump on the currently clocked 
   item.
  
   Explicitly Loading `org-compat' does cure this problem... But we must 
   miss a
   `require' somewhere, but where?  In `org.el' itself?
  
   Best regards,
    Seb
  
   --
   Sebastien Vauban
  
  
 




[O] Org as a publishing framework, where to start?

2011-12-02 Thread Marcelo de Moraes Serpa
Hi everyone,

I'd love to use orgmode as my publishing framework for ebooks (mainly PDF).
I'd like some flexibility on defining the output. The thought of having to
use OpenOffice / Office or even Adobe Indesign to write text is daunting to
me. It might work for small reports, but for longer works, I'd rather write
it in plain text, and org just makes things easier.

I don't know where to start though. I don't have much time, and I'd like to
design a nice beautiful layout for the book. Where should I start looking?
What combos work best ? (org + LaTeX, etc) Is there any place I could get
some ready beautiful LaTeX layouts to study from that could be used from
org?

Sorry about the ignorance, I might even be using the wrong terms here, the
issue is that there's way too much information spread around, and I don't
know where to start.

Thanks,

Marcelo.


Re: [O] [bug] Symbol's function definition is void: org-pop-to-buffer-same-window

2011-12-02 Thread Nick Dokos
Kenny Meyer knny.m...@gmail.com wrote:

 According to this discussion on the mailing list,
 http://comments.gmane.org/gmane.emacs.orgmode/48571 , this is a known
 bug.
 
 I fixed this by loading org-compat after requiring org-mode from
 git, just like Sebastian said.
 

I don't think it's a bug in org: if you start with a clean copy of the
repo (make clean; make) and have your load-path pointing there, you
should not see any problems.

IIUC, Michael Bach's problem (a fairly common one, btw) was that he was
mixing different installations: he was picking up a recent org-capture
that was using org-pop-to-buffer-same-window, but an older org-compat
that did not include the definition of that function.

You have to make sure that all of the pieces come from the same place,
but there is still a gotcha in the sense that an old .elc file will
be picked up by emacs in preference to a new .el file (possibly with
a warning, but who looks at warnings?)

Hence assuming you are using git to keep up to date:

make clean
make
C-h v load-path RET
[make sure that your load path points at your git directory *first*]
M-x org-reload RET
[or perhaps safer: restart emacs]

And use M-x locate-library to make sure that emacs agrees with you about
where things are picked up from.

Nick


 --
 Kenny Meyer
 
 
 
 On Thu, Dec 1, 2011 at 12:05 PM, Nick Dokos nicholas.do...@hp.com wrote:
  Nick Dokos nicholas.do...@hp.com wrote:
 
  Kenny Meyer knny.m...@gmail.com wrote:
 
   I am getting the same message here upon calling various org-functions
   (e.g.: org-drill, org-submit-bug-report), since I have compiled
   org-mode from git, but I am not sure where exactly the error was
   introduced.
  
Explicitly Loading `org-compat' does cure this problem...
   Requiring org-compat does not fix that here.
   Can you tell me where exactly you loaded org-compat?
  
   Org-mode version 7.7 (release_7.7.617.gb1f2)
   GNU Emacs 24.0.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.2.0) of 
   2011-09-29
  
   --
   Kenny Meyer
  
 
  IIRC, the cure for macro problems like this is to
 
 
  Sorry - I thought it was a macro but it isn't. Nevertheless,
  the note below still stands.
 
  Nick
 
        make clean
        make
 
  (alternatively, make clean and just use uncompiled code). There might be
  something missing to cause it, but I don't think so in this case: I
  tried a minimal .emacs with the same version as above (Org-mode version
  7.7 (release_7.7.617.gb1f2) and I can start, goto the active clock and
  stop it with no errors.
 
  Nick
 
 
  
  
   On Thu, Dec 1, 2011 at 9:51 AM, Sebastien Vauban
   wxhgmqzgw...@spammotel.com wrote:
Hello,
   
In conditions which I consider unchanged (I speak of my emacs config 
file),
with the latest Org-mode version, I now have the message:
   
   let*: Symbol's function definition is void: 
org-pop-to-buffer-same-window
   
when doing, for example, `C-c C-x C-j' to jump on the currently 
clocked item.
   
Explicitly Loading `org-compat' does cure this problem... But we must 
miss a
`require' somewhere, but where?  In `org.el' itself?
   
Best regards,
 Seb
   
--
Sebastien Vauban
   
   
  
 
 



Re: [O] [bug] Symbol's function definition is void: org-pop-to-buffer-same-window

2011-12-02 Thread Sebastien Vauban
Hi Nick,

Nick Dokos wrote:
 Kenny Meyer knny.m...@gmail.com wrote:
 According to this discussion on the mailing list,
 http://comments.gmane.org/gmane.emacs.orgmode/48571 , this is a known
 bug.
 
 I fixed this by loading org-compat after requiring org-mode from
 git, just like Sebastian said.

 I don't think it's a bug in org: if you start with a clean copy of the
 repo (make clean; make) and have your load-path pointing there, you
 should not see any problems.

 IIUC, Michael Bach's problem (a fairly common one, btw) was that he was
 mixing different installations: he was picking up a recent org-capture
 that was using org-pop-to-buffer-same-window, but an older org-compat
 that did not include the definition of that function.

I don't see why I would suddenly have mixed paths in my .emacs file -- though
this can always happen, as it is changed almost daily, here and there.

 You have to make sure that all of the pieces come from the same place,
 but there is still a gotcha in the sense that an old .elc file will
 be picked up by emacs in preference to a new .el file (possibly with
 a warning, but who looks at warnings?)

 Hence assuming you are using git to keep up to date:

   make clean

I don't use compiled files, so problem is not that.

   make
   C-h v load-path RET

load-path's value is
(...
c:/home/sva/src/org-mode/contrib/lisp
c:/home/sva/src/org-mode/lisp
...
c:/Program Files/Emacs-24.0/lisp/org
...)

   [make sure that your load path points at your git directory *first*]

Checked.

   M-x org-reload RET
   [or perhaps safer: restart emacs]

 And use M-x locate-library to make sure that emacs agrees with you about
 where things are picked up from.

Library is file ~/src/org-mode/lisp/org-compat.el

Library is file ~/src/org-mode/lisp/org.el

It's not obvious what I would have changed for getting this now... but I'll
diff my emacs config files, if you say you don't have such a problem.

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Org as a publishing framework, where to start?

2011-12-02 Thread Russell Adams
On Fri, Dec 02, 2011 at 02:09:22PM -0600, Marcelo de Moraes Serpa wrote:
 Hi everyone,

 I'd love to use orgmode as my publishing framework for ebooks (mainly PDF).
 I'd like some flexibility on defining the output. The thought of having to
 use OpenOffice / Office or even Adobe Indesign to write text is daunting to
 me. It might work for small reports, but for longer works, I'd rather write
 it in plain text, and org just makes things easier.

 I don't know where to start though. I don't have much time, and I'd like to
 design a nice beautiful layout for the book. Where should I start looking?
 What combos work best ? (org + LaTeX, etc) Is there any place I could get
 some ready beautiful LaTeX layouts to study from that could be used from
 org?

 Sorry about the ignorance, I might even be using the wrong terms here, the
 issue is that there's way too much information spread around, and I don't
 know where to start.

 Thanks,

 Marcelo.

My advice? Start writing in Org, and don't worry too much.

Org's latex output to PDF already looks good, and should you decide
later to update to a different page layout or template those settings
are normally global and set once for the whole document.

Its a case of focus on content, and make it pretty(ier) later. ;]

Thanks.

--
Russell Adamsrlad...@adamsinfoserv.com

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

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



Re: [O] Org as a publishing framework, where to start?

2011-12-02 Thread Thomas S. Dye
Aloha Marcelo,


Marcelo de Moraes Serpa celose...@gmail.com writes:

 Hi everyone,

 I'd love to use orgmode as my publishing framework for ebooks (mainly PDF).
 I'd like some flexibility on defining the output. The thought of having to
 use OpenOffice / Office or even Adobe Indesign to write text is daunting to
 me. It might work for small reports, but for longer works, I'd rather write
 it in plain text, and org just makes things easier.

It is certainly possible to use Org-mode to produce ebooks, such as
would be read with a mobile device like a Nook or an iPad, or pdf files,
which might be thought of as electronic descriptions of printed books.

The path from Org-mode to ebook is: export to html then convert the html
to an epub format with the open-source software Calibre.  Because the
ebook readers take care of most of the formatting, there is
relatively little of that kind of work to do on the Org-mode end.


 I don't know where to start though. I don't have much time, and I'd like to
 design a nice beautiful layout for the book. Where should I start looking?
 What combos work best ? (org + LaTeX, etc) Is there any place I could get
 some ready beautiful LaTeX layouts to study from that could be used from
 org?

Designing a nice beautiful printed book layout is time-consuming and
somewhat of an art.  If you're pressed for time, then the best route
here might be to choose a LaTeX class that already looks good and then
tweak it so that it looks just right.  I've worked with the standard
LaTeX book class, with the memoir class, and with the Koma scrbook
class.  Of these, I prefer the scrbook class.  I like its page layout
algorithm (see the DIV option) and the facilities it provides for
changing the fonts for particular elements of the layout.

There is a LaTeX export tutorial on Worg that will show you how to set
up Org-mode to use scrbook (or any other class).

You might want to spend some time setting up the right font.  This isn't
trivial in the LaTeX world--some fonts lack the faces required by a
book's design, or don't support math, etc.  A good choice if you want
your book to look like a standard science text is the Times setup
illustrated in the LaTeX export tutorial.  If you'd like something a
little different and don't want to spend time hunting for the right
combination of serif, sans-serif, and typewriter fonts, then you might
want to purchase the Lucida fonts from the TeX User's Group.  This is a
very complete set of faces that supports math and will basically do
whatever a book class asks of it.
 
hth,
Tom


 Sorry about the ignorance, I might even be using the wrong terms here, the
 issue is that there's way too much information spread around, and I don't
 know where to start.

 Thanks,

 Marcelo.
 Hi everyone,I#39;d love to use orgmode as my publishing framework for ebooks 
 (mainly PDF). I#39;d like some flexibility on defining the output. The 
 thought of having to use OpenOffice / Office or even Adobe Indesign to write 
 text is daunting to me. It might work for small reports, but for longer 
 works, I#39;d rather write it in plain text, and org just makes things 
 easier.
 I don#39;t know where to start though. I don#39;t have much time, and 
 I#39;d like to design a nice beautiful layout for the book. Where should I 
 start looking? What combos work best ? (org + LaTeX, etc) Is there any place 
 I could get some ready beautiful LaTeX layouts to study from that could be 
 used from org?
 Sorry about the ignorance, I might even be using the wrong terms here, the 
 issue is that there#39;s way too much information spread around, and I 
 don#39;t know where to start.
 Thanks,Marcelo.

-- 
Thomas S. Dye
http://www.tsdye.com



[O] More specific LaTeX output classes

2011-12-02 Thread Ken Williams
If I export the following code to LaTeX:

--
#+begin_src R
CV.t.hat - rowMeans(loss)[m]
CV.t.hat
#+end_src

#+results:
: [1] 1.135857
--

, then it looks like this in the *.tex file:

--
\begin{verbatim}
CV.t.hat - rowMeans(loss)[m]
CV.t.hat
\end{verbatim}

\begin{verbatim}
 [1] 1.135857
\end{verbatim}
--

So there's no distinction between input  output, nor between various types of 
input (e.g. different programming languages).

Would it be possible for the export process to define various classes that 
default to being exactly like 'verbatim', but could be customized?  After that, 
a next step might be to provide nice defaults that do things like 
syntax-highlighting (through the 'minted' package, perhaps), or at least add a 
visual marker distinguishing between input  output.

Or of course it's possible some of this is already implemented and I've missed 
it. =)

--
Ken Williams, Senior Research Scientist
WindLogics
http://windlogics.com



CONFIDENTIALITY NOTICE: This e-mail message is for the sole use of the intended 
recipient(s) and may contain confidential and privileged information. Any 
unauthorized review, use, disclosure or distribution of any kind is strictly 
prohibited. If you are not the intended recipient, please contact the sender 
via reply e-mail and destroy all copies of the original message. Thank you.



Re: [O] [bug] Symbol's function definition is void: org-pop-to-buffer-same-window

2011-12-02 Thread Nick Dokos
Sebastien Vauban wxhgmqzgw...@spammotel.com wrote:

  I don't think it's a bug in org: if you start with a clean copy of the
  repo (make clean; make) and have your load-path pointing there, you
  should not see any problems.
 
  IIUC, Michael Bach's problem (a fairly common one, btw) was that he was
  mixing different installations: he was picking up a recent org-capture
  that was using org-pop-to-buffer-same-window, but an older org-compat
  that did not include the definition of that function.
 
 I don't see why I would suddenly have mixed paths in my .emacs file -- though
 this can always happen, as it is changed almost daily, here and there.
 
  You have to make sure that all of the pieces come from the same place,
  but there is still a gotcha in the sense that an old .elc file will
  be picked up by emacs in preference to a new .el file (possibly with
  a warning, but who looks at warnings?)
 
  Hence assuming you are using git to keep up to date:
 
  make clean
 
 I don't use compiled files, so problem is not that.
 
  make
  C-h v load-path RET
 
 load-path's value is
 (...
 c:/home/sva/src/org-mode/contrib/lisp
 c:/home/sva/src/org-mode/lisp
 ...
 c:/Program Files/Emacs-24.0/lisp/org
 ...)
 
  [make sure that your load path points at your git directory *first*]
 
 Checked.
 
  M-x org-reload RET
  [or perhaps safer: restart emacs]
 
  And use M-x locate-library to make sure that emacs agrees with you about
  where things are picked up from.
 
 Library is file ~/src/org-mode/lisp/org-compat.el
 
 Library is file ~/src/org-mode/lisp/org.el
 
 It's not obvious what I would have changed for getting this now... but I'll
 diff my emacs config files, if you say you don't have such a problem.
 

It is possible that any particular pull from the git repo will get you
a buggy version - so when I said it's not a bug, I should have said:
it's not a bug with the version that I tested at the time. That's
reason #357 for *always* reporting the org version one is using.

With that caveat stated, if the steps above don't resolve the problem,
then it might be a bug in org, but, given the history of problems with
mixed installs[fn:1], it behooves one to make sure that one's install does
*not* have that problem: locate-library is your friend.

And, fwiw, I don't see the problem with Org-mode version 7.7
(release_7.7.617.gb1f2).

Nick

Footnotes:

[fn:1] ... assuming I have not misinterpreted the underlying cause of
   Michael Bach's problem in the thread that Kenny Myers quoted, of
   course.



Re: [O] More specific LaTeX output classes

2011-12-02 Thread Niels Giesen
Ken Williams ken.willi...@windlogics.com writes:


[...]

 Would it be possible for the export process to define various classes
 that default to being exactly like 'verbatim', but could be
 customized? After that, a next step might be to provide nice defaults
 that do things like syntax-highlighting (through the 'minted' package,
 perhaps), or at least add a visual marker distinguishing between input
  output.

 Or of course it's possible some of this is already implemented and I've 
 missed it. =)

Yes it is:

#+begin_src emacs-lisp
  (setq org-export-latex-listings 'minted)
  (add-to-list 'org-export-latex-packages-alist '( minted)
#+end_src

See also `org-export-latex-listings-langs' for a mapping of Emacs modes
to languages known to pygmentize.

Also see

C-h v org-export-latex-listings RET

for more information (e.g. about the --shell-escape option you'll have
to pass to the LaTeX process).

Regards, Niels.
-- 
http://pft.github.com/



Re: [O] More specific LaTeX output classes

2011-12-02 Thread Nick Dokos
Niels Giesen niels.gie...@gmail.com wrote:

 Ken Williams ken.willi...@windlogics.com writes:
 
 
 [...]
 
  Would it be possible for the export process to define various classes
  that default to being exactly like 'verbatim', but could be
  customized? After that, a next step might be to provide nice defaults
  that do things like syntax-highlighting (through the 'minted' package,
  perhaps), or at least add a visual marker distinguishing between input
   output.
 
  Or of course it's possible some of this is already implemented and I've 
  missed it. =)
 
 Yes it is:
 
 #+begin_src emacs-lisp
   (setq org-export-latex-listings 'minted)
   (add-to-list 'org-export-latex-packages-alist '( minted)
 #+end_src
 

NB: there's a closing paren missing in the add-to-list line.

 See also `org-export-latex-listings-langs' for a mapping of Emacs modes
 to languages known to pygmentize.
 
 Also see
 
 C-h v org-export-latex-listings RET
 
 for more information (e.g. about the --shell-escape option you'll have
 to pass to the LaTeX process).
 

Thanks for this (and the pointers that you - and others? - have
provided previously): it finally motivated me to try out minted.

One problem I ran into was that the version of minted.sty that I have
uses which -s to find pygmentize, ``which'' complains about -s and the
run fails. I ended up editing minted.sty to get rid of the -s and
everything works smoothly.

The version I have says

\ProvidesPackage{minted}[2010/01/27 v1.6 Yet another Pygments shim for LaTeX]

I checked CTAN and the most recent version is 1.7: that has excised the -s.

Nick




[O] Emacs Prelude

2011-12-02 Thread SndChaser
Is anybody here using Bozhidar Batsov's Emacs Prelude? 
(https://github.com/bbatsov/emacs-prelude)


The reason I as is: by default it disables the Up, Down, Left, right 
keys (in order to try to for users to learn the C-N, C-P, C-F, C-B, etc. 
keys).  This, of course, messes with the structure editing keys (M-Up, 
M-Left, M-S-Up, etc.) So, being a relative n00b to emacs, this brings 
about two questions:


1) Is there a way I can re-hook these keys, just to make them active in 
Org-Mode?


-Or -

2) Has someone bound: org-do-promote, org-do-demote, 
org-promote-subtree. org-demote-subtree, org-move-subtree-up and 
org-move-subtree-down to another set of keys that is as handy / workable 
as the original bindings?


George

--
We need to heed the words of the Dalai Lama,
Or at least, the words of your mama.



Re: [O] how to show deadlines in global to-do list?

2011-12-02 Thread James Harkins
At Fri, 02 Dec 2011 12:01:05 -0500,
emacs-orgmode-requ...@gnu.org wrote:
 Date: Fri, 2 Dec 2011 03:01:36 + (UTC)
 From: Herbert Sitz hes...@gmail.com
 To: emacs-orgmode@gnu.org
 Subject: Re: [O] how to show deadlines in global to-do list?
 
 James Harkins jamshark70 at gmail.com writes:
 
  I like the out-of-the-box to-do list, except one thing: I would like
  to see the items' deadlines. The weekly agenda view shows the
  deadlines, but I need a view where I can see *only* to-do items and
  their deadlines.
  
 Here is one way:
 
 Include this line in your org-file's config lines, or just stick it in if you
 don't have config-line block:
 
 #+COLUMNS: %45ITEM %18DEADLINE
... snip

Thanks, that's very helpful. It means I can focus my documentation searches on 
a couple of options rather than several dozen :)  -- now that I know that to-do 
+ column view is a good way (if not the best way).

James


--
James Harkins /// dewdrop world
jamshar...@dewdrop-world.net
http://www.dewdrop-world.net

Come said the Muse,
Sing me a song no poet has yet chanted,
Sing me the universal.  -- Whitman

blog: http://www.dewdrop-world.net/words
audio clips: http://www.dewdrop-world.net/audio
more audio: http://soundcloud.com/dewdrop_world/tracks



[O] new ikiwiki export plugin for org

2011-12-02 Thread Chris Gray
Hello,

I've created a new export plugin for org-mode files for the ikiwiki wiki
compiler.  It's in a very preliminary state at
https://github.com/chrismgray/ikiwiki-org-plugin

Just to prove that it is working to some extent, I am currently using it
to generate my blog at http://chrismgray.github.com

When it actually works properly, it will have a few advantages over the
perl plugin originally authored by Manoj Srivastiva.  First, it should
be faster.  The perl plugin starts a new emacs process for every org
file that it encounters.  The new plugin talks to an emacs instance
using emacsclient and xml-rpc.  Having the bulk of the work being done
inside emacs also means that org-mode can expose its internal structure
to the plugin, so getting things like the title and other metadata is
much easier than writing another org-mode parser in perl.

Anyway, I don't know if there are any other users of ikiwiki on this
list, but I hope someone might find it useful.

Cheers,
Chris