Re: [O] PDF-tools... and LaTeX

2015-11-16 Thread briangpowell .
Wow, as usual thanks Nick, great help and insights.

Say, LaTeX and xpdf and poppler and Okular are all great software--suggest
you try out xournal too:

apt-get install xournal

--shows .pdfs and many tools for editing .pdf's

Also, you're well aware of the Emacs/ELisp tools for .pdf's (
https://github.com/politza/pdf-tools); but, suggest you install and tinker
with CPAN/Perl's pdf-tools--well worth investigating.

On Mon, Nov 16, 2015 at 8:58 PM, Nick Dokos  wrote:

> AW  writes:
>
> > Dear all,
> >
> > I dare to ask this slightly off-topic question, because of the discussion
> > about pdf-tools a day ago.
> >
> > I installed pdf-tools (https://github.com/politza/pdf-tools). It is a
> _lot_
> > faster than doc-view. Many thanks to Matt Price
> > (http://matt.hackinghistory.ca/2015/11/11/note-taking-with-pdf-tools/)
> I got
> > it working with orgmode.
> >
> > But I'd like to use it to display my PDFs I produce with LaTeX (Emacs,
> AUCTeX)
> > as well.
> >
> > The trouble is the automagic reloading of the PDF every time it get's
> changed
> > on disk. Okular does this, but pdf-tools need some kind of invitation?!
> >
> > From here https://github.com/politza/pdf-tools/issues/128
> > is this setup for .emacs:
> >
> > = 8< ==
> >
> >
> > (pdf-tools-install)
> > (load "pdf-tools")
> > (setq TeX-view-program-selection '((output-dvi "Okular")
> > (output-pdf "PDF Tools") ;;
> > ))
> >
> > (require 'subr-x)
> > (defun th/pdf-view-revert-buffer-maybe (file)
> > (when-let ((buf (find-buffer-visiting file)))
> > (with-current-buffer buf
> > (when (derived-mode-p 'pdf-view-mode)
> > (pdf-view-revert-buffer nil t)
> >
> > (add-hook 'TeX-after-TeX-LaTeX-command-finished-hook
> >  #'th/pdf-view-revert-buffer-maybe)
> >
> >
> >  >8 
> >
> > If I compile a *.tex file again, I get the error
> >
> > "error in process sentinel: Symbol's function definition is void:
> when-let"
> >
> > ...and the PDF won't get updated.
> >
>
> So when-let is not defined above, and it is not defined by emacs, so you
> got to get the definition from somewhere. Go back to the link and you'll
> see further down that the OP complains about the same thing. The
> solution seems to be
>
>(require 'subr-x)
>
> > Can anybody help me to get a working setup? Really, this libpoppler
> behind
> > pdf-tools is such a lot faster, it reminds me on xpdf.
> >
>
> That's because libpoppler is essentially a library version of xpdf:
>
> $ yum info poppler
> Loaded plugins: auto-update-debuginfo, copr, etckeeper, langpacks
> Installed Packages
> Name: poppler
> Arch: x86_64
> Version : 0.26.2
> Release : 9.fc21
> Size: 2.6 M
> Repo: installed
> Summary : PDF rendering library
> URL : http://poppler.freedesktop.org/
> License : (GPLv2 or GPLv3) and GPLv2+ and LGPLv2+ and MIT
> Description : Poppler, a PDF rendering library, is a fork of the xpdf PDF
> : viewer developed by Derek Noonburg of Glyph and Cog, LLC.
>
> --
> Nick
>
>
>
>
>


Re: [O] PDF-tools... and LaTeX

2015-11-16 Thread Nick Dokos
AW  writes:

> Dear all,
>
> I dare to ask this slightly off-topic question, because of the discussion 
> about pdf-tools a day ago. 
>
> I installed pdf-tools (https://github.com/politza/pdf-tools). It is a _lot_ 
> faster than doc-view. Many thanks to Matt Price 
> (http://matt.hackinghistory.ca/2015/11/11/note-taking-with-pdf-tools/) I got 
> it working with orgmode. 
>
> But I'd like to use it to display my PDFs I produce with LaTeX (Emacs, 
> AUCTeX) 
> as well.
>
> The trouble is the automagic reloading of the PDF every time it get's changed 
> on disk. Okular does this, but pdf-tools need some kind of invitation?!
>
> From here https://github.com/politza/pdf-tools/issues/128  
> is this setup for .emacs:
>
> = 8< ==
>
>
> (pdf-tools-install) 
> (load "pdf-tools")
> (setq TeX-view-program-selection '((output-dvi "Okular") 
> (output-pdf "PDF Tools") ;; 
> ))
>
> (require 'subr-x)
> (defun th/pdf-view-revert-buffer-maybe (file)
> (when-let ((buf (find-buffer-visiting file)))
> (with-current-buffer buf
> (when (derived-mode-p 'pdf-view-mode)
> (pdf-view-revert-buffer nil t)
>
> (add-hook 'TeX-after-TeX-LaTeX-command-finished-hook
>  #'th/pdf-view-revert-buffer-maybe)
>
>
>  >8 
>
> If I compile a *.tex file again, I get the error 
>
> "error in process sentinel: Symbol's function definition is void: when-let"
>
> ...and the PDF won't get updated.
>

So when-let is not defined above, and it is not defined by emacs, so you
got to get the definition from somewhere. Go back to the link and you'll
see further down that the OP complains about the same thing. The
solution seems to be

   (require 'subr-x)
   
> Can anybody help me to get a working setup? Really, this libpoppler behind 
> pdf-tools is such a lot faster, it reminds me on xpdf.
>

That's because libpoppler is essentially a library version of xpdf:

$ yum info poppler
Loaded plugins: auto-update-debuginfo, copr, etckeeper, langpacks
Installed Packages
Name: poppler
Arch: x86_64
Version : 0.26.2
Release : 9.fc21
Size: 2.6 M
Repo: installed
Summary : PDF rendering library
URL : http://poppler.freedesktop.org/
License : (GPLv2 or GPLv3) and GPLv2+ and LGPLv2+ and MIT
Description : Poppler, a PDF rendering library, is a fork of the xpdf PDF
: viewer developed by Derek Noonburg of Glyph and Cog, LLC.

--
Nick






[O] PDF-tools... and LaTeX

2015-11-16 Thread AW
Dear all,

I dare to ask this slightly off-topic question, because of the discussion 
about pdf-tools a day ago. 

I installed pdf-tools (https://github.com/politza/pdf-tools). It is a _lot_ 
faster than doc-view. Many thanks to Matt Price 
(http://matt.hackinghistory.ca/2015/11/11/note-taking-with-pdf-tools/) I got 
it working with orgmode. 

But I'd like to use it to display my PDFs I produce with LaTeX (Emacs, AUCTeX) 
as well.

The trouble is the automagic reloading of the PDF every time it get's changed 
on disk. Okular does this, but pdf-tools need some kind of invitation?!

>From here https://github.com/politza/pdf-tools/issues/128  
is this setup for .emacs:

= 8< ==


(pdf-tools-install) 
(load "pdf-tools")
(setq TeX-view-program-selection '((output-dvi "Okular") 
(output-pdf "PDF Tools") ;; 
))

(require 'subr-x)
(defun th/pdf-view-revert-buffer-maybe (file)
(when-let ((buf (find-buffer-visiting file)))
(with-current-buffer buf
(when (derived-mode-p 'pdf-view-mode)
(pdf-view-revert-buffer nil t)

(add-hook 'TeX-after-TeX-LaTeX-command-finished-hook
 #'th/pdf-view-revert-buffer-maybe)


 >8 

If I compile a *.tex file again, I get the error 

"error in process sentinel: Symbol's function definition is void: when-let"

...and the PDF won't get updated.

Can anybody help me to get a working setup? Really, this libpoppler behind 
pdf-tools is such a lot faster, it reminds me on xpdf.

I'm on Linux, Emacs 24.5.1 and AUCTeX 11.89.

Thanks!

Alexander





Re: [O] environmental variables in links in org

2015-11-16 Thread Samuel Wales
On 11/5/15, Zhihao Ding  wrote:
> Is it a good idea to use environment variables in the links referenced in a
> org file?  e.g.

imo yes.

> [[$mydata/myfigure.pdf]]
>
> If so how to achieve this?

you just did!



Re: [O] :minlevel for columnview dynamic block

2015-11-16 Thread Joon Ro
> 
> http://orgmode.org/worg/org-faq.html#ecm
> 

I sent this email yesterday but I'm sending it again because it seems it did 
not go through - I'm sorry if this is a duplicate message.

I found that skip-empty-rows works correctly only if ITEM is in the COLUMNS 
property. Here is an ECM :). As you can see, when ITEM is not included in 
COLUMNS property, it generates an empty line for the parent heading.* 
Columnview with ITEM in columns:PROPERTIES::COLUMNS:  %ITEM %Variable:END:- 
This correctly skips the parent headline because ITEM is one of the 
columns#+BEGIN: columnview :hlines 1 :id local :maxlevel 2 :skip-empty-rows t| 
ITEM| Variable ||-+--|| ** Subheading 1 |   
 1 || ** Subheading 2 |2 |#+END** Subheading 1:PROPERTIES::Name:
 Subheading 1:Variable: 1:END:** Subheading 2:PROPERTIES::Name: Subheading 
2:Variable: 2:END:* Columnview without ITEM in columns:PROPERTIES::COLUMNS:  
%Name %Variable:END:- When ITEM is not in columns, columnview generates one 
empty line on the top:#+BEGIN: columnview :hlines 1 :id local :maxlevel 2 
:skip-empty-rows t| Name | Variable ||--+--||   
   |  || Subheading 1 |1 || Subheading 2 |2 
|#+END** Subheading 1:PROPERTIES::Name: Subheading 1:Variable: 1:END:** 
Subheading 2:PROPERTIES::Name: Subheading 2:Variable: 2:END:
 

Re: [O] Org and Citations / References / Bibliography

2015-11-16 Thread Rainer M Krug
Grant Rettke  writes:

> On Fri, Nov 6, 2015 at 8:12 PM, Rainer M Krug  wrote:
>> I am still struggling with larger configurations (like org-mode and ESS, 
>> which
>> have different sections in my emacs.org), but I am getting there.
>
> Take it slow. Looking forward to seeing your approach. Here is mine for ESS
>
> https://github.com/grettke/help/blob/master/help.md#emacs-speaks-statistics-ess
>
> Org is covered by the whole document.

This is a very nice setup - I like the document!

I'll go through it and might have some questions.


Thanks,

Rainer

-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax :   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug

PGP: 0x0F52F982


signature.asc
Description: PGP signature


Re: [O] html export: what do codehighlighton/off functions do?

2015-11-16 Thread Manuel Koell
document.querySelectorAll and addEventListener

2015-11-14 1:07 GMT+01:00 Rasmus :

> Manuel Koell  writes:
>
> > It's just kinda weird, these function still get called from
> > onmouseover/onmouseout bindings.
>
> What would you prefer?
>
> Rasmus
>
> --
> I almost cut my hair, it happened just the other day
>


Re: [O] bug#21818: 24.5; org-set-tags-to indentation problems when called programmatically

2015-11-16 Thread Emanuel Evans
Nicolas Goaziou  writes:

> Nicolas Goaziou  writes:
>
> Fixed in d5767ad.

Hi! It looks like it's fixed for `org-insert-link', but I ran across a
similar bug with `org-element-interpret-data' that seems to be not
entirely fixed:

(defun good-indent ()
  (interactive)
  (insert (org-element-interpret-data
   `(headline (:level 1
  :title "something"
  :tags ("foo"))

(defun bad-indent ()
  (interactive)
  (insert (org-element-interpret-data
   `(headline (:level 1
  :title ((link (:raw-link 
"http://www.example.com/foo/bar/baz/qux/abc123f56789";)
"something"))
  :tags ("foo"))

`good-indent' looks like:

* something :foo:

With org-mode 8.2.10, `bad-indent' looks like:

* something:foo:

With the latest master version of org-mode (d6aafd7), `bad-indent' looks
like:

* something  :foo:

(i.e., "almost but still not quite right").

I'm not very familiar with the org-element internals, but is there any
way to work around this for 8.2.10? (I'm writing a library that I'd like
to be compatible with Emacs 24.5.)

Thanks so much!




[O] interaction between org-latex-custom-lang-environments and name when exporting to latex

2015-11-16 Thread Alan Schmitt
Hello,

I want to export some code for a custom language environment (to be able
to use minted's global customization), and I find there is a strange
interaction with adding a name to the block. Here is an ECM.

Init file:
--8<---cut here---start->8---
(defvar emacsd-dir "~/.emacs.d/")
(add-to-list 'load-path (concat emacsd-dir "org/emacs/site-lisp/org"))
(require 'org)

(require 'ox-latex)

(setq org-latex-listings 'minted)

(setq org-latex-custom-lang-environments
  '((emacs-lisp "common-lisp-code")))
--8<---cut here---end--->8---

Org file:
--8<---cut here---start->8---
#+name: test
#+BEGIN_SRC emacs-lisp
(message "hello")
#+END_SRC
--8<---cut here---end--->8---

Exported latex (only for the source block):
--8<---cut here---start->8---
\begin{common-lisp-code}
(message "hello")
\label{orgsrcblock1}

\end{common-lisp-code}
--8<---cut here---end--->8---

The problem is the “\label” in the middle of the source block, which
plays badly with minted.

Is this a known bug?

Thanks,

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7
Athmospheric CO₂ (Updated November 9, 2015, Mauna Loa Obs.): 399.06 ppm


signature.asc
Description: PGP signature


Re: [O] environmental variables in links in org

2015-11-16 Thread Zhihao Ding
Thanks for your reply. I found controlling the environment outside org is
much better and stopped thinking this direction.

Cheers,
Zhihao


On 15 November 2015 at 14:03, Grant Rettke  wrote:

> On Thu, Nov 5, 2015 at 7:16 PM, Zhihao Ding  wrote:
> > Is it a good idea to use environment variables in the links referenced
> in a
> > org file?  e.g.
> >
> > [[$mydata/myfigure.pdf]]
>
> How do you want Org to behave when the user clicks the link?
>
> > If so how to achieve this?
>
> I would try in-line source blocks.
>



-- 
Regards,
Zhihao Ding


[O] What's the best editor for org file in iOS?

2015-11-16 Thread 童俊翔
Since the mobile internet and cloud storage are easily accessible, which app do 
you use to edit org files in iOS devices?


Re: [O] Org Mode and PDF Notes!

2015-11-16 Thread Ramon Diaz-Uriarte
Thanks for the pointer.


On Fri, 13-11-2015, at 09:04, Matti Minkkinen  wrote:
> Ramon Diaz-Uriarte writes:
>
>> On Thu, 12-11-2015, at 14:11, Matt Price gmail.com> wrote:
>> It works! I get the highlighted text (I have just tried with a pdf I
>> highlighted with EzPDF, the one that, above, was giving just the location
>> and properties). And it still does the correct thing in your pdf (the one
>> from repligo).
>> Awesome! Thanks.
>> R.
>>
>> link
>
> I also have a strong interest in getting PDF annotations from Android to
> org-mode notes easily, so I've been following this thread with great
> interest.
>
> Very recently, on 11 November, there were a couple of commits to this
> pdf-tools fork which also let you export highlighted text:
> https://github.com/pinguim06/pdf-tools
>
> Matt Price already referred to the pull request from that fork, but
> those commits are more recent than the original pull request. I think it
> uses the same principle as the solution mentioned here but maybe it's
> more elaborate. I don't know enough elisp to confirm that.


-- 
Ramon Diaz-Uriarte
Department of Biochemistry, Lab B-25
Facultad de Medicina
Universidad Autónoma de Madrid 
Arzobispo Morcillo, 4
28029 Madrid
Spain

Phone: +34-91-497-2412

Email: rdia...@gmail.com
   ramon.d...@iib.uam.es

http://ligarto.org/rdiaz



Re: [O] fetching the description from a link string

2015-11-16 Thread Rasmus
Alan Schmitt  writes:

> Hello,
>
> I cannot seem to find in org.el a function that will return the
> description part of a link. I'm probably missing it … Could someone tell
> me if such a function exists?

org-element-context on a link will give you what you want.  It lives in
org-element, though.

Something like this when point is on a link,

(let ((e (org-element-context)))
  (buffer-substring-no-properties
   (org-element-property :contents-begin e)
   (org-element-property :contents-end e)))

Hope it helps,
Rasmus

-- 
Sådan en god dansk lagereddike kan man slet ikke bruge mere




Re: [O] :minlevel for columnview dynamic block

2015-11-16 Thread Joon Ro
> http://orgmode.org/worg/org-faq.html#ecmThank you. I found that 
> skip-empty-rows works correctly only if ITEM is in the COLUMNS property. Here 
> is an ECM :). As you can see, when ITEM is not included in COLUMNS property, 
> it generates an empty line for the parent heading.* Columnview with ITEM in 
> columns:PROPERTIES::COLUMNS:  %ITEM %Variable:END:- This correctly skips the 
> parent headline because ITEM is one of the columns#+BEGIN: columnview :hlines 
> 1 :id local :maxlevel 2 :skip-empty-rows t| ITEM| Variable 
> ||-+--|| ** Subheading 1 |1 || ** Subheading 
> 2 |2 |#+END** Subheading 1:PROPERTIES::Name: Subheading 
> 1:Variable: 1:END:** Subheading 2:PROPERTIES::Name: Subheading 
> 2:Variable: 2:END:* Columnview without ITEM in columns:PROPERTIES::COLUMNS:  
> %Name %Variable:END:- When ITEM is not in columns, columnview generates one 
> empty line on the top:#+BEGIN: columnview :hlines 1 :id local :maxlevel 2 
> :skip-empty-rows t| Name | Variable ||--+--|| 
>  |  || Subheading 1 |1 || Subheading 2 |2 
> |#+END** Subheading 1:PROPERTIES::Name: Subheading 1:Variable: 1:END:** 
> Subheading 2:PROPERTIES::Name: Subheading 2:Variable: 2:END:

  

Re: [O] :minlevel for columnview dynamic block

2015-11-16 Thread Joon Ro
> http://orgmode.org/worg/org-faq.html#ecm
I found that skip-empty-rows works correctly only if ITEM is in the COLUMNS 
property. Here is an ECM :). As you can see, when ITEM is not included in 
COLUMNS property, it generates an empty line for the parent heading.

* Columnview with ITEM in columns:PROPERTIES::COLUMNS:  %ITEM %Variable:END:- 
This correctly skips the parent headline because ITEM is one of the 
columns#+BEGIN: columnview :hlines 1 :id local :maxlevel 2 :skip-empty-rows t| 
ITEM| Variable ||-+--|| ** Subheading 1 |   
 1 || ** Subheading 2 |2 |#+END** Subheading 1:PROPERTIES::Name:
 Subheading 1:Variable: 1:END:** Subheading 2:PROPERTIES::Name: Subheading 
2:Variable: 2:END:* Columnview without ITEM in columns:PROPERTIES::COLUMNS:  
%Name %Variable:END:- When ITEM is not in columns, columnview generates one 
empty line on the top:#+BEGIN: columnview :hlines 1 :id local :maxlevel 2 
:skip-empty-rows t| Name | Variable ||--+--||   
   |  || Subheading 1 |1 || Subheading 2 |2 
|#+END** Subheading 1:PROPERTIES::Name: Subheading 1:Variable: 1:END:** 
Subheading 2:PROPERTIES::Name: Subheading 2:Variable: 2:END: