Re: [O] Bug: Exporting smart single quotes in Org 8.3 seems broken [8.3.2 (8.3.2-elpa @ /Users/jonathan/.emacs.d/elpa/org-20150929/)]

2016-09-16 Thread Suvayu Ali
Hi Nicolas,

On Thu, Sep 15, 2016 at 03:29:09PM +0200, Nicolas Goaziou wrote:
> Hello,
> 
> Suvayu Ali  writes:
> 
> > Sorry about resuming an old thread, but how would I go about quoting
> > special characters?  I need to quote strings like ' > Using double quotes here seems wrong.
> 
> Why does it seem wrong?

It feels wrong as these are not English words, or phrases, but strings
with context dependent special meaning.  In my case, these are action
keys in my organisation denoting specific processes.

I also found this English.SX answer:

  http://english.stackexchange.com/a/3471

It mentions:

  [...] referring to the concept behind the word [...],

as one of the use cases for single quotes.

Cheers,

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] Bug: Exporting smart single quotes in Org 8.3 seems broken [8.3.2 (8.3.2-elpa @ /Users/jonathan/.emacs.d/elpa/org-20150929/)]

2016-09-15 Thread Suvayu Ali
Hello everyone,

It's been a while, I still use Org, just not active on mailing lists.

On Sat, Oct 03, 2015 at 09:30:02AM +0200, Nicolas Goaziou wrote:
> Rasmus  writes:
> 
> > Nicolas Goaziou  writes:
> >> Also, I think it would be clearer to rename `opening-double-quote' to
> >> `opening-primary-quote' and `opening-single-quote' to
> >> `opening-secondary-quote'. WDYT?
> >
> > In fact, I thought they needed renaming as well in light of the
> > redefinition of " and '.
> 
> I renamed `opening-double-quote' to `primary-opening' and
> `opening-closing-quote' to `secondary-opening'. Ditto for closing parts.

Sorry about resuming an old thread, but how would I go about quoting
special characters?  I need to quote strings like '

Re: [O] The power of '-'

2016-06-24 Thread Suvayu Ali
On Fri, Jun 24, 2016 at 01:24:44PM -0400, Brenda Butler wrote:
> I'm not super advanced in org-mode, so take what I have to say as
> "non-authoritative", but:
> 
> I don't think you need any prefix on lines in your org-mode file.
> Lines with some number of * are headers as you noted
> Lines that start with a - make a list of items.
> 
> I'm not sure what you can do with lists ... but probably that has an effect
> on formatting.
> So you can have a paragraph (no prefix), then a list (list items start with
> -) then another paragraph ...

You may take a look here for an authoritative source:

  http://orgmode.org/manual/Document-structure.html#Document-structure


> I haven't tried to "export" my org files so I don't know how it would
> look.  I just use the files as a todo/done list/database/thing.

Here are some export tutorials:

  http://orgmode.org/worg/exporters/

The canonical reference is of course the manual.  You can also find a
plethora of tutorials here: http://orgmode.org/worg/org-tutorials/.
Note, some are quite outdated though.  That said, you need not go
through them all.  The central idea behind getting started with Org mode
is: explore as your need broadens.  Welcome to Org mode, and happy
exploring :)

Cheers,

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] [ANN] Export block syntax change

2016-01-02 Thread Suvayu Ali
On Sat, Jan 02, 2016 at 11:54:42AM +0100, Nicolas Goaziou wrote:
> Hello,
> 
> Suvayu Ali  writes:
> 
> 
> > On Sun, Dec 20, 2015 at 10:06:44PM +0100, Nicolas Goaziou wrote:
> >> 
> >> I just finalized the syntax change for export blocks. As a reminder, the
> >> new syntax is:
> >> 
> >>   #+BEGIN_EXPORT backend
> >>   ...
> >>   #+END_EXPORT
> >> 
> >> instead of
> >> 
> >>   #+BEGIN_backend
> >>   ...
> >>   #+END_backend
> >
> > This seems to not work for me.  The following block is completely
> > missing from the exported tex source.
> >
> >   #+begin_export latex
> >   \begin{equation}
> > ct = (S.V. - P.V.) \times m/p.
> >   \end{equation}
> >   #+end_export
> >
> 
> Fixed. Thank you.

Thanks!  It works now.

Cheers,

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] [ANN] Export block syntax change

2016-01-01 Thread Suvayu Ali
Hi,

On Sun, Dec 20, 2015 at 10:06:44PM +0100, Nicolas Goaziou wrote:
> 
> I just finalized the syntax change for export blocks. As a reminder, the
> new syntax is:
> 
>   #+BEGIN_EXPORT backend
>   ...
>   #+END_EXPORT
> 
> instead of
> 
>   #+BEGIN_backend
>   ...
>   #+END_backend

This seems to not work for me.  The following block is completely
missing from the exported tex source.

  #+begin_export latex
  \begin{equation}
ct = (S.V. - P.V.) \times m/p.
  \end{equation}
  #+end_export

Am I missing something?

Cheers,

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] Per command org-agenda-prefix-format

2015-10-08 Thread Suvayu Ali
Hi Nick,

