Re: [O] [RFC] Org version of the Org manual

2013-03-05 Thread Yagnesh Raghava Yakkala

Hello Thomas,

> These instructions assume more knowledge than I have. Could you be more
> specific about "in the Org worktree"? Should I create a branch where I
> do this? Or, should I put this in one of the upstream branches and
> arrange to push it into the Org repo?  In any case, can you suggest a
> location?  /contrib?  /doc?

IIUC, Achim means,

--8<---cut here---start->8---
cd /source/directory/of/org-mode
git clone http:github.com/tsdye/orgmanual  # or your most updated repo of 
orgmanual

git submodule add orgmanual# optional
git commit -m "Commit Message" # optional

cd orgmanual
Create_Makefile# [1] 
ln -s ../doc/org-version.inc .

cd ..
update_local.mk_file   # [2]
make orgmanual
--8<---cut here---end--->8---

For me also texi2dvi failed, but orgmanual.info is generated fine and looks
great.

Given texi generation is very slow, I wonder which format of manual will be
included in Emacs trunk.?

Anyway, very nice to see org manual in org Format. 

Thanks.,

[1],[2] are code bits from Achim's mail.

-- 
ఎందరో మహానుభావులు అందరికి వందనములు.
YYR



Re: [O] [new exporter] ignoring a headline on export to PDF via?latex

2013-03-05 Thread Charles Berry
Suvayu Ali  gmail.com> writes:

> 
> On Tue, Mar 05, 2013 at 08:58:28PM +, Charles Berry wrote:
> 
> [...]
> 
> > FWIW, I defun'ed filters like the above for all of the filter functions

[...]

> > if anyone is interested, I can post or upload somewhere.
> 
> That would be wonderful!
> 
> You could put them up on Worg.  This section on org-hacks would be
> appropriate: .  If you
> do not have access to Worg, you can post the content in Org format on
> the list and I can add it.

I added to org-hacks.org at the bottom of ** Exporting org files. I tried to
push to worg but got a permission error - its been years since I last pushed
anything, so something on my end probably needs to be updated.

I've posted the file at:

https://raw.github.com/chasberry/orgmode-accessories/master/filter-markup.org

If you would like to put it in org-hacks, I'd appreciate it.







[O] [PATCH] ox-latex: Support tikz images, :width, and :height

2013-03-05 Thread Aaron Ecay
* ox-latex.el:
(org-latex-image-default-option): Change default value to ""
(org-latex-image-default-width)
(org-latex-image-default-height): Add variables
(org-latex-inline-image-rules): Make .tikz files as exportable with
latex
(org-latex--inline-image): Support tikz images.  Also support separate
:width and :height parameters for images.

* ob-R.el (org-babel-R-construct-graphics-device-call): Change file
extension of tikz graphics files to .tikz

Tikz graphics should be exported to LaTeX by \include, not as a link.
This commit changes the file extension used for tikz graphics from .tex
to .tikz, and inserts code for including such images.  The :options for
tikz graphics are passed as an optional argument to a tikzpicture
environment.

Also provide :width and :height ATTR_LATEX entries for images.  For tikz
graphics, these are implemented with \resizebox; for other image types
they are inserted in the optional arguments to \includegraphics.
---
 lisp/ob-R.el |   2 +-
 lisp/ox-latex.el | 111 ---
 2 files changed, 83 insertions(+), 30 deletions(-)

diff --git a/lisp/ob-R.el b/lisp/ob-R.el
index 8db0853..9875f81 100644
--- a/lisp/ob-R.el
+++ b/lisp/ob-R.el
@@ -237,7 +237,7 @@ current code buffer."
 '((:bmp . "bmp")
   (:jpg . "jpeg")
   (:jpeg . "jpeg")
-  (:tex . "tikz")
+  (:tikz . "tikz")
   (:tiff . "tiff")
   (:png . "png")
   (:svg . "svg")
diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index 8a5b6a6..47b8bb1 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -77,15 +77,19 @@
 ;; (i.e. "inparaenum").  The second one allows to specify optional
 ;; arguments for that environment (square brackets are not mandatory).
 ;;
-;; Images accept `:float', `:placement', `:comment-include', and
-;; `:options' as attributes.  `:float' accepts a symbol among `wrap',
-;; `multicolumn', and `figure', which defines the float environment
-;; for the table (if unspecified, an image with a caption will be set
-;; in a "figure" environment).  `:comment-include' is a boolean that
-;; toggles whether to comment out the \includegraphics
-;; call.  `:placement' is a string that will be used as argument for
-;; the environment chosen.  `:options' is a string that will be used
-;; as the optional argument for "includegraphics" macro.
+;; Images accept `:float', `:placement', `:comment-include', `:width',
+;; and `:height', and `:options' as attributes.  `:float' accepts a
+;; symbol among `wrap', `multicolumn', and `figure', which defines the
+;; float environment for the image (if unspecified, an image with a
+;; caption will be set in a "figure" environment).  `:comment-include'
+;; is a boolean that toggles whether to comment out the code which
+;; actually includes the image. `:placement' is a string that will be
+;; used as argument for the environment chosen.  `:width' and
+;; `:height' control the width and height of the image.  `:options' is
+;; a string that will be used as the optional argument for
+;; "includegraphics" macro or (in the case of tikz images), used as
+;; the optional argument for a `tikzpicture' environment which will
+;; surround the "\input" picture code.
 ;;
 ;; Special blocks accept `:options' as attribute.  Its value will be
 ;; appended as-is to the opening string of the environment created.
@@ -472,18 +476,28 @@ which format headlines like for Org version prior to 8.0."
 
  Links
 
