Re: [O] Emacs+org-mode in a Docker?

2015-11-17 Thread Grant Rettke
On Mon, Nov 9, 2015 at 10:45 PM, John Kitchin  wrote:
> This sounds a lot like what I have in mind. Have you tried doing this yet?

What I have done is used Vagrant for a development box, which included
text Emacs. That worked well.

I have not moved this forward yet as an Org mode box with a GUI. When
the topic came up here, it got me thinking about doing this again. My
other motivation is to move to 100% VM based workstations, and this
seems like a perfect way to get some re-use out of my Emacs/Org box.



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

2015-11-17 Thread Alan Schmitt
On 2015-11-16 10:45, Rasmus  writes:

> 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)))

Thank you for the suggestion. I'm already doing something similar:
#+begin_src emacs-lisp
(let ((link (org-store-link nil))
  (name (org-element-property :raw-value (org-element-at-point
...)
#+end_src

For some reason I was under the impression that org-element might be
overkill for this, but it works well.

Thanks again,

Alan

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


signature.asc
Description: PGP signature


Re: [O] Emacs+org-mode in a Docker?

2015-11-17 Thread Grant Rettke
On Sat, Nov 7, 2015 at 4:17 PM, Stelian Iancu  wrote:
> However the users still have to download the base box image initially and
> that can be many GBs, depending on what you include in it.

Off the top of my head I assume that the user has high speed Internet,
many GiBs of disk space, a few GiBs of RAM, and a couple of CPUs to
run the VM.

> Also, would you include Xorg and thus the ability to run Emacs in graphical
> mode or only a terminal-based Emacs?

Include Xorg so as to be able to run GUI Emacs.



Re: [O] PDF-tools... and LaTeX (solved)

2015-11-17 Thread AW
Sorry for the noise, to use PDF Tools instead of Okular I just had to write 
into my .emacs:

(pdf-tools-install) 

 (TeX-view-program-selection (quote (((output-dvi style-pstricks) "dvips and 
gv") (output-dvi "xdvi") (output-pdf "PDF Tools") (output-html "xdg-open"





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

2015-11-17 Thread AW
Am Montag, 16. November 2015, 20:58:20 schrieb Nick Dokos:
> > 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)

Yes, well, this is already part of the code I posted, see above. However, 
thank you, I admit my question is a little bit OT!

Regards,

-- 

Alexander



Re: [O] Emacs+org-mode in a Docker?

2015-11-17 Thread joakim
John Kitchin  writes:

> Has anyone tried setting up a Docker with an Emacs and org-mode setup?
>
> I am looking for some kind of solution like this to use with some
> students. Any thoughts?

I made a docker image for my xwidget emacs branch:
https://github.com/jave/xwidget-aux/tree/master/emacs-xwidget-docker-debian

There are notes there also how to run the dockerized emacs in graphical mode by
forwarding X. 

It would be very straightforward to use the same technique with plain
gnu emacs rather than my branch.

>
> Thanks,
>
> --
> 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
>
>

-- 
Joakim Verona




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

2015-11-17 Thread Arkadiusz Drabczyk
On 2015-11-15, 童俊翔  wrote:

> Since the mobile internet and cloud storage are easily accessible,
> which app do you use to edit org files in iOS devices?

Have you seen this: https://github.com/MobileOrg/mobileorg?  Anyway,
.org files are just plain text files so any editor will suffice. 

-- 
Arkadiusz Drabczyk