On Thu, Oct 08, 2015 at 03:02:02AM -0400, Nick Dokos wrote:
> Suvayu Ali  writes:
> 
> > On Wed, Oct 07, 2015 at 02:52:24PM -0400, Nick Dokos wrote:
> >> Suvayu Ali  writes:
> >>
> >> > Hi,
> >> >
> >> > I wanted to prefix the results of a tags-todo agenda command with
> >> > scheduling information.  But I can't seem to figure out the 
> correct way
> >> > to do this.  This is what I tried:
> >> >
> >> > (setq org-agenda-custom-commands
> >> >   '(("J" "Type1/Type2"
> >> >  ((tags-todo "CATEGORY=\"foo\"+type1"
> >> >  ((org-agenda-overriding-header "Type1")))
> >> >   (tags-todo "CATEGORY=\"foo\"+type2"
> >> >  ((org-agenda-overriding-header "Type2"
> >> >  ((org-agenda-files (list "~/tmp/org/tasks.org"))
> >> >   (org-agenda-prefix-format "  % s")
> >>
> >> org-agenda-prefix-format is an alist, not a string.
> >
> > Forgot to mention in my earlier post, I tried that too! Something like
> > this:
> >
> >   (org-agenda-prefix-format '(tags "  % s"))
> >
> > Same result.
> 
> Although that's not the right form (it should be '((tags . " % s")) -
> and according to the doc it should be the whole 5-element alist), you
> are right: it does not make any difference. Also, internally, the string
> form is accepted just as well as the alist form by
> org-compile-prefix-format, so I was wrong about the alist vs string
> distinction.

Actually I went through these steps too!  I am not too familiar with the
agenda code, so I wasn't sure whether I was understanding it correctly.

> IIUC (do I?), you expect the format to produce the Deadline: or Scheduled:
> prefixes that you get in the timeline. Unfortunately, that code is
> completely separate from the code that gets executed here. In the
> timeline, we go
> 
>   org-timeline -> org-agenda-get-scheduled (or org-agenda-get-deadlines)
>   -> org-agenda-format-item("Scheduled: " )
> 
> with the first argument providing the appropriate prefix.
> But with the custom agenda, we go a different way:
> 
>   org-tags-view -> org-scan-tags -> org-agenda-format-item("" ...)
> 
> and org-scan-tags calls org-agenda-format-item with a hardwired empty
> string for the "extra" argument - it does not matter that %s has been
> specified in org-agenda-prefix-format. So I don't think you can do what
> you want (again IIUC).

Hmm, I was hoping for the timeline like prefix, but even a normal prefix
as in the usual agenda ("Sched. 2x") would also have worked for me.

> Presumably, stealing the code that calculates whether the entry should
> get a scheduling prefix from org-agenda-get-scheduled and grafting it
> into org-scan-tags would do the trick, but that's not the way things are
> today.

Thanks for clearly outlining the code path for me.  Maybe if I find some
time, I'll hack around a bit.

Cheers,

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] Latex strikethrough or cancel?

2015-10-08 Thread Suvayu Ali
Hi Lawrence,

On Thu, Oct 08, 2015 at 03:35:43AM +, Lawrence Bottorff wrote:
> I've got a fraction done this way in an org file:
> 
> \[
>  \frac{1}{(2^3)(5)}
>  \]
> 
> and I'd like to strike though or cancel the (5) part. The Latex method I've
> found says do it this way:
> 
> ...
> \usepackage[makeroom]{cancel}
> ...
> 
> \[
>  \frac{1}{(2^3)\cancel{(5)}}
>  \]
> 
> But it's ignored and comes back verbatim. Of course +(5)+ doesn't work
> either, again, coming back verbatim with the pluses. How can I do this?

Unless the \cancel{..} is not exported properly, this is a LaTeX
question.  I think you will have better luck finding an answer if you
ask a community dedicated to LaTeX, e.g. TeX.SX.

Cheers,

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] Per command org-agenda-prefix-format

2015-10-07 Thread Suvayu Ali
On Wed, Oct 07, 2015 at 02:52:24PM -0400, Nick Dokos wrote:
> Suvayu Ali  writes:
> 
> > Hi,
> >
> > I wanted to prefix the results of a tags-todo agenda command with
> > scheduling information.  But I can't seem to figure out the correct way
> > to do this.  This is what I tried:
> >
> > (setq org-agenda-custom-commands
> >   '(("J" "Type1/Type2"
> >  ((tags-todo "CATEGORY=\"foo\"+type1"
> >  ((org-agenda-overriding-header "Type1")))
> >   (tags-todo "CATEGORY=\"foo\"+type2"
> >  ((org-agenda-overriding-header "Type2"
> >  ((org-agenda-files (list "~/tmp/org/tasks.org"))
> >   (org-agenda-prefix-format "  % s")
> 
> org-agenda-prefix-format is an alist, not a string.

Forgot to mention in my earlier post, I tried that too!  Something like
this:

  (org-agenda-prefix-format '(tags "  % s"))

Same result.

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] Per command org-agenda-prefix-format

2015-10-07 Thread Suvayu Ali
On Wed, Oct 07, 2015 at 05:24:50PM +0200, Suvayu Ali wrote:
> 
> With the attached Org file, the agenda buffer looks like this:

Forgot to attach the file :-p.

-- 
Suvayu

Open source is the future. It sets us free.
#+OPTIONS: toc:nil
#+STARTUP: content


* Foo
  :PROPERTIES:
  :CATEGORY: foo
  :END:
** Type 1 [0/2]   :type1:
*** TODO Item 1
DEADLINE: <2016-01-31 Sun>
*** TODO Item 3
DEADLINE: <2015-10-31 Sat>

** Type 2 [2/3]   :type2:
*** DONE Item 4
CLOSED: [2015-09-22 Tue 15:36] SCHEDULED: <2015-09-14 Mon>
*** DONE Item 6
CLOSED: [2015-10-02 Fri 13:36] SCHEDULED: <2015-09-07 Mon>
*** TODO Item 8
SCHEDULED: <2015-09-02 Wed>


[O] Per command org-agenda-prefix-format

2015-10-07 Thread Suvayu Ali
Hi,

I wanted to prefix the results of a tags-todo agenda command with
scheduling information.  But I can't seem to figure out the correct way
to do this.  This is what I tried:

(setq org-agenda-custom-commands
  '(("J" "Type1/Type2"
 ((tags-todo "CATEGORY=\"foo\"+type1"
 ((org-agenda-overriding-header "Type1")))
  (tags-todo "CATEGORY=\"foo\"+type2"
 ((org-agenda-overriding-header "Type2"
 ((org-agenda-files (list "~/tmp/org/tasks.org"))
  (org-agenda-prefix-format "  % s")
  (org-agenda-compact-blocks t)

With the attached Org file, the agenda buffer looks like this:

Type1
  foo:TODO Item 1   :type1::
  foo:TODO Item 3   :type1::
Type2
  foo:TODO Item 8   :type2::

Anyone any thoughts?  Actually I have wanted a view like "Timeline" for
many years for my agenda searches.  Is that possible?  That would be
even better.

Cheers,

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] "Symbol’s value as variable is void: compile" when export to latex

2015-09-30 Thread Suvayu Ali
On Tue, Sep 29, 2015 at 11:11:09AM +0200, Rainer M Krug wrote:
> 
> Exporting to latex of the simple file below results in an error:
> 
> ,
> | mapcar: Symbol’s value as variable is void: compile
> `

 [...chomp...chomp...chomp...]

> #+LATEX_COMPILER: pdflatex

Are you trying to use Rasmus's latex variant facility?  I'll update and
test soon.

Cheers,

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] bug: latex exporter

2015-09-30 Thread Suvayu Ali
On Tue, Sep 29, 2015 at 05:37:30AM -0400, Charles Millar wrote:
> Since Monday morning (New York time) I have not been able to export to
> pdflatex (worked OK the night before). Instead the message buffer reads
> 
> symbol's value as variable is void - compile
> 
> GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.10.7) of 2014-03-07 on
> lamiak, modified by Debian
> Org-mode version 8.3.1 (release_8.3.1-283-gf6187d @
> /usr/share/emacs/site-lisp/org-mode/lisp/)

You do not provide enough information.  Did you reload Org?  How do you
export?  Did you try to produce a backtrace?  What does that show?
Maybe try with minimal settings?

Please see: http://orgmode.org/manual/Feedback.html#Feedback

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] Exporter aborts upon encountering even one unresolvable link

2015-09-27 Thread Suvayu Ali
On Fri, Sep 25, 2015 at 09:04:29AM +0200, Rainer M Krug wrote:
> 
> Look at publishing instead of exporting to html which works with
> missing links.

That sounds a bit fishy.  AFAIK, ox-publish just wraps around the usual
org-export-as functions from ox.el.  I could be wrong of course.

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] help debugging org-element crashes?

2015-09-25 Thread Suvayu Ali
On Fri, Sep 25, 2015 at 01:34:50PM +0200, Nicolas Goaziou wrote:
> Hello,
> 
> Suvayu Ali  writes:
> 
> > @Nicolas, others, do you think this should be on an FAQ on worg?
> 
> Not yet, please. I plan to change the internals of the cache at some
> point, when I get sufficient spare time.

Sure!

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] help debugging org-element crashes?

2015-09-25 Thread Suvayu Ali
On Thu, Sep 24, 2015 at 04:30:13PM -0400, Peter Salazar wrote:
> Hey everyone,
> 
> I'm finding my Emacs crashing a lot; other times I get errors like these
> which I assume are related to the crashes:
> http://pastebin.com/Tncs79r0
> http://pastebin.com/jfdEYwVk
> 
> I mean total Emacs crashes, where I have to force quit Emacs itself. It's
> happened in various org-mode situations including:
> - pasting text from OSX clipboard
> - promoting/demoting org-headings
> - moving subtree up or down (i.e. using org-metadown org org-metaup)

 [...chomp...chomp...chomp...]

> Any suggestions on how I can track this down and fix it?

You could use this minor mode to track down the cache issue:

https://github.com/suvayu/.emacs.d/blob/master/lisp/org-element-debug.el

Once you know what triggers the crash, you can probably come-up with a
minimal example and post it here.

@Nicolas, others, do you think this should be on an FAQ on worg?

Cheers,

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] [ ] Checkboxes or count of completed TODOs in subtree?

2015-09-24 Thread Suvayu Ali
On Thu, Sep 24, 2015 at 10:41:19AM +0200, Rainer M Krug wrote:
> 
> I would like to be able to use something like checkboxes in a tree of
> headers.
> 
> I understand that checkboxes only work in simple lists, i.e. not on
> headers and trees of headers.
> 
> But I would like to see in my document (an ongoing analysis, of which
> certain parts in each subtree are completed and others still need to
> be done) which subtree contains how many TODO subheaders, effectively as
> I can do with simple lists and checkboxes.
> 
> But as this is the basis for a paper, I want to keep the headers and not
> use simple lists.
> 
> Is this possible? Is there a way to see how many active TODOs are still
> under each header?

You can use statistics cookies for TODO states on the parent headline.

  * Parent [1/3]
  
  ** TODO Section 1
  
  ** WInP Section 2
  
  ** DONE Section 3

Hope this helps,

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] http address for cloning org-mode git

2015-09-23 Thread Suvayu Ali
On Wed, Sep 23, 2015 at 09:29:06PM +0200, Achim Gratz wrote:
> Suvayu Ali writes:
> > On Wed, Sep 23, 2015 at 03:03:42PM -0400, Kaushal Modi wrote:
> >> I cannot access the git: repo address and so had been using the http:
> >> version till now ( http://repo.or.cz/r/org-mode.git/ ).
> >
> > That is a mirror, a relic from the old days when that used to be the
> > official repo.  Maybe try:  http://orgmode.org/org-mode.git
> 
> No, that never was the official repo.  I've set up that mirror.

Didn't we used to have the Org repo hosted on repo.or.cz way, way back
in the old days, pre-2010?  Maybe I'm just confusing a different repo
because it was on the same domain?

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] http address for cloning org-mode git

2015-09-23 Thread Suvayu Ali
On Wed, Sep 23, 2015 at 03:03:42PM -0400, Kaushal Modi wrote:
> Hi all,
> 
> I cannot access the git: repo address and so had been using the http:
> version till now ( http://repo.or.cz/r/org-mode.git/ ).

That is a mirror, a relic from the old days when that used to be the
official repo.  Maybe try:  http://orgmode.org/org-mode.git

http://orgmode.org/worg/org-faq.html#keeping-current-with-Org-mode-development

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] Agenda Tag filtering - has the behaviour changed?

2015-09-22 Thread Suvayu Ali
On Thu, Sep 17, 2015 at 12:16:44PM -0400, Bernt Hansen wrote:
> Nicolas Goaziou  writes:
> 
> > Hello,
> >
> > Robert Klein  writes:
> >
> >> Looking through the commit messages this may come from commit
> >> 6c6ae990c10dbe7f96b24fccf840fe9f6d81a3b8
> >
> > Indeed. It seems related to this NEWS entry
> >
> >   *** Minor refactoring of ~org-agenda-filter-by-tag~
> >   Now uses the argument arg and optional argument exclude instead of
> >   strip and narrow.  ARG because the argument has multiple purposes and
> >   makes more sense than strip now.  The term narrowing is changed to
> >   exclude.
> >
> >   The main purpose is for the function to make more logical sense when
> >   filtering on tags now when tags can be structured in hierarchies.
> 
> Thanks both.
> 
> So was this an intended usability change?  I can probably live with it -
> I just need to retrain my fingers -- but it does take longer to achieve
> the result I want now since I have to clear the agenda tags before
> selecting a new filter and wait for the agenda update each time (my
> agenda has lots of entries).
> 
> The old behaviour was faster to use.
> 
> I haven't done anything with hierarchical tags yet.

FWIW, I think hierarchical tags should be opt-in.  The current behaviour
is a very nice feature, but probably a less common use case than the old
behaviour.  Maybe there can be a toggle?

I tried looking at the source, but it looked non-trivial.

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] A book produced using Org

2015-09-21 Thread Suvayu Ali
On Mon, Sep 21, 2015 at 02:51:13PM -0500, Grant Rettke wrote:
> Where is your Emacs+OrgMode configuration file?
> 
> I want to see what it takes to compile using xelatex; utf8 support
> seems like a great idea.

Until recently, it used be just this:

;; remove "inputenc" from default packages as it clashes with xelatex
(setf org-latex-default-packages-alist
  (remove '("AUTO" "inputenc" t) org-latex-default-packages-alist))

;; replace fontenc, with fontspec
(let ((pos (position '("T1" "fontenc" t) ; T1 -> utf8 for pdflatex
 org-latex-default-packages-alist
 :test 'equal)))
  (if pos
  (setf (nth pos org-latex-default-packages-alist)
'("" "fontspec" t

(setq org-latex-pdf-process ; -shell-escape needed for minted
  '("xelatex -shell-escape -interaction nonstopmode -output-directory %o %f"
"xelatex -shell-escape -interaction nonstopmode -output-directory %o %f"
"xelatex -shell-escape -interaction nonstopmode -output-directory %o 
%f")
  ;; org-latex-pdf-process '("sh -v -x texi2dvi -p -b -c -V %f") ; 
historical
  ;; TODO: maybe use arara, that probably requires export changes
  )

After this patch from Rasmus:

  

it's as simple as adding a

  #+latex_program: xelatex

Hope this helps,

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] [PATCH] ox-latex: Add scrartcl LaTeX class

2015-09-21 Thread Suvayu Ali
On Mon, Sep 21, 2015 at 11:45:08PM +0200, Rasmus wrote:
> Nicolas Goaziou  writes:
> 
> > Sebastian Boehm  writes:
> >
> >> I would like to propose adding the KOMA-script scrartcl class to the
> >> list of supported ox-latex classes. scrartcl is one of the most
> >> popular "article" alternatives out there and it would be great to be
> >> able to pass org files using scrartcl to other Org mode users without
> >> having to explain ox-latex custom settings.
> >>
> >> The attached patch changes ox-latex.el to include scrartcl in
> >> org-latex-classes.
> >
> > Thank you. But can't users needing a non-default class customize their
> > own `org-latex-classes? Or is there an entitling reason to offer it out
> > of the box?
> 
> It's absolutely a much more pleasant experience than article, at least if
> you agree with the KOMA-guys' margin opinion (e.g. top:bottom margin is
> fixed at 1:2).  [I've been using the KOMA-bundle for years and years].
> 
> The patch is also subjective, e.g. it does not feature \minisec[.]{.}.
> 
> ox-koma-article.el would be awesome but until then, there's no point in
> adding it.

I use scrartcl, but I think this should be left up to the end user.
ox-koma-article.el would be great though :).

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] A book produced using Org

2015-09-20 Thread Suvayu Ali
Hi,

Really cool :).  Good work!

On Sun, Sep 20, 2015 at 08:50:20AM +0200, Rainer M Krug wrote:
> Vikas Rawal  writes:
> >
> > Let me put the files in a github repo and share the link.
> 
> That would be great - thanks.
> 
> Is there a worg page where links to documents created using org are
> collected? This would be a brilliant addition!

This might be a good page for that:

  http://orgmode.org/worg/org-papers.html

Although it might need a little restructuring.  For example collecting
these:

  http://orgmode.org/worg/org-contrib/babel/uses.html#sec-6

in the same page might be worthwhile.

Cheers,

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] Using the file as 1st level headline

2015-09-19 Thread Suvayu Ali
On Thu, Sep 17, 2015 at 07:55:07PM +0200, Sven Bretfeld wrote:
> 
> * TODO Write book on XY
> ** Introduction
>Text.
> * NEXT Something 1
> * END
> 
> ** Chapter 1
>Text.
>  TODO Something 2
>  END

If you are using latex export, you should be able to get the above
structure to work with a custom latex-class.  Here is an example:

(add-to-list 'org-latex-classes
 '("withtodos" "\\documentclass[11pt]{scrreprt}"
   (" %s" . " %s")
   ("\\chapter{%s}" . "\\chapter*{%s}")
   ("\\section{%s}" . "\\section*{%s}")
   ("\\subsection{%s}" . "\\subsection*{%s}")
   ("\\subsubsection{%s}" . "\\subsubsection*{%s}")))

This will insert the top level headline as a comment.

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] [org-plot/gnuplot] Plotting candlestick plots

2015-09-18 Thread Suvayu Ali
On Thu, Sep 17, 2015 at 08:05:16PM +0300, Foivos S. Zakkak wrote:
> Hello list,
> 
> I am trying to plot some candlesticks through org-plot/gnuplot,  but I
> fail.
> 
> It seems that org-plot/gnuplot supports a list of numbers in deps, i.e.,
> deps:(2 3 4) and then creates a string of the form:
> 'test.dat' using X with lines
> where X is first 2 then 3 and finally 4 for deps:(2 3 4)
> 
> To plot candlesticks though, gnuplot expects a line of the form:
> 'test'.dat' using 1:3:2:6:5:xticlabels(7) with candlesticks whiskerbars

Org plot is there for quick and easy plotting.  I would recommend using
babel with gnuplot source blocks.  You can easily pass tables as data,
and configure your plot as you wish.  Unfortunately I have not done this
recently, so I don't have any simple examples handy, but I'm sure there
are plenty on Worg.

Hope this helps,

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] Limit on macro snippet size?

2015-09-14 Thread Suvayu Ali
On Mon, Sep 14, 2015 at 08:49:17AM -1000, Thomas S. Dye wrote:
> Hi Suvayu,
> 
> Suvayu Ali  writes:
> 
> > Hey Tom,
> >
> > On Mon, Sep 14, 2015 at 07:34:39AM -1000, Thomas S. Dye wrote:
> >> Suvayu Ali  writes:
> >>
> >> > show it actually works.  How does the failure happen, what do you see in
> >> > the exported file?
> >> 
> >> \textcolor{PaleGreen4}\{the only weapons they had were a
> >> few stones in some of the Canoes and these they threw overboard
> >> when they found they were not wanted\}.
> >> 
> >> Note the curly brackets are escaped.  Not sure why ...
> >
> > Easy-peasy!  Org recognises the first {..} as part of a latex command,
> > not the later.  You need snippets.  I always use them to make export
> > more robust.  Try this:
> >
> > #+macro: green @@l:\textcolor{PaleGreen4}{@@$1@@l:}@@
> 
> This doesn't work for me.  The latex output isn't marked up, but the
> text passed to $1 appears in the tex file.

Sorry, I have a shortcut for latex snippets to l.  Try replacing the l
with latex:

#+macro: green @@latex:\textcolor{PaleGreen4}{@@$1@@latex:}@@

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] Limit on macro snippet size?

2015-09-14 Thread Suvayu Ali
On Mon, Sep 14, 2015 at 07:40:24PM +0200, Suvayu Ali wrote:
> Hey Tom,
> 
> On Mon, Sep 14, 2015 at 07:34:39AM -1000, Thomas S. Dye wrote:
> > Suvayu Ali  writes:
> >
> > > show it actually works.  How does the failure happen, what do you see in
> > > the exported file?
> > 
> > \textcolor{PaleGreen4}\{the only weapons they had were a
> > few stones in some of the Canoes and these they threw overboard
> > when they found they were not wanted\}.
> > 
> > Note the curly brackets are escaped.  Not sure why ...
> 
> Easy-peasy!  Org recognises the first {..} as part of a latex command,
> not the later.  You need snippets.  I always use them to make export
> more robust.  Try this:
> 
> #+macro: green @@l:\textcolor{PaleGreen4}{@@$1@@l:}@@

Btw, this happens because of the newlines of course :).

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] Limit on macro snippet size?

2015-09-14 Thread Suvayu Ali
Hey Tom,

On Mon, Sep 14, 2015 at 07:34:39AM -1000, Thomas S. Dye wrote:
> Suvayu Ali  writes:
>
> > show it actually works.  How does the failure happen, what do you see in
> > the exported file?
> 
> \textcolor{PaleGreen4}\{the only weapons they had were a
> few stones in some of the Canoes and these they threw overboard
> when they found they were not wanted\}.
> 
> Note the curly brackets are escaped.  Not sure why ...

Easy-peasy!  Org recognises the first {..} as part of a latex command,
not the later.  You need snippets.  I always use them to make export
more robust.  Try this:

#+macro: green @@l:\textcolor{PaleGreen4}{@@$1@@l:}@@

Hope this helps,

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] Limit on macro snippet size?

2015-09-14 Thread Suvayu Ali
On Mon, Sep 14, 2015 at 07:24:52PM +0200, Rasmus wrote:
> Eric S Fraga  writes:
> 
> > Less fragile, so long as there are no paragraph breaks maybe...
> 
> But much less portable.
> 
> I think the limitation is that no newlines are allowed, but I did not
> check the source.

But it works with newlines for me; see my reply to the original message.

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] create vector-graphics with org-babel

2015-09-14 Thread Suvayu Ali
On Wed, Sep 09, 2015 at 09:50:58AM +0200, Max Linke wrote:
> Hi
> 
> I'm trying to use vector graphics in my org document
> 
> #+BEGIN_SRC ipython :session :file iso.svg :exports results
>   x = np.linspace(0, 10, 100)
>   y = np.sin(x)
>   plt.plot(x, y)
> #+END_SRC
> 
> I can run this cell with 'C-c C-c' but I can't export it to latex
> because it says that svg is currently not supported. Is there a way
> to include svg (or another type of vector graphics) export into my
> document.

If you want vector graphics, but do not care about the specific type of
vector graphics, you can always use pdf.  IIUC, you are using
matplotlib.  So pdfs are supported, just configure PdfPages from
matplotlib.backends.backend_pdf.

Cheers,

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] Limit on macro snippet size?

2015-09-14 Thread Suvayu Ali
Hi Tom,

On Mon, Sep 14, 2015 at 06:40:48AM -1000, Thomas S. Dye wrote:
> 
> I couldn't find any information on this in the manual or the mailing
> list, though I vaguely recall some discussion on the list a while back.
> 
> Is there a limit on the length of text that a macro like this will
> process?
> 
> #+MACRO: green \textcolor{PaleGreen4}{$1}
> 
> I have 2 and 3 line sections of text passed to $1 that worked last
> spring, but fail now.

Are you sure?  Here is a 3 line macro that seems to work fine for me:

  non-uniform acceptance ratio.  {{{note(Add note on RICH detectors
  relying on exactly this feature to discriminate between particle
  species.,inline)}}}

I have attached a screenshot of the relevant part of the output pdf to
show it actually works.  How does the failure happen, what do you see in
the exported file?

Hope this helps,

-- 
Suvayu

Open source is the future. It sets us free.


Re: [O] inter-word space in org -> latex

2015-09-14 Thread Suvayu Ali
On Mon, Sep 14, 2015 at 10:42:25AM -0400, Dan Griswold wrote:
> Dear org-mode community,
> 
> In LaTeX, a space after a period is treated as an inter-sentence space,
> which is wider than an inter-word space. This can lead to overly wide
> spacing after a period that ends an abbreviation rather than a space. The
> way to cover this in LaTeX is to use a backslash prior to the space, as in:
> 
> Mr.\ Henry Higgins.
> 
> I have some documents in org that have the same issue: periods concluding
> abbreviations, with the result that LaTeX puts more space than I want after
> the abbreviation. Yet the use of "\ " does not work, as the backslash is
> exported to LaTeX as a literal backslash.
> 
> How should I mark in org mode that I want a space following a period
> concluding an abbreviation to be seen by LaTeX as an interword space?

You can use entities.  Maybe something like this:

(setq org-entities-user ; can also use "\ "
  '(("space" "~" nil " " " " " " " ")))

Then the following:

  Mr.\space{}Henry Higgins.

exports as:

  Mr.~Henry Higgins.

Hope this helps,

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] remote plot with local output?

2015-09-14 Thread Suvayu Ali
On Tue, Sep 15, 2015 at 12:11:03AM +0900, Benda Xu wrote:
> 
> My solution is to cache the result (:cache yes), execute the code block,
> copy the output file to localhost, update the #+RESULTS link to the
> local one, manually.  Now I am facing many such tasks and feel like
> automating that.

Maybe, you could do all that in your python source block?  You could use
the :file header to specify where the plot gets copied to on the local
filesystem.

WDYT?

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] Merge branch 'maint'

2015-09-11 Thread Suvayu Ali
On Thu, Sep 10, 2015 at 06:26:59PM -0400, Kyle Meyer wrote:
> Oleh Krehel  writes:
> 
> > Why not just cherry-pick the commits from master onto maint, or the
> > other way around? That would result in no merge commits.
> 
> The result of doing that is IMO worse than many merge commits.  For each
> fix in maint, you'd end up with two commits that are linked only by a
> patch id (if there are no conflicts) and perhaps a reference in the
> message (e.g., if -x is used and there are no conflicts).  Merging
> allows you to manage a large set of changes, including conflicts,
> between upstream and downstream branches and to be sure about which
> commits a branch contains.

Indeed!  It's one of Git's upsides, why fight it?

> I think cherry picking should be limited to one-off cases where a fix
> lands in master and then it is later realized that it's needed in maint.

Well said.

-- 
Suvayu

Open source is the future. It sets us free.



[O] Bug in LaTeX export with short captions

2015-09-10 Thread Suvayu Ali
Hi,

When I export the following table to latex,

  #+name: tab:foo
  #+caption[/s/-weights]: /s/-weights.
  | A | B | C |D |
  |---+---+---+--|
  | 70347 | 10885 | 68502 | 4021 |
  | 68458 | 20310 | 66683 | 5853 |
  | 69418 | 22329 | 67617 | 6431 |
  | 71336 | 28674 | 69479 | 8160 |

I get the following:

  \begin{table}[htb]
  \caption[\emph{s}-weights]{\label{tab:foo}
  weights]: \emph{s}-weights.}
  \centering
  \begin{tabular}{}
  A & B & C & D\\
  \hline
  70347 & 10885 & 68502 & 4021\\
  68458 & 20310 & 66683 & 5853\\
  69418 & 22329 & 67617 & 6431\\
  71336 & 28674 & 69479 & 8160\\
  \end{tabular}
  \end{table}

Note the extra "weights]:" in the long caption.  This happens whenever
there is some kind of emphasis in the short caption: /s/, *s*, etc.

Cheers,

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] porting guide from old to new beamer export?

2015-09-02 Thread Suvayu Ali
On Tue, Sep 01, 2015 at 09:11:36PM +0200, Joseph Vidal-Rosset wrote:
> 2015-08-31 10:32 GMT+02:00 Loris Bennett :
> 
> > #+BEAMER_THEME: CambridgeUS
> >
> > If that doesn't work, you should post a minimal working example which
> > illustrates the problem.
> >
> 
> 
> I must say to the list that the code that solves my problem is given in
> Eric Fraga's tutorial:
> 
> #+latex_header:
> \mode{\usetheme{CambridgeUS}\usepackage{beamer_udl_theme}}

If using the BEAMER_THEME keyword option does not work for you, please
submit a bug report with a minimal working example demonstrating the
bug.

Thanks,

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] porting guide from old to new beamer export?

2015-09-01 Thread Suvayu Ali
On Tue, Sep 01, 2015 at 12:19:32AM +, Marko Schütz-Schmuck wrote:
> Suvayu Ali  gmail.com> writes:
> 
> > 
> > On Mon, Aug 31, 2015 at 05:23:52PM +, Marko Schütz-Schmuck wrote:
> > > 
> > > Thanks for the link. I had used all of the documentation that are 
> > > referenced
> > > on that page.
> > > 
> > > I have uploaded a typical file with slides to http://pastebin.com/L2ss0hXG
> > > and http://pastebin.com/D61eSkDq.
> > > 
> > > When I publish this to PDF with the new exporter the LaTeX file that is
> > > generated does not use any frames http://pastebin.com/8jN6XeuE
> > 
> > I think you are doing one of two things wrong.  Either your
> > org-latex-classes is incorrectly setup, or you are simply exporting to
> > latex instead of beamer (C-c C-e l b).  E.g. I get the following as the
> > first frame:
> 
> Thanks, that helps a lot!
> 
> I did not have an option to export to beamer. I wasn't aware that I had to
> require ox-beamer explicitly.

Okay good.

> Now I notice that the new exporter makes frame titles like this
> 
> \begin{frame}[label=sec-8]{proving 
> \hoareTriple{V}\{\(\textmath{merge}\)\}\{P\}}
> 
> where the old one generated this
> 
> \begin{frame}
> \frametitle{proving \hoareTriple{V}{\(\textmath{merge}\)}{P}}
> \label{sec-8}
> 
> The new exporter escaped some { and } that should not be escaped.

The new exporter tries to preserve special characters whenever it
doesn't recognise a latex snippet.  To ensure they are not escaped as
special characters, you should use export snippets.  Try:

  @@latex:\hoareTriple{V}{@@\(\textmath{merge}\)@@latex:}{P}@@

See the help string for org-export-snippet-translation-alist.

Hope this helps,

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] porting guide from old to new beamer export?

2015-08-31 Thread Suvayu Ali
On Mon, Aug 31, 2015 at 05:23:52PM +, Marko Schütz-Schmuck wrote:
> 
> Thanks for the link. I had used all of the documentation that are referenced
> on that page.
> 
> I have uploaded a typical file with slides to http://pastebin.com/L2ss0hXG
> and http://pastebin.com/D61eSkDq.
> 
> When I publish this to PDF with the new exporter the LaTeX file that is
> generated does not use any frames http://pastebin.com/8jN6XeuE

I think you are doing one of two things wrong.  Either your
org-latex-classes is incorrectly setup, or you are simply exporting to
latex instead of beamer (C-c C-e l b).  E.g. I get the following as the
first frame:

  \begin{frame}[label={sec:orgheadline1}]{linear search}
   %% stuff
  \end{frame}

