Re: [O] gnus: link annoyance

2014-01-07 Thread Bastien
Hi François,

François Pinard pin...@iro.umontreal.ca writes:

 One possibility (untested, so I'm not sure) is that when following a
 gnus: link, Org could use something like:

(let ((gnus-mark-article-hook nil))
  (ACCESS-THE-gnus:-LINK))

I attach a patch to see if it does what you want.

This is from a quick exploration, and while testing it,
somes links to gwene.org blog entries were throwing a
501 error message (but still display the article.)

Take it as a basis for clarifying the discussion, not
really a solution right now!

diff --git a/lisp/org-gnus.el b/lisp/org-gnus.el
index e368a14..968c556 100644
--- a/lisp/org-gnus.el
+++ b/lisp/org-gnus.el
@@ -262,7 +262,7 @@ If `org-store-link' was called with a prefix arg the meaning of
 	   (cond
 		((eq backend 'nndoc)
 		 (if (gnus-group-read-group t nil group)
-		 (gnus-summary-goto-article article nil t)
+		 (gnus-summary-display-article article)
 		   (message Couldn't follow gnus link.  %s
 			The summary couldn't be opened.)))
 		(t
@@ -283,7 +283,7 @@ If `org-store-link' was called with a prefix arg the meaning of
 	(1+ articles)
   (* articles 2
 		   (if group-opened
-		   (gnus-summary-goto-article article nil t)
+		   (gnus-summary-display-article article)
 		 (message Couldn't follow gnus link.  %s
 			  The summary couldn't be opened.))
 	   (quit (message Couldn't follow gnus link.  %s

-- 
 Bastien


Re: [O] Org-drill installation

2014-01-07 Thread Bastien
Todd Neufeld todd.neuf...@gmail.com writes:

 It took me some time to set up the load-path correctly...
 But I got it eventually and Org-drill now works for me.

 Thanks very much !

Thanks for confirming!

-- 
 Bastien



Re: [O] org-cycle-hook from org-mode hook

2014-01-07 Thread Bastien
François Pinard pin...@iro.umontreal.ca writes:

 I did not immediately find the documentation about C-u C-u TAB, which is
 in the node Initial visibility.  The node Global and local cycling
 documents TAB, C-u TAB and C-u C-u C-u TAB, but surprisingly, not C-u
 C-u TAB.  Maybe some linking between those two manual nodes would be
 useful to other users, when they happen to be as anal as I am? :-)

Yes, I added the information and the link, thanks!

-- 
 Bastien



Re: [O] Performance issues after upgrading from Emacs 23.3 to 24.3+prelude

2014-01-07 Thread Bastien
Karl Voit devn...@karl-voit.at writes:

 I guess that with Emacs prelude, I got some functionality which is
 causing these issues. So this might be of interest of other
 Emacs/prelude users as well.

Yes, probably, since the Org version is the same :)
Better ping the Emacs prelude devs directly IMHO.

-- 
 Bastien



[O] Question about the math mode table exporting for latex and html

2014-01-07 Thread bsun
hello list,

Here is the example.


#+ATTR_LATEX: :mode math :environment pmatrix :math-prefix \mathbf{H}=
| \vdots | 0 | \vdots |
| \vdots | H | \vdots |
| \vdots | 0 | \vdots |


These lines generate perfect latex code. But the html exporter omits
the #+attr_latex line (which is correct), and produces a plain text
table.

The question is, is it possible to export the math mode table as latex
code in html exporting? Maybe there is some option like
#+attr_html: :mode latex?

Thanks.

Regards,
Bing



[O] [PATCH] Fix org.texi

2014-01-07 Thread Rasmus
Hi,

I needed to apply the following patch to make install the master
branch.

–Rasmus

-- 
May contains speling mistake
From 5b9a61dc9aa0327796d0319126fac87862f35da8 Mon Sep 17 00:00:00 2001
From: Rasmus w...@pank.eu
Date: Tue, 7 Jan 2014 11:32:31 +0100
Subject: [PATCH] Bug in org.texi

* org.texi (Global and local cycling): Fix missing '@'.
---
 doc/org.texi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/org.texi b/doc/org.texi
index 9298c57..ccea65f 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -1277,7 +1277,7 @@ tables, @kbd{S-@key{TAB}} jumps to the previous field.
 
 @cindex set startup visibility, command
 @orgcmd{C-u C-u @key{TAB},org-set-startup-visibility}
-Switch back to the startup visibility of the buffer (pxref{Initial visibility}).
+Switch back to the startup visibility of the buffer (@pxref{Initial visibility}).
 @cindex show all, command
 @orgcmd{C-u C-u C-u @key{TAB},show-all}
 Show all, including drawers.
-- 
1.8.5.2



Re: [O] Question about the math mode table exporting for latex and html

2014-01-07 Thread Rasmus
Hi Bing and Nicholas,

b...@pku.edu.cn writes:

 
 #+ATTR_LATEX: :mode math :environment pmatrix :math-prefix \mathbf{H}=
 | \vdots | 0 | \vdots |
 | \vdots | H | \vdots |
 | \vdots | 0 | \vdots |
 

 These lines generate perfect latex code. But the html exporter omits
 the #+attr_latex line (which is correct), and produces a plain text
 table.

I have noticed this bug as well, but forgot to report it since it
isn't really a bug.

 The question is, is it possible to export the math mode table as latex
 code in html exporting? Maybe there is some option like
 #+attr_html: :mode latex?

No.

AFAIK, mathjax supports amsmath matrices, e.g. the third example here¹ .
Thus, we'd really just want to insert the output of org-latex-table in
the html-file.

Perhaps something like the following would be OK?  Nicholas?

#+ATTR_HTML: :mode latex
#+ATTR_LATEX: :mode math :environment pmatrix :math-prefix \mathbf{H}=
| \vdots | 0 | \vdots |
| \vdots | H | \vdots |
| \vdots | 0 | \vdots |

This would tell ox-html.el to transcode the table via ox-latex-tabel
and feed the string via org-html-format-latex (assuming latex-frag is
a string).  Of course ox-html could also check out ATTR_LATEX but this
would lead to a spurious solution since LaTeX ≠ HTML IMO.

Alternatively, you'd have to use one the following hooks described in
ox.html (since filters would work on a transcoded elements).

;; Eventually, two hooks (`org-export-before-processing-hook' and
;; `org-export-before-parsing-hook') are run at the beginning of the
;; export process and just before parsing to allow for heavy structure
;; modifications.

Nicholas, if you want I can look into this.

–Rasmus

Footnotes: 
¹   http://www.mathjax.org/demos/tex-samples/

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




Re: [O] gnus: link annoyance

2014-01-07 Thread Nick Dokos
François Pinard pin...@iro.umontreal.ca writes:

 Nick Dokos ndo...@gmail.com writes:

 François Pinard pin...@iro.umontreal.ca writes:

 Whenever I visit a gnus: type link from Org, it has the side effect of
 reading the article in Gnus parlance, forcing me to unread it each
 time afterwards.

 it's certainly not lost: the link continues to work, even if it points
 to a read article; and visiting the group with C-u SPACE in gnus
 also allows you to see previously read articles.

 Hi, Nick.

 Of course, you are fully right in that the article is still there, and
 likely unexpired.  But in practice, from my viewpoint, it is not there
 anymore: I do not usually enter groups by C-u SPC.  While possible, it
 is unusual that I want to find and read again an article which I once
 decided has been read for good.


The question is how one deals with those unusual cases where you do want
to revisit an article (or a mail message: to gnus they are the same thing).

 If I search all mailgroups for a certain string, and randomly check
 hits, I do not want these articles I check to later have disappeared
 from sight in practice.  I was not really in the process of reading
 articles, but merely checking on them.

You call it checking but you are really reading them: how exactly is org
or gnus to know that even though you are reading the articles, you are
not really reading them?

  It would not make sense that Org removes lines that I visit after a
 grep, and when grepping through many files, would they be Org,
 non-Org, mailboxes or articles in mailgroups, I am in a mode where I
 do not expect any kind of altering behaviour.


But it doesn't: the links in the org file still work. In any case,
you must have read the article in order to determine that you want to
save a link to it. Then following the link does not change the flags:
it was read before, it's still read after.

I suspect however that my arguments are going to convince you just as
much as your arguments have convinced me :-)
-- 
Nick




Re: [O] [PATCH] Fix org.texi

2014-01-07 Thread Bastien
Rasmus ras...@gmx.us writes:

 I needed to apply the following patch to make install the master
 branch.

Argh.  Applied, sorry and thanks for the quick fix!

-- 
 Bastien



Re: [O] Problem updating Org

2014-01-07 Thread Charles Millar

Thank you.

On 1/2/2014 2:01 PM, Nathan DeGruchy wrote:
Try checking out the version already in HEAD: git checkout -- 
lisp/ox-html.el


Then pull again.

*Nathan DeGruchy*
nat...@degruchy.org mailto:nat...@degruchy.org


Charlie Millar


---
This email is free from viruses and malware because avast! Antivirus protection 
is active.
http://www.avast.com


Re: [O] html checkbox output

2014-01-07 Thread Rick Frankel
Bastien-

Top quoting to keep the history but save the search to the bottom
:)...

Yes, i will rework/simplify the patch (remove the free-form option and
the in-buffer setting), but I've been short on time the last week or
so.. Will fix it and push this week.

BTW, I've kept ascii output as the default mostly so I don't break the
regression test. Should I leave it alone or make utf-8 the default and
update the test?


rick
On Sat, Jan 04, 2014 at 10:36:13AM +0100, Bastien wrote:
 Hi Nicolas and Rick,
 
 Nicolas Goaziou n.goaz...@gmail.com writes:
 
  A new buffer keyword (which needs to be documented in org.texi),
  a defcustom with a completely free sexp... Isn't it a bit too much for
  mere checkboxes?
 
 Personally I think the defcustom is enough, as this choice is likely
 to be made for all Org documents.
 
  Filters provide almost the same functionality:
 
(defun my-checkbox-filter (item backend info)
  (when (org-export-derived-backend-p backend 'html)
(replace-regexp-in-string 
  \\`.*\\(code\\[\\(X\\|#xa0;\\|-\\)\\]/code\\).*$
  (lambda (rep)
(let ((check (match-string 2 rep)))
  (cond ((equal check X) #x2611;)
((equal check -) #x2610;)
(t #x2610;
  item
  nil nil 1)))
(add-to-list 'org-export-filter-item-functions 'my-checkbox-filter)
 
 Yes, but a defcustom would be easier.
 
  Anyway, here are a few comments.
 
  +(defcustom org-html-checkbox-type ascii
  +  The type of checkboxes to use for html export. See
 
  First line of a docstring has to be a single complete sentence.
 
  +(defun org-html-checkbox (checkbox info)
  +  Format CHECKBOX into HTML. This can be overriden on a
 
  Ditto.
 
  +(cdr
  + (assoc checkbox
 
(assq checkbox
 
  +  (if (listp checkboxes) checkboxes
  +(if (string-equal (substring checkboxes 0 1) ()
 
(if (eq (aref checkboxes 0) ?\()
 
  +(read checkboxes)
 
  This looks cheesy. `read'? Do you really want to parse arbitrary
  Sexps?
 
 Can we re-work Rick's patch/code and add this feature?  Rick,
 are you still on it?
 
 Thanks,
 



[O] puzzling org-mime-htmlize

2014-01-07 Thread Joseph Vidal-Rosset

Hello the list,

Back to gnus in order to improve my life in emacs, I meet a very strange
problem with  org-mime-htmlize. The  more surprising  fact is  that this
problem does  not appear  on my  laptop (running  with GNU  Linux Debian
testing) but only with my PC (running also with a Crunchbang + Debian
wheezy upgraded to  testing). Therefore I have imported  my .gnus.el and
my  init.el from  my laptop  to my  pc, but  very strangely  the problem
persists ! 

It is the same settings, the  same O.S. , even the same org-mime.el
and it works on laptop, not on my pc. 

Here is the error message: 

Creating LaTeX Image...
Failed to create dvi file from /tmp/orgtex11506Npy.tex
Auto-saving...


I do not know what to do, because I can't guess where the problem is. 

I send this message with Gnus to say you that your help is very welcome. 

Jo. 



Re: [O] Missing patch from Eric Schulte from 2013-10-09

2014-01-07 Thread Francesco Pizzolante
Hi Achim,

 The maint branch contains the release (8.2.4 for your example) plus
 those patches that are purely bugfixes (i.e. do not alter, remove or
 introduce features).  In your example, eight such patches had
 accumulated, placing you at commit f1b933: release_8.2.4-8-gf1b9339.

 The master branch includes everything on maint plus any patches that
 alter, remove or introduce features.  That amounted to 350 commits past
 the 8.2.4 release at the merge into master (d55f06), including those
 eight from maint: release_8.2.4-350-gd55f063.

Thanks a lot for these clear explanations.

If I understand well, to find patches from the master branch in the
maint branch, I'll need to wait until the next major release, i.e.
release 8.3. Am I right?

Regards,
 Francesco



Re: [O] gnus: link annoyance

2014-01-07 Thread Rasmus
Hi François,

François Pinard pin...@iro.umontreal.ca writes:

 The list gnus-mark-article-hook, which is there for customization, has
 the function gnus-summary-mark-read-and-unread-as-read by default.  I
 guess that if the hook list was empty, articles would be displayed and
 not automatically marked as read.

Yeah.  There's a bunch of other possible functions, but none of them
seem to work here (though nil might work nicely).

(apropos-documentation gnus-mark-article-hook)

 Perhaps you would like to the following on mailgroups you care about
 (from the *Groups* buffer):

 G c C-s Display S-TAB RET TAB RET 1 TAB 100 M- TAB TAB RET

 Also, you can search with nnir using GG or C-u GG (but links probably
 won't work from a nnir buffer).

 I would not think one should modify his Gnus habits or methods merely
 because Org has a tool to search in Gnus.  Org uses Gnus, but Gnus
 should not be disturbed because of that.

I agree.  The method is a way to make Gnus act like a 'normal' MUA in
mail groups.  Combined with expiring it would give you almost the same
work-flow, but in more 'traditionalist' manner, if e.g. TB represents
a 'traditional' MUA.

   1. Mark an article as important with '!',
  (gnus-summary-tick-article-forward N)

 But I do not want to tick (or bang) articles because I do Org searches.
 When really in Gnus, if I want to keep an article, I unread it.  But
 that does not mean I consider this article especially important.

It seems counter-intuitive to me, but it's not my mailbox!

Just out of curiosity, 'cause I'm still not fully appreciating your
setup; Say you have a mail X that's semi-interesting.  Do you then,
read it, mark it as unread, close the buffer, go back later, read it
again and unread it?

I used to use a similar setup in Thunderbird, though I would 'archive'
boring emails ('expire' in Gnus, I guess) and keep the remaining read
emails in my inbox together with new emails.

Cheers,
Rasmus

-- 
I hear there's rumors on the, uh, Internets. . .




Re: [O] html checkbox output

2014-01-07 Thread Bastien
Rick Frankel r...@rickster.com writes:

 Yes, i will rework/simplify the patch (remove the free-form option and
 the in-buffer setting), but I've been short on time the last week or
 so.. Will fix it and push this week.

Thanks!

 BTW, I've kept ascii output as the default mostly so I don't break the
 regression test. Should I leave it alone or make utf-8 the default and
 update the test?

I'm for keeping the ascii output as the default one,
but if people prefer the utf-8 one, so be it.

-- 
 Bastien



Re: [O] gnus: link annoyance

2014-01-07 Thread Joseph Vidal-Rosset

Hello François (bonjour Montréal), hello the list, 

I do  not want to  be rude  in asking a  newbie question in  this thread
about Gnus and Org. But I would be  happy to know if the thing to what I
think exists or not, and it is a possible thing or not. 

Le   mar.07   janv.2014   à06:36:02   ,François   Pinard
pin...@iro.umontreal.ca a envoyé ce message:
 Rasmus ras...@gmx.us writes:

 I would not think one should modify his Gnus habits or methods merely
 because Org has a tool to search in Gnus.  Org uses Gnus, but Gnus
 should not be disturbed because of that.

Here is my question : if Org uses Gnus, is it possible of making uses of
Org via Gnus? 

I mean  that it would be  great to write  a letter with for  example the
letter  class in  a file  letter.org .  After that  you can  export your
letter.org to a letter.html as well as to letter.pdf via letter.tex, and with 
Gnus,
thanks to  the link system, you  can send your nice  letter.html to your
colleague with letter.pdf as attachment. 

Is it already  possible to do that with  Org and Gnus, or not?  If it is
not possible at the moment, would it be possible? 

If this dream is  already the reality, your advice to  learn this use of
Gnus and Org will be welcome. 

Best wishes,

Jo. 



Re: [O] puzzling org-mime-htmlize

2014-01-07 Thread Nick Dokos
Joseph Vidal-Rosset joseph.vidal.ros...@gmail.com writes:

 Hello the list,

 Back to gnus in order to improve my life in emacs, I meet a very strange
 problem with  org-mime-htmlize. The  more surprising  fact is  that this
 problem does  not appear  on my  laptop (running  with GNU  Linux Debian
 testing) but only with my PC (running also with a Crunchbang + Debian
 wheezy upgraded to  testing). Therefore I have imported  my .gnus.el and
 my  init.el from  my laptop  to my  pc, but  very strangely  the problem
 persists ! 

 It is the same settings, the  same O.S. , even the same org-mime.el
 and it works on laptop, not on my pc. 

 Here is the error message: 

 Creating LaTeX Image...
 Failed to create dvi file from /tmp/orgtex11506Npy.tex
 Auto-saving...


 I do not know what to do, because I can't guess where the problem is. 


Run latex on /tmp/orgtex11506Npy.tex from the command line and look for
errors.

-- 
Nick




Re: [O] ox-bibtex: Allow for missing bibtex style

2014-01-07 Thread Julian Gehring

Hi Nicolas,

Please excuse the late reply.  The patch works great, can't find 
anything that would need further tweaking.


Best wishes
Julian


On 12/21/2013 04:15 PM, Nicolas Goaziou wrote:

Hello,

Julian Gehring julian.gehr...@gmail.com writes:


I would like to add this feature, if I knew how to program in lisp...
Would you like to work on this together?  I could contribute on the
side of documenting and testing, if this helps.


Fair enough. Here is a patch for you to test.


Regards,





Re: [O] puzzling org-mime-htmlize

2014-01-07 Thread Joseph Vidal-Rosset
2014/1/7 Nick Dokos ndo...@gmail.com

 Run latex on /tmp/orgtex11506Npy.tex from the command line and look for
 errors.


Many thanks Nick. I did not think about  it.

But it is more and more strange: it seems to be no error : Have a look ;

joseph@crunchbang:/tmp$ latex orgtex11506Npy.tex
This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013)
 restricted \write18 enabled.
entering extended mode
(./orgtex11506Npy.tex
LaTeX2e 2011/06/27
Babel 3.9f and hyphenation patterns for 78 languages loaded.
(/usr/local/texlive/2013/texmf-dist/tex/latex/base/article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(/usr/local/texlive/2013/texmf-dist/tex/latex/base/size10.clo))
(/usr/local/texlive/2013/texmf-dist/tex/latex/graphics/color.sty
(/usr/local/texlive/2013/texmf-dist/tex/latex/latexconfig/color.cfg)
(/usr/local/texlive/2013/texmf-dist/tex/latex/graphics/dvips.def)
(/usr/local/texlive/2013/texmf-dist/tex/latex/graphics/dvipsnam.def))
(/usr/local/texlive/2013/texmf-dist/tex/latex/base/inputenc.sty
(/usr/local/texlive/2013/texmf-dist/tex/latex/base/utf8.def
(/usr/local/texlive/2013/texmf-dist/tex/latex/base/t1enc.dfu)
(/usr/local/texlive/2013/texmf-dist/tex/latex/base/ot1enc.dfu)
(/usr/local/texlive/2013/texmf-dist/tex/latex/base/omsenc.dfu)))
(/usr/local/texlive/2013/texmf-dist/tex/latex/base/fontenc.sty
(/usr/local/texlive/2013/texmf-dist/tex/latex/base/t1enc.def))
(/usr/local/texlive/2013/texmf-dist/tex/latex/graphics/graphicx.sty
(/usr/local/texlive/2013/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/local/texlive/2013/texmf-dist/tex/latex/graphics/graphics.sty
(/usr/local/texlive/2013/texmf-dist/tex/latex/graphics/trig.sty)
(/usr/local/texlive/2013/texmf-dist/tex/latex/latexconfig/graphics.cfg)))
(/usr/local/texlive/2013/texmf-dist/tex/generic/ulem/ulem.sty)
(/usr/local/texlive/2013/texmf-dist/tex/latex/amsmath/amsmath.sty
For additional information on amsmath, use the `?' option.
(/usr/local/texlive/2013/texmf-dist/tex/latex/amsmath/amstext.sty
(/usr/local/texlive/2013/texmf-dist/tex/latex/amsmath/amsgen.sty))
(/usr/local/texlive/2013/texmf-dist/tex/latex/amsmath/amsbsy.sty)
(/usr/local/texlive/2013/texmf-dist/tex/latex/amsmath/amsopn.sty))
(/usr/local/texlive/2013/texmf-dist/tex/latex/base/textcomp.sty
(/usr/local/texlive/2013/texmf-dist/tex/latex/base/ts1enc.def
(/usr/local/texlive/2013/texmf-dist/tex/latex/base/ts1enc.dfu)))
(/usr/local/texlive/2013/texmf-dist/tex/latex/marvosym/marvosym.sty)
(/usr/local/texlive/2013/texmf-dist/tex/latex/wasysym/wasysym.sty)
(/usr/local/texlive/2013/texmf-dist/tex/latex/amsfonts/amssymb.sty
(/usr/local/texlive/2013/texmf-dist/tex/latex/amsfonts/amsfonts.sty))
No file orgtex11506Npy.aux.
(/usr/local/texlive/2013/texmf-dist/tex/latex/base/ts1cmr.fd)
(/usr/local/texlive/2013/texmf-dist/tex/latex/wasysym/uwasy.fd)
(/usr/local/texlive/2013/texmf-dist/tex/latex/amsfonts/umsa.fd)
(/usr/local/texlive/2013/texmf-dist/tex/latex/amsfonts/umsb.fd) [1]
(./orgtex11506Npy.aux) )
Output written on orgtex11506Npy.dvi (1 page, 352 bytes).
Transcript written on orgtex11506Npy.log.

End of quotation. I do not quote the log file, it would be rude, it is very
long.

I wonder if the  restricted \write18 enabled. betrays something helpful ?

Best wishes, and thanks for your kind help,

Jo.


Re: [O] Performance issues after upgrading from Emacs 23.3 to 24.3+prelude

2014-01-07 Thread Karl Voit
* Bastien b...@gnu.org wrote:
 Karl Voit devn...@karl-voit.at writes:

 I guess that with Emacs prelude, I got some functionality which is
 causing these issues. So this might be of interest of other
 Emacs/prelude users as well.

 Yes, probably, since the Org version is the same :)
 Better ping the Emacs prelude devs directly IMHO.

OK, I'll file a bug on GitHub. Thanks!

-- 
mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode:
get Memacs from https://github.com/novoid/Memacs 

https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on github




Re: [O] gnus: link annoyance

2014-01-07 Thread François Pinard
Bastien b...@gnu.org writes:

 I attach a patch to see if it does what you want.  This is from a
 quick exploration, and while testing it, somes links to gwene.org blog
 entries were throwing a 501 error message (but still display the
 article.)  Take it as a basis for clarifying the discussion, not
 really a solution right now!

Hi, Bastien.

Thanks.  I quickly tried the patch this morning, and it appears to be
usable so far.  I'll let it cook for a while, and report any
misbehaviour I would observe :-).

François



Re: [O] gnus: link annoyance

2014-01-07 Thread François Pinard
Rasmus ras...@gmx.us writes:

 Say you have a mail X that's semi-interesting.  Do you then, read it,
 mark it as unread, close the buffer, go back later, read it again and
 unread it?

I once used Gnus as a reader who tremendously helped me at handling the
high email volume of email I got when I maintained many GNU packages
(the Translation Project and also tar were pretty generative!) and
following lots of newsgroups.  Now that I got out of maintenance, Gnus
as a mail reader is a bit of overkill, but I still use it to peruse
archives I collected on many subjects, in about a thousand of nnfolders.

Searching them all is often convenient.  Normally, I only delete
articles from one of these archives when I decide to ponder it whole and
clean it up, and then read articles one after another the normal Gnus
way.  Otherwise, I prefer them untouched even if casually consulted,
postponing the cleanup until I get motivation and a good chunk of time.

For the detail, when not in clean mode, I often unread an article just
after having read it, or when I know I am perusing a lot, just let them
read but quit by Q instead of q, which reverts all the marks.

From an hits buffer generated by org-grep, I can get many hits of many
kinds (Org, non-Org, mailboxes or mailgroups), and while checking many
of these links in speedy mode, it slows me down considerably if I have
to stay alert and careful at unreading Gnus articles among the rest, and
fairly dangerous if I get tired and stop being careful.

François



Re: [O] Using org-diary

2014-01-07 Thread Dan Griswold
Try this:

*** Teaching
%%(org-class 2014 1 6 2014 3 10 1 1) 07:00-08:30 Teaching

That's what I find works for me.

Dan




On Mon, Jan 6, 2014 at 6:45 PM, Stephen J. Barr stev...@uw.edu wrote:

 So, from a broader perspective, perhaps this org-class stuff is not the
 right way to go. I am also noticing that the icalendar-export does not seem
 to be exporting these diary-sexps anyway. Perhaps I can
 use org-clone-subtree-with-time-shift to do most of what I want.

 Best,
 Stephen


 On Mon, Jan 6, 2014 at 3:35 PM, Nick Dokos ndo...@gmail.com wrote:

 Stephen J. Barr stev...@uw.edu writes:

  What I am now seeing is that the particular date gets picked up, but
 not the time. Am I doing something incorrect with the
  syntax?
 

 No, I believe that's a limitation of what you can do with these
 diary-sexps.

 You can always add the time to the headline: that way it'll appear in
 the agenda (but not in the grid, if you use that, and not sorted
 correctly - the time is just a label):

 *** Teaching 7:00pm-8:30pm
%%(org-class 2014 1 6 2014 3 10 1 1)

 Nick






Re: [O] gnus: link annoyance

2014-01-07 Thread François Pinard
Joseph Vidal-Rosset joseph.vidal.ros...@gmail.com writes:

 Org uses Gnus, is it possible of making uses of Org via Gnus?  [...]
 Is it already possible to do that with Org and Gnus, or not?  If it is
 not possible at the moment, would it be possible?

Gnus and Org are both open source and very capable systems, both in
themselves and when it comes to extensibility.  The main problem is
acquiring enough familiarity with their internals to find out the
correct, short, compact way of doing about anything one wants. :-)

 I mean that it would be great to write a letter with for example the
 letter class in a file letter.org .  After that you can export your
 letter.org to a letter.html as well as to letter.pdf via letter.tex,
 and with Gnus, thanks to the link system, you can send your nice
 letter.html to your colleague with letter.pdf as attachment.

Many years ago, the message composition has been fairly decoupled from
Gnus and brought back into Emacs for other mailers to use.  So, I guess
you are seeking some machinery between Org and Message, more than
between Org and Gnus.

I'm far from being sure, but if I wanted to use Org as a mean to write
HTML or PDF as message attachments, I would think it could be done with
a very moderate amount of Emacs Lisp customization.  Unless mistaken,
the Org editor to HTML might yield its output in a temporary Emacs
buffer, (for PDF, maybe not) and I would be fairly surprised if message
composition does not have facilities to receive attachments from
buffers.  And even if one would have to go through an external file, the
extra overhead might be negligible in practice.  Putting all the pieces
together might require some work, but maybe not that much.

François



Re: [O] gnus: link annoyance

2014-01-07 Thread François Pinard
Nick Dokos ndo...@gmail.com writes:

 I suspect however that my arguments are going to convince you just as
 much as your arguments have convinced me :-)

Hi, Nick.  You know, it always has been a pleasure corresponding with
you, and enjoying your respectful attitude.  In the case here, I'm not
so trying to convince you, than to alleviate a bit of my misery! :-)

 The question is how one deals with those unusual cases where you do
 want to revisit an article (or a mail message: to gnus they are the
 same thing).

Well, using Gnus interactively or through Emacs Lisp programming does
not have to be the same thing, programs may bend Gnus behaviour.

 You call it checking but you are really reading them: how exactly is org
 or gnus to know that even though you are reading the articles, you are
 not really reading them?

Org could tell Gnus that I am not really reading an article as if I was
using Gnus interactively.  When a user interactively created an Org link
to a Gnus article (likely using C-c l), (s)he decided at the time if the
article was to be left read, unread, ticked or otherwise.  The human
decision has been taken at the time the Org link was created.  When Org
later visits that link and triggers Gnus into displaying the article, it
could get Gnus to do nothing else then display it, keeping the prior
human decision unaltered, defeating a Gnus automatism that mainly make
sense when reading interactively from Gnus (and not from Org), leaving
the responsibility to the user to explicitly change the prior human
decision if this is then deemed appropriate.

 the links in the org file [to previously read articles] still work.

Which is wonderful, indeed.  I can read an article, leave it read, and
still save a working Org link on a article who disappeared out of sight.

 In any case, you must have read the article in order to determine that
 you want to save a link to it. Then following the link does not change
 the flags: it was read before, it's still read after.

Exactly! :-) Your last sentence summarizes all of my desires!  But I
would complete it, just to make sure it extremely clear:

   Then following the link does not change the flags: it was read
   before, it's still read after; it was unread before, it's still
   unread after.

Hoping that you forgive my friendly tease!  Keep happy!

François






[O] bug#16270: Incorrect custom types

2014-01-07 Thread Bastien Guerry
Bastien b...@gnu.org writes:

 Indeed, fixed in Org's repo.

This is now in Emacs trunk.  Closing.





[O] bug#15081: 24.3; org-crypt: Making epg-context local to *epg* while let-bound!

2014-01-07 Thread Bastien Guerry
Thierry Volpiatto thierry.volpia...@gmail.com writes:

 as subject says, epg-context is let-bounded in org-crypt and then epg
 local set it in this context.
 Probably is should just be set as local var instead of being let
 bounded.

This has been fixed in trunk, thanks.





Re: [O] ox-bibtex: Allow for missing bibtex style

2014-01-07 Thread Nicolas Goaziou
Hello,

Julian Gehring julian.gehr...@gmail.com writes:

 The patch works great, can't find anything that would need further
 tweaking.

Applied then. Thank you for the feedback.


Regards,

-- 
Nicolas Goaziou



Re: [O] Question about the math mode table exporting for latex and html

2014-01-07 Thread Nicolas Goaziou
Hello,

Rasmus ras...@gmx.us writes:

 AFAIK, mathjax supports amsmath matrices, e.g. the third example here¹ .
 Thus, we'd really just want to insert the output of org-latex-table in
 the html-file.

 Perhaps something like the following would be OK?  Nicholas?

 #+ATTR_HTML: :mode latex
 #+ATTR_LATEX: :mode math :environment pmatrix :math-prefix \mathbf{H}=
 | \vdots | 0 | \vdots |
 | \vdots | H | \vdots |
 | \vdots | 0 | \vdots |

 This would tell ox-html.el to transcode the table via ox-latex-tabel
 and feed the string via org-html-format-latex (assuming latex-frag is
 a string).  

FWIW, I think it's worth trying. I'm Cc'ing Rick Frankel for his
opinion.

 Of course ox-html could also check out ATTR_LATEX but this
 would lead to a spurious solution since LaTeX ≠ HTML IMO.

I agree.

 Nicholas, if you want I can look into this.

Certainly. Thank you.


Regards,

-- 
Nicolas Goaziou



[O] [PATCH] Strip text properties from string code block arguments

2014-01-07 Thread Daniel Gerber

Hi,

This change in org-babel-python-var-to-python makes python code blocks 
accept a string with text properties (as one gets when referring another 
code block). I guess there should be something similar for other languages.


diff --git a/lisp/ob-python.el b/lisp/ob-python.el
index 1457682..baa5764 100644
--- a/lisp/ob-python.el
+++ b/lisp/ob-python.el
@@ -137,7 +137,7 @@ specifying a variable of the same value.
org-babel-python-hline-to
   (format
(if (and (stringp var) (string-match [\n\r] var)) 
\\%S\\ %S)

-   var
+   (if (stringp var) (substring-no-properties var) var)

 (defun org-babel-python-table-or-string (results)
   Convert RESULTS into an appropriate elisp value.




Re: [O] gnus: link annoyance

2014-01-07 Thread Joseph Vidal-Rosset
2014/1/7 François Pinard pin...@iro.umontreal.ca

 I'm far from being sure, but if I wanted to use Org as a mean to write
 HTML or PDF as message attachments, I would think it could be done with
 a very moderate amount of Emacs Lisp customization.  Unless mistaken,
 the Org editor to HTML might yield its output in a temporary Emacs
 buffer, (for PDF, maybe not) and I would be fairly surprised if message
 composition does not have facilities to receive attachments from
 buffers.  And even if one would have to go through an external file, the
 extra overhead might be negligible in practice.  Putting all the pieces
 together might require some work, but maybe not that much.


Thanks for the reply. Unfortunately, I am  not at all able to do such a
work, and I very probably will never be able to.
But maybe this suggestion will be interesting for an emacs org-mode
developer, who knows...

Best whishes, et meilleurs voeux pour 2014.

Joseph


Re: [O] Parsing Org-mode in Python

2014-01-07 Thread Brett Viren
Hi Karl,

Karl Voit devn...@karl-voit.at writes:

 Hi!

 * Daniel Clemente n142...@gmail.com wrote:
 
 I dream of having a general Python parser for Org mode files, knowing
 every bit about the current syntax for Org files, surrounded by enough
 Python machinery to make it useful.

 Oh, this would be great since there are way more Python-coders out
 there as ELISP coders.

I agree.

I'm also (slowly) working toward some Python-based org processing.  My
strategy is to produce an intermediate file in JSON format which is
designed to capture the full org document structure.  I am calling this
a shunt export as it is meant to do as little interpretation of the
document as possible.

If this is interesting to you and you haven't already seen it please
check the thread from December were I got a lot of help to output this
JSON via the new org export mechanism (I'm a LISP newbie).  Here is the
concluding post with a working example:

  http://permalink.gmane.org/gmane.emacs.orgmode/79838

Besides any eventual Python-side development, one remaining gap in my
plan is how to produce some kind of schema description using the org
exporter machinery.  I want to have this description generated
automatically so that any future changes to the org format can be
accommodated with some level of automation.

So, my current thinking is to find a way to exploit org export machinery
to generate this schema (call it a meta-shunt export?).  If I can find
that I'll output it as another JSON file.  Then, on the Python-side, I
will read this schema file in and generate instances of
collections.namedtuple.  Finally a reader of the JSON org document will
be developed to produce objects of these namedtuple classes.

At the end of the day one will have a DOM-style data structure
representing the initial org document.

-Brett.


pgpRE1ypSZwl8.pgp
Description: PGP signature


Re: [O] [PATCH] Strip text properties from string code block arguments

2014-01-07 Thread Bastien
Hi Daniel,

Daniel Gerber daniel.g.ger...@gmail.com writes:

 This change in org-babel-python-var-to-python makes python code blocks
 accept a string with text properties (as one gets when referring
 another code block). I guess there should be something similar for
 other languages.

I don't understand why properties would be a problem here.
Can you elaborate a bit on this?

Thanks,

-- 
 Bastien



Re: [O] gnus: link annoyance

2014-01-07 Thread Nick Dokos
Joseph Vidal-Rosset joseph.vidal.ros...@gmail.com writes:

 2014/1/7 François Pinard pin...@iro.umontreal.ca

 I'm far from being sure, but if I wanted to use Org as a mean to write
 HTML or PDF as message attachments, I would think it could be done with
 a very moderate amount of Emacs Lisp customization.  Unless mistaken,
 the Org editor to HTML might yield its output in a temporary Emacs
 buffer, (for PDF, maybe not) and I would be fairly surprised if message
 composition does not have facilities to receive attachments from
 buffers.  And even if one would have to go through an external file, the
 extra overhead might be negligible in practice.  Putting all the pieces
 together might require some work, but maybe not that much.

 Thanks for the reply. Unfortunately, I am  not at all able to do such a work, 
 and I very
 probably will never be able to. 
 But maybe this suggestion will be interesting for an emacs org-mode 
 developer, who knows...


Not sure how relevant this is (I haven't read this part of the thread
carefully - Some time! Some time! My kingdom for some time!!!)  but it's
at least not entirely unrelated:

http://orgmode.org/worg/org-contrib/org-mime.html

Nick




Re: [O] gnus: link annoyance

2014-01-07 Thread Achim Gratz
François Pinard writes:
 Org could tell Gnus that I am not really reading an article as if I was
 using Gnus interactively.

You keep saying that; while clearly you could coerce Gnus into doing
something like that I'm not sure Gnus would entertain to listen to such
a request.  This is probably best asked on a Gnus mailing list, but it
seems that Gnus wants to present search results in an ephemeral group.
If you treat a link as a search that finds one article, then the problem
you're trying to solve goes away, I'd think.


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

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




Re: [O] [PATCH] Strip text properties from string code block arguments

2014-01-07 Thread Achim Gratz
Bastien writes:
 I don't understand why properties would be a problem here.
 Can you elaborate a bit on this?

With format %S prints an s-expression via prin1, not a string.  So
either the format should be %s or the properties need to be stripped
unless one really wants to interpret the result via read again.


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

Wavetables for the Terratec KOMPLEXER:
http://Synth.Stromeko.net/Downloads.html#KomplexerWaves




Re: [O] Using org-diary

2014-01-07 Thread Stephen J . Barr
I think that iI figured it out. I was transposing the last two arguments
for some of the cases. Just curious, in the documentation for org-class,

(org-class Y1 M1 D1 Y2 M2 D2 DAYNAME rest SKIP-WEEKS)

what is rest ?

Thanks,
Stephen

ndo...@gmail.com writes:

 Stephen J. Barr stev...@uw.edu writes:

 Greetings org-mode,

 I am trying to use org-class to put in my regularly scheduled
 events. The following snippet is my attempt to put in a regularly
 scheduled Monday-evening event. This is in a file that is included in my
 org-agenda-files, yet when I look at my agenda, this does not show up!

 

 *** Teaching
 %%(org-class 2014 1 6 2014 3 10 1 1) 7:00pm-8:30pm

 

 I would appreciate any advice on this.


 Tested it with a minimal .enacs and it works fine for me:

 Org-mode version 8.2.4 (release_8.2.4-410-ge23bbd)

 Nick

-- 
Sent with my mu4e




[O] GIT fot publishing .org

2014-01-07 Thread Renato

Hi,
I'm looking for a GIT, that I can use, to save .org file.

CAn someone sudgest me one?

TIA

Renaro



Re: [O] [RFC] About `org-export-with-\(fixed-width\|tables\)'

2014-01-07 Thread Eric S Fraga
Eric Abrahamsen e...@ericabrahamsen.net writes:

 Florian Beck f...@miszellen.de writes:
 [...]
 Actually, I would find it useful (because I sometimes export my notes as
 an ebook and tables get garbled on the way).

 Hey, are you actually exporting to an epub? How are you doing that?

I'd be curious to know as well.  I export to epub in two ways, both by
first exporting to HTML.  Then either use calibre to convert the HTML
document or load the HTML document in firefox and use the dotepub
addon.  I haven't done this enough to say which is better.

I would guess that defining an epub exporter, derived from the HTML
exporter, may not be that difficult.  If only I had the time :-(

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.3.1, Org release_8.2.4-322-gece429




[O] Bug: org-beamer-select-environment (ox-beamer.el) assumes org-use-fast-tag-selection is on

2014-01-07 Thread Anders Johansson

Hi,
I recently set org-use-fast-tag-selection to nil in my configuration. 
This meant org-beamer-select-environment stopped working since it 
assumes that org-set-tags will launch the fast-tag-selection mechanism 
when it has set org-tag-alist to it's special value.


Fix: Explicitly set org-use-fast-tag-selection to t in the 
let*-construct in org-use-fast-tag-selection, as is now done with 
org-fast-tag-selection-single-key.


Greetings,
Anders Johansson





Re: [O] Bug: org-beamer-select-environment (ox-beamer.el) assumes org-use-fast-tag-selection is on

2014-01-07 Thread Nicolas Goaziou
Hello,

Anders Johansson mejlaande...@gmail.com writes:

 I recently set org-use-fast-tag-selection to nil in my
 configuration. This meant org-beamer-select-environment stopped
 working since it assumes that org-set-tags will launch the
 fast-tag-selection mechanism when it has set org-tag-alist to it's
 special value.

 Fix: Explicitly set org-use-fast-tag-selection to t in the
 let*-construct in org-use-fast-tag-selection, as is now done with
 org-fast-tag-selection-single-key.

Fixed. Thank you for the report.


Regards,

-- 
Nicolas Goaziou



[O] ob-C patch

2014-01-07 Thread Thierry Banel
Hi Org maintainers

Here is a patch to overcome some shortcomings of Babel for C, C++, D
- handle non-homogeneous tables
- support table headers
- easier table iterating
- some new error handling
- simple lists and vectors support for D
- new unit tests

Have fun
Thierry

From 8fdf544154b1d75ffe877082251cd87b93e8ad9f Mon Sep 17 00:00:00 2001
From: Thierry Banel tbanelweb...@free.fr
Date: Tue, 7 Jan 2014 21:46:05 +0100
Subject: [PATCH] enhanced table handling in Babel C, C++, D

---
 lisp/ob-C.el   |  285 ++--
 testing/examples/ob-C-test.org |   88 +
 testing/lisp/test-ob-C.el  |  103 +--
 3 files changed, 369 insertions(+), 107 deletions(-)

diff --git a/lisp/ob-C.el b/lisp/ob-C.el
index 4c2d1ba..f93a967 100644
--- a/lisp/ob-C.el
+++ b/lisp/ob-C.el
@@ -70,40 +70,25 @@ This function calls `org-babel-execute:C++'.
 This function is called by `org-babel-execute-src-block'.
   (let ((org-babel-c-variant 'cpp)) (org-babel-C-execute body params)))
 
-;;(defun org-babel-expand-body:C++ (body params) ;; unused
-;;  Expand a block of C++ code with org-babel according to it's
-;;header arguments (calls `org-babel-C-expand').
-;;  (let ((org-babel-c-variant 'cpp)) (org-babel-C-expand body params)))
-
 (defun org-babel-execute:D (body params)
   Execute a block of D code with org-babel.
 This function is called by `org-babel-execute-src-block'.
   (let ((org-babel-c-variant 'd)) (org-babel-C-execute body params)))
 
-;; (defun org-babel-expand-body:D (body params) ;; unused
-;;  Expand a block of D code with org-babel according to it's
-;;header arguments (calls `org-babel-C-expand').
-;;  (let ((org-babel-c-variant 'd)) (org-babel-C-expand body params)))
-
 (defun org-babel-execute:C (body params)
   Execute a block of C code with org-babel.
 This function is called by `org-babel-execute-src-block'.
   (let ((org-babel-c-variant 'c)) (org-babel-C-execute body params)))
 
-;; (defun org-babel-expand-body:c (body params) ;; unused
-;;  Expand a block of C code with org-babel according to it's
-;;header arguments (calls `org-babel-C-expand').
-;;  (let ((org-babel-c-variant 'c)) (org-babel-C-expand body params)))
-
 (defun org-babel-C-execute (body params)
   This function should only be called by `org-babel-execute:C'
 or `org-babel-execute:C++' or `org-babel-execute:D'.
   (let* ((tmp-src-file (org-babel-temp-file
 			C-src-
-			(cond
-			 ((equal org-babel-c-variant 'c  ) .c  )
-			 ((equal org-babel-c-variant 'cpp) .cpp)
-			 ((equal org-babel-c-variant 'd  ) .d  
+			(case org-babel-c-variant
+			 (c   .c  )
+			 (cpp .cpp)
+			 (d   .d  
 	 (tmp-bin-file (org-babel-temp-file C-bin- org-babel-exeext)) ;; not used for D
 	 (cmdline (cdr (assoc :cmdline params)))
 	 (cmdline (if cmdline (concat   cmdline) ))
@@ -111,43 +96,47 @@ or `org-babel-execute:C++' or `org-babel-execute:D'.
 	 (flags (mapconcat 'identity
 			   (if (listp flags) flags (list flags))  ))
 	 (full-body
-	  (cond ((equal org-babel-c-variant 'c  ) (org-babel-C-expand-C   body params))
-		((equal org-babel-c-variant 'cpp) (org-babel-C-expand-C++ body params))
-		((equal org-babel-c-variant 'd  ) (org-babel-C-expand-D   body params)
+	  (case org-babel-c-variant
+	(c   (org-babel-C-expand-C   body params))
+	(cpp (org-babel-C-expand-C++ body params))
+	(d   (org-babel-C-expand-D   body params)
 (with-temp-file tmp-src-file (insert full-body))
-(if (memq org-babel-c-variant '(c cpp)) ;; no separate compilation for D
-	(org-babel-eval
-	 (format %s -o %s %s %s
-		 (cond
-		  ((equal org-babel-c-variant 'c  ) org-babel-C-compiler)
-		  ((equal org-babel-c-variant 'cpp) org-babel-C++-compiler))
-		 (org-babel-process-file-name tmp-bin-file)
-		 flags
-		 (org-babel-process-file-name tmp-src-file)) ))
+(case org-babel-c-variant
+  ((c cpp)
+   (org-babel-eval
+	(format %s -o %s %s %s
+		(case org-babel-c-variant
+		 (c   org-babel-C-compiler)
+		 (cpp org-babel-C++-compiler))
+		(org-babel-process-file-name tmp-bin-file)
+		flags
+		(org-babel-process-file-name tmp-src-file)) ))
+  (d nil)) ;; no separate compilation for D
 (let ((results
-	   (org-babel-trim
-	(org-remove-indentation
-	 (org-babel-eval
-	  (cond ((memq org-babel-c-variant '(c cpp))
-		 (concat tmp-bin-file cmdline))
-		((equal org-babel-c-variant 'd)
-		 (format %s %s %s %s
-			 org-babel-D-compiler
-			 flags
-			 (org-babel-process-file-name tmp-src-file)
-			 cmdline)))
-	  )
-  (org-babel-reassemble-table
-   (org-babel-result-cond (cdr (assoc :result-params params))
-	 (org-babel-read results t)
-	 (let ((tmp-file (org-babel-temp-file c-)))
-	   (with-temp-file tmp-file (insert results))
-	   (org-babel-import-elisp-from-file tmp-file)))
-   (org-babel-pick-name
-	(cdr (assoc :colname-names params)) (cdr (assoc :colnames params)))
-   (org-babel-pick-name
-	(cdr (assoc :rowname-names 

Re: [O] Using org-diary

2014-01-07 Thread Nick Dokos
Stephen J. Barr step...@planetbarr.com writes:

 I think that iI figured it out. I was transposing the last two arguments
 for some of the cases. Just curious, in the documentation for org-class,

 (org-class Y1 M1 D1 Y2 M2 D2 DAYNAME rest SKIP-WEEKS)

 what is rest ?


See

   (info (elisp) Other Features of Argument Lists)

,
|To specify optional arguments that may be omitted when a function is
| called, simply include the keyword `optional' before the optional
| arguments.  To specify a list of zero or more extra arguments, include
| the keyword `rest' before one final argument.
`

Nick


   




Re: [O] GIT fot publishing .org

2014-01-07 Thread Nick Dokos
Renato renar...@gmail.com writes:

 Hi,
 I'm looking for a GIT, that I can use, to save .org file.

 Can someone sudgest me one?


I don't know what you mean. Instead of me trying to guess what you mean,
can you rephrase your question?

Nick




Re: [O] GIT fot publishing .org

2014-01-07 Thread Alexander Baier
On 2014-01-06 18:55 Renato wrote:
 Hi,
 I'm looking for a GIT, that I can use, to save .org file.

 CAn someone sudgest me one?

 TIA

 Renaro



As I do not quite get what you are trying to do and can only guess, this
is a stab in the dark: Have you had a look at github pages? As far as I
know, that might be something to publish an org file to.

HTH,
-- 
 Alexander Baier



Re: [O] Question about the math mode table exporting for latex and html

2014-01-07 Thread Rick Frankel
On Tue, Jan 07, 2014 at 05:39:06PM +0100, Nicolas Goaziou wrote:
 Rasmus ras...@gmx.us writes:
 
  AFAIK, mathjax supports amsmath matrices, e.g. the third example here¹ .
  Thus, we'd really just want to insert the output of org-latex-table in
  the html-file.
 
  Perhaps something like the following would be OK?  Nicholas?
 
  #+ATTR_HTML: :mode latex
  #+ATTR_LATEX: :mode math :environment pmatrix :math-prefix \mathbf{H}=
  | \vdots | 0 | \vdots |
  | \vdots | H | \vdots |
  | \vdots | 0 | \vdots |
 
  This would tell ox-html.el to transcode the table via ox-latex-tabel
  and feed the string via org-html-format-latex (assuming latex-frag is
  a string).  
 
 FWIW, I think it's worth trying. I'm Cc'ing Rick Frankel for his
 opinion.
 

I have no opinion on this one. Nicolas, if you think this is the
correct approach syntactically, then it works for me.

rick



[O] Long lines prevent Org mode!

2014-01-07 Thread François Pinard
Hi, Org maintainers.

This morning, while using my little org-grep tool, I got a Stack
overflow in regexp matcher diagnostic.  I first looked for a bug in my
things, but the problem lies in Org mode.  It cannot be activated if the
Org buffer happens to contain a long line.

In the *Scratch* buffer, I wrote this little function:

   (defun essai (n)
 (with-temp-buffer
   (insert (make-string n ?x))
   (org-mode)))

and called it with various values of N.  It works fine for small N, but
breaks when (on the machine here) N reaches 3.

I wonder if the following article could help:

  [[https://groups.google.com/forum/#!topic/gnu.emacs.help/pxfMC5f7JHg][Stack 
overflow in regexp matcher - Google Groupes]]

François

P.S. Would someone be kind enough to teach me the wisdom about how to
insert Org mode fragments in an email so it is received the most legibly
possible at the other end?  Presumably, there is a Gnus way (which is
it?) yet many people do not use it.



[O] sa-ignore-headline for HTML export

2014-01-07 Thread James Harkins

Hi Suvayu,

I've been using your sa-ignore-headline filter [1] for a while -- works 
great for LaTeX.


(defun sa-ignore-headline (contents backend info)
 Ignore headlines with tag `ignoreheading'.
 (when (and (org-export-derived-backend-p backend 'latex 'html 'ascii)
 (string-match \\`.*ignoreheading.*\n
   (downcase contents)))
   (replace-match  nil nil contents)))

Unfortunately, although this is supposed to apply to latex, html and ascii 
backends, the string-match works only for LaTeX. I was just trying it with 
HTML and there was no effect.


For HTML export, the contents end up looking like this:

div id=outline-container-sec-2 class=outline-2
h2 id=sec-2span class=section-number-22/span 
B#xa0;#xa0;#xa0;span class=tagspan 
class=ignoreheadingignoreheading/span/span/h2

div class=outline-text-2 id=text-2
p
Text B
/p
/div
/div

.. where there is no backquote to match.

So I've changed the string-match predicate to read as follows (also 
removing the downcase), and it now works with HTML export.


(string-match .*ignoreheading.* contents)

That's a hack -- sufficient for now, but ideally I suppose it should 
dispatch to a different predicate per backend.


Posting here because I didn't see a way on stackexchange to comment on your 
answer.


Thanks for the function! It would have taken me ages to figure it out on my 
own.

hjh

[1] 
http://stackoverflow.com/questions/10295177/is-there-an-equivalent-of-org-modes-b-ignoreheading-for-non-beamer-documents




Re: [O] gnus: link annoyance

2014-01-07 Thread François Pinard
Achim Gratz strom...@nexgo.de writes:

 François Pinard writes:

 Org could tell Gnus that I am not really reading an article as if I was
 using Gnus interactively.

 You keep saying that; while clearly you could coerce Gnus into doing
 something like that I'm not sure Gnus would entertain to listen to
 such a request.  This is probably best asked on a Gnus mailing list,
 but it seems that Gnus wants to present search results in an ephemeral
 group.  If you treat a link as a search that finds one article, then
 the problem you're trying to solve goes away, I'd think.

The whole discussion is about how Org mode should best follow gnus:
links.  I surely do not mind if Org uses ephemeral groups or any other
kind of machinery.  My only suggestion is that, whatever the mechanics,
Org following a gnus: link should manage so Gnus does not change the
article flags.  If Org asks Gnus to perform a search to locate a given
article, it seems like overkill to me, but I may well be wrong and not
see the advantages.

François



[O] HTML export doesn't convert quote before footnote

2014-01-07 Thread James Harkins
This appears to be an HTML export bug: A straight double-quote mark before 
a footnote fails to convert into rdquo;


Minimal example:

* Heading
Krusty the Klown opined, Well, that's showbiz for ya.[fn:1]
* Footnotes
[fn:1] /The Simpsons/.

Expected:

p
Krusty the Klown opined, ldquo;Well, thatrsquo;s showbiz for 
ya.rdquo;supa id=fnr.1 name=fnr.1 class=footref 
href=#fn.11/a/sup

/p

Got:

p
Krusty the Klown opined, ldquo;Well, thatrsquo;s showbiz for ya.supa 
id=fnr.1 name=fnr.1 class=footref href=#fn.11/a/sup

/p

I guess I can filter for it as a workaround.

hjh



Re: [O] Long lines prevent Org mode!

2014-01-07 Thread Nick Dokos
François Pinard pin...@iro.umontreal.ca writes:

 Hi, Org maintainers.

 This morning, while using my little org-grep tool, I got a Stack
 overflow in regexp matcher diagnostic.  I first looked for a bug in my
 things, but the problem lies in Org mode.  It cannot be activated if the
 Org buffer happens to contain a long line.

 In the *Scratch* buffer, I wrote this little function:

(defun essai (n)
  (with-temp-buffer
(insert (make-string n ?x))
(org-mode)))

 and called it with various values of N.  It works fine for small N, but
 breaks when (on the machine here) N reaches 3.

 I wonder if the following article could help:

   [[https://groups.google.com/forum/#!topic/gnu.emacs.help/pxfMC5f7JHg][Stack 
 overflow in regexp matcher - Google Groupes]]


I think it is the same problem. The backtrace in this case is

,
| Debugger entered--Lisp error: (error Stack overflow in regexp matcher)
|   looking-at(.*:ARCHIVE:)
|   (if (looking-at (concat .*: org-archive-tag :)) (message %s 
(substitute-command-keys Subtree is archived and stays closed.  Use 
\\[org-force-cycle-archived] to cycle it anyway.)))
|   ...
|   org-mode()
|   (progn (insert (make-string n 120)) (org-mode))
|   (unwind-protect (progn (insert (make-string n 120)) (org-mode)) (and 
(buffer-name temp-buffer) (kill-buffer temp-buffer)))
|   (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn 
(insert (make-string n 120)) (org-mode)) (and (buffer-name temp-buffer) 
(kill-buffer temp-buffer
|   (let ((temp-buffer (generate-new-buffer  *temp*))) ...)
|   essai(3)
|   eval((essai 3) nil)
`


and in fact, you can leave org out of the picture altogether: create an
empty buffer, insert 3 x's by hand, go to the beginning and evaluate

   (looking-at .*foo)

As Stefan says in the thread you pointed out, it's a limitation of the
emacs regexp engine.

 François

 P.S. Would someone be kind enough to teach me the wisdom about how to
 insert Org mode fragments in an email so it is received the most legibly
 possible at the other end?  Presumably, there is a Gnus way (which is
 it?) yet many people do not use it.



I cut and paste and then use either C-c m (bound to
message-mark-inserted-region) which produces this style:

--8---cut here---start-8---
some code
--8---cut here---end---8---

or C-c q (bound to boxquote-region) which produces this style:

,
| some quoted material
`

I use the first one for things that a recipient might want to cut
and paste in order to experiment with them. I use the second to quote
immutable stuff (e.g. doc strings).

Of course, if your problem is that your mailer (or some mailer along the
way) mangles the content, then the safest thing to do is to put it in an
attachment or post it on some pastebin and send a link.
-- 
Nick




[O] Possible bug in the org-element cache code?

2014-01-07 Thread Nick Dokos
I've gotten the attached backtrace a couple of times in the past few
days. Also same error with org-cache-sync. I'm not sure how reproducible
it is and I have to admit that I've been running with a possibly tainted
emacs/org for the last few days. I'll restart emacs and try to keep it
pristine and see if it happens again, but I thought I'd post the
backtrace just in case it is real.

Debugger entered--Lisp error: (wrong-type-argument arrayp #s(hash-table size 
5003 test eq rehash-size 1.5 rehash-threshold 0.8 data (1 ((paragraph (:begin 1 
:end 3 :contents-begin 1 :contents-end 2 :post-blank 2 :post-affiliated 1 
:parent nil))) 3 ((paragraph (:begin 3 :end 164 :contents-begin 3 :contents-end 
162 :post-blank 2 :post-affiliated 3 :parent nil))) 164 ((paragraph (:begin 164 
:end 282 :contents-begin 164 :contents-end 282 :post-blank 0 :post-affiliated 
164 :parent nil)) (233 nil) (164 ((link . 164)) (link (:type gnus :path 
gmane.emacs.orgmode#87k3edcbe5@alphaville.bos.redhat.com :raw-link 
gnus:gmane.emacs.orgmode#87k3edcbe5@alphaville.bos.redhat.com 
:application nil :search-option nil :begin 164 :end 282 :contents-begin 233 
:contents-end 280 :post-blank 0 :parent (paragraph (:begin 164 :end 282 
:contents-begin 164 :contents-end 282 :post-blank 0 :post-affiliated 164 
:parent nil (link (:type gnus :path 
gmane.emacs.orgmode#87k3edcbe5@alphaville.bos.redhat.com :raw-link 
gnus:gmane.emacs.orgmode#87k3edcbe5@alphaville.bos.redhat.com 
:application nil :search-option nil :begin 164 :end 282 :contents-begin 233 
:contents-end 280 :post-blank 0 :parent (paragraph (:begin 164 :end 282 
:contents-begin 164 :contents-end 282 :post-blank 0 :post-affiliated 164 
:parent nil)
  aref(#s(hash-table size 5003 test eq rehash-size 1.5 rehash-threshold 0.8 
data (1 ((paragraph (:begin 1 :end 3 :contents-begin 1 :contents-end 2 
:post-blank 2 :post-affiliated 1 :parent nil))) 3 ((paragraph (:begin 3 :end 
164 :contents-begin 3 :contents-end 162 :post-blank 2 :post-affiliated 3 
:parent nil))) 164 ((paragraph (:begin 164 :end 282 :contents-begin 164 
:contents-end 282 :post-blank 0 :post-affiliated 164 :parent nil)) (233 nil) 
(164 ((link . 164)) (link (:type gnus :path 
gmane.emacs.orgmode#87k3edcbe5@alphaville.bos.redhat.com :raw-link 
gnus:gmane.emacs.orgmode#87k3edcbe5@alphaville.bos.redhat.com 
:application nil :search-option nil :begin 164 :end 282 :contents-begin 233 
:contents-end 280 :post-blank 0 :parent (paragraph (:begin 164 :end 282 
:contents-begin 164 :contents-end 282 :post-blank 0 :post-affiliated 164 
:parent nil (link (:type gnus :path 
gmane.emacs.orgmode#87k3edcbe5@alphaville.bos.redhat.com :raw-link 
gnus:gmane.emacs.orgmode#87k3edcbe5@alphaville.bos.redhat.com 
:application nil :search-option nil :begin 164 :end 282 :contents-begin 233 
:contents-end 280 :post-blank 0 :parent (paragraph (:begin 164 :end 282 
:contents-begin 164 :contents-end 282 :post-blank 0 :post-affiliated 164 
:parent nil)) ...)) 0)
  (memq (aref org-element--cache 0) cl-struct-avl-tree--tags)
  (and (memq (aref org-element--cache 0) cl-struct-avl-tree--tags))
  (or (and (memq (aref org-element--cache 0) cl-struct-avl-tree--tags)) (error 
%s accessing a non-%s (quote avl-tree--dummyroot) (quote avl-tree-)))
  (progn (or (and (memq (aref org-element--cache 0) cl-struct-avl-tree--tags)) 
(error %s accessing a non-%s (quote avl-tree--dummyroot) (quote avl-tree-))) 
(aref org-element--cache 1))
  (aref (progn (or (and (memq (aref org-element--cache 0) 
cl-struct-avl-tree--tags)) (error %s accessing a non-%s (quote 
avl-tree--dummyroot) (quote avl-tree-))) (aref org-element--cache 1)) 0)
  (progn (aref (progn (or (and (memq (aref org-element--cache 0) 
cl-struct-avl-tree--tags)) (error %s accessing a non-%s (quote 
avl-tree--dummyroot) (quote avl-tree-))) (aref org-element--cache 1)) 0))
  (let ((node (progn (aref (progn (or (and ...) (error %s accessing a non-%s 
... ...)) (aref org-element--cache 1)) 0))) last) (catch (quote found) (while 
node (let* ((element (progn (aref node 2))) (beg (org-element-property :begin 
element))) (cond (( key beg) (setq node (progn ...))) ((= key beg) (if (memq 
... ...) (setq last ... node ...) (throw ... ...))) (t (setq last (progn ...) 
node (progn ...)) last))
  (if (not (wholenump key)) (gethash key org-element--cache-objects) (let 
((node (progn (aref (progn (or ... ...) (aref org-element--cache 1)) 0))) last) 
(catch (quote found) (while node (let* ((element (progn ...)) (beg 
(org-element-property :begin element))) (cond (( key beg) (setq node ...)) ((= 
key beg) (if ... ... ...)) (t (setq last ... node ...) last)))
  (progn (if (and (not ignore-changes) (org-element--cache-pending-changes-p)) 
(progn (org-element--cache-sync (current-buffer (if (not (wholenump key)) 
(gethash key org-element--cache-objects) (let ((node (progn (aref (progn ... 
...) 0))) last) (catch (quote found) (while node (let* ((element ...) (beg 
...)) (cond 

Re: [O] HTML export doesn't convert quote before footnote

2014-01-07 Thread Nick Dokos
James Harkins jamshar...@gmail.com writes:

 This appears to be an HTML export bug: A straight double-quote mark
 before a footnote fails to convert into rdquo;

 Minimal example:

 * Heading
 Krusty the Klown opined, Well, that's showbiz for ya.[fn:1]
 * Footnotes
 [fn:1] /The Simpsons/.

 Expected:

 p
 Krusty the Klown opined, ldquo;Well, thatrsquo;s showbiz for
 ya.rdquo;supa id=fnr.1 name=fnr.1 class=footref
 href=#fn.11/a/sup
 /p

 Got:

 p
 Krusty the Klown opined, ldquo;Well, thatrsquo;s showbiz for
 ya.supa id=fnr.1 name=fnr.1 class=footref
 href=#fn.11/a/sup
 /p


FWIW, I tried it and I get a different behavior: neither the opening quote
nor the closing quote is touched. I get:

,
| p
| Krusty the Klown opined, Well, that's showbiz for ya.supa id=fnr.1 
name=fnr.1 class=footref href=#fn.11/a/sup
| /p
`

Org-mode version 8.2.5c (release_8.2.5c-430-gf8e174)

-- 
Nick




Re: [O] Possible bug in the org-element cache code?

2014-01-07 Thread Nick Dokos
Forgot to mention:

Org-mode version 8.2.5c (release_8.2.5c-430-gf8e174)
-- 
Nick






Re: [O] Long lines prevent Org mode!

2014-01-07 Thread François Pinard
Nick Dokos ndo...@gmail.com writes:

 you can leave org out of the picture altogether: create an empty
 buffer, insert 3 x's by hand, go to the beginning and evaluate

(looking-at .*foo)

 As Stefan says in the thread you pointed out, it's a limitation of the
 emacs regexp engine.

Yes, I got this from his article.  However, it seems that [^\nf]*foo
would succeed, avoiding the stack explosion.  So, it is possible to
rework the regexpes around the limitation.

Surely not a fun job to do for Org regexpes, I know.  Maybe not worth
doing as very long lines are unusual, yet maybe worth doing nevertheless
for Org files because long lines are still possible.  The fact is that I
was hit by this problem in the Org buffers generated by org-grep.

However, as I am tempted to think that the problem is unlikely to be
solved soon, I tried to alleviate it.  org-grep now shortens the lines
by removing, within each line, a good part of the context between hits.
This does not guarantee that the above problem will never occur, but it
considerably decreases the chance that it occurs.

 I cut and paste and then use either C-c m (bound to
 message-mark-inserted-region) or C-c q (bound to boxquote-region)

Thanks for these hints, which I saved on keys here! :-)

 Of course, if your problem is that your mailer (or some mailer along
 the way) mangles the content, then the safest thing to do is to put it
 in an attachment or post it on some pastebin and send a link.

Sure.

My little problem was different.  If I use Org in-line markup, like
bold, italics, or links to Web sites, or even block markup like
fragments between #+BEGIN_SRC and #+END_SRC, say, I was wondering how
this is best transmitted within a message, in the text, without
resorting to an attachment.  Gnus as a reader surely has some capability
somewhere, as I think I saw messages displaying Org code nicely; I just
do not remember how it was done.  Outside Gnus, it might be more
problematic to find a useful way to have Org included.  Sending Org all
raw is sometimes a bit noisy, especially for links.

Someone recently mentioned org-mime.el, new to me, maybe this is the
proper avenue?  I should at least play and experiment with it! :-).

François



Re: [O] Long lines prevent Org mode!

2014-01-07 Thread Nick Dokos
François Pinard pin...@iro.umontreal.ca writes:

 Nick Dokos ndo...@gmail.com writes:

 you can leave org out of the picture altogether: create an empty
 buffer, insert 3 x's by hand, go to the beginning and evaluate

(looking-at .*foo)

 As Stefan says in the thread you pointed out, it's a limitation of the
 emacs regexp engine.

 Yes, I got this from his article.  However, it seems that [^\nf]*foo
 would succeed, avoiding the stack explosion.  So, it is possible to
 rework the regexpes around the limitation.

 Surely not a fun job to do for Org regexpes, I know.  Maybe not worth
 doing as very long lines are unusual, yet maybe worth doing nevertheless
 for Org files because long lines are still possible.  The fact is that I
 was hit by this problem in the Org buffers generated by org-grep.


It would be better to reimplement the regexp engine using e.g. an NDFA.
IIRC, it requires constant stack but it limits the regexps allowed. See
e.g.

http://swtch.com/~rsc/regexp/regexp1.html

It might make sense to pair the NDFA with a backtracker. The pattern
compiler could then choose which one to use based on the regexp.

-- 
Nick




Re: [O] [RFC] About `org-export-with-\(fixed-width\|tables\)'

2014-01-07 Thread Florian Beck

On 07.01.2014 19:17, Eric S Fraga wrote:

Eric Abrahamsen e...@ericabrahamsen.net writes:



Hey, are you actually exporting to an epub? How are you doing that?


I'd be curious to know as well.  I export to epub in two ways, both by
first exporting to HTML.  Then either use calibre to convert the HTML
document or load the HTML document in firefox and use the dotepub
addon.  I haven't done this enough to say which is better.


If you are copying your file to a device, conversion with calibre is the 
simplest option.



I would guess that defining an epub exporter, derived from the HTML
exporter, may not be that difficult.  If only I had the time :-(



(org-export-define-derived-backend 'fb/org-export-epub 'html
  :menu-entry '(?h 99 ((?p As epub file fb/org-export-epub

(defun fb/convert-html-to-epub (infile)
  (let ((outfile (concat (file-name-sans-extension infile)
 .epub))
(max-toc-links 0)
(level1 //h:h2)
(level2 //h:h3)
(chapter \//*[name()='h1' or name()='h2']\)
(chapter-mark pagebreak))
(shell-command
 (format ebook-convert %s %s --max-toc-links=%s --use-auto-toc 
--level1-toc=%s --level2-toc=%s --chapter=%s --chapter-mark=%s 
--input-encoding=utf8 -v -v -v --authors=\%s\ --title=\%s\

 infile outfile
 max-toc-links level1 level2 chapter chapter-mark
 (user-full-name)
 (file-name-base outfile)))
outfile))

(defun fb/org-export-epub (optional async subtreep visible-only
 body-only ext-plist)
  (interactive)
  (let* ((extension (concat . org-html-extension))
 (file (org-export-output-file-name extension subtreep))
 (org-export-coding-system org-html-coding-system))
(org-export-to-file 'fb/org-export-epub file
  async subtreep visible-only body-only ext-plist
  (lambda (file) (fb/convert-html-to-epub file)





[O] Fwd: puzzling org-mime-htmlize

2014-01-07 Thread Joseph Vidal-Rosset
Dear Eric (cc. the list),

I apologize to insist with this problem that I meet with org-mime-htmize in
the gnus on my PC.

On my laptop, with the same OS and I believe the same configuration, it
runs perfectly. Here I meet always this sort of message:

Creating LaTeX Image...
Failed to create dvi file from /tmp/orgtex11506Npy.tex
Auto-saving...


I have tried to run latex /tmp/orgtex11506Npy.tex - as adviced Nick -  and
the dvi file was created.

I  understand neither what happens nor how I can fix this problem. Do you
see  an possible explanation ?

Best wishes,

Jo.



-- Forwarded message --
From: Joseph Vidal-Rosset joseph.vidal.ros...@gmail.com
Date: 2014/1/7
Subject: puzzling org-mime-htmlize
To: emacs-orgmode@gnu.org



Hello the list,

Back to gnus in order to improve my life in emacs, I meet a very strange
problem with  org-mime-htmlize. The  more surprising  fact is  that this
problem does  not appear  on my  laptop (running  with GNU  Linux Debian
testing) but only with my PC (running also with a Crunchbang + Debian
wheezy upgraded to  testing). Therefore I have imported  my .gnus.el and
my  init.el from  my laptop  to my  pc, but  very strangely  the problem
persists !

It is the same settings, the  same O.S. , even the same org-mime.el
and it works on laptop, not on my pc.

Here is the error message:

Creating LaTeX Image...
Failed to create dvi file from /tmp/orgtex11506Npy.tex
Auto-saving...


I do not know what to do, because I can't guess where the problem is.

I send this message with Gnus to say you that your help is very welcome.

Jo.


Re: [O] Possible bug in the org-element cache code?

2014-01-07 Thread Nicolas Goaziou
Hello,

Nick Dokos ndo...@gmail.com writes:

 I've gotten the attached backtrace a couple of times in the past few
 days. Also same error with org-cache-sync. I'm not sure how reproducible
 it is and I have to admit that I've been running with a possibly tainted
 emacs/org for the last few days. I'll restart emacs and try to keep it
 pristine and see if it happens again, but I thought I'd post the
 backtrace just in case it is real.

It is because I changed cache structure from a hash table to an AVL tree
(basically a vector). If you restart Emacs, or (setq org-element--cache
nil) in all Org buffers, the error should go away.

Thank you for the report anyway.


Regards,

-- 
Nicolas Goaziou