Re: [O] Some projects

2015-10-26 Thread Rasmus
Marcin Borkowski  writes:

> On 2015-10-26, at 00:03, Aaron Ecay  wrote:
>
>> - The only “off the shelf”-capable citation processing library that we
>>   found last time is in Haskell, which introduced some difficulties for
>>   distributing the resulting tool.  I know some projects
>>   (e.g. git-annex) are written in Haskell and distributed as static
>>   binaries for windows/mac/linux/etc.  We’d need to figure out how to do
>>   this, or find another citation processing library in an
>>   easier-to-distribute language.  (I should say, all the work on the
>>   external tool was done by Richard Lawrence; I worked on the exporter
>>   for the citation syntax including the interface with an external
>>   tool.)
>
> This is probably a very naive question, but wouldn't it be possible to
> have a pure Elisp tool?  I understand that lack of manpower may be the
> main problem; are there any others?

Sure, but it’s a lot of work. citeproc-java is 22K lines:

  https://github.com/michel-kraemer/citeproc-java/graphs/contributors

>> - There is a difference between citations as done by latex/bibtex/etc.,
>>   and those done in every other format (handled through CSL).  Assuming
>>   latex users want to keep their native processing rather than
>>   delegating to CSL, we need to solve the myriad small inconsistencies
>>   between these two tools.  I think this is an area where it’s important
>>   to get things right: users of citations generally have exacting
>>   requirements.  “Approximately Chicago-style” or “almost MLA” aren’t
>>   worth anything.
>
> Out of curiosity: what is CSL?

  https://en.wikipedia.org/wiki/Citation_Style_Language

What is used by e.g. Zotero and Pandoc and mostly everyone who's not using
LaTeX.  Unfortunately, it is not as flexible as biblatex.  E.g. to get
"author (year)" and "(author, year)" I /think/ you need two separate
styles, but I could easily be wrong on this.  This was discussed
extensively earlier.

Rasmus

-- 
Together we will make the possible totay impossible!




Re: [O] org-crypt & multiple recipients

2015-10-26 Thread Grégoire Jadi

Eric S Fraga writes:

> On Sunday, 25 Oct 2015 at 18:39, Nick Anderson wrote:
>> I was playing with org-crypt today and it's pretty nifty.
>>
>> While encrypting things for myself is the primary use case, I have other
>> team members that also use org-mode. It occurred to me that it would be
>> neat if I could specify a list of users to encrypt a node for. Then we
>> could share an org file and a node could be decrypted by individual.
>
> This is fundamentally difficult with a public key encryption system: you
> would have to have separate copies of the encrypted text, one for each
> recipient?
>
> Maybe you could have a separate private/public key pair that is shared
> for group work instead?

GPG supports multiple-recipient with --recipient
See
https://stackoverflow.com/questions/597188/encryption-with-multiple-different-keys/23725786#23725786

And the answer below explains how GPG/PGP does to not have to copy the
text for each recipient.
https://stackoverflow.com/questions/597188/encryption-with-multiple-different-keys/28206835#28206835

Best,

-- 
Grégoire Jadi


signature.asc
Description: PGP signature


Re: [O] org-crypt & multiple recipients

2015-10-26 Thread Eric S Fraga
On Monday, 26 Oct 2015 at 10:21, Grégoire Jadi wrote:
> GPG supports multiple-recipient with --recipient

I stand corrected!  Thanks.  Interesting hybrid encryption approach.

However, although the main text is not copied, the header (which has the
session key, as it is called, used to encrypt the main text) is so there
will need to be a structure which has the multiple headers, one for each
recipient, in the org file.

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.5.1, Org release_8.3beta-1229-ge900eb



Re: [O] org-crypt & multiple recipients

2015-10-26 Thread Eric S Fraga
On Sunday, 25 Oct 2015 at 18:39, Nick Anderson wrote:
> I was playing with org-crypt today and it's pretty nifty.
>
> While encrypting things for myself is the primary use case, I have other
> team members that also use org-mode. It occurred to me that it would be
> neat if I could specify a list of users to encrypt a node for. Then we
> could share an org file and a node could be decrypted by individual.

This is fundamentally difficult with a public key encryption system: you
would have to have separate copies of the encrypted text, one for each
recipient?

Maybe you could have a separate private/public key pair that is shared
for group work instead?

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.5.1, Org release_8.3beta-1229-ge900eb



Re: [O] Some projects

2015-10-26 Thread Marcin Borkowski

On 2015-10-26, at 00:03, Aaron Ecay  wrote:

> - The only “off the shelf”-capable citation processing library that we
>   found last time is in Haskell, which introduced some difficulties for
>   distributing the resulting tool.  I know some projects
>   (e.g. git-annex) are written in Haskell and distributed as static
>   binaries for windows/mac/linux/etc.  We’d need to figure out how to do
>   this, or find another citation processing library in an
>   easier-to-distribute language.  (I should say, all the work on the
>   external tool was done by Richard Lawrence; I worked on the exporter
>   for the citation syntax including the interface with an external
>   tool.)

This is probably a very naive question, but wouldn't it be possible to
have a pure Elisp tool?  I understand that lack of manpower may be the
main problem; are there any others?

> - There is a difference between citations as done by latex/bibtex/etc.,
>   and those done in every other format (handled through CSL).  Assuming
>   latex users want to keep their native processing rather than
>   delegating to CSL, we need to solve the myriad small inconsistencies
>   between these two tools.  I think this is an area where it’s important
>   to get things right: users of citations generally have exacting
>   requirements.  “Approximately Chicago-style” or “almost MLA” aren’t
>   worth anything.

Out of curiosity: what is CSL?

Best,
(and count me in the number of people who say a big Thank you),

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University



Re: [O] org-crypt & multiple recipients

2015-10-26 Thread Nick Anderson
On 10/26/2015 06:24 AM, Eric S Fraga wrote:
> On Monday, 26 Oct 2015 at 10:21, Grégoire Jadi wrote:
>> GPG supports multiple-recipient with --recipient
> 
> I stand corrected!  Thanks.  Interesting hybrid encryption approach.
> 
> However, although the main text is not copied, the header (which has the
> session key, as it is called, used to encrypt the main text) is so there
> will need to be a structure which has the multiple headers, one for each
> recipient, in the org file.

Thanks for the link describing the multiple-recipient handling, good read.

But I guess I don't understand why there would have to be a header for
each recipient (other than current implementation limitations with
org-crypt).

Currently the CRYPTKEY property identifies the email address or KEY that
you want to encrypt for. If I have multiple of the same property the one
that is listed first seems to be used.

What if there were a CRYPTKEYS property that took a space separated list
of keys or emails?







Re: [O] org-agenda-scheduled-leaders and repeating tasks

2015-10-26 Thread cesar mena
hi again nicolas,

sorry. i made a mistake updating my tree.

i'm quite certain i'm on master now "org-version: 8.3.2
(release_8.3.2-219-g770671)" and the repeater resets itself again.

so presently i have a task that looks like this:

** TODO some task
   SCHEDULED: <2015-08-24 Mon ++1w>

and in the agenda it shows up as:

  Scheduled:  TODO some task

best,
-cm





On Mon, Oct 26, 2015 at 9:13 AM, cesar mena  wrote:
> hello guys,
>
> so far so good for me.
>
> thanks nicolas and matt.
>
> -cm
>
> On Sun, Oct 25, 2015 at 1:24 PM, Nicolas Goaziou  
> wrote:
>> Nicolas Goaziou  writes:
>>
>>> Matt Lundin  writes:
>>>
 In short, org-habit seems to want a + notation for the purposes of the
 agenda display and a .+ notation for the purposes of resetting the
 timestamp. What is the best solution?
>>>
>>> Still looking for it.
>>>
>>> Meanwhile, I reverted the opinionated change in
>>> a427098b57c747ecc76feb0593f32922a1e12f67.
>>
>> Another take on this in 3072cb28e8627066f465f1a4af85da88135d0549.



Re: [O] Some projects

2015-10-26 Thread Richard Lawrence
Hi Nicolas and all,

Nicolas Goaziou  writes:

> Richard Lawrence  writes:
>
>> Yes, this is my understanding, too.  In particular, there does not seem
>> to be an Elisp CSL library, and it would be a lot of work to write
>> one.
>
> Here is a genuine question: what is the difficult part, or if there is
> none, the longer parts of the work? AFAIU, CSL is XML and we can use
> libxml for the low-level parsing.

I can't speak to how difficult it would really be.  But I do think it
would be a lot of work, and tedious, unglamorous work at that.
Essentially it means implementing the CSL specification:

http://docs.citationstyles.org/en/stable/specification.html

The specification describes the XML format for CSL styles, which IIUC
are something like XSLT programs: they describe how to transform an
input document tree into an output document tree.  So, implementing CSL
is something like implementing a very special-purpose declarative
programming language, which has to handle declarations about every
detail of citation formatting (where to put periods, how to capitalize
names like "von Neumann", whether to use "&" or a translation of "and"
for the current locale, etc.).  Lisp is a good language to do this kind
of thing in, but parsing the XML is surely the easy part.

> Could you give some examples of the UI offered by the citeproc-hs
> library?

The library I ended up wrapping is actually pandoc-citeproc, which is a
fork of citeproc-hs (which seems to be unmaintained).

pandoc-citeproc essentially exports one main function, processCites.
This function transforms a Pandoc data structure containing Citation
nodes into another Pandoc where the citations have been rendered into
the text and the bibliography is appended at the end of the document.

processCites also requires a list of references (read from a
bibliography database, e.g. .bib files, via the readBiblioFile function)
and a CSL style (read from a file via the readCSLFile function).  So
basically, the pandoc-citeproc API consists of these three functions:
processCites, readBiblioFile, and readCSLFile.

Best,
Richard




Re: [O] Regression in Org triggered from helm

2015-10-26 Thread Kyle Meyer
Simon Thum  writes:

[...]

> Arrgh - you're on the spot. That explains a lot, including my
> difficulties with reproducing.
>
> It sends window-width. Increase to window(-width) and I'm done.
>
> But that means it's arguably Org which should be more graceful than it
> is.

I agree.  At some point, if window-width is returning a small enough
value or if PREFIX is too long, the results of org-format-outline-path
will be truncated to the point of being useless, but
org-format-outline-path shouldn't choke.

I'll fix it up and add some tests.

--
Kyle



Re: [O] pdflatex not found?

2015-10-26 Thread Myles English


John Hendy writes:

> On Mon, Oct 26, 2015 at 2:26 PM, Peter Davis  wrote:
>>
>> I'm trying to export PDF from org, but I'm getting the error:
>>
>> pdflatex: Command not found. [3 times]
>>
>> I've checked the definition of exec-path, and it includes "/usr/texbin", 
>> which is where tcsh tells me the executable is.
>
> Someone else might have a better answer, but can you check your system
> itself first? I'm guessing "exec-path" is an Org/Emacs variable?
>
> Just try:
>
> $ which pdflatex
>
> Or
>
> $ pdflatex --version
>
> That would be my suggestion for starters. At least then you know it's
> definitely not your system/setup (my bet is that it is, though).
>
>
> John
>
>>
>> Any ideas?
>>
>> Thank you!
>>
>> -pd

pd,

After trying what has alreaddy been suggested you might try putting your
cursor after the last bracket of this and pressing C-x C-e to see what
emacs thinks your shell PATH environment variable is set to:

(getenv "PATH")

If you can't see the correct path in there then it should probably be
set in ~/.profile or equivalent for tcsh rather than in ~/.tcshrc (I
don't use tcsh so I just guessed that filename).

Myles




Re: [O] org-agenda-scheduled-leaders and repeating tasks

2015-10-26 Thread Nicolas Goaziou
cesar mena  writes:

> sorry. i made a mistake updating my tree.
>
> i'm quite certain i'm on master now "org-version: 8.3.2
> (release_8.3.2-219-g770671)" and the repeater resets itself again.
>
> so presently i have a task that looks like this:
>
> ** TODO some task
>SCHEDULED: <2015-08-24 Mon ++1w>
>
> and in the agenda it shows up as:
>
>   Scheduled:  TODO some task

Hopefully fixed, this time. Thank you.

Regards,



Re: [O] org-agenda-scheduled-leaders and repeating tasks

2015-10-26 Thread cesar mena
me again :)

the calculation is correct.

however the face is now `org-scheduled-today, as opposed to
`org-scheduled-previously, and the agenda sorting is wrong. instead of
bubbling to the top (since it is so late) it is staying within the
"scheduled today" range.


best,
-cm


On Mon, Oct 26, 2015 at 4:31 PM, Nicolas Goaziou  wrote:
> cesar mena  writes:
>
>> sorry. i made a mistake updating my tree.
>>
>> i'm quite certain i'm on master now "org-version: 8.3.2
>> (release_8.3.2-219-g770671)" and the repeater resets itself again.
>>
>> so presently i have a task that looks like this:
>>
>> ** TODO some task
>>SCHEDULED: <2015-08-24 Mon ++1w>
>>
>> and in the agenda it shows up as:
>>
>>   Scheduled:  TODO some task
>
> Hopefully fixed, this time. Thank you.
>
> Regards,



[O] pdflatex not found?

2015-10-26 Thread Peter Davis

I'm trying to export PDF from org, but I'm getting the error:

pdflatex: Command not found. [3 times]

I've checked the definition of exec-path, and it includes "/usr/texbin", which 
is where tcsh tells me the executable is.

Any ideas?

Thank you!

-pd




Re: [O] pdflatex not found?

2015-10-26 Thread Nick Dokos
Peter Davis  writes:

> I'm trying to export PDF from org, but I'm getting the error:
>
> pdflatex: Command not found. [3 times]
>
> I've checked the definition of exec-path, and it includes
> "/usr/texbin", which is where tcsh tells me the executable is.
>
> Any ideas?
>

Backtrace?

(setq debug-on-error t) and do the export again, possibly with
uncompiled code: (info "(org) Feedback") for the details of producing a
useful backtrace.

This should be SOP for any errors, *before* you post a question to the
list. You don't have to be able to read the backtrace; there are people
on the list who can and it makes the diagnosis *much* easier by pruning
the tree of "how did we get there" down to its essentials.  It will also
help me avoid sounding like a broken record.

And all instances of "you" is plural and all-inclusive ;-)
--
Nick






Re: [O] org-agenda-scheduled-leaders and repeating tasks

2015-10-26 Thread cesar mena
hi samuel,

yes i suspect this is why it hasn't been reported in years.

what say you nicolas?

-cm

On Mon, Oct 26, 2015 at 4:23 PM, Samuel Wales  wrote:
> fwiw, i am one who is so [disorganized?] that the old behavior is
> preferred.  if something is a 6m repeater, and i ignore it for 6m,
> it's actually useful to be reminded after another repeat.  perhaps
> more normal people would understand 1w.  no matter how much i "should"
> mootify it or take it off the list or do it, this "bug" has proved
> useful in practice.
>
> i don't claim to represent hordes of disorganized people, but there you have 
> it.



Re: [O] pdflatex not found?

2015-10-26 Thread Charles C. Berry

On Mon, 26 Oct 2015, Myles English wrote:




John Hendy writes:


On Mon, Oct 26, 2015 at 2:26 PM, Peter Davis  wrote:


I'm trying to export PDF from org, but I'm getting the error:

pdflatex: Command not found. [3 times]

I've checked the definition of exec-path, and it includes "/usr/texbin", which 
is where tcsh tells me the executable is.


Someone else might have a better answer, but can you check your system
itself first? I'm guessing "exec-path" is an Org/Emacs variable?

Just try:

$ which pdflatex

Or

$ pdflatex --version

That would be my suggestion for starters. At least then you know it's
definitely not your system/setup (my bet is that it is, though).


John



Any ideas?

Thank you!

-pd


pd,

After trying what has alreaddy been suggested you might try putting your
cursor after the last bracket of this and pressing C-x C-e to see what
emacs thinks your shell PATH environment variable is set to:

(getenv "PATH")