My org-latex-classes has an entry like this:

 ("beamer" "\\documentclass[presentation]{beamer}"
  ("\\section{%s}" . "\\section*{%s}")
  ("\\subsection{%s}" . "\\subsection*{%s}")
  ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))

Does yours?

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] porting guide from old to new beamer export?

2015-08-31 Thread Suvayu Ali
On Mon, Aug 31, 2015 at 10:32:35AM +0200, Loris Bennett wrote:
> Joseph Vidal-Rosset  writes:
> 
> > Is it possible to get something like the CambridgeUS colortheme via
> > the org-export of beamer? I do not succeed to do it, it is always the
> > same theme.
> >
> > Best wishes
> >
> > Jo. 
> 
> #+BEAMER_THEME: CambridgeUS
> 
> If that doesn't work, you should post a minimal working example which
> illustrates the problem.

Most of the standard stuff is quite extensively documented.  E.g. see
these:

- Manual: (info "(org) Beamer specific export settings")
  
http://orgmode.org/manual/Beamer-specific-export-settings.html#Beamer-specific-export-settings
- Worg: http://orgmode.org/worg/exporters/beamer/ox-beamer.html#config

Cheers,

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] porting guide from old to new beamer export?

2015-08-30 Thread Suvayu Ali
On Sun, Aug 30, 2015 at 07:02:51PM -0400, Marko Schütz Schmuck wrote:
> Dear All,
> 
> I have again tried (unsuccessfully in the time I was able to spend on
> this) to switch to a newer version of org (tried ELPA as well as
> 8.2.4). The obstacle is always the beamer export. I have consulted the
> documentation online, but by following the instructions there the
> generated LaTeX does not use the frame environment at all. I did set
> H:1, but no frames...

Which documentation did you look at?  The manual is very complete, and
if you want something more along the lines of a tutorial, see the
articles listed on this page:

  http://orgmode.org/worg/exporters/beamer/index.html

If you have specific questions, please feel free to ask.

Hope this helps,

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] Links to Info manuals in exported HTML/LaTeX

2015-08-28 Thread Suvayu Ali
On Thu, Aug 27, 2015 at 10:19:40AM +0200, Marcin Borkowski wrote:
> Hi all,
> 
> it seems that links to Info manuals are broken in HTML and LaTeX export
> (and possibly in other backends, too).
> 
> Would it make sense to make them work, i.e., link to the official web
> versions, at least for standard Info manuals, like Emacs manual, Elisp
> reference or Org manual?

You could probably use filters (org-export-filter-link-functions) to
point them where you want them.

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] subscript on a table caption

2015-08-27 Thread Suvayu Ali
Hi,

May I suggest not to top post, makes it much harder to follow the
discussion.

On Wed, Aug 26, 2015 at 11:54:57PM -0400, Peter Salazar wrote:
> What do you see if you do C-h v org-export-latex-emphasis-alist
> and org-html-text-markup-alist? Anything about subscript?

sub/super-scripts are different from emphasis/markup.  Also the emphasis
variable you mention does not exist, maybe you meant org-emphasis-alist?

In any case, all of this is moot.  The bug has been fixed.

  

Cheers,

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] Tables with multicolumn in LaTeX export

2015-08-25 Thread Suvayu Ali
Hi Eric,

On Tue, Aug 25, 2015 at 04:13:40PM +0100, Eric S Fraga wrote:
> On Tuesday, 25 Aug 2015 at 16:38, Suvayu Ali wrote:
> >
> > I was wondering if it is possible to have multicolumn when exporting
> > tables to LaTeX.  Something like the following:
> >
> > | | | ∈ (5300,5800) | | ∈ (5320,5420) | <- row with multicolumn

 [...]

> A kludge but you can use @@latex:...@@ in the table headings to achieve
> what you want.  Not pretty, mind you, and to avoid multiple \cr being
> created for the extra rows on the first line, this will only work if the
> last column is part of a multicolumn.
> 
> #+begin_src org
>   ,* table with multiple column spanning
>   || @@latex:\multicolumn{2}{c}{@@\in (5300,5800)@@latex:}@@ 
> | @@latex:\multicolumn{2}{c}{@@ \in (5320,5420) @@latex:} \\%@@ ||
> |

This is very clever and works nicely :).  Thank you!

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] emacs & org mode for scholars questions

2015-08-25 Thread Suvayu Ali
Hi John,

On Tue, Aug 25, 2015 at 09:51:53AM -0400, John Kitchin wrote:
> 
> Most important maybe: figure out how to merge narrative text in version
> control! I don't want to write a sentence per line just to use the
> default merge with git. I really want a word-based track-change like
> diff, and merge.

Ages ago there was a GSoC project, Org merge driver, for use with git.
I don't recall what was the last status.  Okay, found some info:

http://orgmode.org/worg/org-contrib/gsoc2012/student-projects/git-merge-tool/

Would be good to somehow revive this.  I guess it's not an easy problem.
If I remember correctly, there was no prior discussion on the list what
should be the merge strategy.  It happened as the project progressed.  I
think this is one of those projects where a clear path/plan how to
proceed before writing any code would be very beneficial.

Maybe someone can propose a plan?

Cheers,

-- 
Suvayu

Open source is the future. It sets us free.



[O] Tables with multicolumn in LaTeX export

2015-08-25 Thread Suvayu Ali
Hi,

I was wondering if it is possible to have multicolumn when exporting
tables to LaTeX.  Something like the following:

||| ∈ (5300,5800) || ∈ (5320,5420) | <- row 
with multicolumn
| classifier | signal |combi. | signal |combi. |
|++---++---|
| old BDT > 0.3  |  70347 | 10885 |  68502 |  4021 |
| BDT v1 > -0.08 |  68458 | 20310 |  66683 |  5853 |
| BDT v1 > -0.09 |  69418 | 22329 |  67617 |  6431 |
| BDT v1 > -0.12 |  71336 | 28674 |  69479 |  8160 |

to

\begin{tabular}{l}
 &  \multicolumn{2}{c}{∈ (5300,5800)} &  \multicolumn{2}{c}{∈ (5320,5420)}\\
classifier & signal & combi. & signal & combi.\\
\hline
old BDT > 0.3  & 70347  & 10885  & 68502  & 4021\\
BDT v1 > -0.08 & 68458  & 20310  & 66683  & 5853\\
BDT v1 > -0.09 & 69418  & 22329  & 67617  & 6431\\
BDT v1 > -0.12 & 71336  & 28674  & 69479  & 8160\\
\end{tabular}

I am not too keen on using table.el as it uses too many lines, I would
like it to be minimal (tiny screenshot attached).  Maybe there is a
hack?  I'm not familiar with all the possibilities available via
#+attr_latex properties.  Thanks for any ideas.

Cheers,

-- 
Suvayu

Open source is the future. It sets us free.


Re: [O] using subscripts in table captions

2015-08-25 Thread Suvayu Ali
On Tue, Aug 25, 2015 at 08:09:55AM +0200, Johannes Rainer wrote:
> 
> The test org-file I used contains the following:
> 
> 
> 
> #+TITLE:TestTest
> #+OPTIONS: ^:nil
> 
> * Test tables
> 
> just in plain text: bla_blu, bla\_blu; both works nicely.
> 
> #+CAPTION: Some bla bla and an underscore: bla_blu. The same escaped: 
> bla\_blu. Doesn't work for either of them; blu is always used as subscript.
> || agegp | alcgp |tobgp | ncases | ncontrols |
> |+---+---+--++---|
> |  1 | 25-34 | 0-39g/day | 0-9g/day |   0.00 | 40.00 |
> |  2 | 25-34 | 0-39g/day |10-19 |   0.00 | 10.00 |
> |  3 | 25-34 | 0-39g/day |20-29 |   0.00 |  6.00 |
> 
> 
> ---
> 
> The _ in the plain text are exported as expected, but not the caption.

Using your example file, I get the following.  I guess that confirms
your bug.  I'm using release_8.3.1-129-g526927.

Hope this helps,


\section{Test tables}
\label{sec:orgheadline1}

just in plain text: bla\_blu, bla$\backslash$\_blu; both works nicely.

\begin{table}[htb]
\caption{Some bla bla and an underscore: bla\(_{\text{blu}}\). The same 
escaped: bla$\backslash$\(_{\text{blu}}\). Doesn't work for either of them; blu 
is always used as subscript.}
\centering
\begin{tabular}{rrlrrr}
 & agegp & alcgp & tobgp & ncases & ncontrols\\
\hline
1 & 25-34 & 0-39g/day & 0-9g/day & 0.00 & 40.00\\
2 & 25-34 & 0-39g/day & 10-19 & 0.00 & 10.00\\
3 & 25-34 & 0-39g/day & 20-29 & 0.00 & 6.00\\
\end{tabular}
\end{table}

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] Stable releases

2015-08-21 Thread Suvayu Ali
Hi Tom,

On Thu, Aug 20, 2015 at 01:56:43PM -1000, Thomas S. Dye wrote:
> 
> Bastien  writes:
> 
> > Hi Rasmus,
> >
> > Rasmus  writes:
> >
> >> One data point: I can absolutely not be bothered using anything that is
> >> not at least in contrib.
> >
> > Just out of curiosity: don't you use the Emacs package system at all?
> >
> > I used not to use it, but thanks to recent improvements, I find it
> > quite good now -- and I would not mind using Org packages from there.
> 
> The package system appears to be quite popular in the Org mode world.

The summary you provide below is very impressive, thanks for compiling
it. It would be a nice addition to worg, with a date attached to it of
course!  It's bound to go stale at some point :-p.

However I would like to point out, the documentation for many of these
extensions is rather spreadout and thin.  So I agree with Rasmus, as in,
contrib is much more accessible, but I think it also encourages authors
to contribute documentation on worg (after all it's in the official
repository).  That said, I'm not sure why some of the extensions, like
ox-reveal, are _not_ in contrib.  AFAIU, it's quite mature.

Cheers,


> There are a dozen ob-* languages distributed by the package system
> vs. eight in contrib.  There are fifteen ox-* exporters available
> through the package system vs. eleven in contrib.
> 
> Download statistics from Melpa indicate several of the packages are
> quite popular.  ox-reveal has been downloaded more than 4,000 times, and
> ox-pandoc and ox-gfm (Github flavored markup) more than 1,000 times.
> The babel languages are less popular, but ob-browser (for html),
> ob-ipython, ob-mongo, and ob-sml have all been downloaded more than 300
> times.
> 
> Melpa has 91 org-* packages. The packages evil-org, org-bullets, and
> org-fstree have all been downloaded more than 10,000 times.  There are
> ten others with more than 1,000 downloads.

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] [DEV] Bump Emacs requirement to 24.4?

2015-08-19 Thread Suvayu Ali
Hi Bastien,

On Wed, Aug 19, 2015 at 11:40:09AM +0200, Bastien wrote:
> Suvayu Ali  writes:
> 
> > I'm slightly confused as-to why this special org-8-master branch is
> > needed.  As far as I understood from Achim's message (2nd paragraph):
> >
> >   <http://mid.gmane.org/87twrzkbow.fsf@Rainer.invalid>,
> >
> > that so far maint supports Emacs 23.
> 
> Yes, maint supports Emacs 23.
> 
> But maint is for minor release, and I want a branch where we can work
> on major releases (8.4, 8.5, etc.) that support Emacs 23 too.

I think this was the bit of information I was missing.

Thanks,

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] [DEV] Bump Emacs requirement to 24.4?

2015-08-18 Thread Suvayu Ali
Hi Bastien,

On Wed, Aug 19, 2015 at 01:01:29AM +0200, Bastien wrote:
> 
> The maint branch continues to be used to work on minor releases, as it
> has always been used.
> 
> Instead of reverting changes from the master branch (you clearly don't
> want to do that, and I don't either), I suggest we create a new branch
> called "org-8-master" for Org 8.4+, and continue to use master for Org
> 9.x+ (i.e. "major major releases").

I'm slightly confused as-to why this special org-8-master branch is
needed.  As far as I understood from Achim's message (2nd paragraph):

  ,

that so far maint supports Emacs 23.  Although this might have been a
coincidence, without a conscious decision.  It will continue supporting
Emacs 23 until Org 9.  Post Org 9, if required, one can choose to start
a new maint branch called maint23 for continued Emacs 23 support.

Given the above, I do not understand the need for a separate
org-8-master branch.  Is this a gap in communication, or am I missing
something here?

Cheers,

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] beamer_env tag issue with empty headlines

2015-08-18 Thread Suvayu Ali
On Mon, Aug 17, 2015 at 11:11:59PM -0400, Prateek Mehta wrote:
> 
> I have a beamer block setup like below, so that it does not have a headline.
> 
> 
> **  :B_block:BMCOL:
>:PROPERTIES:
>:BEAMER_col: 0.64
>:BEAMER_env: block
>:END:
> 
> - Some text here
> 
> When I export it, the beamer environment tags show up in the pdf. This was
> not the case a couple of months ago, when the tags didn't appear in the
> pdf.
> 
> If the the headline is not empty, the tags do not show in the pdf and it
> works as it used to.

I can confirm this behaviour.  I do not know if this is a regression,
but it is inconsistent for sure.  That said, you can hack around this by
using \phantom{dummy}.

Hope this helps,

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] 8.3.1 and org-latex-with-hyperref

2015-08-17 Thread Suvayu Ali
On Sun, Aug 16, 2015 at 04:22:43PM -0400, Scott Randby wrote:
> On 08/16/2015 09:36 AM, Bastien Guerry wrote:
> >Scott Randby  writes:
> >
> >>Unfortunately, the \hypersetup{...} generated by org is last one in
> >>the preamble when an org document is exported.
> >
> >Is there anything to fix here?
> 
> Yes in my opinion. Return the org-latex-with hyperref variable to Org.

I don't get it, what's wrong with Nicolas's suggestion with
org-latex-hyperref-template in this message?

  

I thought that should take care of all your needs.

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] Pass options to \columns{} environment in beamer export

2015-08-14 Thread Suvayu Ali
Hi John,

On Fri, Aug 14, 2015 at 11:16:42PM -0500, John Hendy wrote:
> On Fri, Aug 14, 2015 at 6:25 AM, Suvayu Ali  
> wrote:
> >
> >   All contiguous environments are automatically wrapped in a columns
> >   environment, although it can be forced at any point by setting the
> >   BEAMER_env property to columns. This might be handy if you want to
> >   pass special options.

 [...]

> Definitely, and I can take a stab at it now that I understand how it
> works. I think what didn't register was the meaning of "contiguous
> environments." I'm not really sure how to parse that.
> - What is an "environment" (as in any of the b_xxx properties causes
> it to be in a columns env. as well)?

Environment here refers to what is exported to LaTeX.  Since the
previous paragraph was talking about "column", I mean these blocks:

  \begin{column}
  ...
  \end{column}

I think the important bit to understand (in general about the beamer
exporter), the properties are what determine the exported LaTeX
environment.  The tags are there for the convenience of the user.  The
BMCOL tag is the exception, no other tag behaves this way.  There is
another special tag, B_ignoreheading, but there the purpose is to end
the previous environment, rather than export a new one.

> - What is "contiguous" (I think I now understand this to mean
> "nested.")? I guess I tend to think of contiguous as "of the same
> part," which didn't immediately register as "parent/child." That said,

The dictionary meaning of contiguous is something that shares a
boundary, or adjacent.  Maybe a more common, but less specific, word is
easier to follow, say something like adjacent or consecutive.  Is the
meaning clearer if contiguous is changed to one of these?  

Would a more verbose explanation, maybe with an example, be better?
Either way, please feel free to make the change :).

Cheers,

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] Pass options to \columns{} environment in beamer export

2015-08-14 Thread Suvayu Ali
Hi John,

On Thu, Aug 13, 2015 at 06:41:45PM -0500, John Hendy wrote:
> 
> I would not have guessed that from Worg, that's for sure. Thanks much for
> chiming in.

In the tutorial under "Special environments"[1], I see the following
paragraph:

  All contiguous environments are automatically wrapped in a columns
  environment, although it can be forced at any point by setting the
  BEAMER_env property to columns. This might be handy if you want to
  pass special options.

Do you think it could be worded more clearly?  When I wrote the article
(which is quite a while back :-p), I was trying to be complete without
being too verbose.  While working on your project, if you think of
improvements to the article, please feel free to make the changes.  The
article is in desperate need of updates.  I have a long list of
additions, if only I could find the time.

Cheers,


Footnotes:

[1] http://orgmode.org/worg/exporters/beamer/ox-beamer.html#special-environments

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] Stable releases

2015-08-11 Thread Suvayu Ali
On Tue, Aug 11, 2015 at 02:33:18PM -0400, Ista Zahn wrote:
> On Tue, Aug 11, 2015 at 1:18 PM, Scott Randby  wrote:
> >
> > I guess what I want to know, and maybe there is no answer, is how long
> > should I wait before upgrading to a stable release?
> 
> One strategy is keeping an eye on the mailing list and waiting for bug
> reports to die down before upgrading.

I would like to add, the community always needs help, and writing code
is not the only way to do that.  From your message it seems to me you
have a rather elaborate use for Org.  It might serve as a great test
case.  If you follow the list regularly, then you could help by testing
the maint branch from time to time (or even master, up to you). 

You do not need to know how to use git, you have two options:

- simply download the tarballs from the gitweb interface (see the
  "snapshot" links, http://orgmode.org/w/org-mode.git),

- use elpa (either GNU, Org's own)

As for git, I have included the bash function I use to update Org once a
week.  If you are interested, feel free to ask me Git questions
off-list.

function update_org() {
pushd ~/build/org-mode  # my Org repo and install directory
local dorebase=$(git rev-list origin/master..master|wc -l)
git stash
git checkout master
if [[ $dorebase -gt 0 ]]; then
git pull --rebase --stat
else
git pull
fi

if [ $? == 0 ]; then
echo "+++ Check if merged successfully. +++"
echo "==> Want to continue?"
select yesorno in "Yes" "No"; do
case $yesorno in
Yes)
echo "+++ Building Org-mode $(git branch|egrep '\*')
+++";
make compile autoloads info "$@" &> log
[ $? -ne 0 ] && echo "+++ Build failed  
+++" && break;
echo "+++ Installing Info files +++";
make install-info
break;;
No)
echo "Aborting on user command.";
break;;
*)
echo "==> Choose Yes or No by typing 1 or 2."
esac
done
else
echo "Merge failed, aborting."
fi
popd
}


Hope this helps,

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] [OFF TOPIC] almost giving up on emacs email..looking for advice?

2015-08-11 Thread Suvayu Ali
On Tue, Aug 11, 2015 at 02:35:57PM +0200, Nicolas Richard wrote:
> Peter Davis  writes:
> > 2) I need a decent editor for replies. I have not found a
> > browser-based client that has this.
> 
> 
> Firefox has an extension,
> https://addons.mozilla.org/fr/firefox/addon/its-all-text/, which allows
> you to edit any text in your favourite editor (aka emacs) with
> emacsclient.

Doesn't work anymore with Gmail.

  https://github.com/docwhat/itsalltext/issues/36

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] 8.3.1 and org-latex-with-hyperref

2015-08-09 Thread Suvayu Ali
On Sun, Aug 09, 2015 at 09:06:27AM -0400, Scott Randby wrote:
> On 08/09/2015 03:54 AM, Suvayu Ali wrote:
> >
> >If I understand hyperref correctly, I think it is okay to have multiple
> >\hypersetup{...} commands, and the last one has precedence.  So in the
> >future, you could simply put yours after the one generated by Org.
> 
> Unfortunately, the \hypersetup{...} generated by org is last one in the
> preamble when an org document is exported.

Indeed, you are right.

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] 8.3.1 and org-latex-with-hyperref

2015-08-09 Thread Suvayu Ali
On Sat, Aug 08, 2015 at 03:04:52PM -0400, Scott Randby wrote:
> On 08/08/2015 02:50 PM, Rasmus wrote:
> >Scott Randby  writes:
> >
> >>Sorry for the noise, I figured out how to prevent the automatic
> >>insertion of \hypersetup{...} by deleting the settings for
> >>org-latex-hyperref-template
> >
> >I'm curious to know what you are missing in org-latex-hyperref-template?
> >What do you need in order to use the provided method?
> 
> Nothing is missing. I had difficulties with the default \hypersetup{...}
> with an old version of org, and my habit became to use my own
> \hypersetup{...} instead. Since I now have a huge number of documents with
> my own setup, it isn't worth it to go and change all of them.

If I understand hyperref correctly, I think it is okay to have multiple
\hypersetup{...} commands, and the last one has precedence.  So in the
future, you could simply put yours after the one generated by Org.

Hope this helps,

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] Exporting multiple images in a float (LaTeX)

2015-08-08 Thread Suvayu Ali
On Sat, Aug 08, 2015 at 09:23:57PM +0200, Rasmus wrote:
> Eric S Fraga  writes:
> 
> > On Friday,  7 Aug 2015 at 16:23, Rasmus wrote:
> >
> > [...]
> >
> >> I guess there would also be no loss from actually inserting a "%" after
> >> \includegraphics[·]{·} in ox-latex.
> >
> > Except that then the suggestion I just made would not work and would in
> > fact be quite confusing as the second figure would be lost in the
> > export?
> 
> But we can insert "%\n" and in the latex end there's no difference between
> 
> \includegraphics[]{}%
> \includegraphics[]{}%
> 
> And
> 
> \includegraphics[]{}\includegraphics[]{}%
> 
> To the best of my knowledge.

I think you are correct!

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] Beamer environment properties highlighting and shortcut

2015-08-07 Thread Suvayu Ali
On Fri, Aug 07, 2015 at 05:40:55PM -0500, John Hendy wrote:
> 
> It states that =C-c C-b= will prompt for beamer specific headlines;
> this does not appear to work with the new ox-beamer export engine. I
> see the command is =org-beamer-select-environment=. Did this get
> mapped to something else now?