-(defcustom org-latex-image-default-option "width=.9\\linewidth"
+(defcustom org-latex-image-default-option ""
   "Default option for images."
   :group 'org-export-latex
   :type 'string)
 
+(defcustom org-latex-image-default-width ".9\\linewidth"
+  "Default width for images."
+  :group 'org-export-latex
+  :type 'string)
+
+(defcustom org-latex-image-default-height ""
+  "Default height for images."
+  :group 'org-export-latex
+  :type 'string)
+
 (defcustom org-latex-default-figure-position "htb"
   "Default position for latex figures."
   :group 'org-export-latex
   :type 'string)
 
 (defcustom org-latex-inline-image-rules
-  '(("file" . "\\.\\(pdf\\|jpeg\\|jpg\\|png\\|ps\\|eps\\)\\'"))
+  '(("file" . "\\.\\(pdf\\|jpeg\\|jpg\\|png\\|ps\\|eps\\|tikz\\)\\'"))
   "Rules characterizing image files that can be inlined into LaTeX.
 
 A rule consists in an association whose key is the type of link
@@ -1751,6 +1765,7 @@ used as a communication channel."
 (path (let ((raw-path (org-element-property :path link)))
 (if (not (file-name-absolute-p raw-path)) raw-path
   (expand-file-name raw-path
+(filetype (file-name-extension path))
 (caption (org-latex--caption/label-string parent info))
 ;; Retrieve latex attributes from the element around.
 (attr (org-export-read-attribute :attr_latex parent))
@@ -1768,32 +1783,70 @@ used as a communication channel."
   (format "[%s]" org-latex-default-figure-position)

Re: [O] [new exporter] [html] Tables of Contents

2013-03-05 Thread Jambunathan K

>> This gives a significant advantage in that authors can link to the
>> various instances just by knowing their own usage.  For instance, if
>> they provided a top-level toc at the beginning of their book, and a
>> deeper-level toc later on, they could link to each separately by id by
>> knowing this plan.
>
> This seems like a valid use-case.  

Brainstorimg here: Why not export a subtree (with displaced section
numbers) and splice the exported strings together to produce the
compelete document.

Subtree export of headline 1, but with section numbers starting at 1.
Subtree export of headline 2, but with section numbers starting at 2.
Splice them together.



There are books where each chapter could be written by different
authors.  The chapters are later spliced together to produce the master
document.  In case of OpenDocument, such files have *.odm extension.  I
can look up what the OpenDocument spec says or LibreOffice does.





[O] [PATCH] * lisp/org-src.el (org-edit-src-exit): disable undo.

2013-03-05 Thread Aaron Ecay
Currently, this function modifies the buffer-undo-list, which it should
not.  One can reproduce the undesirable behavior by creating a new org
buffer and manually typing in the following text:

#+begin_src emacs-lisp
  foo
  bar
#+end_src

Then press C-c ' twice to enter and exit the edit-src.  Then press C-/
to undo: the cursor moves to the beginning of the source block.  Further
presses of C-/ undo the original text entry (as expected).
---
 lisp/org-src.el | 11 ++-
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/lisp/org-src.el b/lisp/org-src.el
index 81c0054..73e0751 100644
--- a/lisp/org-src.el
+++ b/lisp/org-src.el
@@ -737,11 +737,12 @@ with \",*\", \",#+\", \",,*\" and \",,#+\"."
   (kill-buffer buffer))
 (goto-char beg)
 (when allow-write-back-p
-  (delete-region beg (max beg end))
-  (unless (string-match "\\`[ \t]*\\'" code)
-   (insert code))
-  (goto-char beg)
-  (if single (just-one-space)))
+  (let ((buffer-undo-list t))
+   (delete-region beg (max beg end))
+   (unless (string-match "\\`[ \t]*\\'" code)
+ (insert code))
+   (goto-char beg)
+   (if single (just-one-space
 (if (memq t (mapcar (lambda (overlay)
  (eq (overlay-get overlay 'invisible)
  'org-hide-block))
-- 
1.8.1.5




Re: [O] [new exporter] [html] Tables of Contents

2013-03-05 Thread Jambunathan K

Torrey

>>> One small problem, though: I see that if there is a TOC at the top and
>>> then one included later using #+TOC, the exporter gives them both the
>>> same id ().  Duplicate ID's makes the XML
>>> invalid.
>>
>> What do you suggest instead? id="table-of-contents-1" for the first
>> #+TOC: keyword and so on?

Why do you need two table of contents?

> This gives a significant advantage in that authors can link to the
> various instances just by knowing their own usage.  For instance, if
> they provided a top-level toc at the beginning of their book, and a
> deeper-level toc later on, they could link to each separately by id by
> knowing this plan.

This seems like a valid use-case.  

I would recommend that you just specify just the use-case and leave out
the "how"s of implementation.

Put your user hat and set aside the developer's hat.
-- 



[O] [PATCH] * lisp/org.el (org-set-font-lock-defaults): include link targets

2013-03-05 Thread Aaron Ecay
The org-target face is created in org-faces.el, but never used for
font-locking.  This patch fixes that.
---
 lisp/org.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lisp/org.el b/lisp/org.el
index 3959c17..5399177 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -6056,6 +6056,8 @@ needs to be inserted at a specific position in the 
font-lock sequence.")
   (if (memq 'radio lk) '(org-activate-target-links (0 'org-link t)))
   (if (memq 'date lk) '(org-activate-dates (0 'org-date t)))
   (if (memq 'footnote lk) '(org-activate-footnote-links))
+   ;; Link targets
+   (list org-any-target-regexp '(0 'org-target t))
   '("^&?%%(.*\\|<%%([^>\n]*?>" (0 'org-sexp-date t))
   '(org-hide-wide-columns (0 nil append))
   ;; TODO keyword
-- 
1.8.1.5




Re: [O] [PATCH] ox-latex: provide width and height options for images

2013-03-05 Thread aaronecay
2013ko otsailak 27an, Nicolas Goaziou-ek idatzi zuen:

> Thank you for your patch. Here are a few comments.

Thank you for the comments! I think the patch is simpler and better
thanks to them.

> 
>> These are implemented with \resizebox, and thus are uniform across
>> different types of image inclusion (\includegraphics, \input of tikz
>> images).  This differs from the older way of using width and height
>> optional args to \includegraphics.
> 
> I tend to agree with Rasmus. It would be better to keep height and
> width options in \includegraphics when possible.

Okay.

> 
>> Thus, the default value for org-latex-image-default-options is left
>> untouched, to avoid breaking compatibility with older code.  After a
>> transition period, the 0.9\linewidth value should be moved into
>> org-latex-image-default-width, and the -options variable set to the
>> empty string.
> 
> We don't need this precaution. The exporter code for 8.0 introduced
> many incompatibilities already. Also, this one is easy to discover.

Okay.

> 
> I think it's a good step forward. It will need to be documented in the
> comments at the beginning of ox-latex.el, where all attributes
> properties relative to different syntactical elements are explained.

Okay – see what you think of the documentation in the new patch.

> 
> Here, you can obtain \resizebox{!}{!}{%s}, which is wrong, isn't it?

No...it is a no-op.  That said, the code should no longer do this.

> 
> This needs to be changed as these options would interfere with :width
> argument. For example, (eq float 'float) could set :width property if
> it is undefined. Obviously, this means the check has to be done before
> WIDTH and HEIGHT strings are built.

This should now be handled.  The new patch will follow this email.  In
related news, I have completed the FSF copyright assignment process, so
the patch can be merged whenever it is deemed ready.

Thanks again,

-- 
Aaron Ecay



[O] [PATCH] * lisp/ob-core.el (org-babel-execute-src-block): insert hash for silent results

2013-03-05 Thread Aaron Ecay
In order for the cache feature to work, the hash of a finished
computation must be inserted.  But, this is not currently done for src
blocks which have the option :results none.  Thus, we should insert a
dummy empty result for these blocks, which will hold the hash.
---
 lisp/ob-core.el | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lisp/ob-core.el b/lisp/ob-core.el
index 3b7c463..eabfc05 100644
--- a/lisp/ob-core.el
+++ b/lisp/ob-core.el
@@ -576,7 +576,10 @@ block."
(if (member "none" result-params)
(progn
  (funcall cmd body params)
- (message "result silenced"))
+ (message "result silenced")
+ (when cachep
+   (org-babel-insert-result
+"" result-params info new-hash indent lang)))
(setq result
  ((lambda (result)
 (if (and (eq (cdr (assoc :result-type params)) 'value)
-- 
1.8.1.5




[O] Block agendas and filtering

2013-03-05 Thread Thomas Moyer
Is it possible to have a block agenda that contains two daily/weekly
agendas that are "opposites" of each other, based on something like a
tag? For example I have my normal todo list things that are scheduled,
and then I have other regular things, like cleaning and taking care of
other tasks that occur every week. Below is an example

* Tasks
** File paperwork
SCHEDULED: <2013-05-17 Fri>
** Build model airplane
SCHEDULED: <2013-05-18 Sat>
* Regular chores:chores:
** Dishes
<%%(member (calendar-day-of-week date) '(0 1 2 3 4 5 6))>
** Laundry
<%%(= 6 (calendar-day-of-week date))>

What I want is a block agenda, using two agenda blocks. The first will
*exclude* the entrys tagged as :chores: and the second will *include*
any entry that is tagged with :chores:.

Is there a way to accomplish this with tags, or maybe properties?

Thanks!

-Tom



[O] Using org-map-entries with org-export-before-processing-hook

2013-03-05 Thread Eric Abrahamsen
I've attached a minimum org file that shows what I'm trying to do:
essentially to attach a hook to the export process that ends up calling
org-map-entries to make alterations to the file just before it's
exported.

As I've got it now, the hook does change the org buffer, but those
changes are *not* reflected in the exported output. I can only guess
that somehow the export process is able to continue on before the
org-map-entries results are returned? Doesn't seem likely, but...

This is actually kind of the opposite of what I'd like: to have the
changes *only* reflected in the export, and leave the original buffer
unchanged. On the other hand, I can see what thought and care has gone
into setting up a clone buffer for export (and I do need to rely on
buffer-local variables), so maybe an (undo) is my best solution for
returning the buffer to its pre-export state.

But I would like the changes to show up in the exported file!

Thanks in advance,

Eric



test2.org
Description: Lotus Organizer


Re: [O] [RFC] Org version of the Org manual

2013-03-05 Thread Thomas S. Dye
Hi Achim,

Achim Gratz  writes:

> Thomas S. Dye writes:
> […]
>> I look forward to picking this project up again in a week or so, or
>> learning from my Org colleagues that the project ought to be scuttled.
>
> Hi Tom,
>
> this looks good.

Thanks for reviewing a work in progress.  I'm really pleased it looks
good to you.

>
> I've implemented a rough draft of a Makefile that integrates with the
> build system (a clean target is still missing, etc.pp.).  To use, clone
> orgmanual.git in the Org worktree (don't add it, or add as a submodule),
> then drop this Makefile into orgmanual/:

These instructions assume more knowledge than I have. Could you be more
specific about "in the Org worktree"? Should I create a branch where I
do this? Or, should I put this in one of the upstream branches and
arrange to push it into the Org repo?  In any case, can you suggest a
location?  /contrib?  /doc?

>
> BEXP=$(BATCH) \
>   --eval '(add-to-list '"'"'load-path "../lisp")' \
>   --eval '(setq org-footnote-auto-adjust nil)' \
>   -l ox-texinfo \
>   --eval '(add-to-list '"'"'org-export-snippet-translation-alist 
> '"'"'("info" . "texinfo"))'
> ORG2TEXI=-f org-texinfo-export-to-texinfo
> ORG2INFO=--eval "(org-texinfo-compile \"./$<\")"
>
> orgmanual.texi:   orgmanual.org
>   $(BEXP) $< $(ORG2TEXI)
> orgmanual.info:   orgmanual.texi
> # $(BEXP) $< $(ORG2INFO)
>   $(MAKEINFO)  --no-split $< -o $@
> orgmanual.pdf:LC_ALL=C# work around a bug in texi2dvi
> orgmanual.pdf:LANG=C  # work around a bug in texi2dvi
> orgmanual.pdf:orgmanual.texi
>   $(TEXI2PDF) $<

This seems straightforward.

>
> Also make a link (for now) to ../doc/org-version.inc and add this to
> local.mk:
>
> .PHONY:   orgmanual
> orgmanual:
>   $(MAKE) -C $@ $@.info $@.pdf
>

I can do this, but then the orgmanual.info generated from the source
will indicate the wrong version. Is that OK? I have instructions from
Bastien how to cull all the changes to org.texi that have taken place
since I started translating the manual to org several months ago. When
I'm done going through those, then the link will indicate the correct
version.

>
> A "make orgmanual" then exports to orgmanual.texi (slowly) and an info
> file is produced by makeinfo, but texi2dvi does not want to produce a
> PDF yet and errors out.  The info file contains a few easily spotted
> mistakes in the macro section like "~@{@{@{name(arg1,arg2)@~@}@}}" that
> are quite probably the source of some of these errors.

Thanks, I found these and have corrected them.  There are probably more ...

All the best,
Tom

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



Re: [O] [new exporter] #+TOC in beamer export

2013-03-05 Thread Nicolas Goaziou
Hello,

Suvayu Ali  writes:

> On Tue, Mar 05, 2013 at 10:53:42PM +0100, Andreas Leha wrote:
>> Nicolas Goaziou  writes:
>> > Andreas Leha  writes:
>> >
>> >> from a recent thread I learned about #+TOC (there's always something new
>> >> to learn about org mode).
>> >>
>> >> I'd like to use it in a beamer document.  Here I find it hard to use
>> >> because it introduces its own frame.
>> >>
>> >> My question basically is:  How is this supposed to be used in a beamer
>> >> doc?
>> >> (And would it not be easier if it did not introduce its own frame?)
>> >
>> > It seems useful to keep frame around TOC generated from toc:t option.
>> > But we could remove it from TOC generated from #+TOC keywords.
>> >
>> 
>> Thanks for taking this further.  Indeed, for the toc:t triggered TOC the
>> frame is absolutely useful.
>
> I'm not sure what a \tableofcontents outside a frame would look like.
> Can someone show an example?

I think that the idea behind a frameless TOC is that you provide your
own frame for it.

It makes sense since #+TOC: allows to control accurately the location of
your table of contents.

> I also had another thought; sometimes for long presentations, I use
> something like this:
>
>   \AtBeginSubsection[]{
> \ifthenelse{
>   \(\value{section}=1\)\AND\(\value{subsection}=1\)
> }{}
> {
>   \begin{frame}
> \frametitle{Outline}
> \tableofcontents[currentsubsection]
>   \end{frame}
> }
>   }
>
> At the moment I put it in as one long LaTeX_HEADER line.  But would it
> be possible to leverage #+TOC: into having a similar effect?  It might
> then provide a greater degree of control where you want the toc frame to
> appear.

I think this kind of control should really belong to specific latex
code.

A TOC limited to current section sure sounds seducing, but I'm not sure
how to achieve this in LaTeX.


Regards,

-- 
Nicolas Goaziou



Re: [O] [Bug] beamer backend and org-reload

2013-03-05 Thread Nicolas Goaziou
Hello,

Suvayu Ali  writes:

> Hi Achim,
>
> On Tue, Mar 05, 2013 at 07:26:54PM +0100, Achim Gratz wrote:
>> Suvayu Ali writes:
>> > That said, I have noticed something odd about the new exporter and
>> > org-reload.  I think with the new exporter after doing org-reload, org
>> > related config is not reloaded properly.
>> 
>> Config is not reloaded at all (and never has been), any configuration
>> variables that are already existing are not touched when the file gets
>> reloaded.
>> 
>> > This borks the Org instance.  This is more visible when using the
>> > Beamer backend since it requires customisation of org-latex-classes by
>> > the user.  One of these days, I'll try to come up with a proper recipe
>> > to reproduce this.
>> 
>> Please do, this should not happen.
>
> Here is the recipe:
>
> 1. emacs -nw -Q -l ~/minimal-org.el
>
>;;; minimal-org.el: Minimal setup to load latest `org-mode'
>
>;;; Code:
>(setq debug-on-error t
>  debug-on-signal nil
>  debug-on-quit nil)
>
>(add-to-list 'load-path (expand-file-name "~/build/org-mode/lisp"))
>
>(require 'ox-beamer)
>(add-to-list 'org-latex-classes
> '("beamer"
>   "\\documentclass\[presentation\]\{beamer\}"
>   ("\\section\{%s\}" . "\\section*\{%s\}")
>   ("\\subsection\{%s\}" . "\\subsection*\{%s\}")
>   ("\\subsubsection\{%s\}" . "\\subsubsection*\{%s\}")))
>
> 2. C-x C-f some-file.org RET
> 3. Now try to export: C-c C-e.  You can see menu options for beamer export.
> 4. Now reload Org: C-c C-x !.  Try step 3 again.  You will notice the
>entries for beamer is missing.

This should be fixed in master. Thank you.


Regards,

-- 
Nicolas Goaziou



Re: [O] New html exporter and filters

2013-03-05 Thread Rick Frankel
On Tue, Mar 05, 2013 at 09:16:16AM +0100, Nicolas Goaziou wrote:
> Rick Frankel  writes:

> > On the other hand, it would be easier if ox-html were modified so that
> > org-html-headline uses a variable (or callback) for the format of the
> > wrapper (currently " > generation. This would add flexibility for inherited backends as well
> > as allow for more "html5ish" structures (e.g.,  and 
> > instead of generic ).
> 
> Wouldn't it be simpler to just fork `org-html-headline' in your back-end
> in order to replace the divs with something you need?

Well, `org-html-headline' does a lot and I'm trying to rewrite as
little as possible. Actually, i already wrap `org-html-headline', so i
could fix the :CUSTOM_ID on the way in. I think i was looking for a
solution to both the wrapper element and id in the same place (a
filter).

> On the other hand, there are a couple of variables providing a way to
> modify divs ids in ox-html.el. I suppose one more doesn't hurt. It may
> be even better to collect them in a single defcustom.
> 
> What do you think?

What I think is missing is a way to customize the element used for the
wrapper, and possiblly the id/class prefixes.  The simple solution
would be to add an `org-headline-wrapper-element' customization
(defaulting to "div"), or if allowing change to the id and class:

   '("div" "outline-container-%s" "outline-%d").

If you were to over-engineer it,something along the lines of the way
the latex exporter specifies the headline hierarchies for one of the 
document classes would work :}

Likewise, it would make sense for the `org-html-divs' to become a list
of '(element . class) instead of a list of just classes. e.e.g

(defcustom org-html-divs '(("header" . "preamble")
   ("section" . "content")
   ("footer" . "postamble"))

Rick



Re: [O] [new exporter] ignoring a headline on export to PDF via latex

2013-03-05 Thread Nicolas Goaziou
Hello,

Eric S Fraga  writes:

> I used to use the following to ignore a headline when exporting to PDF:
>
> #+begin_src emacs-lisp
> (defun my-e-latex-headline (headline contents info)
>   (if (member "ignoreheading" (org-element-property :tags headline)) contents
> (org-latex-headline headline contents info)))
> (add-to-list 'org-latex-translate-alist '(headline . my-e-latex-headline))
> #+end_src
>
> With the new exporter, this no longer works.
>
> On the mailing list, I found this thread from a couple of months ago:
>
> http://comments.gmane.org/gmane.emacs.orgmode/62742
>
> but I do not want to create a new backend just for this.  Is there an
> equivalent solution to the above with the new exporter?  Nicolas, you do
> imply that there is but you leave it as an exercise for the reader.  As
> much as I appreciate the pedagogical nature of your response, this
> reader is not up to the task and a solution would be greatly
> appreciated!

Indeed, this won't work anymore: `org-latex-translate-alist' has been
removed. The equivalent would just be to use a defadvice:

#+begin_src emacs-lisp
(defadvice org-latex-headline (around my-latex-skip-headlines
  (headline contents info) activate)
  (if (member "ignoreheading" (org-element-property :tags headline))
  (setq ad-return-value contents)
ad-do-it))
#+end_src

Another approach is, as mentioned by Charles Berry, to remove the first
line of transcoded headline when it contains "ignoreheading".

#+begin_src emacs-lisp
(defun org-latex-ignore-heading-filter-headline (headline backend info)
"Strip headline from HEADLINE. Ignore BACKEND and INFO."
(when (and (org-export-derived-backend-p backend 'latex)
   (string-match "\\`.*ignoreheading.*\n" headline))
  (replace-match "" nil nil headline)))
(add-to-list 'org-export-filter-headline-functions
 'org-latex-ignore-heading-filter-headline)
#+end_src


Regards,

-- 
Nicolas Goaziou



Re: [O] [new exporter] #+TOC in beamer export

2013-03-05 Thread Suvayu Ali
On Tue, Mar 05, 2013 at 10:53:42PM +0100, Andreas Leha wrote:
> Nicolas Goaziou  writes:
> > Andreas Leha  writes:
> >
> >> from a recent thread I learned about #+TOC (there's always something new
> >> to learn about org mode).
> >>
> >> I'd like to use it in a beamer document.  Here I find it hard to use
> >> because it introduces its own frame.
> >>
> >> My question basically is:  How is this supposed to be used in a beamer
> >> doc?
> >> (And would it not be easier if it did not introduce its own frame?)
> >
> > It seems useful to keep frame around TOC generated from toc:t option.
> > But we could remove it from TOC generated from #+TOC keywords.
> >
> 
> Thanks for taking this further.  Indeed, for the toc:t triggered TOC the
> frame is absolutely useful.

I'm not sure what a \tableofcontents outside a frame would look like.
Can someone show an example?

I also had another thought; sometimes for long presentations, I use
something like this:

  \AtBeginSubsection[]{
\ifthenelse{
  \(\value{section}=1\)\AND\(\value{subsection}=1\)
}{}
{
  \begin{frame}
\frametitle{Outline}
\tableofcontents[currentsubsection]
  \end{frame}
}
  }

At the moment I put it in as one long LaTeX_HEADER line.  But would it
be possible to leverage #+TOC: into having a similar effect?  It might
then provide a greater degree of control where you want the toc frame to
appear.

Cheers,

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] [Bug] beamer backend and org-reload

2013-03-05 Thread Suvayu Ali
Hi Achim,

On Tue, Mar 05, 2013 at 09:50:29PM +0100, Achim Gratz wrote:
> Suvayu Ali writes:
> >(add-to-list 'org-latex-classes
> > '("beamer"
> >   "\\documentclass\[presentation\]\{beamer\}"
> >   ("\\section\{%s\}" . "\\section*\{%s\}")
> >   ("\\subsection\{%s\}" . "\\subsection*\{%s\}")
> >   ("\\subsubsection\{%s\}" . "\\subsubsection*\{%s\}")))
> 
> Pilot error, I'd say: org-latex-classes is a defcustom, I don't think it
> is a good idea to muck with the data directly (it doesn't have
> getter/setter methods IIRC, but still).  So what happens when you add
> the beamer classes properly, via customize — and then do an org-reload?

I see the same problem when I put the following in my minimal-org.el

(custom-set-variables
 '(org-latex-classes (quote (("beamer" "\\documentclass[presentation]{beamer}" 
("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") 
("\\subsubsection{%s}" . "\\subsubsection*{%s}")) ("chapter" 
"\\documentclass[11pt]{report}" ("\\chapter{%s}" . "\\chapter*{%s}") 
("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") 
("\\subsubsection{%s}" . "\\subsubsection*{%s}")) ("article" 
"\\documentclass[11pt]{article}" ("\\section{%s}" . "\\section*{%s}") 
("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . 
"\\subsubsection*{%s}") ("\\paragraph{%s}" . "\\paragraph*{%s}") 
("\\subparagraph{%s}" . "\\subparagraph*{%s}")) ("report" 
"\\documentclass[11pt]{report}" ("\\part{%s}" . "\\part*{%s}") ("\\chapter{%s}" 
. "\\chapter*{%s}") ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . 
"\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}")) ("book" 
"\\documentclass[11pt]{book}" ("\\part{%s}" . "\\part*{%s}") ("\\chapter{%s}" . 
"\\chapter*{%s}") ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . 
"\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
)

I did encounter another curious problem though.  When in the customise
buffer I try to add a new class, I get a customize interface similar to
what is shown below.

  [INS] [DEL] List:
  LaTeX class: beamer
  LaTeX header: \documentclass[presentation]{article}
  Choice: [Value Menu] Heading:
numbered: \section{%s}
  unnumbered: \section*{%s}
  [INS] [DEL] List:
  LaTeX class: article
  LaTeX header: \documentclass[11pt]{article}
  Levels:
  [INS] [DEL] Choice: [Value Menu] Heading:
numbered: \section{%s}
  unnumbered: \section*{%s}
  [INS] [DEL] Choice: [Value Menu] Heading:
numbered: \subsection{%s}
  unnumbered: \subsection*{%s}
  [...]

As you can see, there is no way to add deeper sectioning entries for the
new entry (beamer).  I worked around it for the moment to proceed with
my test, but I find this very curious indeed.

Cheers,

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] [new exporter] ignoring a headline on export to PDF via latex

2013-03-05 Thread Nicolas Goaziou
Hello,

Eric S Fraga  writes:

> Suvayu Ali  writes:
>
> [...]
>
>> Try using your function with a filter.  This filter might work:
>> org-export-filter-headline-functions.  Of course it goes without saying
>> you will have to update your function.
>
> Thanks Suvayu.  It is this update that I need help with!  The
> documentation of that variable is close to impenetrable to me 

A TYPE filter is called each time transcoding process is over of an
element of type TYPE. Here, each time a headline is transcoded (along
with its contents), functions in `org-export-filter-headline-functions'
are called with the resulting string as the first argument (i.e. the
LaTeX code for the headline and all its contents).

There's a filter for each type of element/object, and a couple of
special filters.

> (e.g. what is a /communication channel/?).

The communication channel is basically a plist containing data available
for all transcoding functions. 99% of its properties have constant
values during export process (like export options, or pre-computed
values from the parse tree).

Nevertheless, it can be used to store some data at some point in time
and retrieve it from another transcoding function later, effectively
allowing communication between parts of the export system.


Regards,

-- 
Nicolas Goaziou



Re: [O] [new exporter] #+TOC in beamer export

2013-03-05 Thread Andreas Leha
Hi Nicolas,

Nicolas Goaziou  writes:

> Hello,
>
> Andreas Leha  writes:
>
>> from a recent thread I learned about #+TOC (there's always something new
>> to learn about org mode).
>>
>> I'd like to use it in a beamer document.  Here I find it hard to use
>> because it introduces its own frame.
>>
>> My question basically is:  How is this supposed to be used in a beamer
>> doc?
>> (And would it not be easier if it did not introduce its own frame?)
>
> It seems useful to keep frame around TOC generated from toc:t option.
> But we could remove it from TOC generated from #+TOC keywords.
>

Thanks for taking this further.  Indeed, for the toc:t triggered TOC the
frame is absolutely useful.

So, I like your suggestion very much.

Best,
Andreas




Re: [O] [new exporter] ignoring a headline on export to PDF via?latex

2013-03-05 Thread Suvayu Ali
On Tue, Mar 05, 2013 at 08:58:28PM +, Charles Berry wrote:

[...]

> FWIW, I defun'ed filters like the above for all of the filter functions that 
> can
> take (text backend info) as arguments. Then using a derived backend like the
> above `latex3', I can see where the filterable elements are. It is trivial to
> do, but if anyone is interested, I can post or upload somewhere.

That would be wonderful!

You could put them up on Worg.  This section on org-hacks would be
appropriate: .  If you
do not have access to Worg, you can post the content in Org format on
the list and I can add it.

Cheers,

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] [new exporter] is #+bind supported?

2013-03-05 Thread Nicolas Goaziou
Hello,

Eric S Fraga  writes:

> I seem to have some problem with the new exporter taking into account a
> =#+BIND= directive such as
>
>   #+bind: org-latex-pdf-process ("pdflatex %b" "bibtex %b" "pdflatex %b" 
> "pdflatex %b")
>
> Am I doing something really silly here?  I need bibtex to export my org
> paper to PDF.  This used to work...

Bind keywords are supported. Unfortunately, `org-latex-pdf-process' is
not bind-able.

BIND variables are set as buffer-local variables in the buffer where the
transcoding takes place. So, they affect the way the current buffer is
changed into LaTeX code.

However, `org-latex-pdf-process' is used during post-processing, i.e.
after transcoding is over. At this time, the buffer where local
variables were set has disappeared already.

If you need to change the value of `org-latex-pdf-process', use a file
local variable in the current buffer instead.


Regards,

-- 
Nicolas Goaziou



Re: [O] [new exporter] #+TOC in beamer export

2013-03-05 Thread Nicolas Goaziou
Hello,

Andreas Leha  writes:

> from a recent thread I learned about #+TOC (there's always something new
> to learn about org mode).
>
> I'd like to use it in a beamer document.  Here I find it hard to use
> because it introduces its own frame.
>
> My question basically is:  How is this supposed to be used in a beamer
> doc?
> (And would it not be easier if it did not introduce its own frame?)

It seems useful to keep frame around TOC generated from toc:t option.
But we could remove it from TOC generated from #+TOC keywords.

Is that what you have in mind?


Regards,

-- 
Nicolas Goaziou



Re: [O] [new exporter] ignoring a headline on export to PDF via latex

2013-03-05 Thread Charles Berry
Suvayu Ali  gmail.com> writes:

> 
> On Tue, Mar 05, 2013 at 01:25:03PM -0500, Nick Dokos wrote:
> > Eric S Fraga  ucl.ac.uk> wrote:
> > 
> > > Suvayu Ali  gmail.com> writes:
> > > 
> > > [...]
> > > 
> > > > Try using your function with a filter.  This filter might work:
> > > > org-export-filter-headline-functions.  Of course it goes without saying
> > > > you will have to update your function.
> > > 
> > > Thanks Suvayu.  It is this update that I need help with!  The
> > > documentation of that variable is close to impenetrable to me (e.g. what
> > > is a /communication channel/?).
> > > 
> > 
> > Reading the commentary in ox.el might help, at least to shed light on
> > some terminology.
> 
> As far as know, it is a property list returned by the parser.  Look in
> lisp/ox.el:1094.  Beyond that my understanding is also a bit hazy.  I
> think I have gone through that bit of the comments at least once, but it
> is a little difficult to follow for me (my lack of understanding of lisp
> is probably to blame :-p).

If you just want the latex to have "\section{}" you can do this


#+BEGIN_SRC emacs-lisp
  (defun org-latex-ignore-heading-filter-headline
(headline backend info)
"Strip headline from HEADLINE. Ignore BACKEND and INFO."
(replace-regexp-in-string
 "^[\\]section\\[.*\\textsc{ignoreheading}}$"
 "\\section{}" headline nil t))
#+END_SRC

#+BEGIN_SRC emacs-lisp
  (require 'ox-latex)
  (org-export-define-derived-backend latex3 latex
:filters-alist (
(:filter-headline . 
org-latex-ignore-heading-filter-headline))) 
#+END_SRC


then (org-export-to-buffer 'latex3 "a-buffer-name")

should do it.


The so-called 'headline' is actually a lot more than I would have thought.

If you use this filter instead:

#+BEGIN_SRC emacs-lisp
  (defun filter-headline-show
(text back-end info)
(format "%s" text))
#+END_SRC

you will see that the headline --- enclosed in 

 <\hdln>

will typically contain within it an entire "section" (in exporter
`:filter-section' terms - not latex's \section{})

FWIW, I defun'ed filters like the above for all of the filter functions that can
take (text backend info) as arguments. Then using a derived backend like the
above `latex3', I can see where the filterable elements are. It is trivial to
do, but if anyone is interested, I can post or upload somewhere.

Chuck







Re: [O] [Bug] beamer backend and org-reload

2013-03-05 Thread Achim Gratz
Suvayu Ali writes:
>(add-to-list 'org-latex-classes
> '("beamer"
>   "\\documentclass\[presentation\]\{beamer\}"
>   ("\\section\{%s\}" . "\\section*\{%s\}")
>   ("\\subsection\{%s\}" . "\\subsection*\{%s\}")
>   ("\\subsubsection\{%s\}" . "\\subsubsection*\{%s\}")))

Pilot error, I'd say: org-latex-classes is a defcustom, I don't think it
is a good idea to muck with the data directly (it doesn't have
getter/setter methods IIRC, but still).  So what happens when you add
the beamer classes properly, via customize — and then do an org-reload?



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

Factory and User Sound Singles for Waldorf Q+, Q and microQ:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds




[O] Slowdown when editing tables with horizontal lines

2013-03-05 Thread Peder Stray
I have noticed a significant slowdown when editing tables with horizontal
lines compared with the same table without the horizontal line.  Currently
tested in 7.9.2 and the version in elpa (7.9.3e i think?).

Editing the table I have now, 12 columns, about 60 rows is nearly instant
when the table doesn't have any horizontal lines, but when it does contain
such lines, just inserting a character in a cell cause a delay of several
seconds.  Seems to be related to the number of rows too I guess, because it
only became noticeable when the table got over a given number of rows.

-- 
  Peder Stray


[O] [Bug] beamer backend and org-reload

2013-03-05 Thread Suvayu Ali
Hi Achim,

On Tue, Mar 05, 2013 at 07:26:54PM +0100, Achim Gratz wrote:
> Suvayu Ali writes:
> > That said, I have noticed something odd about the new exporter and
> > org-reload.  I think with the new exporter after doing org-reload, org
> > related config is not reloaded properly.
> 
> Config is not reloaded at all (and never has been), any configuration
> variables that are already existing are not touched when the file gets
> reloaded.
> 
> > This borks the Org instance.  This is more visible when using the
> > Beamer backend since it requires customisation of org-latex-classes by
> > the user.  One of these days, I'll try to come up with a proper recipe
> > to reproduce this.
> 
> Please do, this should not happen.

Here is the recipe:

1. emacs -nw -Q -l ~/minimal-org.el

   ;;; minimal-org.el: Minimal setup to load latest `org-mode'
   
   ;;; Code:
   (setq debug-on-error t
 debug-on-signal nil
 debug-on-quit nil)
   
   (add-to-list 'load-path (expand-file-name "~/build/org-mode/lisp"))
   
   (require 'ox-beamer)
   (add-to-list 'org-latex-classes
'("beamer"
  "\\documentclass\[presentation\]\{beamer\}"
  ("\\section\{%s\}" . "\\section*\{%s\}")
  ("\\subsection\{%s\}" . "\\subsection*\{%s\}")
  ("\\subsubsection\{%s\}" . "\\subsubsection*\{%s\}")))

2. C-x C-f some-file.org RET
3. Now try to export: C-c C-e.  You can see menu options for beamer export.
4. Now reload Org: C-c C-x !.  Try step 3 again.  You will notice the
   entries for beamer is missing.

This might actually be a problem with ox-beamer and not org-reload
because I noticed my other Org customisations do stay intact (which is
of course in line with your comment about settings not being touched).

Instead of step (3), you could also try M-x org-beamer-export-as-latex.
After step (4), repeating this alternate step (3) should give you the
following backtrace.

Debugger entered--Lisp error: (error "Unknown \"beamer\" back-end: Aborting 
export")
  signal(error ("Unknown \"beamer\" back-end: Aborting export"))
  error("Unknown \"%s\" back-end: Aborting export" beamer)
  org-export-barf-if-invalid-backend(beamer)
  org-export-as(beamer nil nil nil nil)
  org-export-to-buffer(beamer "*Org BEAMER Export*" nil nil nil nil)
  org-beamer-export-as-latex()
  call-interactively(org-beamer-export-as-latex record nil)
  command-execute(org-beamer-export-as-latex record)
  execute-extended-command(nil "org-beamer-export-as-latex")
  call-interactively(execute-extended-command nil nil)
  command-execute(execute-extended-command)

Hopefully my recipe is complete to fix this issue.

Cheers,

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] [new exporter] [html] Tables of Contents

2013-03-05 Thread T.F. Torrey
Nicolas Goaziou  writes:

> Hello,
>
> tftor...@tftorrey.com (T.F. Torrey) writes:
>
>> One small problem, though: I see that if there is a TOC at the top and
>> then one included later using #+TOC, the exporter gives them both the
>> same id ().  Duplicate ID's makes the XML
>> invalid.
>
> What do you suggest instead? id="table-of-contents-1" for the first
> #+TOC: keyword and so on?
>
>
> Regards,

If I were implementing this with abundant resources, I'd probably opt
for a schema of base-type[-levels][-sequence], with these definitions:

- base :: probably "toc" to group and identify these id's
- type :: "headlines", "images", or other current or future types
- level :: depth of map, if it makes sense for the type
- sequence :: if necessary, the number of the copy of this configuration
  in this document

This schema would produce id's such as these:

- toc-headlines-1 :: lone instance of toc/headlines/one level
- toc-headlines-2 :: lone instance of toc/headlines/two levels
- toc-headlines-2-2 :: second instance of toc/headlines/two levels
- toc-images :: lone instance of toc/images (do levels make sense?)
- toc-tables :: first instance of list of tables
- toc-tables-2 :: second instance of list of tables

You get the idea.

This gives a significant advantage in that authors can link to the
various instances just by knowing their own usage.  For instance, if
they provided a top-level toc at the beginning of their book, and a
deeper-level toc later on, they could link to each separately by id by
knowing this plan.

Another idea for achieving the same linkability without the plan, would
be to support assigning an id in the plist (that isn't implemented yet),
such as "#+TOC: :type headlines :levels 2 :id toc-headlines-2".  With
this power would come the responsibility for the users to make sure id's
were not duplicated.

As a minimum, your suggestion ("table-of-contents-1", etc.) would be
reasonable for most use cases, and it's the shortest route to valid XML.

Some users of Org are producing complex documents that will probably be
active users of multiple toc types.  I'm curious what kind of schema
would work best for their use cases.

Best regards,
Terry
-- 
T.F. Torrey



Re: [O] [new exporter] ignoring a headline on export to PDF via latex

2013-03-05 Thread Suvayu Ali
On Tue, Mar 05, 2013 at 01:25:03PM -0500, Nick Dokos wrote:
> Eric S Fraga  wrote:
> 
> > Suvayu Ali  writes:
> > 
> > [...]
> > 
> > > Try using your function with a filter.  This filter might work:
> > > org-export-filter-headline-functions.  Of course it goes without saying
> > > you will have to update your function.
> > 
> > Thanks Suvayu.  It is this update that I need help with!  The
> > documentation of that variable is close to impenetrable to me (e.g. what
> > is a /communication channel/?).
> > 
> 
> Reading the commentary in ox.el might help, at least to shed light on
> some terminology.

As far as know, it is a property list returned by the parser.  Look in
lisp/ox.el:1094.  Beyond that my understanding is also a bit hazy.  I
think I have gone through that bit of the comments at least once, but it
is a little difficult to follow for me (my lack of understanding of lisp
is probably to blame :-p).

Good Luck,

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] Tips for using orgmode + ledger to record events?

2013-03-05 Thread Viktor Rosenfeld
Hi Eric,

thanks for explaining your structure.

Eric S Fraga wrote:
 
> I don't use capture templates; I manually enter the information.  I did
> use to use capture but found it too clumsy for my setup (or I was never
> able to suss out how to define the right capture templates).  I don't
> reconcile using ledger.  I do reconciliation manually by visual
> inspection.  Reconciliation is not a big issue for me.  My main use of
> ledger is simply to keep track of where my money is (or isn't, as the
> case may be ;-).

Reconcilation (using ledger-mode) is an important part of my
weekly/monthly workflow and I think you need an actual ledger file to do
it. I imagine that one can manually check the balances with the help of
a few reports, but I'm pretty satisfied with my current setup.

It's interesting that you found capture templates clumsy. I don't use
them right now, but was thinking about using them to record recurring
information. Right now, I do this manually each month while reconciling
my bank account.

Thanks again,
Viktor



Re: [O] [new exporter] ignoring a headline on export to PDF via latex

2013-03-05 Thread Nick Dokos
Eric S Fraga  wrote:

> Suvayu Ali  writes:
> 
> [...]
> 
> > Try using your function with a filter.  This filter might work:
> > org-export-filter-headline-functions.  Of course it goes without saying
> > you will have to update your function.
> 
> Thanks Suvayu.  It is this update that I need help with!  The
> documentation of that variable is close to impenetrable to me (e.g. what
> is a /communication channel/?).
> 

Reading the commentary in ox.el might help, at least to shed light on
some terminology.

Nick

> I can manage without this feature for the moment so I'm not panicking
> but I do hope to find a solution eventually.
> 
> Thanks again,
> eric
> -- 
> : Eric S Fraga, GnuPG: 0xC89193D8FFFCF67D
> : in Emacs 24.3.50.1 and Org release_7.9.3f-1199-g3a0e55
> 
> 



Re: [O] URGENT Need help fixing beamer exporting, can someone jump on IRC?

2013-03-05 Thread Achim Gratz
Suvayu Ali writes:
> That said, I have noticed something odd about the new exporter and
> org-reload.  I think with the new exporter after doing org-reload, org
> related config is not reloaded properly.

Config is not reloaded at all (and never has been), any configuration
variables that are already existing are not touched when the file gets
reloaded.

> This borks the Org instance.  This is more visible when using the
> Beamer backend since it requires customisation of org-latex-classes by
> the user.  One of these days, I'll try to come up with a proper recipe
> to reproduce this.

Please do, this should not happen.


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

SD adaptation for Waldorf rackAttack V1.04R1:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada




Re: [O] [new exporter] is #+bind supported?

2013-03-05 Thread Achim Gratz
Eric S Fraga writes:
> It is rather annoying to have the old org files picked up
> automatically.  My git copy of org-mode is before anything else in my
> =load-path= variable.  I know there has been a whole thread on the list
> about this but I did not see any solution to this; did I miss one?  I
> track emacs-snapshot weekly and org-mode more frequently.

No, nothing complete yet.  Here's what I have so far, some autoload
definitions might still be there, but will error out due to the fact
that their target files are not in load-path anymore.

--8<---cut here---start->8---
;;
;; Kill our ancestors
;;

;; clean load-path
(setq load-path
  (delq nil (mapcar
 (function (lambda (p)
 (unless (string-match "lisp/org$" p)
   p))
   load-path)))
;; remove property list to defeat cus-load and remove autoloads
(mapatoms (function  (lambda (s)
   (let ((sn (symbol-name s)))
 (when (string-match "^\\(org\\|ob\\)-?" sn)
   (setplist s nil)
   (when (autoloadp s)
 (unintern s)))
(add-to-list 'load-path "/path/to/org-master")
(load "org-loaddefs.el" nil nil 'nosuffix)
--8<---cut here---end--->8---

I still need to generate the custom-load definitions with the build
system so that you can browse customize without loading all Org files
first.


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

SD adaptations for KORG EX-800 and Poly-800MkII V0.9:
http://Synth.Stromeko.net/Downloads.html#KorgSDada




Re: [O] [new exporter] ignoring a headline on export to PDF via latex

2013-03-05 Thread Eric S Fraga
Suvayu Ali  writes:

[...]

> Try using your function with a filter.  This filter might work:
> org-export-filter-headline-functions.  Of course it goes without saying
> you will have to update your function.

Thanks Suvayu.  It is this update that I need help with!  The
documentation of that variable is close to impenetrable to me (e.g. what
is a /communication channel/?).

I can manage without this feature for the moment so I'm not panicking
but I do hope to find a solution eventually.

Thanks again,
eric
-- 
: Eric S Fraga, GnuPG: 0xC89193D8FFFCF67D
: in Emacs 24.3.50.1 and Org release_7.9.3f-1199-g3a0e55




Re: [O] [new exporter] is #+bind supported?

2013-03-05 Thread Eric S Fraga
Achim Gratz  writes:

> Eric S Fraga  ucl.ac.uk> writes:
>> Also, what is the difference between =org-latex-pdf-process= and
>> =org-latex-to-pdf-process= (note the extra -to in the latter)?  One is
>> defined in ox-latex and the other in org-latex.
>
> "These are not the droids you were searching for."
>
> Nothing defined in the old exporter should be used with the new one.  The 
> danger
> is that some of this stuff will autoload parts of the old exporter and
> potentially wreak serious havoc.
>
>
> Regards,
> Achim.

Thanks Achim.  My mistake.  The org-latex file is distributed with Emacs
24.3 and obviously was picked up automatically when I looked for
suitable variables (C-h v with tab completion, as apropos never seems to
find anything useful for me) to set.

It is rather annoying to have the old org files picked up
automatically.  My git copy of org-mode is before anything else in my
=load-path= variable.  I know there has been a whole thread on the list
about this but I did not see any solution to this; did I miss one?  I
track emacs-snapshot weekly and org-mode more frequently.

My question still stands in that binding org-latex-pdf-process, which
comes from ox-latex.el, does not appear to work for me.

I do have org-export-allow-bind-keywords set to t but this seems to have
no effect.

Thanks again,
eric

-- 
: Eric S Fraga, GnuPG: 0xC89193D8FFFCF67D
: in Emacs 24.3.50.1 and Org release_7.9.3f-1199-g3a0e55




Re: [O] URGENT Need help fixing beamer exporting, can someone jump on IRC?

2013-03-05 Thread Suvayu Ali
Hi James,

On Tue, Mar 05, 2013 at 11:28:35PM +0800, James Harkins wrote:
> I had been using C-c C-x ! to reload org after doing a "make" but this
> turned out to mess things up pretty badly. I could get reasonable
> behavior only by quitting emacs and restarting it. I don't know if
> that should be considered a bug or not. Perhaps I don't understand
> what C-c C-x ! is supposed to do? Tonight at least, it was totally
> unreliable.

org-reload is there for convenience, quite often a proper emacs restart
is indeed required to get a consistent Org instance.

That said, I have noticed something odd about the new exporter and
org-reload.  I think with the new exporter after doing org-reload, org
related config is not reloaded properly.  This borks the Org instance.
This is more visible when using the Beamer backend since it requires
customisation of org-latex-classes by the user.  One of these days, I'll
try to come up with a proper recipe to reproduce this.

Cheers,

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] URGENT Need help fixing beamer exporting, can someone jump on IRC?

2013-03-05 Thread Achim Gratz
James Harkins  gmail.com> writes:
> I had been using C-c C-x ! to reload org after doing a "make" but this
> turned out to mess things up pretty badly. I could get reasonable
> behavior only by quitting emacs and restarting it. I don't know if
> that should be considered a bug or not. Perhaps I don't understand
> what C-c C-x ! is supposed to do? Tonight at least, it was totally
> unreliable.

You can't switch between maint and master without restarting Emacs.  Even when
it appears to work it really doesn't.


Regards,
Achim.





Re: [O] [new exporter] ignoring a headline on export to PDF via latex

2013-03-05 Thread Suvayu Ali
On Tue, Mar 05, 2013 at 02:43:30PM +, Eric S Fraga wrote:
> Hello,
> 
> I used to use the following to ignore a headline when exporting to PDF:
> 
> #+begin_src emacs-lisp
> (defun my-e-latex-headline (headline contents info)
>   (if (member "ignoreheading" (org-element-property :tags headline)) contents
> (org-latex-headline headline contents info)))
> (add-to-list 'org-latex-translate-alist '(headline . my-e-latex-headline))
> #+end_src
> 
> With the new exporter, this no longer works.
> 

Try using your function with a filter.  This filter might work:
org-export-filter-headline-functions.  Of course it goes without saying
you will have to update your function.

A very simple test tells me this is probably going to be backend
specific.  I have had this query about filters for a while now, how to
write filters that are backend agnostic.  I think I'll start a new
thread once I have formulated my question more clearly.

Hope this helps,

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] URGENT Need help fixing beamer exporting, can someone jump on IRC?

2013-03-05 Thread James Harkins
On Tue, Mar 5, 2013 at 11:18 PM, James Harkins  wrote:
> Hi, sorry to press, but is anyone on the org-mode IRC channel?
>
> The new beamer exporter has suddenly gotten borked on my system and I
> can't restore it. I have class tomorrow morning. This is an emergency.

OK, in desperation, I checked out my sandbox branch (based on master),
cleaned all the elc files, and quit and relaunched Emacs. Now it's
fine.

I had been using C-c C-x ! to reload org after doing a "make" but this
turned out to mess things up pretty badly. I could get reasonable
behavior only by quitting emacs and restarting it. I don't know if
that should be considered a bug or not. Perhaps I don't understand
what C-c C-x ! is supposed to do? Tonight at least, it was totally
unreliable.

So, crisis averted, but it was quite scary to get essentially complete
garbage from the beamer exporter...

hjh



[O] URGENT Need help fixing beamer exporting, can someone jump on IRC?

2013-03-05 Thread James Harkins
Hi, sorry to press, but is anyone on the org-mode IRC channel?

The new beamer exporter has suddenly gotten borked on my system and I
can't restore it. I have class tomorrow morning. This is an emergency.

This occurred after updating master to test a fix that Bastien pushed.
Recalling advice from others to use "maint" for production, I did "git
checkout maint" and "make clean" and now Emacs fails to initialize.

Symbol's value as variable is void: org-babel-tangle-lang-exts

I figure IRC is faster than e-mail (especially since I read the digest
only). But, nobody is answering.

Again, it's urgent. It's 11:15 PM here in China and I have to be up at
6:30 AM. Didn't quite want to be staying up late fixing my org
configuration...

Thanks,
hjh



[O] [new exporter] ignoring a headline on export to PDF via latex

2013-03-05 Thread Eric S Fraga
Hello,

I used to use the following to ignore a headline when exporting to PDF:

#+begin_src emacs-lisp
(defun my-e-latex-headline (headline contents info)
  (if (member "ignoreheading" (org-element-property :tags headline)) contents
(org-latex-headline headline contents info)))
(add-to-list 'org-latex-translate-alist '(headline . my-e-latex-headline))
#+end_src

With the new exporter, this no longer works.

On the mailing list, I found this thread from a couple of months ago:

http://comments.gmane.org/gmane.emacs.orgmode/62742

but I do not want to create a new backend just for this.  Is there an
equivalent solution to the above with the new exporter?  Nicolas, you do
imply that there is but you leave it as an exercise for the reader.  As
much as I appreciate the pedagogical nature of your response, this
reader is not up to the task and a solution would be greatly
appreciated!

Thanks,
eric

-- 
Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D)




Re: [O] [new exporter] is #+bind supported?

2013-03-05 Thread Achim Gratz
Eric S Fraga  ucl.ac.uk> writes:
> Also, what is the difference between =org-latex-pdf-process= and
> =org-latex-to-pdf-process= (note the extra -to in the latter)?  One is
> defined in ox-latex and the other in org-latex.

"These are not the droids you were searching for."

Nothing defined in the old exporter should be used with the new one.  The danger
is that some of this stuff will autoload parts of the old exporter and
potentially wreak serious havoc.


Regards,
Achim.




[O] [new exporter] is #+bind supported?

2013-03-05 Thread Eric S Fraga
Hello,

I seem to have some problem with the new exporter taking into account a
=#+BIND= directive such as

  #+bind: org-latex-pdf-process ("pdflatex %b" "bibtex %b" "pdflatex %b" 
"pdflatex %b")

Am I doing something really silly here?  I need bibtex to export my org
paper to PDF.  This used to work...

Also, what is the difference between =org-latex-pdf-process= and
=org-latex-to-pdf-process= (note the extra -to in the latter)?  One is
defined in ox-latex and the other in org-latex.

Thanks,
eric

-- 
: Eric S Fraga, GnuPG: 0xC89193D8FFFCF67D
: in Emacs 24.3.50.1 and Org release_7.9.3f-1315-g25b5ab




Re: [O] latex listings number-lines problems with new exporter

2013-03-05 Thread Thomas Alexander Gerds

thanks for the fast fix. now, I agree that there is no great need to put
a link into the doc-string of org-latex-listings-options.

Nicolas Goaziou  writes:

> Hello,
>
> Thomas Alexander Gerds  writes:
>
>> using org-mode "7.9.3f" and the new exporter I was desperately
>> trying to get line numbers back for exported R code blocks using the
>> latex listing package. first I tried
>> (setq org-latex-listings-options '(("basicstyle" "\\small")
>> ("numbers" "left")))
>> which gives
>> ,
>> | \lstset{basicstyle=\small,numbers=left,language=R,numbers=none}
>> `
>> that this is possible seems sub-optimal :)
>
> Thanks. This should be fixed in master. If user provides "numbers"
> option, "+n" and "-n" switches will be ignored from src-block.
>
>> some debugging led me via org-latex-src-block to
>> org-element-src-block-parser which indicated adding a switch "-n"
>> behind to the scr-block:
>> ,
>> | #+BEGIN_SRC R -n :results output raw :exports both :session *R*
>> | :cache yes
>>
>> this works and has a new feature (switch +n) which allows numbering
>> to be continued in subsequent blocks.
>> Now, I would like to set numbers on globally or buffer-local for all
>> blocks. But is it possible to set a switch globally?  I think
>> parameters can still be set with an appropriate #+PROPERTY:
>> statement!?
>
> This isn't possible. But, as noted previously, you can activate
> numbering globally by adding ("numbers" "left") association to
> org-latex-listings-options'.
>
>> whatever the answer, it would be nice if this feature was mentioned
>> in the help string of org-latex-listing-options.
>
> I don't seed the need for that. "+n" and "-n" switches are already
> documented in the manual, and are not "listings" specific. They are
> not even LaTeX specific.
>
> Anyway, if you think it's still important, I will accept a patch for
> it (along with one modifying `org-latex-minted-options' accordingly).
>
> Regards,



Re: [O] emacs and orgmode implemented at beta.metaStudio.org

2013-03-05 Thread Nagarjuna G.
On Tue, Mar 5, 2013 at 4:30 PM, Bastien  wrote:

> Hi,
>
> "Nagarjuna G."  writes:
>
> > I am happy to inform you that we have implemented a collaboratively
> > editable wiki pages using a simple javascript editor based on Jay
> > Salvat's MarkItUp. (http://markitup.jaysalvat.com/home/).  We forked
> > it to create orgitdown (https://github.com/gnowgi/orgitdown).
>
> Great!  I mentioned it in the "Org tools" page on Worg:
> http://orgmode.org/worg/org-tools/index.html#sec-2-2
>
> I also added a link to this page on http://orgmode.org
>
> Among recent interesting additions to Org tools, there is also
> nakkaya: a static site generator parsing Org and MarkDown files:
>
>   http://nakkaya.com/static.html
>
>
Thanks so much for all the good work! and for your encouragement for a
small hack!

best

-- 
Nagarjuna G.
http://beta.metaStudio.org/


[O] [new exporter] #+TOC in beamer export

2013-03-05 Thread Andreas Leha
Hi all,

from a recent thread I learned about #+TOC (there's always something new
to learn about org mode).

I'd like to use it in a beamer document.  Here I find it hard to use
because it introduces its own frame.

My question basically is:  How is this supposed to be used in a beamer
doc?
(And would it not be easier if it did not introduce its own frame?)

Here is a sample file to test (provided that you have a latex-class
"beamer" defined in org-mode)

#+begin_src org
#+TITLE: Something
#+LaTeX_CLASS: beamer
#+LaTeX_CLASS_OPTIONS: [presentation]
#+COLUMNS: %45ITEM %10BEAMER_env(Env) %10BEAMER_act(Act) %4BEAMER_col(Col) 
%8BEAMER_opt(Opt)
#+PROPERTY: BEAMER_col_ALL 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 0.0 :ETC
#+OPTIONS: toc:nil H:2


* Intro
** Motivation
** Challanges

#+TOC: headlines 2

* Main Part
** One
** Two
#+end_src


This produces for me:
,
| [...]
| 
| \section[Intro]{Intro}
| \label{sec-1}
| \begin{frame}[label=sec-1-1]{Motivation}
| \end{frame}
| \begin{frame}[label=sec-1-2]{Challanges}
| \begin{frame}\setcounter{tocdepth}{2}
| \tableofcontents
| \end{frame}
| \end{frame}
| \section[Main Part]{Main Part}
| \label{sec-2}
| \begin{frame}[label=sec-2-1]{One}
| \end{frame}
| \begin{frame}[label=sec-2-2]{Two}
| \end{frame}
|
| [...]
`


I'd prefer to create the frame myself, so that I see the structure of
the presentation, but that does not work either for me:

#+begin_src org
#+TITLE: Something
#+LaTeX_CLASS: beamer
#+LaTeX_CLASS_OPTIONS: [presentation]
#+COLUMNS: %45ITEM %10BEAMER_env(Env) %10BEAMER_act(Act) %4BEAMER_col(Col) 
%8BEAMER_opt(Opt)
#+PROPERTY: BEAMER_col_ALL 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 0.0 :ETC
#+OPTIONS: toc:nil H:2


* Intro
** Motivation
** Challanges

* TOC   :B_frame:
  :PROPERTIES:
  :BEAMER_env: frame
  :END:
#+TOC: headlines 2

* Main Part
** One
** Two
#end_src

Regards,
Andreas




Re: [O] [patch] ox-koma-letter

2013-03-05 Thread Michael Strey
On Tue, Mar 05, 2013 at 01:23:40PM +0100, Rasmus wrote:

[...]

> What happens to headlines without a tag?  Would they be
> read as part of the body or would untagged headliens just be ignored?

Untagged sections shall be treated as body.

Updated proposal:

#+BEGIN_SRC org
#+LATEX_CLASS: letter
#+LCO: strey_consult, DINmtext, sections
#+LANGUAGE: en
#+AUTHOR: Michael Strey
#+EMAIL: mst...@strey.biz
#+DATE: \today
#+TITLE: KomaScript Allows Title and Subject
#+SUBJECT: User interface of org-koma-letter.el
#+SPECIALMAIL: by registered mail
#+TO_ADDRESS: Name\\Street\\Postcode City
#+YOURREF: LT/21/20
#+YOURMAIL: 20.09.2012
#+MYREF: St/foo/bar
#+CUSTOMER: customer name
#+INVOICE: invoice no.
#+OPENING: Dear Org-Mode user,\\dear developers,
#+CLOSING: Regards,
#+AFTER_LETTER: here is code to go after \end{letter}, e.g. for pdfpages 
inclusion

* About this document   :BODY:
This is an example of a letter that contains all options allowed in
Koma-Script letters.  It shall illustrate the proposed user interface
of ox-koma-letter.el for further discussion.

I used properties for all information having a fixed place in the
letter layout and headlines with tags for those parts of the content of
of the letter that have to be typeset in a distinct order.

* Sectioning in letters :BODY:
With the letter class option =sections.lco= KomaScript supports
sectioning in the body of a letter.  Advocates like this feature.

If =sections.lco= was not loaded, headlines shall be ignored.

* Sections without tags
Sections without tags should be read as if they had the tag =:BODY:=.

* Enclosures:ENCL:
a first attachment\\a second one

* Copies go to:CC:
Worg\\Org-Mode mailing list

* PS  :PS:
PS: Usually a postsriptum is a short trailer but for those who like
to write more, it should allow multiple paragraphs.

Here is one.
#+END_SRC

-- 
Michael Strey 
www.strey.biz



[O] [new exporter] latex-date-timestamp-format not adhering #+LANGUAGE

2013-03-05 Thread Andreas Leha
Hi all,

I'd very much like to see org-latex-timestamp-format adhere to a
possibly present #+LANGUAGE setting.

If I set org-latex-timestamp-format to "%A, %Y-%m-%d" the following org
file produces
"Donnerstag, 2013-03-07" on my system, where I'd prefer
"Thursday, 2013-03-07".

#+begin_src org
#+TITLE: Some Document
#+DATE: <2013-03-07 Do>
#+LANGUAGE: en


* Some test document
With some content
#+end_src

Would such a change be possible?

Regards,
Andreas




Re: [O] [patch] ox-koma-letter

2013-03-05 Thread Rasmus
Michael Strey  writes:

> Here is a draft proposal for a user interface using Nicola's
> suggestion:

Looks nice.  What happens to headlines without a tag?  Would they be
read as part of the body or would untagged headliens just be ignored?

–Rasmus

-- 
This is the kind of tedious nonsense up with which I will not put



Re: [O] Predictive for Latex in org-mode

2013-03-05 Thread Sanjib Sikder
Dear Bastien,

The error

> Wrong type argument: listp, t

was due to the following line

(add-hook 'org-mode-hook 'predictive-mode)

which was there in the .emacs file.

While predictive mode is on [without (add-hook 'org-mode-hook
'predictive-mode) in .emacs] in org-mode buffer, C-c C-e p produces an
empty folder .predictive, in the folder where .org file is located. If I
use (add-hook 'org-mode-hook 'predictive-mode) in .emacs then the generated
.predictive folder contains all the .el and .elc files.

Thanks.
-
Sanjib Sikder


Re: [O] latex listings number-lines problems with new exporter

2013-03-05 Thread Nicolas Goaziou
Hello,

Thomas Alexander Gerds  writes:

> using org-mode "7.9.3f" and the new exporter I was desperately trying to
> get line numbers back for exported R code blocks using the latex listing
> package. first I tried
>
> (setq org-latex-listings-options
> '(("basicstyle" "\\small")
>   ("numbers" "left")))
>
> which gives
>
> ,
> | \lstset{basicstyle=\small,numbers=left,language=R,numbers=none}  
> `
>
> that this is possible seems sub-optimal :)

Thanks. This should be fixed in master. If user provides "numbers"
option, "+n" and "-n" switches will be ignored from src-block.

> some debugging led me via org-latex-src-block to
> org-element-src-block-parser which indicated adding a switch "-n" behind
> to the scr-block:
>
> ,
> | #+BEGIN_SRC R -n :results output raw  :exports both  :session *R* :cache yes
>
>
> this works and has a new feature (switch +n) which allows numbering to
> be continued in subsequent blocks.
>
> Now, I would like to set numbers on globally or buffer-local for all
> blocks. But is it possible to set a switch globally?  I think parameters
> can still be set with an appropriate #+PROPERTY: statement!?

This isn't possible. But, as noted previously, you can activate
numbering globally by adding ("numbers" "left") association to
`org-latex-listings-options'.

> whatever the answer, it would be nice if this feature was mentioned in
> the help string of org-latex-listing-options.

I don't seed the need for that. "+n" and "-n" switches are already
documented in the manual, and are not "listings" specific. They are not
even LaTeX specific.

Anyway, if you think it's still important, I will accept a patch for it
(along with one modifying `org-latex-minted-options' accordingly).


Regards,

-- 
Nicolas Goaziou



Re: [O] emacs and orgmode implemented at beta.metaStudio.org

2013-03-05 Thread Bastien
Hi,

"Nagarjuna G."  writes:

> I am happy to inform you that we have implemented a collaboratively
> editable wiki pages using a simple javascript editor based on Jay
> Salvat's MarkItUp. (http://markitup.jaysalvat.com/home/).  We forked
> it to create orgitdown (https://github.com/gnowgi/orgitdown).

Great!  I mentioned it in the "Org tools" page on Worg:
http://orgmode.org/worg/org-tools/index.html#sec-2-2

I also added a link to this page on http://orgmode.org

Among recent interesting additions to Org tools, there is also
nakkaya: a static site generator parsing Org and MarkDown files:

  http://nakkaya.com/static.html

All best,

-- 
 Bastien



Re: [O] Predictive for Latex in org-mode

2013-03-05 Thread Sanjib Sikder
Dear Bastien,

> (add-to-list 'predictive-major-mode-alist
 '(org-mode . predictive-setup-latex))

This works for latex keyword suggestion in org-mode buffer but while trying
to pdf export, I am getting the following error.

Wrong type argument: listp, t

Thanks

-
*Sanjib Sikder
**
*


Re: [O] [patch] ox-koma-letter

2013-03-05 Thread Michael Strey
Hello,

On Mon, Mar 04, 2013 at 09:38:38PM +0100, Nicolas Goaziou wrote:

[...]

> Headlines are also possible, with a :location: property, which could be
> set to, e.g. "closing". See also:
> 
>   http://orgmode.org/worg/org-tutorials/org-e-groff-documentation.html
> 
> for a syntax based on headlines.
 
Here is a draft proposal for a user interface using Nicola's suggestion:

#+BEGIN_SRC org
#+LATEX_CLASS: letter
#+LCO: strey_consult, DINmtext, sections
#+LANGUAGE: en
#+AUTHOR: Michael Strey
#+EMAIL: mst...@strey.biz
#+DATE: \today
#+TITLE: KomaScript Allows Title and Subject
#+SUBJECT: User interface of org-koma-letter.el
#+SPECIALMAIL: by registered mail
#+TO_ADDRESS: Name\\Street\\Postcode City
#+YOURREF: LT/21/20
#+YOURMAIL: 20.09.2012
#+MYREF: St/foo/bar
#+CUSTOMER: customer name
#+INVOICE: invoice no.
#+OPENING: Dear Org-Mode user,\\dear developers,
#+CLOSING: Regards,
#+AFTER_LETTER: here is code to go after \end{letter}, e.g. for pdfpages 
inclusion

* About this document   :BODY:
This is an example of a letter that contains all options allowed in
Koma-Script letters.  It shall illustrate the proposed user interface
of ox-koma-letter.el for further discussion.

I used properties for all information having a fixed place in the
letter layout and headlines with tags for those parts of the content of
of the letter that have to be typeset in a distinct order.

* Sectioning in Letters :BODY:
With the letter class option =sections.lco= KomaScript supports
sectioning in the body of a letter.  Advocates like this feature.

* Enclosures:ENCL:
a first attachment\\a second one

* Copies go to:CC:
Worg\\Org-Mode mailing list

* PS  :PS:
PS: Usually a postsriptum is a short trailer but for those who like
to write more, it should allow multiple paragraphs.

Here is one.
#+END_SRC

Regards,
-- 
Michael Strey 
www.strey.biz



Re: [O] Predictive for Latex in org-mode

2013-03-05 Thread Sanjib Sikder
Hi Bastien,

>(add-to-list 'predictive-major-mode-alist
 '(org-mode . predictive-setup-latex))

This one works :)

Thanks a lot.
---
Sanjib Sikder


Re: [O] Predictive for Latex in org-mode

2013-03-05 Thread Bastien
Hi Sanjib,

Sanjib Sikder  writes:

> Yes, exactly, I wanted to mean this.

Maybe:

(add-to-list 'predictive-major-mode-alist
 '(org-mode . predictive-setup-latex))

Or

(add-hook 'org-mode-hook 'predictive-setup-latex)

Toby is on this list, he'll perhaps confirm/correct.
Another idea would be to use the LaTeX predictions only
in Org's LaTeX fragments/regions but that's another story.

-- 
 Bastien



[O] latex listings number-lines problems with new exporter

2013-03-05 Thread Thomas Alexander Gerds
Hi 

using org-mode "7.9.3f" and the new exporter I was desperately trying to
get line numbers back for exported R code blocks using the latex listing
package. first I tried

(setq org-latex-listings-options
'(("basicstyle" "\\small")
  ("numbers" "left")))

which gives

,
| \lstset{basicstyle=\small,numbers=left,language=R,numbers=none}  
`

that this is possible seems sub-optimal :)

some debugging led me via org-latex-src-block to
org-element-src-block-parser which indicated adding a switch "-n" behind
to the scr-block:

,
| #+BEGIN_SRC R -n :results output raw  :exports both  :session *R* :cache yes


this works and has a new feature (switch +n) which allows numbering to
be continued in subsequent blocks.

Now, I would like to set numbers on globally or buffer-local for all
blocks. But is it possible to set a switch globally?  I think parameters
can still be set with an appropriate #+PROPERTY: statement!?

whatever the answer, it would be nice if this feature was mentioned in
the help string of org-latex-listing-options.

regards,
Thomas









Re: [O] Predictive for Latex in org-mode

2013-03-05 Thread Sanjib Sikder
Hi Suvayu,

> I think what he means is that predictive _does not_ suggest LaTeX
keywords inside an org-mode buffer.

Yes, exactly, I wanted to mean this.

Thanks

-
*Sanjib Sikder
*


Re: [O] Predictive for Latex in org-mode

2013-03-05 Thread Sanjib Sikder
Hi Bastien,

> Do you mean: "once I write some LaTeX keywords in an org-mode buffer,
it only suggests LaTeX keywords (and no english words) for the rest
of the session?"


I am writing my thesis in org-mode. My thesis consists of equations. So in
my thesis.org file, I have latex codes also. I do latex pdf export to
generate the pdf file of the thesis.

While using predictive mode, it suggests regular English words but not
Latex keywords. Just now I noticed that if my file extension is .tex, then
predictive predicts and suggests latex keywords.

May I configure predictive such a way that while I am working on a file
thesis.org (not thesis.tex), predictive will suggest latex keywords also ?

Thanks.
-
*Sanjib Sikder*


Re: [O] [patch] ox-koma-letter

2013-03-05 Thread Nicolas Goaziou
Hello,

Alan Schmitt  writes:

> Nicolas Goaziou writes:
>
>> Headlines are also possible, with a :location: property, which could be
>> set to, e.g. "closing". See also:
>>
>>   http://orgmode.org/worg/org-tutorials/org-e-groff-documentation.html
>>
>> for a syntax based on headlines.
>>
>> Another possibility is to use a special block. E.g.:
>>
>>   #+begin_closing
>>   ...
>>   #+end_closing
>>
>> The advantage of previous solutions is that it allows contents to be in
>> Org syntax whereas "AFTER_CLOSING" keywords require it to be in LaTeX
>> syntax.
>
> These two approaches look great. Do you have a pointer to some could I
> should look at to try to integrate them in ox-koma?

The principle is the same in both cases. You explicitly ignore the
construct (i.e. return nil) in the transcoding function normally
handling the same type of element. E.g.:

#+begin_src emacs-lisp
(defun org-koma-letter-headline (headline contents info)
  (unless (equal (org-element-property :LOCATION headline) "closing")
(org-export-with-backend 'latex headline contents info)))
#+end_src

Then, when at the appropriate environment (i.e. template), you
explicitly search for these constructs with `org-element-map' and insert
them here:

#+begin_src emacs-lisp
(defun org-koma-letter-template (contents info)
  (concat
   ...
   ;; Letter body.
   contents
   ;; Closing.
   (format "\n\\closing{%s}\n\n" (plist-get info :closing))
   ;; Add contents of all headlines with "closing" location.
   (mapconcat
'identity
(delq nil
  (org-element-map (plist-get info :parse-buffer) 'headline
(lambda (hl)
  (and (equal (org-element-property :LOCATION hl) "closing")
   ;; Ignore headline's title.  Focus on contents.
   (org-export-data (org-element-contents hl) info)))
info)) "\n")
   ;; Letter end.
   "\\end{letter}\n\\end{document}"))
#+end_src

This is untested, but should get you started.


Regards,

-- 
Nicolas Goaziou



Re: [O] Predictive for Latex in org-mode

2013-03-05 Thread Suvayu Ali
Hi Bastien and Sanjib,

On Tue, Mar 05, 2013 at 10:44:55AM +0100, Bastien wrote:
> Hi Sanjib,
> 
> Sanjib Sikder  writes:
> 
> > I have installed "Predictive" package. It is working fine for normal
> > English words while working in org-mode. When I am writing few latex
> > codes in org-mode, it is not suggesting latex keywords it seems. I
> > have added the following in .emacs.
> 
> I'm not sure I understand the problem: isn't the purpose of the
> predictive package to suggest keywords depending on the context?
> If so, why is it a problem that predictive suggests LaTeX keywords?
> Do you mean: "once I write some LaTeX keywords in an org-mode buffer,
> it only suggests LaTeX keywords (and no english words) for the rest
> of the session?"
> 

I think what he means is that predictive _does not_ suggest LaTeX
keywords inside an org-mode buffer.  I do not know how predictive works,
but if it is dependent on the major mode to offer suggestions, then it
will fail suggesting LaTeX keywords in Org mode.  This particular
feature of Org mode, allowing LaTeX commands natively is somewhat of a
quirk.

Hope this helps,

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] Predictive for Latex in org-mode

2013-03-05 Thread Bastien
Hi Sanjib,

Sanjib Sikder  writes:

> I have installed "Predictive" package. It is working fine for normal
> English words while working in org-mode. When I am writing few latex
> codes in org-mode, it is not suggesting latex keywords it seems. I
> have added the following in .emacs.

I'm not sure I understand the problem: isn't the purpose of the
predictive package to suggest keywords depending on the context?
If so, why is it a problem that predictive suggests LaTeX keywords?
Do you mean: "once I write some LaTeX keywords in an org-mode buffer,
it only suggests LaTeX keywords (and no english words) for the rest
of the session?"

Thanks for confirming,

-- 
 Bastien



[O] Predictive for Latex in org-mode

2013-03-05 Thread Sanjib Sikder
Hi,

I have installed "Predictive" package. It is working fine for normal
English words while working in org-mode. When I am writing few latex codes
in org-mode, it is not suggesting latex keywords it seems. I have added the
following in .emacs.

;;predictive
(add-to-list 'load-path "~/.emacs.d/predictive")
;; dictionary locations
  (add-to-list 'load-path "~/.emacs.d/predictive/misc")
  (add-to-list 'load-path "~/.emacs.d/predictive/texinfo")
  (add-to-list 'load-path "~/.emacs.d/predictive/latex")
  (add-to-list 'load-path "~/.emacs.d/predictive/html")
;; load predictive package
(require 'predictive)


How do I make it work for Latex ?

-
*Sanjib Sikder
**

*


Re: [O] Tips for using orgmode + ledger to record events?

2013-03-05 Thread Eric S Fraga
Viktor Rosenfeld  writes:

[...]

> Going over you original reply, I was wondering how you add to blocks
> such as <> which you reference in your report statement.

Hi Viktor,

I have named blocks which I subsequently edit using =C-c '= which brings
up the block in Ledger mode.  By having everything within org, I can use
headline structure and tags to organise all the different blocks and
find them easily and quickly.

I have a structure such as this:

#+begin_src org
* finances
** expenses
*** credit cards
*** utilities
** income
*** pay
*** consultancy
** funds
*** savings account
*** chequing account
*** shares
** summaries
*** current balance
*** income tax
 2011-2012
#+end_src

The only issue, and for me it's a very minor one, is that a double entry
ledger system naturally means that many (most?) entries could go into
two different headlines above.  E.g. expenses are likely to take money
from one bank account or another; pay will go into a bank account;
etc.  For me, the bank entries are mostly about recording interest
income and the movement of funds from one account to another.

> Also, do you use capture templates for your expenses and how do you
> reconcile your accounts without having a ledger file as your primary
> data file?

I don't use capture templates; I manually enter the information.  I did
use to use capture but found it too clumsy for my setup (or I was never
able to suss out how to define the right capture templates).  I don't
reconcile using ledger.  I do reconciliation manually by visual
inspection.  Reconciliation is not a big issue for me.  My main use of
ledger is simply to keep track of where my money is (or isn't, as the
case may be ;-).

cheers,
eric
-- 
: Eric S Fraga, GnuPG: 0xC89193D8FFFCF67D
: in Emacs 24.3.50.1 and Org release_7.9.3f-1199-g3a0e55




Re: [O] latex export of unnumbered sections

2013-03-05 Thread Sebastian Hofer
At Mon, 04 Mar 2013 21:21:54 +0100,
Nicolas Goaziou wrote:
> 
> Hello,
> 
> Sebastian Hofer  writes:
> 
> > Is there a particular reason why unnumbered sections are exported to
> > latex including the title in first (optional) argument if there is no
> > * present? To clarify a bit: A sectioning structure like
> >
> > ("\\section{%s}" . "\\section*{%s}")
> >
> > gives rise to
> >
> > \section[title]{title}  % numbered section
> > \section*{title}% unnumbered section
> >
> > If, on the other hand you have something like
> >
> > ("\\numbered{%s}" . "\\unnumbered{%s}")
> >
> > you will get
> >
> > \numbered[title]{title}  % numbered section
> > \unnumbered[title]{title}% unnumbered section
> >
> > Of course one can easily work around that, but it seems a bit
> > inconsistent. So I'm wondering if I am missing something...
> 
> Unnumbered headlines cannot have an optional title anymore in master.
> 
> Thank you for suggesting this.
> 
> 
> Regards,
> 
> -- 
> Nicolas Goaziou

Great, thx for the quick fix!
Sebastian



Re: [O] [patch] ox-koma-letter

2013-03-05 Thread Alan Schmitt
Hello,

Nicolas Goaziou writes:

> Headlines are also possible, with a :location: property, which could be
> set to, e.g. "closing". See also:
>
>   http://orgmode.org/worg/org-tutorials/org-e-groff-documentation.html
>
> for a syntax based on headlines.
>
> Another possibility is to use a special block. E.g.:
>
>   #+begin_closing
>   ...
>   #+end_closing
>
> The advantage of previous solutions is that it allows contents to be in
> Org syntax whereas "AFTER_CLOSING" keywords require it to be in LaTeX
> syntax.

These two approaches look great. Do you have a pointer to some could I
should look at to try to integrate them in ox-koma?

Thanks,

Alan



Re: [O] New html exporter and filters

2013-03-05 Thread Nicolas Goaziou
Hello,

Rick Frankel  writes:

> I seem to have reached the limit of my emacs-fu. I am looking at
> adding XOXO output to the S5 exporter (S5 has built-in support for
> XOXO structured documents) and was trying to use an element (headline)
> filter to modify the document structure. I am also trying to change
> the div id to make them more friendly to the deck.js goto function
> (which accumulates and displays the ids as a menu).

I'm not sure about what you mean here.

> When i look at the `contents' passed to the filter in edebug, i can see
> the element properties (level, raw-title, etc) in the output but I
> cannot figure out how to access them.

You cannot access them. You have access to the full parse tree with
(plist-get info :parse-tree), but not to the parsed current headline.
Filters only give you access to strings produced by the back-end.

Anyway, you still can modify headline div attributes from there.

> On the other hand, it would be easier if ox-html were modified so that
> org-html-headline uses a variable (or callback) for the format of the
> wrapper (currently " generation. This would add flexibility for inherited backends as well
> as allow for more "html5ish" structures (e.g.,  and 
> instead of generic ).

Wouldn't it be simpler to just fork `org-html-headline' in your back-end
in order to replace the divs with something you need?

On the other hand, there are a couple of variables providing a way to
modify divs ids in ox-html.el. I suppose one more doesn't hurt. It may
be even better to collect them in a single defcustom.

What do you think?


Regards,

-- 
Nicolas Goaziou