If you can't see the correct path in there then it should probably be
set in ~/.profile or equivalent for tcsh rather than in ~/.tcshrc (I
don't use tcsh so I just guessed that filename).



Or put something like

#+BEGIN_SRC emacs-lisp
(setenv "PATH"
 "/usr/bin:/bin:/usr/sbin:/sbin:/usr/texbin:/usr/local/bin")
#+END_SRC

in your init file.

HTH,

Chuck



Re: [O] pdflatex not found?

2015-10-26 Thread John Hendy
On Mon, Oct 26, 2015 at 2:26 PM, Peter Davis  wrote:
>
> I'm trying to export PDF from org, but I'm getting the error:
>
> pdflatex: Command not found. [3 times]
>
> I've checked the definition of exec-path, and it includes "/usr/texbin", 
> which is where tcsh tells me the executable is.

Someone else might have a better answer, but can you check your system
itself first? I'm guessing "exec-path" is an Org/Emacs variable?

Just try:

$ which pdflatex

Or

$ pdflatex --version

That would be my suggestion for starters. At least then you know it's
definitely not your system/setup (my bet is that it is, though).


John

>
> Any ideas?
>
> Thank you!
>
> -pd
>
>



[O] Regression in Org triggered from helm

2015-10-26 Thread Simon Thum

Hi,

after updating helm I came across a possible regression on Org. I 
Already filed a helm bug, but Thierry thinks it's Org's fault.


https://github.com/emacs-helm/helm/issues/1246

In short, M-x helm-org-agenda-files-headings breaks.

I had some success working around it, but for reasons beyond me that 
doesn't work any more. I'll try to work out a MCE but for the time in 
between, maybe someone has an idea what's wrong, and where (org or helm)?


Here is the complete stacktrace (the -my function is textually 
equivalent to its non-my counterpart in helm-org):



Debugger entered--Lisp error: (args-out-of-range "LoD" 0 -3)
  substring("LoD" 0 -6)
  (setq h (substring h 0 (- maxwidth 2)) total (+ total maxwidth 1))
  (if (< (length h) maxwidth) (progn (setq total (+ total (length h) 
1)) h) (setq h (substring h 0 (- maxwidth 2)) total (+ total maxwidth 
1)) (if (string-match "[ 	]+\\'" h) (setq h (substring h 0 
(match-beginning 0 (setq h (concat h "..")))
  (lambda (h) (setq n (1+ n)) (if (and (= n nsteps) (< maxwidth 1)) 
(setq maxwidth (- total-width total))) (if (< (length h) maxwidth) 
(progn (setq total (+ total (length h) 1)) h) (setq h (substring h 0 (- 
maxwidth 2)) total (+ total maxwidth 1)) (if (string-match "[ 	]+\\'" h) 
(setq h (substring h 0 (match-beginning 0 (setq h (concat h ".."))) 
(org-add-props h nil (quote face) (nth (% (1- n) org-n-level-faces) 
org-level-faces)) h)("LoD")
  mapconcat((lambda (h) (setq n (1+ n)) (if (and (= n nsteps) (< 
maxwidth 1)) (setq maxwidth (- total-width total))) (if (< (length 
h) maxwidth) (progn (setq total (+ total (length h) 1)) h) (setq h 
(substring h 0 (- maxwidth 2)) total (+ total maxwidth 1)) (if 
(string-match "[ 	]+\\'" h) (setq h (substring h 0 (match-beginning 
0 (setq h (concat h ".."))) (org-add-props h nil (quote face) (nth 
(% (1- n) org-n-level-faces) org-level-faces)) h) (#("CityServer3D" 0 12 
(face org-level-1)) #("Archive" 0 7 (face org-level-2)) #("Portrayal" 0 
9 (face org-level-3)) #("Konzeption" 0 10 (face org-level-4)) 
#("Symbolizer" 0 10 (face org-level-5)) "Einsatzgebiete" "LoD") "/")
  (concat prefix (if prefix (or separator "/")) (mapconcat (function 
(lambda (h) (setq n (1+ n)) (if (and (= n nsteps) (< maxwidth 1)) 
(setq maxwidth (- total-width total))) (if (< (length h) maxwidth) 
(progn (setq total (+ total ... 1)) h) (setq h (substring h 0 (- 
maxwidth 2)) total (+ total maxwidth 1)) (if (string-match "[ 	]+\\'" h) 
(setq h (substring h 0 ...))) (setq h (concat h ".."))) (org-add-props h 
nil (quote face) (nth (% (1- n) org-n-level-faces) org-level-faces)) h)) 
path (or separator "/")))
  (let* ((nsteps (length path)) (total-width (+ nsteps (apply (quote +) 
(mapcar (quote length) path (maxwidth (if (<= total-width width) 
1 (/ (- width nsteps) nsteps))) (org-odd-levels-only nil) (n 0) 
(total (1+ (length prefix (setq maxwidth (max maxwidth 10)) (concat 
prefix (if prefix (or separator "/")) (mapconcat (function (lambda (h) 
(setq n (1+ n)) (if (and (= n nsteps) (< maxwidth 1)) (setq maxwidth 
(- total-width total))) (if (< (length h) maxwidth) (progn (setq total 
...) h) (setq h (substring h 0 ...) total (+ total maxwidth 1)) (if 
(string-match "[ 	]+\\'" h) (setq h ...)) (setq h (concat h ".."))) 
(org-add-props h nil (quote face) (nth (% ... org-n-level-faces) 
org-level-faces)) h)) path (or separator "/"
  (if (not path) (or prefix "") (let* ((nsteps (length path)) 
(total-width (+ nsteps (apply (quote +) (mapcar (quote length) path 
(maxwidth (if (<= total-width width) 1 (/ (- width nsteps) nsteps))) 
(org-odd-levels-only nil) (n 0) (total (1+ (length prefix (setq 
maxwidth (max maxwidth 10)) (concat prefix (if prefix (or separator 
"/")) (mapconcat (function (lambda (h) (setq n (1+ n)) (if (and ... ...) 
(setq maxwidth ...)) (if (< ... maxwidth) (progn ... h) (setq h ... 
total ...) (if ... ...) (setq h ...)) (org-add-props h nil (quote face) 
(nth ... org-level-faces)) h)) path (or separator "/")
  org-format-outline-path((#("CityServer3D" 0 12 (face org-level-1)) 
#("Archive" 0 7 (face org-level-2)) #("Portrayal" 0 9 (face 
org-level-3)) #("Konzeption" 0 10 (face org-level-4)) #("Symbolizer" 0 
10 (face org-level-5)) "Einsatzgebiete" "LoD") 80 "projects.org:")


helm-get-org-candidates-in-file("/home/simon/org/fraunhofer/projects.org" 1 
8 nil nil)
  #[257 "\304\300\301\n%\207" [1 8 helm-org-headings-fontify 
helm-org-headings--nofilename helm-get-org-candidates-in-file] 7 
"\n\n(fn FILENAME)"]("/home/simon/org/fraunhofer/projects.org")
  mapcar(#[257 "\304\300\301\n%\207" [1 8 helm-org-headings-fontify 
helm-org-headings--nofilename helm-get-org-candidates-in-file] 7 
"\n\n(fn FILENAME)"] ("/home/simon/org/org"))

  helm-org-get-candidates(("/home/simon/org/org") 1 8)
  helm-source-org-headings-for-files(("/home/simon/org/org"))
  helm-org-agenda-files-headings()
  call-interactively(helm-org-agenda-files-headings record nil)
  

Re: [O] org-agenda-scheduled-leaders and repeating tasks

2015-10-26 Thread Samuel Wales
fwiw, i am one who is so [disorganized?] that the old behavior is
preferred.  if something is a 6m repeater, and i ignore it for 6m,
it's actually useful to be reminded after another repeat.  perhaps
more normal people would understand 1w.  no matter how much i "should"
mootify it or take it off the list or do it, this "bug" has proved
useful in practice.

i don't claim to represent hordes of disorganized people, but there you have it.



Re: [O] org-agenda-scheduled-leaders and repeating tasks

2015-10-26 Thread Nicolas Goaziou
cesar mena  writes:
>
> yes i suspect this is why it hasn't been reported in years.
>
> what say you nicolas?

Please do not top-post :)

In any case, I'm not sure Samuel complains about the current behaviour.
Actually, I don't understand what is meant by "the old behaviour" in
this context. The behaviour changed a couple of times already in this
thread.

> On Mon, Oct 26, 2015 at 4:23 PM, Samuel Wales  wrote:
>> fwiw, i am one who is so [disorganized?] that the old behavior is
>> preferred.  if something is a 6m repeater, and i ignore it for 6m,
>> it's actually useful to be reminded after another repeat.  perhaps
>> more normal people would understand 1w.  no matter how much i "should"
>> mootify it or take it off the list or do it, this "bug" has proved
>> useful in practice.
>>
>> i don't claim to represent hordes of disorganized people, but there you have 
>> it.

Regards,



Re: [O] Regression in Org triggered from helm

2015-10-26 Thread Simon Thum


On 10/26/15 20:58, Kyle Meyer wrote:

Hello,

Simon Thum  writes:


Hi,

after updating helm I came across a possible regression on Org. I
Already filed a helm bug, but Thierry thinks it's Org's fault.


What version of Org are you using?


Org-mode 8.3.2 - I just upgraded from 8.3 beta hoping to fix this.




https://github.com/emacs-helm/helm/issues/1246

In short, M-x helm-org-agenda-files-headings breaks.

I had some success working around it, but for reasons beyond me that
doesn't work any more. I'll try to work out a MCE but for the time in
between, maybe someone has an idea what's wrong, and where (org or
helm)?


I haven't had any luck reproducing this.  Isolating the error with a
minimal configuration and minimal Org file would be very helpful.


I know, but ATM my time is limited. I tried to debug but only got as far as

Edebug: edebug-anon74105
edebug-signal: Symbol's value as variable is void: Debugger

At which point I figured reporting the bug might be sensible enough.





Here is the complete stacktrace (the -my function is textually
equivalent to its non-my counterpart in helm-org):


Debugger entered--Lisp error: (args-out-of-range "LoD" 0 -3)
   substring("LoD" 0 -6)
   (setq h (substring h 0 (- maxwidth 2)) total (+ total maxwidth 1))


At some point, maxwidth is being set very low (-4 here).  Try to see
where this happens.  For example, what value for width does
helm-get-org-candidates-in-file send into org-format-outline-path?  If
that seems to be appropriate, debug org-format-outline-path and see when
it's getting set to the low value.


Arrgh - you're on the spot. That explains a lot, including my 
difficulties with reproducing.


It sends window-width. Increase to window(-width) and I'm done.

But that means it's arguably Org which should be more graceful than it 
is. Bastien, I cc'ed you as the maintainer, I guess you know who's best 
qualified to fix this.


Thanks for your input Kyle!

Cheers,

Simon   



Re: [O] Regression in Org triggered from helm

2015-10-26 Thread Kyle Meyer
Hello,

Simon Thum  writes:

> Hi,
>
> after updating helm I came across a possible regression on Org. I
> Already filed a helm bug, but Thierry thinks it's Org's fault.

What version of Org are you using?

> https://github.com/emacs-helm/helm/issues/1246
>
> In short, M-x helm-org-agenda-files-headings breaks.
>
> I had some success working around it, but for reasons beyond me that
> doesn't work any more. I'll try to work out a MCE but for the time in
> between, maybe someone has an idea what's wrong, and where (org or
> helm)?

I haven't had any luck reproducing this.  Isolating the error with a
minimal configuration and minimal Org file would be very helpful.

>
> Here is the complete stacktrace (the -my function is textually
> equivalent to its non-my counterpart in helm-org):
>
>
> Debugger entered--Lisp error: (args-out-of-range "LoD" 0 -3)
>   substring("LoD" 0 -6)
>   (setq h (substring h 0 (- maxwidth 2)) total (+ total maxwidth 1))

At some point, maxwidth is being set very low (-4 here).  Try to see
where this happens.  For example, what value for width does
helm-get-org-candidates-in-file send into org-format-outline-path?  If
that seems to be appropriate, debug org-format-outline-path and see when
it's getting set to the low value.

--
Kyle



Re: [O] pdflatex not found?

2015-10-26 Thread Nick Dokos
Peter Davis  writes:

> Nick Dokos  writes:
>
>
>> Peter Davis  writes:
>>
>>> I'm trying to export PDF from org, but I'm getting the error:
>>>
>>> pdflatex: Command not found. [3 times]
>>>
>>> I've checked the definition of exec-path, and it includes
>>> "/usr/texbin", which is where tcsh tells me the executable is.
>>>
>>> Any ideas?
>>>
>>
>> Backtrace?
>
> Sorry. Here's the backtrace:
>
> Debugger entered--Lisp error: (error "PDF file ./test.pdf wasn't produced")
>   signal(error ("PDF file ./test.pdf wasn't produced"))
>   error("PDF file ./test.pdf wasn't produced")
>   org-latex-compile("./test.tex")
>   #[(file) "\301!\207" [file org-latex-compile] 2]("./test.tex")
>   org-export-to-file(latex "./test.tex" nil nil nil nil nil #[(file)
> "\301!\207" [file org-latex-compile] 2])
>   org-latex-export-to-pdf(nil nil nil nil)
>   (org-open-file (org-latex-export-to-pdf nil s v b))
>   (if a (org-latex-export-to-pdf t s v b) (org-open-file 
> (org-latex-export-to-pdf nil s v b)))
>   (lambda (a s v b) (if a (org-latex-export-to-pdf t s v b)
> (org-open-file (org-latex-export-to-pdf nil s v b(nil nil nil nil)
>   org-export-dispatch(nil)
>   call-interactively(org-export-dispatch nil nil)
>   command-execute(org-export-dispatch)
>
> This seems less useful to me than the *Messages* buffer:
>

Yes, probably, but if I can get people to submit backtraces when getting
an error, we can cut down the email volume by a factor of 2.43 (making up
fictitious data to bolster my case...) In all seriousness, at least it
shows that you are not going down some strange path.

It's not clear to me why the error message in the message file is different
from the error message above though.

> Debug on Error enabled globally
> org-babel-exp processing...
> executing Dot code block...
> Wrote 
> /var/folders/d4/xb7t0gbd0f97p6494kz5xzdnmlncz8/T/babel-2213VOW/ob-input-22136yU
> Code block evaluation complete.
> Saving file /Users/davisp/Dropbox/HMH/test.tex...
> Wrote /Users/davisp/Dropbox/HMH/test.tex
> Processing LaTeX file ./test.tex...
> pdflatex: Command not found. [3 times]
> Entering debugger...
> Mark set
> End of buffer
>
> I did verify that the shell, my default of tcsh, does show pdflatex at
> the right location, /usr/texbin/pdflatex
>

In combination, this pretty much says that org-latex-pdf-process was
called (by examining the code for org-latex-compile) and it is set to
the default value of invoking pdflatex three times (hence - probably -
the "command not found 3 times" error), so as I said the standard path.

As others have pointed out, your emacs does not know where to find
pdflatex, even though your tcsh might. If your emacs is started from a
tcsh that can find pdflatex, that would be strange; if it is started
from your desktop environment/window manager, not so much (there are
many things that could go wrong).

OTOH, if exec-path contains the directory where pdflatex resides, then
things are a bit screwy: exec-path is used by call-process, which is
used by shell-command, which is used by org-latex-compile: so pdflatex
should be found - that's a bit of a mystery.

What happens if you say M-x shell-command RET pdflatex RET?

Somebody suggested running "which pdflatex" in your shell - what does
that say?

And you say it should be in /usr/texbin - what happens if you invoke
it with an absolute path: "/usr/texbin/pdflatex" in your shell?

--
Nick





Re: [O] pdflatex not found?

2015-10-26 Thread Peter Davis
Nick Dokos  writes:


> Peter Davis  writes:
>
>> I'm trying to export PDF from org, but I'm getting the error:
>>
>> pdflatex: Command not found. [3 times]
>>
>> I've checked the definition of exec-path, and it includes
>> "/usr/texbin", which is where tcsh tells me the executable is.
>>
>> Any ideas?
>>
>
> Backtrace?

Sorry. Here's the backtrace:

Debugger entered--Lisp error: (error "PDF file ./test.pdf wasn't produced")
  signal(error ("PDF file ./test.pdf wasn't produced"))
  error("PDF file ./test.pdf wasn't produced")
  org-latex-compile("./test.tex")
  #[(file) "\301!\207" [file org-latex-compile] 2]("./test.tex")
  org-export-to-file(latex "./test.tex" nil nil nil nil nil #[(file) 
"\301!\207" [file org-latex-compile] 2])
  org-latex-export-to-pdf(nil nil nil nil)
  (org-open-file (org-latex-export-to-pdf nil s v b))
  (if a (org-latex-export-to-pdf t s v b) (org-open-file 
(org-latex-export-to-pdf nil s v b)))
  (lambda (a s v b) (if a (org-latex-export-to-pdf t s v b) (org-open-file 
(org-latex-export-to-pdf nil s v b(nil nil nil nil)
  org-export-dispatch(nil)
  call-interactively(org-export-dispatch nil nil)
  command-execute(org-export-dispatch)

This seems less useful to me than the *Messages* buffer:

Debug on Error enabled globally
org-babel-exp processing...
executing Dot code block...
Wrote 
/var/folders/d4/xb7t0gbd0f97p6494kz5xzdnmlncz8/T/babel-2213VOW/ob-input-22136yU
Code block evaluation complete.
Saving file /Users/davisp/Dropbox/HMH/test.tex...
Wrote /Users/davisp/Dropbox/HMH/test.tex
Processing LaTeX file ./test.tex...
pdflatex: Command not found. [3 times]
Entering debugger...
Mark set
End of buffer

I did verify that the shell, my default of tcsh, does show pdflatex at the 
right location, /usr/texbin/pdflatex

Thanks,
-pd



Re: [O] Some projects

2015-10-26 Thread Matt Price
On Mon, Oct 26, 2015 at 6:23 PM, Richard Lawrence <
richard.lawre...@berkeley.edu> wrote:

> Hi Nicolas and all,
>
> Nicolas Goaziou  writes:
>
> > Richard Lawrence  writes:
> >
> >> Yes, this is my understanding, too.  In particular, there does not seem
> >> to be an Elisp CSL library, and it would be a lot of work to write
> >> one.
> >
> > Here is a genuine question: what is the difficult part, or if there is
> > none, the longer parts of the work? AFAIU, CSL is XML and we can use
> > libxml for the low-level parsing.
>
> I can't speak to how difficult it would really be.  But I do think it
> would be a lot of work, and tedious, unglamorous work at that.
> Essentially it means implementing the CSL specification:
>
> http://docs.citationstyles.org/en/stable/specification.html
>
> The specification describes the XML format for CSL styles, which IIUC
> are something like XSLT programs: they describe how to transform an
> input document tree into an output document tree.  So, implementing CSL
> is something like implementing a very special-purpose declarative
> programming language, which has to handle declarations about every
> detail of citation formatting (where to put periods, how to capitalize
> names like "von Neumann", whether to use "&" or a translation of "and"
> for the current locale, etc.).  Lisp is a good language to do this kind
> of thing in, but parsing the XML is surely the easy part.
>
> > Could you give some examples of the UI offered by the citeproc-hs
> > library?
>
> The library I ended up wrapping is actually pandoc-citeproc, which is a
> fork of citeproc-hs (which seems to be unmaintained).
>

The obvious advantage to pandoc-citeproc is that it keeps us close to
pandoc, and it would be good to encourage as much compatibility as possible
with those guys.

The disadvantage is that, from what I can tell, the javascript
implementation is the canonical version of citeproc, and the place where
improvements are pushed first.  So, for instance, if one wanted to
implement an org-syntax output format for citeproc, citeproc-js would be
the most likely project to support that work.


Re: [O] org-agenda-scheduled-leaders and repeating tasks

2015-10-26 Thread Samuel Wales
what i am saying is that the behavior that has existed for many years
for .+ timestamps, is actually useful to me.

same for .+ face, sorting, and so on.

just one data point.



Re: [O] pdflatex not found?

2015-10-26 Thread Rainer M Krug


Envoyé de mon iPhone

> Le 27 oct. 2015 à 01:14, Nick Dokos  a écrit :
> 
> Peter Davis  writes:
> 
>> Nick Dokos  writes:
>> 
>> 
>>> Peter Davis  writes:
>>> 
 I'm trying to export PDF from org, but I'm getting the error:
 
 pdflatex: Command not found. [3 times]
 
 I've checked the definition of exec-path, and it includes
 "/usr/texbin", which is where tcsh tells me the executable is.
 
 Any ideas?
>>> 
>>> Backtrace?
>> 
>> Sorry. Here's the backtrace:
>> 
>> Debugger entered--Lisp error: (error "PDF file ./test.pdf wasn't produced")
>>  signal(error ("PDF file ./test.pdf wasn't produced"))
>>  error("PDF file ./test.pdf wasn't produced")
>>  org-latex-compile("./test.tex")
>>  #[(file) "\301!\207" [file org-latex-compile] 2]("./test.tex")
>>  org-export-to-file(latex "./test.tex" nil nil nil nil nil #[(file)
>> "\301!\207" [file org-latex-compile] 2])
>>  org-latex-export-to-pdf(nil nil nil nil)
>>  (org-open-file (org-latex-export-to-pdf nil s v b))
>>  (if a (org-latex-export-to-pdf t s v b) (org-open-file 
>> (org-latex-export-to-pdf nil s v b)))
>>  (lambda (a s v b) (if a (org-latex-export-to-pdf t s v b)
>> (org-open-file (org-latex-export-to-pdf nil s v b(nil nil nil nil)
>>  org-export-dispatch(nil)
>>  call-interactively(org-export-dispatch nil nil)
>>  command-execute(org-export-dispatch)
>> 
>> This seems less useful to me than the *Messages* buffer:
> 
> Yes, probably, but if I can get people to submit backtraces when getting
> an error, we can cut down the email volume by a factor of 2.43 (making up
> fictitious data to bolster my case...) In all seriousness, at least it
> shows that you are not going down some strange path.
> 
> It's not clear to me why the error message in the message file is different
> from the error message above though.
> 
>> Debug on Error enabled globally
>> org-babel-exp processing...
>> executing Dot code block...
>> Wrote 
>> /var/folders/d4/xb7t0gbd0f97p6494kz5xzdnmlncz8/T/babel-2213VOW/ob-input-22136yU
>> Code block evaluation complete.
>> Saving file /Users/davisp/Dropbox/HMH/test.tex...
>> Wrote /Users/davisp/Dropbox/HMH/test.tex
>> Processing LaTeX file ./test.tex...
>> pdflatex: Command not found. [3 times]
>> Entering debugger...
>> Mark set
>> End of buffer
>> 
>> I did verify that the shell, my default of tcsh, does show pdflatex at
>> the right location, /usr/texbin/pdflatex
> 
> In combination, this pretty much says that org-latex-pdf-process was
> called (by examining the code for org-latex-compile) and it is set to
> the default value of invoking pdflatex three times (hence - probably -
> the "command not found 3 times" error), so as I said the standard path.
> 
> As others have pointed out, your emacs does not know where to find
> pdflatex, even though your tcsh might. If your emacs is started from a
> tcsh that can find pdflatex, that would be strange; if it is started
> from your desktop environment/window manager, not so much (there are
> many things that could go wrong).
> 
> OTOH, if exec-path contains the directory where pdflatex resides, then
> things are a bit screwy: exec-path is used by call-process, which is
> used by shell-command, which is used by org-latex-compile: so pdflatex
> should be found - that's a bit of a mystery.
> 
> What happens if you say M-x shell-command RET pdflatex RET?
> 
> Somebody suggested running "which pdflatex" in your shell - what does
> that say?
> 
> And you say it should be in /usr/texbin - what happens if you invoke
> it with an absolute path: "/usr/texbin/pdflatex" in your shell?

Imiight have missed it - but which OS are you using?

Rainer

> 
> --
> Nick
> 
> 
> 



[O] [bug, ox or ob?] something leaks tabs in src blocks

2015-10-26 Thread Rasmus
Hi,

Consider the following example

* test
#+BEGIN_SRC R
  test <- function(index, funs, ...){
  if (missing(funs)) {
  funs <- list(
  "a" = funa,
  "b" = funb)}

  col <- vapply(funs, function(FUN) {
  do.call(FUN, list(index, ...))}, 1.0)
  col}
#+END_SRC

It includes no tabs.  When exported with ox-latex or ox-ascii, but not
ox-html, it has become something along the following, which at least at
the time of posting contains tabs.  When exporting via xelatex, tabs in
verbatim shows up as "^^I".

\begin{verbatim}
test <- function(index, funs, ...){
if (missing(funs)) {
funs <- list(
"a" = funa, # not really
"b" = funb,
"c" = func)}

col <- vapply(funs, function(FUN) {
do.call(FUN, list(index, ...))}, 1.0)
col <- pretty_num(col, rounding = TRUE)
names(col) <- names(funs)
col}
\end{verbatim}

Does anyone know WHERE tabs are introduced so I can try to fix this?  It
seems by the time the src element reaches at least
org-export-format-code-default it already contains tabs.

Thanks,
Rasmus

-- 
El Rey ha muerto. ¡Larga vida al Rey!




Re: [O] How can I call the exporter from function?

2015-10-26 Thread Göktuğ Kayaalp
On Sun, Oct 25 2015 at 10:19:01 pm EET, joa...@verona.se wrote:
> I want to call the exporter in a certain way, so I don't have to type
> the same options every time.
>
> Basically I want to do first this:
> (re-search-backward "^\\*\\* ")
> (org-mark-subtree)
>
> Then I want to export the marked subtree as odt.

See the  docstring of  `org-odt-export-to-odt'.  Its second  argument is
SUBTREEP, if T, only the subtree under  the point is exported. So a call
like:

   (org-odt-export-to-odt nil t)

Would sort your problem out.

>
> With command keys it becomes something like:
> c-c c-e c-s o o
>
> ... If I remember correctly. In this case I would rather do
>
> m-x my-own-canned-exporter
>
> I tried following the exporting dispatcher function but got lost in the
> wilderness. Does anyone have a suggestion?

-- 
İ. Göktuğ Kayaalp.
http://gkayaalp.com/



Re: [O] [PATCH] org-id-goto doesn't work if buffer is narrowed.

2015-10-26 Thread Puneeth Chaganti
On Sun, Oct 25, 2015 at 4:49 PM, Rasmus  wrote:
> The latest patch from
>
> Date: Sun, 25 Oct 2015 14:36:16 +0530
>
> looks good to me.  Thanks!

I guess, this can be merged, then?

Thanks!
Puneeth



Re: [O] [bug, ox or ob?] something leaks tabs in src blocks

2015-10-26 Thread Nicolas Goaziou
Hello,

Rasmus  writes:

> Consider the following example
>
> * test
> #+BEGIN_SRC R
>   test <- function(index, funs, ...){
>   if (missing(funs)) {
>   funs <- list(
>   "a" = funa,
>   "b" = funb)}
>
>   col <- vapply(funs, function(FUN) {
>   do.call(FUN, list(index, ...))}, 1.0)
>   col}
> #+END_SRC
>
> It includes no tabs.  When exported with ox-latex or ox-ascii, but not
> ox-html, it has become something along the following, which at least at
> the time of posting contains tabs.  When exporting via xelatex, tabs in
> verbatim shows up as "^^I".
>
> \begin{verbatim}
> test <- function(index, funs, ...){
> if (missing(funs)) {
>   funs <- list(
>   "a" = funa, # not really
>   "b" = funb,
>   "c" = func)}
>
> col <- vapply(funs, function(FUN) {
>   do.call(FUN, list(index, ...))}, 1.0)
> col <- pretty_num(col, rounding = TRUE)
> names(col) <- names(funs)
> col}
> \end{verbatim}
>
> Does anyone know WHERE tabs are introduced so I can try to fix this?  It
> seems by the time the src element reaches at least
> org-export-format-code-default it already contains tabs.

This is to be expected if `org-src-preserve-indentation' is nil (since
you didn't use the i flag) and `indent-tabs-mode' is non-nil.

See also .

Regards,

-- 
Nicolas Goaziou



Re: [O] Org-mode reinvented?

2015-10-26 Thread Aldric Giacomoni
As someone who came to emacs and org-mode after using Markdown on Github
for quite a while as "the default readme format", it's a consolation to
find that Github supports "pretty" formatting of org-mode:
https://gist.github.com/Trevoke/667a02bfbe464c1b9011

Org-mode is significantly more powerful and nicer than markdown. I think
that is part of its problem. Look at Daniel's TODO list on the
implementation of org-mode syntax for Sublime Text:
https://github.com/danielmagnussons/orgmode/blob/master/messages/install.org#features

Another way of looking at it is that markdown is just a subset of org-mode
anyway... :)

On Sun, Oct 25, 2015 at 2:17 PM Marcin Borkowski  wrote:

>
> On 2015-10-25, at 16:55, Ken Mankoff  wrote:
>
> > On 2015-10-25 at 07:12, John Kitchin  wrote:
> >> Interesting. One day I imagine something like this, or sharelatex
> >> exists for collaborating on org-files with people who don't like
> >> Emacs...
> >
> > One can hope, but unfortunately it seems Markdown is the default
> implementation for people supporting a simple markup language.
>
> Yes.  Sometimes I wish Org-mode used Markdown by default.  Then, I start
> to think "yes, fine, but /which/ Markdown?", and I feel better;-).
>
> (The problem with Markdown seems to be that there is no "official"
> version.  Also, if Org-mode were tied to some external standard, Org's
> own development - like in "adding new features" - would become
> problematic.)
>
> >   -k.
>
> Best,
>
> --
> Marcin Borkowski
> http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
> Faculty of Mathematics and Computer Science
> Adam Mickiewicz University
>
>


Re: [O] org-agenda-scheduled-leaders and repeating tasks

2015-10-26 Thread cesar mena
hello guys,

so far so good for me.

thanks nicolas and matt.

-cm

On Sun, Oct 25, 2015 at 1:24 PM, Nicolas Goaziou  wrote:
> Nicolas Goaziou  writes:
>
>> Matt Lundin  writes:
>>
>>> In short, org-habit seems to want a + notation for the purposes of the
>>> agenda display and a .+ notation for the purposes of resetting the
>>> timestamp. What is the best solution?
>>
>> Still looking for it.
>>
>> Meanwhile, I reverted the opinionated change in
>> a427098b57c747ecc76feb0593f32922a1e12f67.
>
> Another take on this in 3072cb28e8627066f465f1a4af85da88135d0549.



[O] [RFC] Change in export block syntax

2015-10-26 Thread Nicolas Goaziou
Hello,

This one is a long standing issue. I didn't include it in the projects
thread since the patch was almost finished.

Basically, syntax between export blocks and special blocks is ambiguous,
as it depends on the export back-end loaded. For example,

  #+begin_odt
  <>
  #+end_odt

will be parsed very differently if `ox-odt' is loaded or not. In the
former case, the target is inactive whereas in the latter case, it can
be reached with an internal link.

As a solution, export blocks are explicitly marked as such at the syntax
level to disambiguate their parsing from special blocks. The new syntax
is:

  #+BEGIN_EXPORT backend
  ...
  #+END_EXPORT

instead of

  #+BEGIN_backend
  ...
  #+END_backend

So, basically, "export" is a reserved block type, much like "src". As
a consequence, =INCLUDE= keywords syntax is modified, e.g.,

,#+INCLUDE: "file.org" HTML

becomes

,#+INCLUDE: "file.org" export html

The following function, included in ORG-NEWS, updates any Org document
to the new syntax. It is meant to be applied after applying the patch.

  (defun org-repair-export-blocks ()
"Repair export blocks and INCLUDE keywords in current buffer."
(when (eq major-mode 'org-mode)
  (let ((case-fold-search t)
(back-end-re (regexp-opt
  '("HTML" "ASCII" "LATEX" "ODT" "MARKDOWN" "MD" "ORG"
"MAN" "BEAMER" "TEXINFO" "GROFF" "KOMA-LETTER")
  t)))
(org-with-wide-buffer
 (goto-char (point-min))
 (let ((block-re (concat "^[ \t]*#\\+BEGIN_" back-end-re)))
   (save-excursion
 (while (re-search-forward block-re nil t)
   (let ((element (save-match-data (org-element-at-point
 (when (eq (org-element-type element) 'special-block)
   (save-excursion
 (goto-char (org-element-property :end element))
 (save-match-data (search-backward "_"))
 (forward-char)
 (insert "EXPORT")
 (delete-region (point) (line-end-position)))
   (replace-match "EXPORT \\1" nil nil nil 1))
 (let ((include-re
(format "^[ \t]*#\\+INCLUDE: .*?%s[ \t]*$" back-end-re)))
   (while (re-search-forward include-re nil t)
 (let ((element (save-match-data (org-element-at-point
   (when (and (eq (org-element-type element) 'keyword)
  (string= (org-element-property :key element) 
"INCLUDE"))
 (replace-match "EXPORT \\1" nil nil nil 1)

The patch is still lacking documentation update. Once applied, I plan to
implement two checkers in Org lint: one to detect old syntax and another
one to signal a missing back-end after BEGIN_EXPORT string.

Feedback welcome,


Regards,

-- 
Nicolas Goaziou0x80A93738
>From 0190f756ce4393b9db851da89cc731baabdfe7ce Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou 
Date: Tue, 3 Feb 2015 16:16:54 +0100
Subject: [PATCH] Change export block syntax

* lisp/org-element.el (org-element-export-block-parser):
(org-element--current-element): Use new syntax for export blocks.
(org-element-block-name-alist): Remove.

* lisp/ox.el (org-export-register-backend):
(org-export-define-derived-backend): Remove :export-block keyword from
back-end's definition.
(org-export-expand-include-keyword): Use new syntax for include
keywords.

* lisp/ox-ascii.el (ascii):
* lisp/ox-beamer.el (beamer):
* lisp/ox-html.el (html):
* lisp/ox-latex.el (latex):
(org-latex-prefer-user-labels):
* lisp/ox-man.el (man):
* lisp/ox-md.el (md):
* lisp/ox-odt.el (odt):
* lisp/ox-texinfo.el (texinfo): Propagate changes to "ox.el".

* lisp/ob-core.el (org-babel-insert-result):
* lisp/ob-haskell.el (org-babel-haskell-export-to-lhs): Use new syntax.

* lisp/org.el (org-structure-template-alist): Use new syntax.
(org-protecting-blocks): Add "export" to protected blocks.  Remove
  back-ends blocks, which are now special blocks.
(org-fontify-meta-lines-and-blocks-1): Fontify correctly new blocks.

* lisp/org-footnote.el (org-footnote-forbidden-blocks):
* lisp/org-list.el (org-list-forbidden-blocks): Add "export" to
  forbidden blocks.  Remove back-ends blocks, which are now special
  blocks.

* contrib/lisp/ox-extra.el: Update comments.

* testing/lisp/test-org-element.el (test-org-element/export-block-parser):
(test-org-element/export-block-interpreter):
* testing/lisp/test-ob.el (test-ob/org-babel-remove-result--results-html):
(test-ob/org-babel-remove-result--results-latex):
* testing/lisp/test-ox.el (test-org-export/expand-include): Update tests.

Export blocks are explicitly marked as such at the syntax level to
disambiguate their parsing from special blocks.  The new syntax is

  #+BEGIN_EXPORT backend
  ...
  #+END_EXPORT

instead of

  #+BEGIN_backend
  ...
  #+END_backend

As a consequence, =INCLUDE= 

Re: [O] org-reveal questions

2015-10-26 Thread Xebar Saram
wow guys

thx so much this sound very exciting!

i can report back that today i gave my students my first talk composed
entirely in orgmode and org-reveal. homework was exported to pdf as well so
all in one org file..needles to say i was super excited and bragged to the
students who didnt know why the hell i was so excited ;-)
at least i managed to throw some slide on open source since it is a class
on R after all...

thx again guys

Z

On Sun, Oct 25, 2015 at 10:46 PM, Eric S Fraga  wrote:

> Hello all,
>
> So, I decided I would play with org-reveal some more, just to see if I
> could get some of the functionality that Xebar wanted fairly
> easily.  It turns out that I could use a web based presentation for a
> small PR exercise...
>
> I've run into two stumbling blocks using org-reveal.
>
> First, the #+HTML: directive seems to be ignored although
> the #+BEGIN_HTML/#+END_HTML construct works.  This is only in reveal
> export, not HTML export.
>
> The second problem is more about HTML export than reveal
> specifically.  In LaTeX, an image is exported directly without any
> surrounding material if only the image is there.  Surrounding material,
> i.e. LaTeX figure environment, is only included if a caption is
> present.  In reveal, there doesn't seem to be an equivalent
> behaviour.  That is, all my images get exported within a figure
> .  I would like to have the option of a bare-bones  export
> without having to resort to direct HTML.  Is this possible?  It would
> seem to make sense to have the same type of logic apply to HTML export
> as it does to LaTeX?
>
> Thanks,
> eric
>
> --
> : Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.2, Org release_8.3.2-209-gba4d33
>


Re: [O] [bug, ox or ob?] something leaks tabs in src blocks

2015-10-26 Thread Rasmus
Nicolas Goaziou  writes:

> This is to be expected if `org-src-preserve-indentation' is nil (since
> you didn't use the i flag) and `indent-tabs-mode' is non-nil.

Ah, indent-tabs-mode was set outside of the portion of my init.el that's
read when exporting async.

Thanks.

Rasmus

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




Re: [O] [RFC] Change in export block syntax

2015-10-26 Thread Eric S Fraga
On Monday, 26 Oct 2015 at 15:09, Nicolas Goaziou wrote:
> As a solution, export blocks are explicitly marked as such at the syntax
> level to disambiguate their parsing from special blocks.

I like your proposal (although I will have to change practically every
significant org file I have...).  It does make sense to disambiguate
between export and special blocks.

thanks,
eric
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.5.1, Org release_8.3.2-215-gb4af3f



Re: [O] org-reveal questions

2015-10-26 Thread Matt Price
On Sun, Oct 25, 2015 at 6:01 PM, Matt Price  wrote:

>
>
> On Sun, Oct 25, 2015 at 4:46 PM, Eric S Fraga  wrote:
>
>> The second problem is more about HTML export than reveal
>> specifically.  In LaTeX, an image is exported directly without any
>> surrounding material if only the image is there.  Surrounding material,
>> i.e. LaTeX figure environment, is only included if a caption is
>> present.  In reveal, there doesn't seem to be an equivalent
>> behaviour.  That is, all my images get exported within a figure
>> .  I would like to have the option of a bare-bones  export
>> without having to resort to direct HTML.  Is this possible?  It would
>> seem to make sense to have the same type of logic apply to HTML export
>> as it does to LaTeX?
>>
>> I doubt this is possible in reveal right now but it shouldn't be too hard
> to add a (switch ) statement that exports a naked img if some condition is
> met.  And I et a relevant patch could be submitted as a feature request.
>
>
Rereading this, I think maybe you should post this to a list as  a question
about the html exporter, not org-reveal.  Nicolas and others may have
thoughts on the logic of the difference. The difference may reside in
differing expectations/standards in latex & html.

m


>
>


Re: [O] Some projects

2015-10-26 Thread Richard Lawrence
Hi all,

Aaron Ecay  writes:

> Hi Nicolas,
>
> Thanks for writing this up.  It is important to think about, and
> ultimately solve, all the issues you raise.

Yes, thanks for this, Nicolas!  

> 2015ko urriak 25an, Nicolas Goaziou-ek idatzi zuen:
>> 
>> ** Citations
>> 
>> Development apparently stopped for some reason. We have a citation
>> syntax for Org in wip-cite and some work done in wip-cite-awe and
>> probably elsewhere.
>> 
>> I think we could at least provide features defined in Org Ref using the
>> new syntax (minus hydra/helm related functions).
>> 
>> We don't need a silver bullet. Just something with a non-empty user
>> base, and extensible. In any case, the work done so far shouldn't be
>> wasted.
>
> I was working on this rather intensively at one time, but I had to stop
> because other aspects of life intruded.  I have just been coming back
> towards a situation where I can imagine myself having some (still small,
> but non-zero) chunks of time to devote to working on org.  So I hope I
> will be able to pick this back up, but (regrettably) I’m not able to
> make any promises.
>
> Based on my recollection, here’s what the problems were when I stopped:
>
> - The only “off the shelf”-capable citation processing library that we
>   found last time is in Haskell, which introduced some difficulties for
>   distributing the resulting tool.  I know some projects
>   (e.g. git-annex) are written in Haskell and distributed as static
>   binaries for windows/mac/linux/etc.  We’d need to figure out how to do
>   this, or find another citation processing library in an
>   easier-to-distribute language.

Yes, this is my understanding, too.  In particular, there does not seem
to be an Elisp CSL library, and it would be a lot of work to write one.

The other CSL library that looks complete and usable is citeproc-js; but
like the Haskell library (pandoc-citeproc) it would need to be wrapped
somehow so that it can talk with Org.

It should be relatively straightforward for someone who knows Javascript
to write such a wrapper, if anyone wants to work on that.  But this does
not really solve the problem with distribution.  Either of the
off-the-shelf CSL libraries will require both a wrapper and a platform
for building/installing/running the wrapper and library as a complete
external tool.

> (I should say, all the work on the external tool was done by Richard
> Lawrence; I worked on the exporter for the citation syntax including
> the interface with an external tool.)

The tool I was working on is here:
https://github.com/wyleyr/org-citeproc

The branch of Org that it needs is here:
https://github.com/wyleyr/org-mode

At the moment, it supports single- and multiple-work citations in inline
styles (e.g. Chicago/Harvard type citations, and I think also styles
that use numbered references to the bibliography).  It doesn't presently
work with note-based styles, and making it work will require some
modifications on the Org side.  Specifically, the Org side will have to
get a bit smarter about how it inserts the formatted citations into the
document (Org needs to understand them as footnotes so that they get
correctly numbered, etc. amongst other non-citation footnotes).

> - There is a difference between citations as done by latex/bibtex/etc.,
>   and those done in every other format (handled through CSL).  Assuming
>   latex users want to keep their native processing rather than
>   delegating to CSL, we need to solve the myriad small inconsistencies
>   between these two tools.  I think this is an area where it’s important
>   to get things right: users of citations generally have exacting
>   requirements.  “Approximately Chicago-style” or “almost MLA” aren’t
>   worth anything.

I guess I would just add that it is not clear how much we need to solve
here, at least in the short term.  I can't remember whether we found any
concrete examples of needs people have that BibLaTeX can handle but
CSL cannot, or vice versa.  Anyway, there is a core set of citation
features that both types of backends handle readily, and I think it
would be a big win to have these accessible via a common syntax in Org.
No silver bullets is indeed the maxim to keep in mind.

> (I should also say, if someone else is interested in working on this
> please don’t hesitate to jump right in.  I will help you however I can!)

I also want to echo this.  I don't really have much time to work on this
myself right now (trying to get the ol' dissertation finished this year)
but I will help out however I can.

Best,
Richard




Re: [O] Some projects

2015-10-26 Thread Eric Abrahamsen
Nicolas Goaziou  writes:

> Hello,
>
> I'd like to see some features moving forward, and some important issues
> fixed, hopefully, in the next months. I'm sharing them here so that
> anyone interested can help.
>

[...]

> * Important fixes
>
> ** Cache
>
> The cache needs to be fixed. Its underlying implementation probably
> needs to be changed, too. At the moment, it uses an AVL tree, which
> isn't much tolerant and results in a freeze whenever the cache is
> corrupted. Shifting to text properties could improve the situation.

I think we'll have to leave this one to you!

[...]

> ** Find a solution for orgstruct minor mode
>
> Org struct is really different from Org. It prevents Org from using
> better algorithms for outline navigation (see discussion about
> `org-show-children' on this list).
>
> I think Org struct should be removed from "org.el" (and org-footnote
> ...) and added in its own library. It should also be built on top of
> Outline mode instead of Org mode. Org, OTOH, should remove dependencies
> on Outline mode and implement better navigation functions.
>
> I have the feeling that Org struct will need to be rewritten almost from
> scratch in the process.

I've tried more than once over the past couple of years to attack
orgstruct mode, and been defeated every time. Largely because
indentation/filling is so damn complicated (too many layers of
indirection for my little brain), and orgstruct added yet another layer
of indirection on top of that. I think a rewrite would not be a bad
thing, and would be happy to participate.

[...]

Nicolas Goaziou  writes:

[...]

> The full proposal was at
>  but it didn't get
> much positive feedback. Therefore I suggested a simplified version, with
> a single author.

I may have been one of the lukewarm responders at the time, but now I
can't quite remember why. This looks good to me, and I'd like to pitch
in. I'm also +1 for inline annotations.

> Also, there is
>
>   https://github.com/girzel/org-annotate
>
> which is even simpler.

I'll be happy to rename/remove this repo when the time comes, to avoid
confusion!

The one thing I like about the package (indeed, it's what the bulk of
the code actually does) is the ability to "pop up" a single annotation's
text in a small, easily-dismissed special-mode buffer. Also, to display
all of a buffer's annotations in a tabulated-list pop-up buffer, where
you can easily jump to/edit/delete the various annotations.

Obviously Org footnotes (and future annotations) have jump there/jump
back capability, but for some reason I feel much more comfortable with
this style of browsing. If other people like this I could adapt the
existing code to work "on top of" footnotes and the future annotations
syntax, and that could be the whole point of the library. The base code
could remain entirely ignorant of the extra stuff.

--

These new features aside, is there any need to do any fundamental
refactoring? I mostly mean altering existing Org libraries to use the
element framework, stuff like that...

Eric




Re: [O] Links in comments

2015-10-26 Thread Kaushal Modi
Hi all,

I am sending this out again in the event someone knowing a solution to it
can comment.


--
Kaushal Modi

On Mon, Oct 19, 2015 at 6:54 PM, Kaushal Modi 
wrote:

> Hi,
>
> This question has come up a few times on emacs.stackexchange so I was
> curious if the more experienced org-mode users had a solution to this.. or
> if a fix is needed to resolve this issue.
>
> Referenced emacs.stackexchange questions:
>
> - http://emacs.stackexchange.com/q/17505/115
> - http://emacs.stackexchange.com/q/9413/115
>
>
> The issue if that if there is a link in an org-mode commented line like
> below:
>
> * Links in comments
> #+BEGIN_EXAMPLE
> # This is a [[http://orgmode.org][link]] in a comment.
> #+END_EXAMPLE
> # This is a [[http://orgmode.org][link]] in a comment.
>
> the link gets completely camouflaged as seen below.
>
> [image: Inline image 3]
>
> The only way I know that that's a link is if I toggle the visible-mode or
> hover over that link with mouse (as below).
>
> [image: Inline image 1]
>
> Solutions??
> - Different face for such links within comments? Or let the link face
> supersede comment face?
> - Option to not collapse links within comments?
>
> What do you guys think?
>
>
> --
> Kaushal Modi
>


Re: [O] Some projects

2015-10-26 Thread Nicolas Goaziou
Richard Lawrence  writes:

> Yes, this is my understanding, too.  In particular, there does not seem
> to be an Elisp CSL library, and it would be a lot of work to write
> one.

Here is a genuine question: what is the difficult part, or if there is
none, the longer parts of the work? AFAIU, CSL is XML and we can use
libxml for the low-level parsing.

Could you give some examples of the UI offered by the citeproc-hs
library?


Regards,



Re: [O] Some projects

2015-10-26 Thread Kaushal Modi
Hi Nicolas,

Thanks for putting up this list.

> ** Backslash escaping

> Allowing to escape some symbols in plain text (e.g., emphasis markers,
> square brackets...) would remove a limitation in verbatim/code objects.
> As a small benefit, it would also permit to implement mid-word markup:
> b*o*ld.

> There are some gotchas, however.

I am definitely interested in a solution to this (based on a related
discussion we had here earlier):
http://www.mail-archive.com/emacs-orgmode@gnu.org/msg100527.html
I'd happy to contribute to it as I can, but I don't know where to
start. But as soon as I see some activity related to backslash
escaping, I'd happily be involved in the code development.

--
Kaushal Modi