This requires you to enable the `org-beamer-mode'.

 [...]

> I noted that B_col creates some sort of special fontification (see
> attached screenshot), but does not create columns. =beamer_col= *does*
> work, but is not syntax highlighted as special in any way.

Probably a left over from the old days.

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] Exporting multiple images in a float (LaTeX)

2015-08-07 Thread Suvayu Ali
On Fri, Aug 07, 2015 at 05:19:18PM +0100, Eric S Fraga wrote:
> On Friday,  7 Aug 2015 at 16:23, Rasmus wrote:
> 
> [...]
> 
> > I guess there would also be no loss from actually inserting a "%" after
> > \includegraphics[·]{·} in ox-latex.
> 
> Except that then the suggestion I just made would not work and would in
> fact be quite confusing as the second figure would be lost in the
> export?

True, I guess the question is which is more natural.

  file:foo.pdf
  file:bar.pdf

or,

  [[file:foo.pdf]] [[file:bar.pdf]]

One thing I can think of, the second option can be confusing in the Org
buffer when you do not want the space in between.

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] Exporting multiple images in a float (LaTeX)

2015-08-07 Thread Suvayu Ali
On Fri, Aug 07, 2015 at 04:23:48PM +0200, Rasmus wrote:
> Suvayu Ali  writes:
> > On Fri, Aug 07, 2015 at 02:28:58PM +0100, Eric S Fraga wrote:
> >> On Friday,  7 Aug 2015 at 06:24, Suvayu Ali wrote:
> >> 
> >> > This is very nice, thank you!  I think this will do it for me.  I have a
> >> > small question, is there a better way to add a % after the first image
> >> > in the above case other than adding a snippet?
> >> >
> >> >   #+begin_figure
> >> >   #+attr_latex: :width 0.45\linewidth
> >> >   [[file:myfig2.pdf]]@@l:%@@
> >> >   [[file:myfig3.pdf]]
> >> >   #+end_figure
> >> 
> >> If you want the % simply to have LaTeX ignore the line end, you could
> >> put the figures on the same line, such as
> >> 
> >> #+begin_figure
> >> #+attr_latex: :width 0.45\linewidth
> >> [[file:myfig2.pdf]][[file:myfig3.pdf]]
> >> #+end_figure
> >
> > Cool, that works :).  Thanks a lot Eric.
> 
> I guess there would also be no loss from actually inserting a "%" after
> \includegraphics[·]{·} in ox-latex.

I would agree with that :).

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] [PATCH] Re: What is the best way to set #+DATE to today's date?

2015-08-07 Thread Suvayu Ali
On Fri, Aug 07, 2015 at 10:01:42AM -0400, Kaushal wrote:
> @Fabrice Thanks for sharing your examples!
> 
> @Suvayu I tried removing #+DATE: line.. but with that I don't see the date
> stamp in html exports. The advantage of {{{time(FORMAT)}}} is that I can
> also control the formatting of the date-time stamp.

I just tested it, I get the following at the end of the exported html
document:


Author: Suvayu Ali
Created: 2015-08-07 Fri 16:14
http://validator.w3.org/check?uri=referer";>Validate

I don't know any html, were you expecting something else?  About the
format, take a look at org-time-stamp-custom-formats and
org-time-stamp-formats; eventhough they are for timestamps in the
document, maybe they honour the document creation timestamp.

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] Exporting multiple images in a float (LaTeX)

2015-08-07 Thread Suvayu Ali
On Fri, Aug 07, 2015 at 02:28:58PM +0100, Eric S Fraga wrote:
> On Friday,  7 Aug 2015 at 06:24, Suvayu Ali wrote:
> 
> [...]
> 
> > This is very nice, thank you!  I think this will do it for me.  I have a
> > small question, is there a better way to add a % after the first image
> > in the above case other than adding a snippet?
> >
> >   #+begin_figure
> >   #+attr_latex: :width 0.45\linewidth
> >   [[file:myfig2.pdf]]@@l:%@@
> >   [[file:myfig3.pdf]]
> >   #+end_figure
> 
> If you want the % simply to have LaTeX ignore the line end, you could
> put the figures on the same line, such as
> 
> #+begin_figure
> #+attr_latex: :width 0.45\linewidth
> [[file:myfig2.pdf]][[file:myfig3.pdf]]
> #+end_figure

Cool, that works :).  Thanks a lot Eric.

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] What is the best way to set #+DATE to today's date?

2015-08-06 Thread Suvayu Ali
On Thu, Aug 06, 2015 at 01:00:31PM -0400, Kaushal wrote:
> > Why don't you just use a timestamp?
> 
> But that would need me to insert the timestamp manually each time before
> exports
> 
> > You can update whenever you want or using
> >(org-insert-time-stamp (current-time))
> > at the right spot.
> 
> Wouldn't that too need manual navigation to #+date: and then eval that
> elisp form?

Why are you setting it if you want it to be today?  If no DATE field is
set, date is today, at least for LaTeX export.

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] Exporting multiple images in a float (LaTeX)

2015-08-06 Thread Suvayu Ali
Hi Rasmus,

On Fri, Aug 07, 2015 at 12:31:37AM +0200, Rasmus wrote:
> Rasmus  writes:
> > Suvayu Ali  writes:
> >
> >>   #+name: fig:myfig1
> >>   #+caption: This is a single figure, entered in the usual way.
> >>
> >>   file:myfig1.pdf
> >>
> >>   #+begin_latex
> >>   \begin{figure}[htb]
> >> \centering
> >> \includegraphics[width=0.8\linewidth]{myfig2.pdf}
> >> \includegraphics[width=0.8\linewidth]{myfig3.pdf}
> >> \caption{\label{fig:myfig23} Two images in one floating environment.}
> >>   \end{figure}
> >>   #+end_latex
> >
> >
> > You should probably use subcaption for that.  If so see maybe here:
> >
> > http://thread.gmane.org/gmane.emacs.orgmode/92820

I usually don't need multiple captions, just one caption for a float
with multiple very closely related images.

> > For archiving the above you could just use a special block
> >
> >  #+caption: foo
> >  #+attr_latex: :options [htb]
> >
> >  #+begin_figure
> >  [[file:fig2.png]]
> >  [[file:fig3.png]]
> >  #+end_figure

This is very nice, thank you!  I think this will do it for me.  I have a
small question, is there a better way to add a % after the first image
in the above case other than adding a snippet?

  #+begin_figure
  #+attr_latex: :width 0.45\linewidth
  [[file:myfig2.pdf]]@@l:%@@
  [[file:myfig3.pdf]]
  #+end_figure

> Also, note that :float nil now handles captions and that you should be
> able to give arbitrary citations commands.  Thus, you should be able to
> recreate any old latex structure for images.

I'm not sure I understand the comment about arbitrary citation commands.

Cheers,

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] 8.3 hangs

2015-08-06 Thread Suvayu Ali
On Thu, Aug 06, 2015 at 06:42:49PM -0700, Samuel Wales wrote:
> just now occurred when refiling from remember subtree to other agenda
> files.  maybe i did a ^G or an isearch or both.
> 
> Error running timer `org-element--cache-sync': (wrong-type-argument
> integer-or-marker-p nil)
> 
> 
> On 8/6/15, Samuel Wales  wrote:
> > nothing special stands out as something i can try to keep doing to
> > make it occur.
> >
> > On 8/6/15, Nicolas Goaziou  wrote:
> >> Do these errors start to appear a short while after you do something
> >> typical in your workflow (e.g., sorting a table)?
> >

If it is a cache issue, you can try this minor mode from Nicolas.  It
helped me file a more useful cache related bug report.

https://github.com/suvayu/.emacs.d/blob/master/lisp/org-element-debug.el

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] [OFF TOPIC] almost giving up on emacs email..looking for advice?

2015-08-06 Thread Suvayu Ali
On Thu, Aug 06, 2015 at 08:21:15PM +0300, Xebar Saram wrote:
> thank so much everyone for your great tips and comments
> 
> you gave me more energy to further pursue  gnus and or mu4e

There is also notmuch.  In fact, notmuch seems to have an edge over mu4e
when it comes to performance, at least that's my understanding.

I would like to say something though.  I think you should not blindly
keep on trying all these options, that would probably end up in
frustration all over again.  First you need to answer, how you use
email, how do you want to access it, and what kind of features do you
want.  You shouldn't limit yourself to Emacs either.  Eventhough Emacs
can do many things, often there are other tools which are better suited.

- Email could be a means for discussions, in that case it's a reference
  - Then you might want searchability, or someway to refer back to
messages.
- It could be a todo list for you, in that case you want some way to
  filter and carry over your emails to your todo lists.
  - Do you want filtering for other purposes?
- You might want access to your emails over IMAP (it's immediate), or
  available locally (always there, not immediate).
- Local disk space constraints.
- Do you want access to your emails from multiple interfaces?
- Do you prefer using the terminal or a GUI?

As you see, there are lots of points to think about.

Hope this helps,

-- 
Suvayu

Open source is the future. It sets us free.



[O] Exporting multiple images in a float (LaTeX)

2015-08-06 Thread Suvayu Ali
Hi,

Is there an easy way to export multiple images wrapped in a single
floating environment (e.g. figure) when exporting to LaTeX?  For how
many years I have been doing this:

  #+name: fig:myfig1
  #+caption: This is a single figure, entered in the usual way.
  file:myfig1.pdf

  #+begin_latex
  \begin{figure}[htb]
\centering
\includegraphics[width=0.8\linewidth]{myfig2.pdf}
\includegraphics[width=0.8\linewidth]{myfig3.pdf}
\caption{\label{fig:myfig23} Two images in one floating environment.}
  \end{figure}
  #+end_latex

It would be great if I could avoid the LaTeX block for the second case.
An intuitive way might be, when two figures are not separated by empty
lines, treat them as part of the same float.  The above would translate
to:

  #+name: fig:myfig23
  #+caption: Two images in one floating environment.
  #+attr_latex: :width 0.8\linewidth
  file:myfig2.pdf
  file:myfig3.pdf

Presently the above is exported as:

  \begin{figure}[htb]
\centering
\includegraphics[width=.8\linewidth]{myfig2.pdf}
\caption{\label{fig:myfig23} Two images in one floating environment.}
  \end{figure}
  \begin{figure}[htb]
\centering
\includegraphics[width=.8\linewidth]{myfig3.pdf}
\caption{\label{fig:myfig23} Two images in one floating environment.}
  \end{figure}

Actually, the above could probably be considered incorrect.  The figures
have the same caption and labels, which is for all practical purposes
incorrect.  Am I missing something?  Is my "expectation" reasonable?

Cheers,

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] [DEV] Bump Emacs requirement to 24.4?

2015-08-05 Thread Suvayu Ali
On Wed, Aug 05, 2015 at 09:39:19PM +0200, Nicolas Goaziou wrote:
> Hello,
> 
> Just to be sure, can we require Emacs 24.4 for development version
> (a.k.a. Org 8.4)? As a data point, Debian stable provides it.
> 
> Also, what is the status of XEmacs support? AFAIU Org 8.3 doesn't build
> on XEmacs but no one is complaining. We may as well drop it and ignore
> most of "org-compat.el".

Agreed to both :).

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] meta commands and Info manual

2015-07-22 Thread Suvayu Ali
On Tue, Jul 21, 2015 at 10:26:15PM -0400, Nick Dokos wrote:
> 
> For my part I'm happy (and I suspect Suvayu is as well), so I
> guess it's back to the OP: what, if anything, should be
> changed?

Indeed!  I happily shut up :).

As to the OP, the discussion towards the end of this section should
cover the subtlety for a new user, (info "(org) Conventions").

WDYT?

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] meta commands and Info manual

2015-07-21 Thread Suvayu Ali
On Mon, Jul 20, 2015 at 06:08:56PM -0400, Nick Dokos wrote:

> Or maybe showing the indirection explicitly:
> 
> ‘M-S- (org-shiftmetaright) --> (org-table-insert-column)’

Particularly this suggestion would be very helpful, even for long time
Org users such as myself.

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] basename of exported subtree?

2015-07-21 Thread Suvayu Ali
Hi Matt,

On Mon, Jul 20, 2015 at 02:12:17PM -0400, Matt Price wrote:
> 
> Neither of these changed the actual file name, but Suvayu's euggestion --
> setting the EXPORT_FILE_NAME property -- did the trick.  Thank you both!  I
> was unable to find this in the org documentation on my own, though now that
> I am able to search it I find that it is listed in 12.3, export settings.

The first guess for most subtree export properties is, prepend EXPORT_
to whatever was the keyword for a normal export.  So you can have,
EXPORT_TITLE, EXPORT_AUTHOR, EXPORT_OPTIONS, etc.

Hope this helps,

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] basename of exported subtree?

2015-07-20 Thread Suvayu Ali
On Mon, Jul 20, 2015 at 09:58:26AM -0400, Matt Price wrote:
> Is it possible to set the basename of an exported subtree to something
> *other* than the name of the parent file -- to, say, the subtree headline,
> or some property thereof?  Thank you!

Doesn't setting the EXPORT_FILE_NAME property work?

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] ox-koma bug in subtree export

2015-07-17 Thread Suvayu Ali
On Thu, Jul 16, 2015 at 10:20:27PM +0200, Rasmus wrote:
> Suvayu Ali  writes:
> 
> >> I checked and it work from your previous example.
> >
> > Worked nicely for both examples, normal export and subtree export.
> 
> Pushed in a9855380931885d0dbfcbb8fcc6622850ac4bbda.  The Worg page is also
> updated.

Thanks!

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] ox-koma bug in subtree export

2015-07-16 Thread Suvayu Ali
On Thu, Jul 16, 2015 at 12:44:26PM +0200, Rasmus wrote:
> Suvayu Ali  writes:
> 
> > Strange, I tried subtree export with my example, and a normal file
> > export with yours, neither exports the signature, closing works fine.
> 
> I think I didnt't run format-patch correctly  Sorry!  I'm trying to
> get used to do things that I'd normally do from the terminal (like
> format-patch) from magit.

No worries.

> 
> I checked and it work from your previous example.

Worked nicely for both examples, normal export and subtree export.

:)

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] ox-koma bug in subtree export

2015-07-16 Thread Suvayu Ali
On Thu, Jul 16, 2015 at 11:40:06AM +0200, Rasmus wrote:
> Suvayu Ali  writes:
> 
> > The closing bit works well, the signature however does not work for me.
> > Do I need any special config to enable it?
> 
> Maybe it was not robust enough.  Try this patch.

 [...chomp...chomp...chomp...]

> * Yours truly,
> :closing:
>   Romeo of house Montague

Strange, I tried subtree export with my example, and a normal file
export with yours, neither exports the signature, closing works fine.

Cheers,

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] ox-koma bug in subtree export

2015-07-16 Thread Suvayu Ali
Hi,

