[O] [NEW] Surround region with element block (source, example etc.)

2015-12-22 Thread Steve Moreau
Hi all,

I started a new public branch to add element block around selected region.
FSF assignment is all right if you want to import it in the master.
I don't feel comfortable with Git so please excuse any incorrect
manipulation.

https://github.com/stevemoreau/worg/tree/surround-region-with

Regards,

Steve


Re: [O] org-ref video

2015-12-22 Thread John Kitchin
Thanks!

B.V. Raghav writes:

> Hi,
>
> I had been following the thread(s) about org-ref by the words, out of
> curiosity. However, this video shows how examplary the work is. Awesome
> work sir.
>
> Thanks,
> r

--
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu



Re: [O] OrgMode into Gnus buffers (message-mode included) ?

2015-12-22 Thread Rasmus
Xavier Maillard  writes:

> Thorsten Jolitz  writes:
>
>> Xavier Maillard  writes:
>>
>> Hello,
>>
>>> there is an area where I am pretty dumb: orgmode articulation with Gnus
>>> buffers.
>>>
>>> What do I need exactly to do to activate orgmode into Gnus both when
>>> reading
>>> posts and when writing new ones ?
>>
>> I guess you mean message-mode?
>
> `message-mode' is only for outgoing messages, right ?
>
>> For writing:
>>
>> - use orgstruct or
>
> I do but it does not seem to change anything (I have tried to add bullet and
> stuff like that).

I think bullets are in orgstruct mode, but they could be in
orgstuct++-mode.  BTW: there's also orgtbl-mode.

Rasmus

-- 
I almost cut my hair, it happened just the other day




Re: [O] Bug in org-lob: Function call adds space to argument string with parenthesis

2015-12-22 Thread Robert Klein

Hi,

Nicolas Goaziou  wrote:

> Hello,
> 
> Tobias Zawada  writes:
> 
>> I cannot clone the git-repository as non-developer (permission
>> denied). So, trying out the development version is a bit difficult for
>> me.
> 
>   git clone git://orgmode.org/org-mode.git
> 
> gives access to non-developers, doesn't it?

Yes, it does.  If you're behind a firewall blocking git, you can also use

git clone http://orgmode.org/org-mode.git

Best regards
Robert



Re: [O] Base 64 inline images in html export

2015-12-22 Thread Grant Rettke
Since you too are exploring packaging, this might give you some test:

http://kitchingroup.cheme.cmu.edu/blog/2014/03/05/Creating-a-transportable-zip-archive-of-an-org-file/
Sincerely,

Grant Rettke


On Mon, Dec 7, 2015 at 6:15 AM, Greg Sexton  wrote:
> Hi,
>
> I did find a post about this from around 2009 but I'm not sure it went
> anywhere. It's very useful for me to be able to export a single html
> file that I can distribute around. Base 64 encoding images directly in
> to the exported html makes this possible.
>
> The feature seems fairly well supported by browsers these days.[1]
>
> I've hacked up this ugly proof of concept. I guess it wouldn't take too
> much to productionize this and make the behavior configurable. Any
> thoughts?
>
> --8<---cut here---start->8---
> (defun gs/b64-img (file-uri)
>   (let ((file (s-replace "file://" "" file-uri)))
> (if (f-exists? file)
> ;; src="data:image/png;base64,iVBORw0KGgoNSUh..."
> (s-concat "data:image/"
>   (f-ext file)
>   ";base64,"
>   (base64-encode-string (f-read-bytes file)))
>   file-uri)))
>
> (defun org-html--format-image (source attributes info)
>   "Return \"img\" tag with given SOURCE and ATTRIBUTES.
> SOURCE is a string specifying the location of the image.
> ATTRIBUTES is a plist, as returned by
> `org-export-read-attribute'.  INFO is a plist used as
> a communication channel."
>   (org-html-close-tag
>"img"
>(org-html--make-attribute-string
> (org-combine-plists
>  (list :src (gs/b64-img source)   ; <-- interesting line is here
>:alt (if (string-match-p "^ltxpng/" source)
> (org-html-encode-plain-text
>  (org-find-text-property-in-string 'org-latex-src source))
>   (file-name-nondirectory source)))
>  attributes))
>info))
> --8<---cut here---end--->8---
>
>
> [1]: http://stackoverflow.com/questions/1207190/embedding-base64-images
>
> --
>  Greg
>
>
>
> Amazon Development Centre (London) Ltd. Registered in England and Wales with 
> registration number 04543232 and which has its registered office at 
> Leadenhall Court, One Leadenhall Street, London EC3V 1PP, United Kingdom.
>
>



Re: [O] Base 64 inline images in html export

2015-12-22 Thread John Kitchin
I can't recall if I pointed to this post before:
http://kitchingroup.cheme.cmu.edu/blog/2015/05/09/Another-approach-to-embedding-org-source-in-html/

but it is similar to what you are trying to do.

John

---
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu


On Tue, Dec 22, 2015 at 8:48 PM, Grant Rettke 
wrote:

> Since you too are exploring packaging, this might give you some test:
>
>
> http://kitchingroup.cheme.cmu.edu/blog/2014/03/05/Creating-a-transportable-zip-archive-of-an-org-file/
> Sincerely,
>
> Grant Rettke
>
>
> On Mon, Dec 7, 2015 at 6:15 AM, Greg Sexton  wrote:
> > Hi,
> >
> > I did find a post about this from around 2009 but I'm not sure it went
> > anywhere. It's very useful for me to be able to export a single html
> > file that I can distribute around. Base 64 encoding images directly in
> > to the exported html makes this possible.
> >
> > The feature seems fairly well supported by browsers these days.[1]
> >
> > I've hacked up this ugly proof of concept. I guess it wouldn't take too
> > much to productionize this and make the behavior configurable. Any
> > thoughts?
> >
> > --8<---cut here---start->8---
> > (defun gs/b64-img (file-uri)
> >   (let ((file (s-replace "file://" "" file-uri)))
> > (if (f-exists? file)
> > ;; src="data:image/png;base64,iVBORw0KGgoNSUh..."
> > (s-concat "data:image/"
> >   (f-ext file)
> >   ";base64,"
> >   (base64-encode-string (f-read-bytes file)))
> >   file-uri)))
> >
> > (defun org-html--format-image (source attributes info)
> >   "Return \"img\" tag with given SOURCE and ATTRIBUTES.
> > SOURCE is a string specifying the location of the image.
> > ATTRIBUTES is a plist, as returned by
> > `org-export-read-attribute'.  INFO is a plist used as
> > a communication channel."
> >   (org-html-close-tag
> >"img"
> >(org-html--make-attribute-string
> > (org-combine-plists
> >  (list :src (gs/b64-img source)   ; <-- interesting line is here
> >:alt (if (string-match-p "^ltxpng/" source)
> > (org-html-encode-plain-text
> >  (org-find-text-property-in-string 'org-latex-src
> source))
> >   (file-name-nondirectory source)))
> >  attributes))
> >info))
> > --8<---cut here---end--->8---
> >
> >
> > [1]: http://stackoverflow.com/questions/1207190/embedding-base64-images
> >
> > --
> >  Greg
> >
> >
> >
> > Amazon Development Centre (London) Ltd. Registered in England and Wales
> with registration number 04543232 and which has its registered office at
> Leadenhall Court, One Leadenhall Street, London EC3V 1PP, United Kingdom.
> >
> >
>
>


Re: [O] OrgMode into Gnus buffers (message-mode included) ?

2015-12-22 Thread Thorsten Jolitz
Xavier Maillard  writes:

Hello,

> there is an area where I am pretty dumb: orgmode articulation with Gnus
> buffers.
>
> What do I need exactly to do to activate orgmode into Gnus both when
> reading
> posts and when writing new ones ?

I guess you mean message-mode?

For writing:

- use orgstruct or 
- use outorg/outshine, and this:
(add-hook 'message-mode-hook 'outline-minor-mode)
- use ... (there might be more options)

-- 
cheers,
Thorsten




Re: [O] blog refurbised: how is it in 2015 ?

2015-12-22 Thread Xavier Maillard
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

Hey John,

John Kitchin  writes:

> I integrated org-mode to blogofile here:
> https://github.com/jkitchin/jmax/blob/master/user/blogofile.el

> This lets me "publish" an org heading to the blog with a single key
> press, and it copies all the files, and other stuff to the right places,
> builds and pushes the blog.

Nice job. I am pretty sure this can be extended to support any « external »
blog engine, right ? Do you have plan to do so ?

I do not know whether I want to install a blog engine at all or just use plain
GNU emacs + org-mode power as my sole tools. Will see.

- -- Xavier.
-BEGIN PGP SIGNATURE-
Comment: GPGTools - https://gpgtools.org

iQEcBAEBCgAGBQJWei7tAAoJEDy08nibbhJtIoAIAK03sNOl7vDQSyHoHxAh3MQu
MnIu+/EFEbyDAR7Ffk+mFnUT/RQ6kraCGVEknsGvZtA1bZPDpnAcXC0aAwBUWF9d
J1gAkO59nvfaR3DJoFSHZ+LGCtPsRHx346F4EMXhtbrQVZnHFx5JnIv4v4sYRiJs
I+/+U04KhB1St8GewWZQTxVYachS4IjZg4Mbk1ozvZUtki+K4Z95Yg1bgrFDPT5E
zXzLaaFPaAWOymmlYXE0SblvVQPnokYLTfFrRml9A5JqcjJNDeidIElPeQt7QK0+
AvCjOh/GHhGCxbDhbFLj+J9SyAPaBSlmpbNp9nVFlwYGYRl+757O0PwKbZUCl5k=
=e90E
-END PGP SIGNATURE-




Re: [O] blog refurbised: how is it in 2015 ?

2015-12-22 Thread Xavier Maillard
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

Sebastian Christ  writes:

> Hi Xavier,
>
> I'm using org-page (https://github.com/kelvinh/org-page) and I'm quite
> happy with it.

That's pretty interesting. Just to be sure, can I choose which entry I want to
publish or not (via a tag or something like that). Today, I only have *one*
big org-mode file and I am not considering switching to multi-files.

Currently I have « published » several pages /manually/ via a simple org-mode
project (as it was done in the past days). I am not comfortable with using git
for such task even if I can see the potential in updating the right posts when
something has changed.

Can you show the result of your own work ?

Thank you.

- -- Xavier.
-BEGIN PGP SIGNATURE-
Comment: GPGTools - https://gpgtools.org

iQEcBAEBCgAGBQJWejD6AAoJEDy08nibbhJtoxAH/R1+iFhTI59pSM9Xo+/rQv5G
kjug6Q6E0mYJxQtua7Wngt1u1wh3iEwU82nm9862mXXA6Hjzrh8EqIFkNMLigbqn
XQBatSY2Wd9ZTD+95HcSLwdVXalOw5W/Uwo3qH1Xvpiz6CiIofHcqqiAA4lezX8W
ns2pXndCusiF8RDgHBcl9BPFx4h2YHmkdTOV2BFJvDjPLFg0PxQ/Nh5U2wZ4LvpI
Q9urqRQj9Narfro+ix0aVTl3PIMm3zcQbzrPoVAZUxmMrbFHWEaVsyME81rIMxUe
g3yfC+FxENNPxUr5YuuJalPT+/+330KX0f9McM/Arj8eTHL7mec8a75rXWHxUQY=
=81MZ
-END PGP SIGNATURE-




Re: [O] org-ref video

2015-12-22 Thread Nick Dokos
John Kitchin  writes:

> Thanks! 
>
> You might add your interpretation of the pronunciation here: 
> http://tex.stackexchange.com/questions/17502/what-is-the-correct-pronunciation-of-tex-and-latex
>  ;)
>
> John
>

The vexing issue of how to pronounce "LaTeX" has reared its ugly head
before, e.g in this thread on the comp.text.tex group ca 1999:

  
https://groups.google.com/forum/#!searchin/comp.text.tex/Robin$20Fairbairns$20rubber/comp.text.tex/Ts9l6CPcjCk/g_89W2rJsPcJ

with the entertaining subject "anyone have a source of all rubber
panties".  I would recommend that you read the whole thread but in any
case don't give up until you read Robin Fairbairns's followup to his
(Robin's) suggestion that the OP should read the FAQ.

How's that for a Christmas present?
--
Nick




[O] org-ref video

2015-12-22 Thread John Kitchin
Hi everyone,

I made a new video showing some of the new features of the org-ref that
is in Melpa:

http://kitchingroup.cheme.cmu.edu/blog/2015/12/22/org-ref-is-on-Melpa/

These features are:

1. Drag-n-drop a PDF or url onto a bibtex file to add bibtex entries. This 
works when org-ref knows how to get a DOI from the PDF or url.

2. Tooltips on cite links

The video shows how to use these to make a bibtex file, and then add
citations and references in an org-file, followed by export to a pdf.

Happy holidays and New Year to everyone!

--
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu



[O] Format of example block for ASCII export?

2015-12-22 Thread Loris Bennett
Hi,

If I export the following

#+BEGIN_EXAMPLE
  $ sueff loris
  UsernameEfficiency  Number_of_CPUs_In_Use
  loris   87.50%  (7.00 of 8)
#+END_EXAMPLE

to an ASCII file, I get:

  ,
  |   $ sueff loris
  |   UsernameEfficiency  Number_of_CPUs_In_Use
  |   loris   87.50%  (7.00 of 8)
  `

Where can I configure the appearance of the bracket around the example?

Cheers,

Loris

-- 
This signature is currently under construction.




Re: [O] blog refurbised: how is it in 2015 ?

2015-12-22 Thread John Kitchin
I use blogofile (https://github.com/EnigmaCurry/blogofile), which works
fine for me, but it seems is no longer actively developed. It is written
in Python.

I integrated org-mode to blogofile here:
https://github.com/jkitchin/jmax/blob/master/user/blogofile.el

This lets me "publish" an org heading to the blog with a single key
press, and it copies all the files, and other stuff to the right places,
builds and pushes the blog.

The results are all at http://kitchingroup.cheme.cmu.edu

If/when I decide to update this, I would probably consider Nikola
https://getnikola.com.


Xavier Maillard writes:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA512
>
> Hey,
>
> in the same vein I am refurbishing my Gnus (and love it), I'd like, as a 2k16
> resolution (right word in english ?), to restart my long abandoned blog. As
> usual, this is something I can't imagine doing outside GNU emacs and thus
> orgmode.
>
> My question is simply: what are the tools/technics in 2015 to blog ? Can you
> share some good recipes with me ?
>
> Thank you
>
> - -- Xavier.
> -BEGIN PGP SIGNATURE-
> Comment: GPGTools - https://gpgtools.org
>
> iQEcBAEBCgAGBQJWeOZRAAoJEDy08nibbhJtQ58H/R1OxedEz7fpeEsmMj2kHjxA
> eFH1dIiF8LRKAP+9wzv3wn8ZWntqNwznq4Zj4cQQo9t0yc8u2l9Kerj3Lt1zGdB/
> Bwqs4MXu2h/vtVZVZta1RHcZ/EIh/f5eWBoIJ8jD7snLGlywBBn3H+biAblAMc9/
> i2L1aRvcEMR+Y4UX3GZlI+lhrdNaEhtb3UPld6JHTkTxoyOFzzvxvDDbkja/L6UU
> mZNPnFy+UPcmDneHBdTs3EouNicOuukYgIYhSClhzo8/H5W/MhqdpTAqZM3Rg/en
> fqrm+q128F8UQqPKVchOPcURWBCFs0LoxPAH1uJkvE0yOeyFihVZwVpNazz8qJ0=
> =setP
> -END PGP SIGNATURE-

--
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu



[O] Unable to resolve info links during publishing

2015-12-22 Thread Robert Klein
Hi,

when publishing a org document (to HTML), info links, e.g.
"info:org#Formula syntax for Lisp" throw errors, e.g.:

  Unable to resolve link "info:org#Formula syntax for Lisp"


The link exists and can be followed in the org document by pressing
the keys C-c C-o.

Org version is 8.3.2 maint.  I did a little bisection and ended up
with this commit:

dc08e98885015c27196843aeb62bde287da84873 is the first bad commit
commit dc08e98885015c27196843aeb62bde287da84873
Author: Jacob Gerlach 
Date:   Wed Mar 11 22:39:11 2015 -0400

ox.el: Issue error for unresolved fuzzy link

* lisp/ox.el (org-export-resolve-fuzzy-link): Throw an error instead
  of returning nil when link can't be resolved.

* testing/lisp/test-ox.el (test-org-export/resolve-fuzzy-link): Change
  last test from should-not to should-error

In addition to throwing an error, don't store the failed match in the
link cache.

TINYCHANGE

:04 04 3151cb8e3a5da171e93278c7fa5fd7aa82012e81 
7ff2fffd50ed0587acf5ddb498493a7a16f6b549 M  lisp
:04 04 e362c6fb9e260a6d9b0212daac3c89cf12393642 
b08d87de16cabd3416d8eefae2033e3081159218 M  testing


In fact I agree with the commit, but I don't understand why org can't
resolve the link...

Any help is very much appreciated.

Thanks and best regards
Robert



Re: [O] Format of example block for ASCII export?

2015-12-22 Thread Nicolas Goaziou
Hello,

"Loris Bennett"  writes:

> If I export the following
>
> #+BEGIN_EXAMPLE
>   $ sueff loris
>   UsernameEfficiency  Number_of_CPUs_In_Use
>   loris   87.50%  (7.00 of 8)
> #+END_EXAMPLE
>
> to an ASCII file, I get:
>
>   ,
>   |   $ sueff loris
>   |   UsernameEfficiency  Number_of_CPUs_In_Use
>   |   loris   87.50%  (7.00 of 8)
>   `
>
> Where can I configure the appearance of the bracket around the
> example?

You can use a filter function and add it to
`org-export-filter-example-block-functions'.


Regards,

-- 
Nicolas Goaziou



Re: [O] Unable to resolve info links during publishing

2015-12-22 Thread Nicolas Goaziou
Hello,

Robert Klein  writes:

> when publishing a org document (to HTML), info links, e.g.
> "info:org#Formula syntax for Lisp" throw errors, e.g.:
>
>   Unable to resolve link "info:org#Formula syntax for Lisp"
>
>
> The link exists and can be followed in the org document by pressing
> the keys C-c C-o.

FWIW, I cannot reproduce it on development version.


Regards,

-- 
Nicolas Goaziou



Re: [O] [PATCH] org-protocol: Allow key=val=value2-style URLs

2015-12-22 Thread Nicolas Goaziou
Hello,

> Sure! Revised patch attached updates docstrings and adds ORG-NEWS.
>
> I also added more test cases and fixed a few small edge cases (ex:
> org-capture with just a template, no links). I reworded the
> documentation strings to pass M-x checkdoc as well. =)

Great ! 

Applied. Thank you.


Regards,

-- 
Nicolas Goaziou



Re: [O] [RFC] Removal of [1]-like footnotes

2015-12-22 Thread Nicolas Goaziou
Hello,

Simon Thum  writes:

> Same here (yes please!), for the same reason ;)
>
> On 12/19/2015 04:27 PM, Thierry Banel wrote:
>> I vote "yes".
>> It was annoying to see bracketed numbers as links to nowhere.
>>
>> The Nobel prize for the detection of the neutrino _[1995]_ was
>>FrederickReines and the prizes for the discovery of neutrino
>>oscillations _[2015]_ were Takaaki Kajita & Arthur McDonald.
>>
>>The resulting sets are [1,2,3], [1,2], _[1]_
>>
>>
>> Le 17/12/2015 11:03, Nicolas Goaziou a écrit :
>>> Hello,
>>>
>>> As discussed previously, I pushed changes about footnotes in a dedicated
>>> branch, "wip-no-plain-fn", for testing.
>>>
>>> In a nutshell, in this branch, Org no longer recognizes [1]-like
>>> constructs as valid footnotes, an no longer spend time matching them.
>>>
>>> As a consequence, "fn:" can now be unambiguously removed from label and
>>> become part of the syntax. Thus, [fn:1] is labelled "1" and [fn:label]
>>> is labelled "label".

Pushed. Thanks to everyone for the feedback.


Regards,

-- 
Nicolas Goaziou



Re: [O] blog refurbised: how is it in 2015 ?

2015-12-22 Thread Sebastian Christ

Hi Xavier,

I'm using org-page (https://github.com/kelvinh/org-page) and I'm quite
happy with it.

Best,
Sebastian




Re: [O] org-ref video

2015-12-22 Thread B.V. Raghav
Hi,

I had been following the thread(s) about org-ref by the words, out of
curiosity. However, this video shows how examplary the work is. Awesome
work sir. 

Thanks,
r
-- 
(B.V. Raghav)