Re: [O] Bug: Exporting smart single quotes in Org 8.3 seems broken [8.3.2 (8.3.2-elpa @ /Users/jonathan/.emacs.d/elpa/org-20150929/)]

2016-09-15 Thread Suvayu Ali
Hello everyone,

It's been a while, I still use Org, just not active on mailing lists.

On Sat, Oct 03, 2015 at 09:30:02AM +0200, Nicolas Goaziou wrote:
> Rasmus  writes:
> 
> > Nicolas Goaziou  writes:
> >> Also, I think it would be clearer to rename `opening-double-quote' to
> >> `opening-primary-quote' and `opening-single-quote' to
> >> `opening-secondary-quote'. WDYT?
> >
> > In fact, I thought they needed renaming as well in light of the
> > redefinition of " and '.
> 
> I renamed `opening-double-quote' to `primary-opening' and
> `opening-closing-quote' to `secondary-opening'. Ditto for closing parts.

Sorry about resuming an old thread, but how would I go about quoting
special characters?  I need to quote strings like '

[O] latex_class_options

2016-09-15 Thread Vikas Rawal
I have a latex class defined as follows

  (add-to-list 'org-latex-classes
   '(("pulsememoir" "\\documentclass{memoir}"
 ("\\chapter{%s}" . "\\chapter*{%s}")
 ("\\section{%s}" . "\\section*{%s}")
 ("\\subsection{%s}" . "\\subsection*{%s}")
 ("\\subsubsection{%s}" . "\\subsubsection*{%s}"

In my org file, I have the following:

#+LATEX_CLASS: pulsememoir
#+LaTeX_CLASS_OPTIONS: 
[a4paper,11pt,twoside,openany,strict,extrafontsizes,twocolumn]

But when I export, I get:

\documentclass[8pt]{memoir}

Why is #+LATEX_CLASS_OPTIONS ignored? Has the syntax changed?

This is my org-version:
Org-mode version 8.3.5 (release_8.3.5-1026-g096f42 @ 
/Users/vikas/.emacs.d/src/org-mode/lisp/)






Re: [O] org2pdf export broken on parabola

2016-09-15 Thread Divan Santana
Hi Aaron,

Aaron Ecay  writes:

> Hi Divan,
>
> Thanks for your reply.
>
> 2016ko abuztuak 28an, Divan Santana-ek idatzi zuen:
>>
>> Thanks for the reply.
>>
>> My initial post was a lacking detail, sorry...
>>
>> So, on parabola Linux, a simply org file, like this:
>>
>> QUOTE
>> * Test
>>
>> Testing org export to pdf via latex, on parabola Linux.
>> END QUOTE
>>
>> If I try export via C-c C-e l p
>>
>> results in a blank PDF.
>>
>> The *Org PDF LaTeX Output* buffer contains this:
>>
>> QUOTE
>> This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016/Parabola) 
>> (preloaded format=pdflatex)
>>  restricted \write18 enabled.
>> entering extended mode
>> (/home/admin/ownCloud/documents/org/test.tex
>> LaTeX2e <2016/03/31> patch level 3
>> Babel <3.9r> and hyphenation patterns for 83 language(s) loaded.
>> (/usr/share/texmf-dist/tex/latex/base/article.cls
>> Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
>> (/usr/share/texmf-dist/tex/latex/base/size11.clo))
>> (/usr/share/texmf-dist/tex/latex/base/inputenc.sty
>> (/usr/share/texmf-dist/tex/latex/base/utf8.def
>> (/usr/share/texmf-dist/tex/latex/base/t1enc.dfu)
>> (/usr/share/texmf-dist/tex/latex/base/ot1enc.dfu)
>> (/usr/share/texmf-dist/tex/latex/base/omsenc.dfu)))
>> (/usr/share/texmf-dist/tex/latex/base/fontenc.sty
>> (/usr/share/texmf-dist/tex/latex/base/t1enc.def)
>> kpathsea: Running mktextfm ecrm1095
>> mktextfm: Running mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; 
>> input ecrm1095
>> This is METAFONT, Version 2.7182818 (TeX Live 2016/Parabola) (preloaded 
>> base=mf)
>>
>> kpathsea: Running mktexmf ecrm1095
>>
>> ! I can't find file `ecrm1095'.
>> <*> ...ljfour; mag:=1; nonstopmode; input ecrm1095
>
> [...snip the rest...]
>
> This log indicates that the problem occurs during the loading of the
> fontenc package.  Fontenc is a good package to load, apparently:
> .
>
> You can probably fix this error by either removing the entry for the
> fontenc package from org-latex-default-packages-alist, or setting
> org-latex-compiler to either lualatex or xelatex (newer latex compilers
> neither of which use fontenc).  Of course, either of these might uncover
> further problems (the parabola approach to packaging texlive seems
> pretty haphazard), but I believe either step would fix the problem you
> have reported.

Brilliant. Simple work around. Glad to have this working.

Thanks a ton!



Re: [O] latex_class_options

2016-09-15 Thread Vikas Rawal
Sorry, please ignore. I did something dumb.

My apologies.

Vikas


> On 15-Sep-2016, at 5:59 pm, Vikas Rawal  
> wrote:
> 
> I have a latex class defined as follows
> 
>  (add-to-list 'org-latex-classes
>   '(("pulsememoir" "\\documentclass{memoir}"
> ("\\chapter{%s}" . "\\chapter*{%s}")
> ("\\section{%s}" . "\\section*{%s}")
> ("\\subsection{%s}" . "\\subsection*{%s}")
> ("\\subsubsection{%s}" . "\\subsubsection*{%s}"
> 
> In my org file, I have the following:
> 
> #+LATEX_CLASS: pulsememoir
> #+LaTeX_CLASS_OPTIONS: 
> [a4paper,11pt,twoside,openany,strict,extrafontsizes,twocolumn]
> 
> But when I export, I get:
> 
> \documentclass[8pt]{memoir}
> 
> Why is #+LATEX_CLASS_OPTIONS ignored? Has the syntax changed?
> 
> This is my org-version:
> Org-mode version 8.3.5 (release_8.3.5-1026-g096f42 @ 
> /Users/vikas/.emacs.d/src/org-mode/lisp/)
> 
> 
> 




Re: [O] Bug: Exporting smart single quotes in Org 8.3 seems broken [8.3.2 (8.3.2-elpa @ /Users/jonathan/.emacs.d/elpa/org-20150929/)]

2016-09-15 Thread Nicolas Goaziou
Hello,

Suvayu Ali  writes:

> Sorry about resuming an old thread, but how would I go about quoting
> special characters?  I need to quote strings like ' Using double quotes here seems wrong.

Why does it seem wrong?

Regards,

-- 
Nicolas Goaziou



Re: [O] PATCH: add dbport to ob-sql for postgres

2016-09-15 Thread Nicolas Goaziou
Hello,

Nick Dokos  writes:

> Three things:
>
> o This probably qualifies as a TINYCHANGE and can be merged, but if
>   you want to contribute in the future, you will probably have to sign
>   the FSF copyright assignment (unless you have done so
>   already). Details can be found at
>
>http://orgmode.org/worg/org-contribute.html#orgheadline1
>
> o The best way to submit patches is by using ``git format-patch''.
>   There are also conventions that you need to follow - details can be
>   found at
>
>http://orgmode.org/worg/org-contribute.html#patches
>
>   Since org-mode is a part of emacs, you will need to add a commit
>   message that is formatted as an Emacs ChangeLog entry. The URL above
>   has all the details.
>
> o On the positive side, the news entry and the test(s) you provided are
>   very much appreciated.
>
> Nicolas Goaziou (or another maintainer) may want to add to this, but I
> think it covers the basics.

I couldn't be more accurate :) Thank you.

Regards,

-- 
Nicolas Goaziou



[O] org-file-apps settings?

2016-09-15 Thread Matt Price
hi Everyone,
I have been through this a million times, but I never seem to remember, and
have a hard time finding the answer online or in my archives.

On a Linux system, how should I set org-file-apps to allow org to open odt
files in libreoffice, html files in Firefox, and pdf files in evince
(especially in export-and-open commands)?

I have tried a couple of htings; this is what C-h v org-file-apps currently
says:

Its value is ((remote . emacs) (system . mailcap) (t . mailcap))
Original value was
((auto-mode . emacs)
 ("\\.mm\\'" . default)
 ("\\.x?html?\\'" . default)
 ("\\.pdf\\'" . default))

There's no /etc/mailcap on my mahcine (?), and .mailcap reads:

*/*; xdg-open "%s"


Running `xdg-open file.odt` from a terminal will open the file in
libreoffice, but exporting to odt and opening with C-c C-e o O opens the
file in emacs.  What should I try next? Thank you!
m


Re: [O] Trouble with capture template and prompt

2016-09-15 Thread Adam Porter
Bart Bunting  writes:

Hi Bart,

> I sort of had already narrowed it down but am unsure of how to debug
> further.
>
> Removing %^{Todo}  from the template and everything works.

Just a shot in the dark, which shouldn't make any difference, but try
this template, which works for me:

#+BEGIN_SRC elisp
("t" "Task" entry
  (file "")
  "* TODO %^{Description}%^G

%U %?" :clock-in t :clock-resume t)
#+END_SRC

You might also try replacing %^{Todo} with %^{Description}, just for fun.

> Any suggestions on how to dig into this further?

That backtrace doesn't seem helpful to me either.  Maybe Nick's advice
will help here.  :)

> I have some other bits of org config in my main config file but not sure
> that they would cause breakage like this.

Hard to say without testing.  If nothing else works, try using the
bug-hunter package from MELPA to bisect your config, keeping the
template unchanged (i.e. you could eval the template manually when
testing).  If there is something in your config causing it, this should
narrow it down for you.

> The other thing is that I use emacspeak which is probably the advice
> calls shown in the debug above.  Hard for me to test without it though
> as then I can't use emacs.

That definitely makes it much more challenging.  I'm sorry I can't be
much help here, as I know nothing about emacspeak.

> I could also try an earlier version of emacspeak in case the error is
> being caused by the advice in some strange way.

If it's not too time-consuming, that'd be a good idea too.

Also, sorry if you already mentioned this, but you might try using a
newer version of Org if possible.




Re: [O] org-board -- bookmarking and archival

2016-09-15 Thread Adam Porter
Hi Charles,

Thanks for sharing that, I will check it out.  As was mentioned, it
seems ripe for integrating with browser capture.  On that note, have you
seen org-protocol-capture-html?  For articles that are primarily text,
I've been capturing articles directly in Org format, but your package
sounds good for capturing pages as-is.

By the way, you might want to consider integrating something like
Readability or the Python package python-readability (aka
readability-lxml) for reducing web pages to the primary content.  It's
worked out well in org-protocol-capture-html.

By the way, here's some code I've been using to read and/or capture web
pages from URLs on the clipboard:

#+BEGIN_SRC elisp
(defun url-to-org-with-readability (url)
  "Get page content of URL with python-readability, convert to
Org with Pandoc, and display in buffer."

  (let (title content new-buffer)

(with-temp-buffer
  (unless (= 0 (call-process "python" nil '(t t) nil "-m" 
"readability.readability" "-u" url))
(error "Python readability-lxml script failed: %s" (buffer-string)))

  ;; Get title
  (goto-char (point-min))
  (setq title (buffer-substring-no-properties (search-forward "Title:") 
(line-end-position)))

  (unless (= 0 (call-process-region (point-min) (point-max) "pandoc" t t 
nil "--no-wrap" "-f" "html" "-t" "org"))
(error "Pandoc failed."))
  (setq content (buffer-substring (point-min) (buffer-end 1

;; Make new buffer
(setq new-buffer (generate-new-buffer title))
(with-current-buffer new-buffer
  (insert (concat "* [[" url "][" title "]]\n\n"))
  (insert content)
  (org-mode)
  (goto-char (point-min))
  (org-cycle)
  (switch-to-buffer new-buffer
(defun read-url-with-org ()
  "Call `url-to-org-with-readability' on URL in kill ring."
  (interactive)
  (url-to-org-with-readability (first kill-ring)))

(defun org-capture-web-page-with-readability (&optional url)
  "Return string containing entire capture to be inserted in org-capture 
template."
  (let ((url (or url (first kill-ring)))
;; From org-insert-time-stamp
(timestamp (format-time-string (concat "[" (substring (cdr 
org-time-stamp-formats) 1 -1) "]")))
title title-linked content)

(with-temp-buffer
  (unless (= 0 (call-process "python" nil '(t t) nil "-m" 
"readability.readability" "-u" url))
(error "Python readability-lxml script failed: %s" (buffer-string)))

  ;; Get title
  (goto-char (point-min))
  (setq title (buffer-substring-no-properties (search-forward "Title:") 
(line-end-position)))
  (setq title-linked (concat "[[" url "][" title "]]"))

  (unless (= 0 (call-process-region (point-min) (point-max) "pandoc" t t 
nil "--no-wrap" "-f" "html" "-t" "org"))
(error "Pandoc failed."))

  ;; Demote page headings in capture buffer to below the
  ;; top-level Org heading and "Article" 2nd-level heading
  (save-excursion
(goto-char (point-min))
(while (re-search-forward (rx bol (1+ "*") (1+ space)) nil t)
  (beginning-of-line)
  (insert "**")
  (end-of-line)))

  (goto-char (point-min))
  (goto-line 2)
  (setq content (s-trim (buffer-substring (point) (buffer-end 1

  ;; Return capture for insertion
  (concat title-linked " :website:\n\n" timestamp "\n\n** Article\n\n" 
content

;; org-capture template
("wr" "Capture Web site with python-readability" entry
 (file "~/org/articles.org")
 "* %(org-capture-web-page-with-readability)")
#+END_SRC




Re: [O] org-file-apps settings?

2016-09-15 Thread Adam Porter
Hi Matt,

I'm not sure what the solution is for your system, but here's my
configuration:

org-file-apps is a variable defined in `org.el'.
Its value is ((auto-mode . emacs)
 ("\\.mm\\'" . default)
 ("\\.x?html?\\'" . default)
 ("\\.pdf\\'" . default))

I'm on Ubuntu Trusty on this system, and /etc/mailcap is a large file
containing many specific references to opendocument filetypes, etc.
When I export to ODT with "C-c C-e o O", the resulting file opens in
LibreOffice.

Hope this helps.




Re: [O] org-capture always asks me if i want to deelte excess backup versions of bookmarks?

2016-09-15 Thread Adam Porter
Xebar Saram  writes:

Hey Z,

> i have set bookmark saving to t (bookmark-save-flag 1)

Just FYI, t is not the same as 1 here.  Check the help for that
variable.  :)

> yet now every time i finish a org-capture i get this dialog:
>
> Delete excess backup versions of /home/zeltak/.emacs.d/bookmarks? (y
> or n) y
>
> i do want to auto save bookmarks, but can i exclude that when
> capturing in org?

When you finish a capture, org-capture saves a bookmark pointing to the
last captured item, but that uses the built-in Emacs bookmark system, so
this is not an org-related issue.  If you were to make any kind of
bookmark manually, it should produce the same prompt.  I guess you need
to look at the bookmark-version-control setting and follow that rabbit
trail...  ;)




Re: [O] iOrg

2016-09-15 Thread Adam Porter
Thorsten Jolitz  writes:

> [WARNING: this is an extremely long post with lots of boxquotes that 
> might turn out unreadable, you might want to consider this as spam 
> and just ignore it]

Hi Thorsten,

I guess I have missed iOrg before, because this looks very interesting!
If I understand correctly, iOrg runs a web server written in PicoLisp
which presents a set of Org files as an editable wiki in a browser?

If so, this opens up a world of possibilities.  Imagine having your
personal Org files (at least, ones without very personal data) editable
on your personal web server from any computer, even one without Emacs
installed (including mobile devices)!  You could edit your Org files
from any system, then sync changes with Git when you get home and
continue editing in Emacs.

I feel like I've seen a similar project before, one not based on
PicoLisp...I think it ran from within Emacs...I'd have to google it up
again.  But I don't think it was nearly as advanced as this.

Anyway, if I could make one suggestion to help get things going again,
it would be to add a bit more info to the readme so that visitors can
immediately understand what it's about.  :)




Re: [O] latex_class_options

2016-09-15 Thread Eric S Fraga
On Thursday, 15 Sep 2016 at 12:29, Vikas Rawal wrote:
> I have a latex class defined as follows
>
>   (add-to-list 'org-latex-classes
>'(("pulsememoir" "\\documentclass{memoir}"
>  ("\\chapter{%s}" . "\\chapter*{%s}")
>  ("\\section{%s}" . "\\section*{%s}")
>  ("\\subsection{%s}" . "\\subsection*{%s}")
>  ("\\subsubsection{%s}" . "\\subsubsection*{%s}"
>
> In my org file, I have the following:
>
> #+LATEX_CLASS: pulsememoir
> #+LaTeX_CLASS_OPTIONS: 
> [a4paper,11pt,twoside,openany,strict,extrafontsizes,twocolumn]
>
> But when I export, I get:
>
> \documentclass[8pt]{memoir}

Check your error messages.  I think you have the above elisp wrong.  It
should be

(add-to-list 'org-latex-classes
 '("pulsememoir" "\\documentclass{memoir}"
   ("\\chapter{%s}" . "\\chapter*{%s}")
   ("\\section{%s}" . "\\section*{%s}")
   ("\\subsection{%s}" . "\\subsection*{%s}")
   ("\\subsubsection{%s}" . "\\subsubsection*{%s}")))

One set of () removed from around the entry.  You added a list with a
single entry instead of adding the entry to the list.

With this change, it works fine for me.

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.90.1, Org release_8.3.3-535-g7213aa



[O] duration without hours?

2016-09-15 Thread Matt Price
I have a silly table I am planning to use to teach myself a little bit
about R; it contains durations measured in minutes and seconds:

* Kayaking Log
| 500m Trial | <2016-09-14 Wed> | <2016-09-15 Thu> | Mean |
|+--+--+--|
|  1 | 00:02:48 | 00:02:34 | 00:02:48 |
|  2 | 00:02:38 | 00:02:47 |  |
|  3 | 00:02:42 | 00:02:42 |  |
|  4 | 00:02:36 | 00:02:40 |  |
|  5 | 00:02:58 | 00:02:37 |  |
|+--+--+--|
|   MEAN | 00:02:44 | 00:02:40 |  |

#+TBLFM: $2=vmean(@2..@-1);T::$3=vmean(@2..@-1);T::$4=vmean($2..$-1);T

I have a bunch of questions but will start with what is maybe the most
basic: can I write durations in minutes and seconds only? the extra 00: is
sort of annoying to type when I am tired.

Later I'll want to think about the best way to turn this data into a plot
of fastest, slowest, and mean times day-to-day. But not tonight, I'm beat!
Thanks,
Matt


Re: [O] duration without hours?

2016-09-15 Thread Adam Porter
Matt Price  writes:

> I have a bunch of questions but will start with what is maybe the most
> basic: can I write durations in minutes and seconds only? the extra
> 00: is sort of annoying to type when I am tired. 

I'd recommend using org-capture to add to the table, and use a simple
function to take input in the form of "2h4m3s" and convert that to
"02:04:03".  Much faster to type.  :)




[O] org-agenda: different face (color) per file?

2016-09-15 Thread Xebar Saram
Hi all,

this seems it should be trivial but googling didnt help. my org-agenda view
is made out of 5-6 files. can one define a different face (mainly color)
per file?

thx!

Z


Re: [O] org-agenda: different face (color) per file?

2016-09-15 Thread Adam Porter
Xebar Saram  writes:

> this seems it should be trivial but googling didnt help. my org-agenda
> view is made out of 5-6 files. can one define a different face (mainly
> color) per file?

There's no way to do this that I know of, but I guess you could try two
approaches:

1.  Advise the code that writes the agenda line-by-line.  You'll have to
dig through the agenda-making code...

2.  Write a function to post-process the agenda and adjust the color of
each line depending on its source file (or its category, which is
usually the file it comes from).  I'm guessing this would be easier.