On Thu, Jul 16, 2015 at 12:47:29AM +0200, Rasmus wrote:
> Suvayu Ali  writes:
> 
> > Something like that would be a lot more logical indeed.
> 
> The attached patch allows the Romeo letter to have a heading like this:
> 
> * Yours truly,:closing:
>   Romeo of House Capulet
> 
> Outputting:
> 
> \setkomavar{signature}{Romeo of house Capulet}
> ...
> \closing{Yours truly,}

The closing bit works well, the signature however does not work for me.
Do I need any special config to enable it?

Cheers,

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] ox-latex: default packages cleaning

2015-07-16 Thread Suvayu Ali
On Wed, Jul 08, 2015 at 08:35:28PM +0200, Rasmus wrote:
> Suvayu Ali  writes:
> 
> >> +(defun org-latex-guess-polyglossia-language (header info)
> >> +  "Set the Polyglossia language according to the LANGUAGE keyword.
> >
> > I'm in two-minds about this.  On the one had it is a nice thing, but on
> > the other hand, it prevents the more fine grained control offered by
> > polyglossia.  For example, I used this in my setup before:
> >
> >   \setdefaultlanguage[variant=british]{english}
> 
> The attached supports Polyglossia better.  Note, the last loaded language
> is the main one (as babel).  Perhaps org-latex-variant-file-string should
> be less annoying (not a file-variable).

The polyglossia bits work well.  The file local variable prompt for
every export is quite annoying though.  Same goes for the exported file,
opening it brings up the same prompt again.  I guess it is a one time
thing to mark that variable as safe, then it should be good.  

I have a few other questions:
- how does one change the variant when doing a subtree export?  By
  setting EXPORT_LATEX_VARIANT?
- Is it possible to set a default variant?
- How does one insert a line in the package list which is not
  usepackage.  I guess the normal case is still valid:
  "\\somedirective", but inserting a similar variant specific directive
  isn't possible.

I'm starting to wonder, all these complications, is it really worth it?
What do you think?

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] ox-koma bug in subtree export

2015-07-15 Thread Suvayu Ali
On Wed, Jul 15, 2015 at 01:46:59PM +0200, Rasmus wrote:
> Suvayu Ali  writes:
> 
> > I'm using subtree export to write letters using ox-koma.  Everything
> > works except, all the closing statements from different subtrees get
> > accumulated when I export one of the subtrees.
> >
> > So with the attached Org file, when I export either of the subtrees, I
> > get a closing line like this: \closing{Regards, Kind Regards,}.
> 
> For your purpose you can add an :export_closing: property to your
> top-level heading.
> 
> * letter 1
>   :PROPERTIES:
>   :export_subject: Some subject
>   :export_closing: Regards,
>   :END:

Great, this works very well.

> > This used to work before.  That said, I never found it quite consistent
> > when using `#+closing:'.  I would have thought one should use a headline
> > like: to, enclosed, etc.
> 
> Maybe:
> 
>* Regards,:closing:
>  Signature

Something like that would be a lot more logical indeed.

> > Is this a bug?
> 
> From you example, I'd say 'no'.  Keywords are shared.  E.g. if you have
> 
>  #+latex_header: my important package
> 
> You'd want it to be loaded even when using a subtree.
> [OTOH, #+title is changed in subtree export]

Hmm, makes sense.  I wonder how it was working though.

Thanks a lot.

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] ox-koma bug in subtree export

2015-07-15 Thread Suvayu Ali
On Wed, Jul 15, 2015 at 01:20:57PM +0200, Suvayu Ali wrote:
> 
> I'm using subtree export to write letters using ox-koma.  Everything
> works except, all the closing statements from different subtrees get
> accumulated when I export one of the subtrees.
> 
> So with the attached Org file, when I export either of the subtrees, I
> get a closing line like this: \closing{Regards, Kind Regards,}.
> 
> This used to work before.  That said, I never found it quite consistent
> when using `#+closing:'.  I would have thought one should use a headline
> like: to, enclosed, etc.
> 
> Is this a bug?

Of course I forgot to attach the file!

-- 
Suvayu

Open source is the future. It sets us free.

* letter 1
  :PROPERTIES:
  :EXPORT_FILE_NAME: letter_1.pdf
  :EXPORT_LATEX_CLASS: scrlttr2
  :EXPORT_OPTIONS: ':t foldmarks:nil
  :EXPORT_TITLE:
  :EXPORT_SUBJECT: Some subject
  :EXPORT_LCO: DIN
  :END:
** To:to:
Mr. Foo Bar
Some place, Else

** Dear Mr. Bar,
Lots of stuff

#+closing: Regards,

* letter 2
  :PROPERTIES:
  :EXPORT_FILE_NAME: letter_2.pdf
  :EXPORT_LATEX_CLASS: scrlttr2
  :EXPORT_OPTIONS: ':t foldmarks:nil
  :EXPORT_TITLE:
  :EXPORT_SUBJECT: Some other subject
  :EXPORT_LCO: DIN
  :END:
** To:to:
Miss Foo Baz
Some place, Else

** Dear Miss Baz,
Lot more stuff

#+closing: Kind Regards,



[O] ox-koma bug in subtree export

2015-07-15 Thread Suvayu Ali
Hi,

I'm using subtree export to write letters using ox-koma.  Everything
works except, all the closing statements from different subtrees get
accumulated when I export one of the subtrees.

So with the attached Org file, when I export either of the subtrees, I
get a closing line like this: \closing{Regards, Kind Regards,}.

This used to work before.  That said, I never found it quite consistent
when using `#+closing:'.  I would have thought one should use a headline
like: to, enclosed, etc.

Is this a bug?

Cheers,

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] ox-latex: default packages cleaning

2015-07-08 Thread Suvayu Ali
Hi Rasmus,

On Wed, Jul 08, 2015 at 02:53:46PM +0200, Rasmus wrote:
>
> +(defun org-latex-guess-polyglossia-language (header info)
> +  "Set the Polyglossia language according to the LANGUAGE keyword.

I'm in two-minds about this.  On the one had it is a nice thing, but on
the other hand, it prevents the more fine grained control offered by
polyglossia.  For example, I used this in my setup before:

  \setdefaultlanguage[variant=british]{english}

I don't see an easy way of passing the optional argument.  But on the
other hand

  \setmainlanguage{english}

is plain, simple, and works in most (almost all) cases.  I'm thinking
whether to leave the babel/polyglossia features entirely up to the user.
That said, I like the feature very much.  For people who write in
multiple languages, if they load polyglossia, it should "just work" for
all their documents.  Which is great!

WDYT?  What do others think?

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] ox-latex: default packages cleaning

2015-07-08 Thread Suvayu Ali
On Wed, Jul 08, 2015 at 04:26:56PM +0200, Rasmus wrote:
> 
> I'm trying to think of an elegant way to map from a tex-variant to a
> command.  Perhaps change the variant names to the latex variants and input
> that.

I think that would be a good way to go.

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] ox-latex: default packages cleaning

2015-07-08 Thread Suvayu Ali
On Wed, Jul 08, 2015 at 03:53:32PM +0200, Rasmus wrote:
> Suvayu Ali  writes:
> 
> >> From 54bcf8f1ae26c91fa856b64071dca65d3f31e1f2 Mon Sep 17 00:00:00 2001
> >> From: Rasmus 
> >> Date: Wed, 8 Jul 2015 14:44:56 +0200
> >> Subject: [PATCH 9/9] ox-latex: Support TeX variants
> >
> > This one fails to apply for me.  I'm on 
> 
> You probably need the other patches posted in OP due to changes in
> org-latex-default-packages-alist.

Indeed, and it works very nicely!

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] ox-latex: default packages cleaning

2015-07-08 Thread Suvayu Ali
On Wed, Jul 08, 2015 at 02:54:41PM +0200, Rasmus wrote:
> Suvayu Ali  writes:
> 
> > I would also suggest removing inputenc.  At the moment, it is loaded
> > with the AUTO option.  AFAIK, this is redundant since most recent
> > (meaning for quite a few years) TeX engines already use the encoding of
> > the file if nothing is specified.
> 
> A colleague of mine were missing her umlaut today cause she hadn't loaded
> inputenc with utf8.  So I guess removing inputenc is premature.

Interesting, I'll keep this in mind.

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] ox-latex: default packages cleaning

2015-07-08 Thread Suvayu Ali
On Wed, Jul 08, 2015 at 02:53:46PM +0200, Rasmus wrote:
> Suvayu Ali  writes:
> 
> > We could also take this opportunity to provide users an easy way to
> > switch between TeX engines.
> 
> These two patches goes some of the way towards what you want.
> org-latex-pdf-process would also have to patched as well, though.

 [...chomp...chomp...chomp...]

> From 54bcf8f1ae26c91fa856b64071dca65d3f31e1f2 Mon Sep 17 00:00:00 2001
> From: Rasmus 
> Date: Wed, 8 Jul 2015 14:44:56 +0200
> Subject: [PATCH 9/9] ox-latex: Support TeX variants

This one fails to apply for me.  I'm on 

  c76fef6 org-clock: Add `untilnow' time block

Cheers,

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] ox-latex: default packages cleaning

2015-07-07 Thread Suvayu Ali
On Tue, Jul 07, 2015 at 10:05:06PM +0200, Rasmus wrote:
> Suvayu Ali  writes:
> 
> >   \usepackage{polyglossia}  % instead of babel
> 
> You can use babel with xelatex.

Yes, but polyglossia is recommended.  In the interest of minimal work on
the part of Org, this could just be ignored.  I don't think we add babel
anyway, or do we?

Cheers,

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] ox-latex: default packages cleaning

2015-07-07 Thread Suvayu Ali
Hi Rasmus,

On Tue, Jul 07, 2015 at 04:53:35PM +0200, Rasmus wrote:
> 
> If it's a means to archive "high-quality" paragraphs, maybe microtype is
> probably the 'proper' fix...

I would like to second microtype.  In fact as far as I know, now a days
it is recommended to load that for almost all documents with significant
text on TeX.SX.

I would also suggest removing inputenc.  At the moment, it is loaded
with the AUTO option.  AFAIK, this is redundant since most recent
(meaning for quite a few years) TeX engines already use the encoding of
the file if nothing is specified.

The next one would be fontenc, now it is loaded with T1.  I'm not sure
if this is needed.  Maybe LaTeX experts like Marcin or Fabrice could
comment.

> * Fixltx2e
> 
> This packages is depreciated with TL2015 cf. LaTeX News 22.  We can use
> \RequirePackage[current]{latexrelease} but there's no point in that
> AFAIK latexrelease only useful for backwards compatibility.

Didn't know about this.  Thank you.  I would vote for dropping it.

> * marvosym¹ 
> * Wasysym² 

Agreed.  On top of this, wasysym also interferes with integral symbols
from amsmath[1].

We could also take this opportunity to provide users an easy way to
switch between TeX engines.  I have been using XeLaTeX with Org and
outside for quite a few years now.  Originally what used to be very
hacky, is now simply replacing a couple of packages in the header and
calling xelatex instead of pdflatex.  And the list of packages is pretty
much identical for LuaLaTeX.  This is what I would use:

  \usepackage{fontspec}
  \usepackage{microtype}
  \usepackage{polyglossia}  % instead of babel
  % of course this should be something appropriate for the buffer
  \setdefaultlanguage[variant=british]{english}

So an option like tex-engine:xelatex or tex-engine:lualatex adds the
above to the default packages and the right binaries.  Just an idea.

Cheers,


Footnotes:

[1] At least that's what comments in my setup tell me :-p:
https://github.com/suvayu/.emacs.d/blob/master/org-mode-config.el#L136


-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] LaTeX filter for captions

2015-06-28 Thread Suvayu Ali
On Sun, Jun 28, 2015 at 11:52:06PM +0200, Nicolas Goaziou wrote:
> Suvayu Ali  writes:
> 
> > I wanted to apply a filter to normal text and captions.  So I initially
> > used org-export-filter-body-functions, however this also applies on the
> > section title.  Handling that case would make my filter a bit more
> > complicated.  So I switched to using
> > org-export-filter-paragraph-functions.  However I can't find what would
> > be the corresponding filter list for captions (both figures and
> > tables).
> 
> There is no such filter. By the time filters are called, captions have
> already been merged with their element. IOW,
> `org-export-filter-paragraph-functions' is applied to a string
> containing both the caption and the paragraph.

Indeed, this makes sense.  I was mistaken about what I was looking at.
When I noticed my filter was not being applied to captions, I had
forgotten those particular figures were exported via latex blocks, not
as usual figures!  Adding my filter to
org-export-filter-export-block-functions solved my issue.

Thanks!

-- 
Suvayu

Open source is the future. It sets us free.



[O] LaTeX filter for captions

2015-06-28 Thread Suvayu Ali
Hi,

I wanted to apply a filter to normal text and captions.  So I initially
used org-export-filter-body-functions, however this also applies on the
section title.  Handling that case would make my filter a bit more
complicated.  So I switched to using
org-export-filter-paragraph-functions.  However I can't find what would
be the corresponding filter list for captions (both figures and tables).

Any ideas?

Thanks,

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] Special blocks with options in LaTeX export

2015-06-28 Thread Suvayu Ali
Hi Rasmus,

On Sun, Jun 28, 2015 at 01:30:33PM +0200, Rasmus wrote:
> 
> Options are read via 
> 
> (org-export-read-attribute :attr_latex special-block :options).
> 
> As to whether special blocks should support options via a keyword like in
> your example, I do not know.  FWIW ox-html also reads attributes for
> special blocks via an ATTR_BACKEND line.

I expected it to work because the manual says so, see "Special blocks in
LaTeX export" in (info "(org) LaTeX specific attributes").

A brief quote:

  In LaTeX back-end, special blocks become environments of the same name.
  Value of ‘:options’ attribute will be appended as-is to that
  environment’s opening string.  For example: [...]

Cheers,

-- 
Suvayu

Open source is the future. It sets us free.



[O] Special blocks with options in LaTeX export

2015-06-28 Thread Suvayu Ali
Hi,

I am trying to export special blocks with options.  But it seems the
options part is being ignored completely.  I expect the following:

  #+begin_aside :options {Combinatorial background}
  It is all random!
  #+end_aside

to be exported as:

  \begin{aside}{Combinatorial background}
  It is all random!
  \end{aside}

However what I get is without the extra argument to the environment.

Am I missing something, or is this a bug?

Thanks,

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] Links

2015-06-18 Thread Suvayu Ali
On Wed, Jun 17, 2015 at 11:47:38AM +0200, Nicolas Goaziou wrote:

 [... description of the issues trimmed ...]

> > Although, you still have to handle the ambiguous case for existing Org
> > files.  Unless this double maintenance is cumbersome, I would vote for
> > introducing such a scheme.
> 
> The double maintenance is not possible. Either we take into
> consideration the prefix or the heuristic rule above, and some links are
> going to break, or we allow to bypass it and it doesn't improve the
> situation.

This is tricky indeed.  I guess the heuristic is the safest bet when it
comes to compatibility.

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] Bug with label names in beamer export

2015-06-16 Thread Suvayu Ali
On Tue, Jun 16, 2015 at 09:36:26PM +0200, Rasmus wrote:
> Suvayu Ali  writes:
> 
> > The attached patch should fix the issue.
> 
> Pushed, thanks.  I changed the commit message slightly.
> 
> > * lisp/ox-beamer.el (org-beamer--get-label): wrap labels in {..}
> 
> You don't need the "lisp/" prefix.  Capitalize after the colon.  Should
> end with period.

Thank you!

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] Links

2015-06-16 Thread Suvayu Ali
Hi Nicolas, Fabrice,

On Tue, Jun 16, 2015 at 11:30:06PM +0200, Nicolas Goaziou wrote:
> Fabrice Popineau  writes:
> 
> > Ideally, url encoded links should have been prefixed with some kind of uri
> > syntax.
> > This way, you could know what to decode and what not.
> 
> The encoded link could be copied from somewhere else. Also, there are
> numerous links in the wild without this prefix.

Would it make sense to "promote" these kind of encoded links to almost
their own sub-types?  I would guess, almost no one enters these encoded
links by hand.  It's either via copy paste in the prompt from
org-insert-link, or by entering [[encoded-link][description]] by hand.
I think it is a reasonable inconvenience to ask the user to prefix it
with something like uri:.  I mostly see advantages for a minor
inconvenience.  

Although, you still have to handle the ambiguous case for existing Org
files.  Unless this double maintenance is cumbersome, I would vote for
introducing such a scheme.

What do others think?

-- 
Suvayu

Open source is the future. It sets us free.



[O] Bug with label names in beamer export

2015-06-16 Thread Suvayu Ali
Hi,

I encountered a strange problem today, exporting to beamer didn't
produce any pages eventhough it compiled just fine!  It turns out it's
how Org exported the labels.  They should be wrapped in {..}.  See this
TeX.SX question for more: http://tex.stackexchange.com/q/250640/4416

The attached patch should fix the issue.

Cheers,

-- 
Suvayu

Open source is the future. It sets us free.
>From e82cd7bf86dc01d1038a442fd66ba8b97ec7a23e Mon Sep 17 00:00:00 2001
From: Suvayu Ali 
Date: Tue, 16 Jun 2015 21:04:21 +0200
Subject: [PATCH] ox-beamer: Wrap labels in braces in beamer export

* lisp/ox-beamer.el (org-beamer--get-label): wrap labels in {..}

The `:' in the label name causes an argument parsing problem, for more
see <http://tex.stackexchange.com/q/250640/4416>.
---
 lisp/ox-beamer.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/ox-beamer.el b/lisp/ox-beamer.el
index dafadb3..3119bd4 100644
--- a/lisp/ox-beamer.el
+++ b/lisp/ox-beamer.el
@@ -337,7 +337,7 @@ function assumes HEADLINE will be treated as a frame."
 (if (and (stringp opt)
 (string-match "\\(?:^\\|,\\)label=\\(.*?\\)\\(?:$\\|,\\)" opt))
(match-string 1 opt)
-  (concat "sec:" (org-export-get-reference headline info)
+  (format "{sec:%s}" (org-export-get-reference headline info)
 
 (defun org-beamer--frame-level (headline info)
   "Return frame level in subtree containing HEADLINE.
-- 
2.4.3



Re: [O] Custom column environment in beamer export

2015-06-16 Thread Suvayu Ali
On Tue, Jun 16, 2015 at 03:33:03PM +0200, Nicolas Goaziou wrote:
> Rasmus  writes:
> 
> > Indeed.  That's the incremental fix.
> 
> Done in cf5fd31f0c4f18bd0256157adb98306d53f8a52c.

Works great!  I went with this template:

(add-to-list 'org-beamer-environments-extra
 '("minipage" "m" "\\begin{minipage}%O{%R}" "\\end{minipage}%"))

For my use case, I rarely use overlay actions, so I repurposed it for
environment arguments.

Thanks a lot!

PS: OT, within beamer I find minipage is easier to manage than columns.

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] Custom column environment in beamer export

2015-06-16 Thread Suvayu Ali
Hi Nicolas,

On Tue, Jun 16, 2015 at 01:57:06PM +0200, Nicolas Goaziou wrote:
> Rasmus  writes:
> 
> > Unfortunately, BEAMER_OPTs are wrapped in square brackets thanks to
> > org-beamer--normalize-argument, so the above won't actually work (see
> > org-beamer--format-block).  From the looks of it I'd be willing to call it
> > a bug, but Nicolas may have had something in mind.
> 
> IIRC it was a pre-8.0 feature already. In any case, it allows sloppy
> writing for options, i.e., with or without square brackets.

Yes, I think so.

> > Perhaps these days it would be nice to allow the third element of
> > org-beamer-environments-extra to be a λ taking either the object or so.
> > Then again, perhaps this is an overkill and too low-level.
> 
> More simply, we can also add placeholders in templates, e.g.,
> 
>   %R raw action specification
>   %O raw options argument

Indeed, that would work well I think.  One can wrap the raw arguments
anyway you wish in the template.

Cheers,

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] Custom column environment in beamer export

2015-06-16 Thread Suvayu Ali
On Tue, Jun 16, 2015 at 12:30:09AM +0200, Rasmus wrote:
> Suvayu Ali  writes:
> 
> > * Fitting technique  :B_minipage:
> >   :PROPERTIES:
> >   :BEAMER_env: minipage
> >   :BEAMER_arg: 0.1\linewidth
> >   :END:
> > +/cFit/+
> 
> The closest would probably be something like
> 
> (add-to-list 'org-beamer-environments-extra
>  '("minipage"
>"m"
>"\\begin{minipage}%o%a\n\\structure{%h}"
>"\\end{minipage}"))
> 
> Which would afford you something like
> 
> * slide
> ** Fitting technique:B_minipage:
>   :PROPERTIES:
>   :BEAMER_env: minipage
>   :BEAMER_OPT: [t]{0.1\linewidth}
>   :BEAMER_ACT: <5>
>   :END:
>   /cFit/

Well, I would rather keep the formatting in the org file, so no
\structure in the template.  But otherwise your suggestion seems exactly
what I need :).

> Unfortunately, BEAMER_OPTs are wrapped in square brackets thanks to
> org-beamer--normalize-argument, so the above won't actually work (see
> org-beamer--format-block).  From the looks of it I'd be willing to call it
> a bug, but Nicolas may have had something in mind.

I was thinking the same.  That's why I felt the need for the old
BEAMER_arg property!

> Perhaps these days it would be nice to allow the third element of
> org-beamer-environments-extra to be a λ taking either the object or so.
> Then again, perhaps this is an overkill and too low-level.

This might be nice, but as you say could be overkill.  Although, there
are a few other cases which is harder to use with the current syntax.
Take minipage as an example, it takes 3 optional arguments[1].
Presently there is no way of dealing with something like that.  Removing
the autowrapping of brackets would allow such cases, but it would
probably break a few Org files in the wild.  From that perspective, a
lambda might be the way to go.

> Personally, I'd use a block, e.g.
> 
> #+attr_latex: :options [t]{.1\textwidth}
> #+begin_minipage
> Cfit
> #+end_minipage

Nice idea.  I have never really explored using blocks (other than for
raw latex), maybe I should ...

Thanks,

Footnotes:

[1] https://en.wikibooks.org/wiki/LaTeX/Boxes#minipage_and_parbox


-- 
Suvayu

Open source is the future. It sets us free.



[O] Custom column environment in beamer export

2015-06-15 Thread Suvayu Ali
Hi,

Is it possible to define a custom column like environment?  At the
moment I'm hacking around the need with this:

(add-to-list 'org-beamer-environments-extra
 '("minipage" "m" "\\begin{minipage}%H" "\\end{minipage}%"))

With the above I can export the following

* 0.1\linewidth  :B_minipage:
  :PROPERTIES:
  :BEAMER_env: minipage
  :END:
+/cFit/+

to

\begin{minipage}{0.1\linewidth}
\structure{\emph{cFit}}
\end{minipage}%

However within Org, not being able to specify a descriptive headline
sacrifices readability.  It would be great if I could write something
like this:

* Fitting technique  :B_minipage:
  :PROPERTIES:
  :BEAMER_env: minipage
  :BEAMER_arg: 0.1\linewidth
  :END:
+/cFit/+

I seem to recall this was possible in the past.  Is there any chance to
get something like this going?

Thanks for any thoughts.

Cheers,

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] Add LaTeX to SVG support to org-mode

2015-06-15 Thread Suvayu Ali
Hi Adam,

As others mentioned, diffs are easier to work with.  Please see the
instructions on the how to contribute page on Worg.

That said, if you do not want to checkout the latest Org (the version
you sent looks like a version that was shipped with Emacs).  You can
still generate a diff.  Copy the original somewhere, and then edit the
copy.  Once done editing, you can generate a diff like this:

$ diff -u /path/to/original/org.el /path/to/edited/org.el > org.el.diff

If you then send the org.el.diff file, people would be happy to look at
it and help you get to a good solution.

Hope this email ecourages you to put in the extra effort :).

Cheers,


On Sat, Jun 13, 2015 at 06:45:51PM +0200, Adam Sneller wrote:
> 
> Out of the box, emacs supports two methods for rendering LaTeX previews in 
> orgmode: dvipng and imagemagick. I want to add a third method, using dvisvgm. 
> I have modified the org.el file to add org-create-formula-image-with-dvisvg. 
> Everything seems to work fine, except that orgmode is unable to find the SVG 
> file and errors "Failed to create svg file from ...". But the file it is 
> looking for does exist.
> 
> Any ideas?

-- 
Suvayu

Open source is the future. It sets us free.



  1   2   3   4   5   6   7   8   9   10   >