[O] Color theme loading on startup

2015-07-08 Thread Daniel Hertrich
Hi guys,

quick question, as I don’t really see any root cause for this:
 
Whenever I try to load a color theme directly from .emacs using load-theme, e.g.

(load-theme 'cyberpunk)

even if I put this line to the end of the .emacs file, the background color of 
the theme is overridden by something and not applied to the look of Emacs. 
If I load the same theme while Emacs is running using 

M-x load-theme RET cyberpunk RET

it looks good. However, using this method I cannot persist the choice across 
sessions.

Any ideas what the reason could be?



Also, there is 

M-x color-theme-select

which lists different themes than load-theme. Is this method better? How to  
load such themes through .emacs correctly?
E.g. I like the theme „Deep Blue“ listed there, but putting 
(color-theme-select ‚deep_blue)
into the .emacs file doesn’t have any effect. However, I don’t know if that’s 
the correct lisp-compatible name of the theme. How to know what it is?
And where are new themes for this method installed to? As far as I understood, 
both methods take different format theme files? 


Thanks!
Daniel



Re: [O] Structuring and (cross)linking information in org-mode

2015-07-08 Thread Daniel Hertrich
Dear John,

also to you, many thanks for your time to answer so many questions of mine.
I’ll comment them below:


 Am 03.07.2015 um 16:02 schrieb John Kitchin jkitc...@andrew.cmu.edu:
 
 This all sounds doable, but it will take some work ;)
 

I guessed so. ;-) But that’s the trade-off. Take some ready-made software that 
works out of the box, but then it won’t work as you want it to work. The other 
extreme is to program a personalized solution entirely on your own. I have done 
this before. But I hope Emacs is something in-between. The framework is there, 
and it’s only a matter of writing some scripts to make it work exaclty as I 
wish.
The problem is also, that I don’t know exactly in advance how I’d like it to 
work. These wishes will evolve with time. Another advantage of scripting an 
existend application. I can adapt it easier to new requirements than re-writing 
an entire application. ;-)


 I know how to make tasks with the org-todo-keywords.
 Now I want to mark chunks of information in that file in a similar way, but 
 keep it outside of the task workflow. I’d like to have that information 
 accessible and finable easily, and I want to differentiate different kinds 
 of information.
 
 Quick example:
 
 * TODO This is my first task
 Some task description goes here
 
 * MEETINGNOTE of meeting 2015-07-02 MyCompany
 
 I think you should probably use a tag of :MEETINGNOTE: here, instead of
 a TODO keyword like this. TODO keywords imply to me some kind of
 changeable state not a type of content. Alteratively you could make it a
 property.
 
 with your curson on the headline, type C-c C-c and enter MEETINGNOTE to
 add the tag.

I have to press „TAB“ („free“) before entering a new tag. Might be because I 
already defined some tags to be used in quick access.
You are right, somehow a tag is more suuitable for this kind of marking 
information. 
However, I just came across the possiblitiy of defining several TODO keyword 
workflows in parallel. I could imagine to have one for my own todos (TODO), one 
for other people’s todos that I’m monitoring (TASK) and maybe also one for 
information that expires or becomes outdated. Like this, partially taken from 
the org-secretary explanation, but adapted by me:

(setq org-todo-keywords
  '((sequence TODO(t) | DONE(d) CANCELLED(c))
(sequence TASK(f) | DONE(d))
(sequence „INFO(i) |“ „INFO-EXPIRED(e

Or would you consider this total nonsense? I know there is the archiving 
feature. Maybe expired info should be archived instead of maker „expired“? ;-)

This brings me to another idea: Maybe you know the outliner „NoteCase Pro“ 
(www.notecasepro.com http://www.notecasepro.com/). I have written some 
plugins for it (www.notecaseproplugins.com 
http://www.notecaseproplugins.com/), one of them being a plugin for helping 
to keep your files clean. One way to keep them clean is to assign an expiry 
date to every chunk of information in the file. If you generate an entry, you 
are automatically asked to quickly choose a validity time span (only a rough 
one, so you don't need to think too much at this point: one day, one week, one 
month, one year, 5 years, forever). Based on your selection, the plugin sets 
the corresponding date in the ffuture as expiry date for this piece of 
information. Everytime you open your file, the plugin searches for expired info 
and present only one expired info per session (so you are not overwhelemed by 
having to make decisions) to you and lets you choose to archive it, prolong the 
validity time span or to delete the expiry date entirely.

I think in times of gigantic flood of information we need such mechanisms to be 
able to maintain our information.

Does something like this exist for Emacs, too? Or is it already easily possible 
by using dates and the agenda…?


 
 ** participants
 *** — John Doe
 *** — Mary Sample
 ** Goal
 This is the description of meeting goal
 ** Outcome
 Outcome of the meeting
 
 
 * PERSON John Doe
 Street address
 email address
 telephone
 
 PERSON should also be a tag, or look at org-contacts, where those bits
 in the body would be stored as properties.


org-contacts seems to have a similar use case as BBDB (big brother data base). 
What is better? :-D I know, this is a very sloppy question.
New attempt: Which one would you recommend? I’d like to have a full-fledged 
contacts database that i’d like to sync with CardDAV servers and possibly 
iCloud, so that ai can use the same address data in any email client / 
telephone assistance solution on the Mac, and also inside Emacs for referring 
to todos etc., maybe to write letters inside Emacs with LaTex export and 
automatic inclusion of the snail mail address of the person etc. etc. All on a 
Mac. (Currently using Aquamacs, but maybe switching to Emacs Mac Port later, as 
that seems to be more standard, more stable and also less performance-hungry).

 
 * COMPANY MyCompany
 address
 field of operation
 employees:
 - John Doe
 - Mary 

Re: [O] Structuring and (cross)linking information in org-mode

2015-07-08 Thread Daniel Hertrich

 Am 05.07.2015 um 04:21 schrieb Haider Rizvi hari...@gmail.com:
 
 I use a yasnippet for writing down my meeting minutes, that also
 creates some properties. Daniel may find it useful.

Indeed I do! 
This is great, and will probably have its place in my future setup.
I will look into this.

Thanks,
Daniel





[O] meta commands and Info manual

2015-07-08 Thread Alan Wehmann
I am a new user of Org.  I'm an experienced user of Emacs.  My first use of Org 
was to create a table.  I soon found myself wanting to insert a column.  I 
looked at Info node (org) Built-in table editor [This manual is for Org 
version 8.2.9.] and it said:

‘M-S-right (org-table-insert-column)’
 Insert a new column to the left of the cursor position.

I now know that this was somewhat mis-leading, since that key combination is 
bound to org-shiftmetaright, but at the time I was rather confused (see topic 
Org keymap question in news group gnu.emacs.help).  I'd recommend a 
revision to the Info manual, to describe more prominently command 
org-shiftmetaright and other meta commands like it (apologies in advance if 
there is a later version of the Info manual that addresses this).

Info node (org) Conventions does mention the use of the meta commands 
somewhat, but I certainly didn't see it right away.

I am using:

GNU Emacs 24.5.1 (x86_64-apple-darwin13.4.0, NS apple-appkit-1265.21) of 
2015-04-10 on builder10-9.porkrind.org



Re: [O] Structuring and (cross)linking information in org-mode

2015-07-08 Thread Daniel Hertrich
Dear Pascal,

thanks for your answer.
org-secretary looks vey interesting. I have already looked into this before, 
but not deeply enough (because I didn’t understand most of it yet, but now my 
Emacs knowledge is good enough to understand most of it). Personalized agendas 
will definitly be a component of my new system! Thanks!

Daniel



 Am 03.07.2015 um 14:25 schrieb Pascal Fleury pas...@telefleuries.com:
 
 I think properties can be used for this. I personally like the org-secretary 
 module, described nicely here by the author: 
 http://juanreyero.com/article/emacs/org-teams.html 
 http://juanreyero.com/article/emacs/org-teams.html
 Also, personalized agendas 
 http://orgmode.org/manual/Storing-searches.html#Storing-searches for your 
 entire set of org-files is useful here.



[O] Non-latin drawer's name

2015-07-08 Thread Melleus
Is it possible?

I can hide the drawer's contents only if its name is in latin
characters. Is this intended behaviour? I register the drawer on
per-file basis with #+DRAWERS declaration. Thank you.

--

My Emacs is v 24.4.1 and Org is v 8.2.10 from Debian repositories.




Re: [O] [PATCH]: ox-deck

2015-07-08 Thread Rasmus
Matt Price mopto...@gmail.com writes:

 Do patches for contrib go to the list?

Sure.

 this fixes export of checkbox list
 items when they are part of a deck.js build within a slide.

Thanks.  Pushed.

Rasmus

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




Re: [O] ox-latex: default packages cleaning

2015-07-08 Thread Suvayu Ali
On Wed, Jul 08, 2015 at 03:53:32PM +0200, Rasmus wrote:
 Suvayu Ali fatkasuvayu+li...@gmail.com writes:
 
  From 54bcf8f1ae26c91fa856b64071dca65d3f31e1f2 Mon Sep 17 00:00:00 2001
  From: Rasmus ras...@gmx.us
  Date: Wed, 8 Jul 2015 14:44:56 +0200
  Subject: [PATCH 9/9] ox-latex: Support TeX variants
 
  This one fails to apply for me.  I'm on 
 
 You probably need the other patches posted in OP due to changes in
 org-latex-default-packages-alist.

Indeed, and it works very nicely!

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] ox-latex: default packages cleaning

2015-07-08 Thread Rasmus
Suvayu Ali fatkasuvayu+li...@gmail.com writes:

 We could also take this opportunity to provide users an easy way to
 switch between TeX engines.

These two patches goes some of the way towards what you want.
org-latex-pdf-process would also have to patched as well, though.

Test document:

 #+title: test xetex
 #+language: en
 #+options: tex-variant:xetex
 * header
 #+BEGIN_SRC emacs-lisp
   (add-to-list 'org-latex-packages-alist
'(AUTO, french polyglossia nil (luatex xetex)))
 #+END_SRC


Result (node the missing inputenc and fontenc):

 \documentclass[11pt]{article}
 \usepackage{graphicx}
 \usepackage{grffile}
 \usepackage{longtable}
 \usepackage{wrapfig}
 \usepackage{rotating}
 \usepackage[normalem]{ulem}
 \usepackage{amsmath}
 \usepackage{textcomp}
 \usepackage{amssymb}
 \usepackage{capt-of}
 \usepackage{hyperref}
 \usepackage{polyglossia}
 \setmainlanguage{english}
 \setotherlanguage{french}

 \author{Rasmus}
 \date{\textit{2015-07-07 mar}}
 \title{test xetex}
 \hypersetup{
  pdfauthor={Rasmus},
  pdftitle={test xetex},
  pdfkeywords={},
  pdfsubject={},
  pdfcreator={Emacs 25.0.50.1 (Org mode 8.3beta)}, 
  pdflang={English}}
 \begin{document}

 \maketitle
 \tableofcontents

 \section{add polyglossia}
 \label{sec:orgheadline1}
 \begin{verbatim}
 (add-to-list 'org-latex-packages-alist
  '(AUTO, french polyglossia nil (luatex xetex)))
 \end{verbatim}
 \end{document}

Rasmus

-- 
However beautiful the theory, you should occasionally look at the evidence
From df91d417df3223c0698e56be219f8f1a303ce566 Mon Sep 17 00:00:00 2001
From: Rasmus ras...@gmx.us
Date: Wed, 8 Jul 2015 14:12:21 +0200
Subject: [PATCH 8/9] ox-latex: Add polyglossia support

* ox-latex.el (org-latex-guess-polyglossia-language): New function.
  (org-latex-template): Apply new function.
---
 lisp/ox-latex.el | 61 ++--
 1 file changed, 51 insertions(+), 10 deletions(-)

diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index ff42843..058d7f8 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -1195,6 +1195,45 @@ Return the new header.
 		, )
 	 t nil header 1)
 
+(defun org-latex-guess-polyglossia-language (header info)
+  Set the Polyglossia language according to the LANGUAGE keyword.
+
+HEADER is the LaTeX header string.  INFO is the plist used as
+a communication channel.
+
+Insertion of guessed language only happens when the Polyglossia
+package has been explicitly loaded.
+
+The argument to Polyglossia may be \AUTO\ which is then
+replaced with the language of the document or
+`org-export-default-language'.  Note, the language is really set
+using \setdefaultlanguage and not as an option to the package.
+
+Return the new header.
+  (let ((language-code (plist-get info :language)))
+;; If no language is set or Polyglossia is not loaded, return
+;; HEADER as-is.
+(if (or (not (stringp language-code))
+	(not (string-match usepackage\\[?\\(.*?\\)?\\]?{polyglossia} header)))
+	header
+  (let* ((language (cdr (assoc language-code
+   org-latex-babel-language-alist)))
+	 (options (or (org-string-nw-p (match-string 1 header)) AUTO))
+	 (languages (save-match-data
+			  (org-split-string
+			   (replace-regexp-in-string
+			AUTO (if (string-match-p language options)  language)
+			options t)
+			   ,[ \t]*)))
+	 (main-language-set (string-match-p setmainlanguage{.*?} header)))
+	(replace-match
+	 (concat \\usepackage{polyglossia}\n
+		 (when (and languages (not main-language-set))
+		   (format \\setmainlanguage{%s} (pop languages)))
+		 (when languages
+		   (format \n\\setotherlanguage{%s}\n (mapconcat 'identity languages , 
+	 t t header 0)
+
 (defun org-latex--find-verb-separator (s)
   Return a character not used in string S.
 This is used to choose a separator for constructs like \\verb.
@@ -1349,16 +1388,18 @@ holding export options.
 		 class-options header t nil 1)
(if (not document-class-string)
 	   (user-error Unknown LaTeX class `%s' class)
-	 (org-latex-guess-babel-language
-	  (org-latex-guess-inputenc
-	   (org-element-normalize-string
-	(org-splice-latex-header
-	 document-class-string
-	 org-latex-default-packages-alist
-	 org-latex-packages-alist nil
-	 (concat (org-element-normalize-string
-		  (plist-get info :latex-header))
-		 (plist-get info :latex-header-extra)
+	 (org-latex-guess-polyglossia-language
+	  (org-latex-guess-babel-language
+	   (org-latex-guess-inputenc
+	(org-element-normalize-string
+	 (org-splice-latex-header
+	  document-class-string
+	  org-latex-default-packages-alist
+	  org-latex-packages-alist nil
+	  (concat (org-element-normalize-string
+		   (plist-get info :latex-header))
+		  (plist-get info 

Re: [O] ox-latex: default packages cleaning

2015-07-08 Thread Rasmus
Suvayu Ali fatkasuvayu+li...@gmail.com writes:

 I would also suggest removing inputenc.  At the moment, it is loaded
 with the AUTO option.  AFAIK, this is redundant since most recent
 (meaning for quite a few years) TeX engines already use the encoding of
 the file if nothing is specified.

A colleague of mine were missing her umlaut today cause she hadn't loaded
inputenc with utf8.  So I guess removing inputenc is premature.

Rasmus

-- 
. . . The proofs are technical in nature and provides no real understanding




Re: [O] ox-latex: default packages cleaning

2015-07-08 Thread Suvayu Ali
On Wed, Jul 08, 2015 at 02:54:41PM +0200, Rasmus wrote:
 Suvayu Ali fatkasuvayu+li...@gmail.com writes:
 
  I would also suggest removing inputenc.  At the moment, it is loaded
  with the AUTO option.  AFAIK, this is redundant since most recent
  (meaning for quite a few years) TeX engines already use the encoding of
  the file if nothing is specified.
 
 A colleague of mine were missing her umlaut today cause she hadn't loaded
 inputenc with utf8.  So I guess removing inputenc is premature.

Interesting, I'll keep this in mind.

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] Color theme loading on startup

2015-07-08 Thread Eric S Fraga
On Wednesday,  8 Jul 2015 at 14:08, Daniel Hertrich wrote:
 Hi guys,

 quick question, as I don’t really see any root cause for this:
  
 Whenever I try to load a color theme directly from .emacs using load-theme, 
 e.g.

 (load-theme 'cyberpunk)

[...]

I am not sure what causes the behaviour you see but I can say that I use
the following sequence to set the particular colour theme I want:

(require 'color-theme)
(color-theme-initialize)
(color-theme-blue-sea)

The second line makes all the colour themes available and you can see
them all by M-x color-theme TAB.

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.1, Org release_8.3beta-1260-gcedef7



Re: [O] ox-latex: default packages cleaning

2015-07-08 Thread Suvayu Ali
On Wed, Jul 08, 2015 at 02:53:46PM +0200, Rasmus wrote:
 Suvayu Ali fatkasuvayu+li...@gmail.com writes:
 
  We could also take this opportunity to provide users an easy way to
  switch between TeX engines.
 
 These two patches goes some of the way towards what you want.
 org-latex-pdf-process would also have to patched as well, though.

 [...chomp...chomp...chomp...]

 From 54bcf8f1ae26c91fa856b64071dca65d3f31e1f2 Mon Sep 17 00:00:00 2001
 From: Rasmus ras...@gmx.us
 Date: Wed, 8 Jul 2015 14:44:56 +0200
 Subject: [PATCH 9/9] ox-latex: Support TeX variants

This one fails to apply for me.  I'm on 

  c76fef6 org-clock: Add `untilnow' time block

Cheers,

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] ox-latex: default packages cleaning

2015-07-08 Thread Rasmus
Suvayu Ali fatkasuvayu+li...@gmail.com writes:

 From 54bcf8f1ae26c91fa856b64071dca65d3f31e1f2 Mon Sep 17 00:00:00 2001
 From: Rasmus ras...@gmx.us
 Date: Wed, 8 Jul 2015 14:44:56 +0200
 Subject: [PATCH 9/9] ox-latex: Support TeX variants

 This one fails to apply for me.  I'm on 

You probably need the other patches posted in OP due to changes in
org-latex-default-packages-alist.

-- 
Tack, ni svenska vakttorn. Med plutonium tvingar vi dansken på knä!




Re: [O] ox-latex: default packages cleaning

2015-07-08 Thread Rasmus
Suvayu Ali fatkasuvayu+li...@gmail.com writes:

 Indeed, and it works very nicely!

Let me know when you find bugs.

I'm trying to think of an elegant way to map from a tex-variant to a
command.  Perhaps change the variant names to the latex variants and input
that.  E.g. if using plain commands, pdflatex is changed to replaced
with xelatex.  texi2dvi uses LATEX=xelatex texi2dvi.  With latexmk you
can use -pdflatex=xelatex.  Rubber: no clue and it's not part of TL...

Rasmus

-- 
And when I’m finished thinking, I have to die a lot




Re: [O] Structuring and (cross)linking information in org-mode

2015-07-08 Thread John Kitchin

Daniel Hertrich writes:

 Dear John,

 also to you, many thanks for your time to answer so many questions of mine.
 I’ll comment them below:


 Am 03.07.2015 um 16:02 schrieb John Kitchin jkitc...@andrew.cmu.edu:

 This all sounds doable, but it will take some work ;)


 I guessed so. ;-) But that’s the trade-off. Take some ready-made software 
 that works out of the box, but then it won’t work as you want it to work. The 
 other extreme is to program a personalized solution entirely on your own. I 
 have done this before. But I hope Emacs is something in-between. The 
 framework is there, and it’s only a matter of writing some scripts to make it 
 work exaclty as I wish.
 The problem is also, that I don’t know exactly in advance how I’d like
 it to work. These wishes will evolve with time. Another advantage of
 scripting an existend application. I can adapt it easier to new
 requirements than re-writing an entire application. ;-)

I think Emacs+org-mode is somewhere in the middle there.


 I know how to make tasks with the org-todo-keywords.
 Now I want to mark chunks of information in that file in a similar
 way, but keep it outside of the task workflow. I’d like to have that
 information accessible and finable easily, and I want to
 differentiate different kinds of information.

You might look at inlinetasks. C-c C-x t
you can put headline like items in a headline that doesn't change the
headline level.


 Quick example:

 * TODO This is my first task
 Some task description goes here

 * MEETINGNOTE of meeting 2015-07-02 MyCompany

 I think you should probably use a tag of :MEETINGNOTE: here, instead of
 a TODO keyword like this. TODO keywords imply to me some kind of
 changeable state not a type of content. Alteratively you could make it a
 property.

 with your curson on the headline, type C-c C-c and enter MEETINGNOTE to
 add the tag.

 I have to press „TAB“ („free“) before entering a new tag. Might be
 because I already defined some tags to be used in quick access.

 You are right, somehow a tag is more suuitable for this kind of marking 
 information.
 However, I just came across the possiblitiy of defining several TODO keyword 
 workflows in parallel. I could imagine to have one for my own todos (TODO), 
 one for other people’s todos that I’m monitoring (TASK) and maybe also one 
 for information that expires or becomes outdated. Like this, partially taken 
 from the org-secretary explanation, but adapted by me:

 (setq org-todo-keywords
   '((sequence TODO(t) | DONE(d) CANCELLED(c))
 (sequence TASK(f) | DONE(d))
 (sequence „INFO(i) |“ „INFO-EXPIRED(e

This is certainly reasonable. I use this for various states of
proposals and manuscripts. For example, just in a file called
manuscripts.org, I have this at the top:

#+TODO: TODO PREPARATION | SUBMITTED REVISING | ACCEPTED DONE REJECTED

and in proposals.org:
#+TODO: TODO PENDING | DONE DECLINED AWARDED EXPIRED

In my mind TODO keywords should represent states of a headline, not
categories (which I use tags for). Although states can also be used as a
category, e.g. all PENDING proposals.

I think the INFO/INFO-EXPIRED should be tags though (just my
opinion). What headline is not information? and when it is expired, it
should be archived.


 Or would you consider this total nonsense? I know there is the
 archiving feature. Maybe expired info should be archived instead of
 maker „expired“? ;-)

The point of archiving in org-mode is to keep the information out of the
agenda. You can use a tag  ARCHIVE (C-c C-x a) for this if you want to
keep the headline in the file, or setup archiving to move the headline
to a new file with C-c C-x C-a.


 This brings me to another idea: Maybe you know the outliner „NoteCase
 Pro“ (www.notecasepro.com http://www.notecasepro.com/). I have
 written some plugins for it (www.notecaseproplugins.com
 http://www.notecaseproplugins.com/), one of them being a plugin for
 helping to keep your files clean. One way to keep them clean is to
 assign an expiry date to every chunk of information in the file. If
 you generate an entry, you are automatically asked to quickly choose a
 validity time span (only a rough one, so you don't need to think too
 much at this point: one day, one week, one month, one year, 5 years,
 forever). Based on your selection, the plugin sets the corresponding
 date in the ffuture as expiry date for this piece of
 information. Everytime you open your file, the plugin searches for
 expired info and present only one expired info per session (so you are
 not overwhelemed by having to make decisions) to you and lets you
 choose to archive it, prolong the validity time span or to delete the
 expiry date entirely.

You could pretty easily expire headlines based on a date. see
http://orgmode.org/w/?p=org-mode.git;a=blob_plain;f=contrib/lisp/org-expiry.el;hb=HEAD


 I think in times of gigantic flood of information we need such mechanisms to 
 be able to maintain our information.

 Does 

Re: [O] ox-latex: default packages cleaning

2015-07-08 Thread Suvayu Ali
On Wed, Jul 08, 2015 at 04:26:56PM +0200, Rasmus wrote:
 
 I'm trying to think of an elegant way to map from a tex-variant to a
 command.  Perhaps change the variant names to the latex variants and input
 that.

I think that would be a good way to go.

-- 
Suvayu

Open source is the future. It sets us free.



[O] org-mode, file-link, tramp, and smb domain

2015-07-08 Thread Dov Grobgeld
Hello,

In tramp the syntax for specifying a domain in a smb link is by using a
percentage sign [1]

//smb:user%DOMAIN@host:D/path/

but when trying to use this together with the org-mode file: link the
result is that it changes %D to ^M (control-M). Similar results are gotten
with other characters after the percentage sign. (If the letter is not in
the hexadecimal range, ^@ (null) is received). Even %% does not escape the
percentage sign.

Is there any easy workaround?

Thanks!
Dov


[1]
http://www.gnu.org/software/emacs/manual/html_node/tramp/External-methods.html


Re: [O] ox-latex: default packages cleaning

2015-07-08 Thread Rasmus
Hi,

Suvayu Ali fatkasuvayu+li...@gmail.com writes:

 +(defun org-latex-guess-polyglossia-language (header info)
 +  Set the Polyglossia language according to the LANGUAGE keyword.

 I'm in two-minds about this.  On the one had it is a nice thing, but on
 the other hand, it prevents the more fine grained control offered by
 polyglossia.  For example, I used this in my setup before:

   \setdefaultlanguage[variant=british]{english}

It's a shame that Polyglossia is so much different from babel  For
babel we translate en-gb to british which is a valid babel language.
But your example shows that org-latex-babel-language-alist does not work
for polyglossia.  Which means that somebody has to come up with a mapping
from language codes (en-gb) to (language . variant) pairs (your example).

Also, some mechanism needs to be in place to convey random options like
spelling={new, old} for German...  Unless polyglossia options can be set
afterwards via latex_headers.

 I don't see an easy way of passing the optional argument.  But on the
 other hand

   \setmainlanguage{english}

 is plain, simple, and works in most (almost all) cases.

The only limitation here is whether somebody wants to contribute
org-latex-polyglossia-language-alist (≡ go through the manual and map all
pairs).  Conveying language-specific options in Org is what I worry about.

Rasmus

-- 
ツ




Re: [O] ox-latex: default packages cleaning

2015-07-08 Thread Suvayu Ali
Hi Rasmus,

On Wed, Jul 08, 2015 at 02:53:46PM +0200, Rasmus wrote:

 +(defun org-latex-guess-polyglossia-language (header info)
 +  Set the Polyglossia language according to the LANGUAGE keyword.

I'm in two-minds about this.  On the one had it is a nice thing, but on
the other hand, it prevents the more fine grained control offered by
polyglossia.  For example, I used this in my setup before:

  \setdefaultlanguage[variant=british]{english}

I don't see an easy way of passing the optional argument.  But on the
other hand

  \setmainlanguage{english}

is plain, simple, and works in most (almost all) cases.  I'm thinking
whether to leave the babel/polyglossia features entirely up to the user.
That said, I like the feature very much.  For people who write in
multiple languages, if they load polyglossia, it should just work for
all their documents.  Which is great!

WDYT?  What do others think?

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] Time-zone in dates

2015-07-08 Thread Don Armstrong
On Tue, 07 Jul 2015, Russell Adams wrote:
 On Wed, Jul 01, 2015 at 12:22:43PM +0100, Eric S Fraga wrote:
  I particularly like the single event (a flight) that requires more than
  one time zone to make sense.  My diary is chock full of cases where it
  looks like a flight out somewhere takes 2 hours but coming back takes
  11!  (strong winds ;-)
 
 I believe this doesn't disprove the need for storing in UTC.
[...]
 After all there's no data lost in the plane example other than the
 relative timezone of the observer.

The relative timezone of the observer is important, though, because
that's how you enter the information, and it's often the most logical
way to display the information. If you just store UTC there's no way to
regenerate that.

Though all of that said, just storing UTC is significantly easier, and
while I'd love to see a complete implementation, an incomplete
implementation which could be expanded to become complete would be a
great advance.

-- 
Don Armstrong  http://www.donarmstrong.com

This can't be happening to me. I've got tenure.
 -- James Hynes _Publish and Perish_



Re: [O] Time-zone in dates

2015-07-08 Thread Russell Adams
On Wed, Jul 08, 2015 at 10:59:54AM -0500, Don Armstrong wrote:
 The relative timezone of the observer is important, though, because
 that's how you enter the information, and it's often the most logical
 way to display the information. If you just store UTC there's no way to
 regenerate that.

I'd suggest that the relative timezone of the observer is normally the
same, and if it should differ a display override sounds appropriate.

 Though all of that said, just storing UTC is significantly easier, and
 while I'd love to see a complete implementation, an incomplete
 implementation which could be expanded to become complete would be a
 great advance.

I think the question is would supporting timezones be difficult to add?

Then would you store the time in UTC only, or support a full timestamp
that included timezone?

Finally when being displayed they can use the user's $TZ by default,
and maybe a suffix of @ TZ inside the date syntax?


--
Russell Adamsrlad...@adamsinfoserv.com

PGP Key ID: 0x1160DCB3   http://www.adamsinfoserv.com/

Fingerprint:1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3



Re: [O] ox-latex: default packages cleaning

2015-07-08 Thread Rasmus
Suvayu Ali fatkasuvayu+li...@gmail.com writes:

 +(defun org-latex-guess-polyglossia-language (header info)
 +  Set the Polyglossia language according to the LANGUAGE keyword.

 I'm in two-minds about this.  On the one had it is a nice thing, but on
 the other hand, it prevents the more fine grained control offered by
 polyglossia.  For example, I used this in my setup before:

   \setdefaultlanguage[variant=british]{english}

The attached supports Polyglossia better.  Note, the last loaded language
is the main one (as babel).  Perhaps org-latex-variant-file-string should
be less annoying (not a file-variable).

Test file:

 #+title: test xetex
 #+language: en-gb
 #+latex_variant: xelatex

 * header
   add polyglossia

 #+BEGIN_SRC emacs-lisp
 (add-to-list 'org-latex-packages-alist
   '(AUTO, french polyglossia nil (lualatex xelatex)))
 #+END_SRC

Output:

% -*- LaTeX-command: xelatex -*-
% Created 2015-07-08 mié 20:32
\documentclass[11pt]{article}
\usepackage{graphicx}
\usepackage{grffile}
\usepackage{longtable}
\usepackage{wrapfig}
\usepackage{rotating}
\usepackage[normalem]{ulem}
\usepackage{amsmath}
\usepackage{textcomp}
\usepackage{amssymb}
\usepackage{capt-of}
\usepackage{hyperref}
\usepackage{polyglossia}
\setmainlanguage{french}
\setotherlanguage[variant=uk]{english}
\author{Rasmus}
\date{\today}
\title{test xetex}
\hypersetup{
 pdfauthor={Rasmus},
 pdftitle={test xetex},
 pdfkeywords={},
 pdfsubject={},
 pdfcreator={Emacs 25.0.50.1 (Org mode 8.3beta)}, 
 pdflang={British}}
\begin{document}

\maketitle
\tableofcontents


\section{add polyglossia}
\label{sec:orgheadline1}
\begin{verbatim}
(add-to-list 'org-latex-packages-alist
  '(AUTO, french polyglossia nil (lualatex xelatex)))
\end{verbatim}
\end{document}


-- 
Dung makes an excellent fertilizer
From 96dcb2ab15ddfce1f95560f49076187508b2ef43 Mon Sep 17 00:00:00 2001
From: Rasmus ras...@gmx.us
Date: Wed, 8 Jul 2015 14:44:56 +0200
Subject: [PATCH 09/10] ox-latex: Support TeX variants

* org.el (org-latex-default-packages-alist): Only use inputenc
and fontenc in pdftex.
* ox-latex.el (latex): Add :latex-tex-variant.
(org-latex-variant): New defcustom.
(org-latex-variants): New defconst.
(org-latex--remove-packages): New function.
(org-latex-template): Use new function.
(org-latex-pdf-process): Update to use %latex shorthand.
(org-latex-compile): Check and use intended compiler.

Suggested-by: Suvayu Ali fatkasuvayu+li...@gmail.com
http://permalink.gmane.org/gmane.emacs.orgmode/98921
---
 lisp/org.el  |   4 +-
 lisp/ox-latex.el | 133 ---
 2 files changed, 89 insertions(+), 48 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index f10ccf9..2721646 100755
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -4069,8 +4069,8 @@ header, or they will be appended.
 	  (default-value var)))
 
 (defcustom org-latex-default-packages-alist
-  '((AUTO inputenc  t)
-(T1   fontenc   t)
+  '((AUTO inputenc  t (pdflatex))
+(T1   fontenc   t (pdflatex))
 ( graphicx  t)
 ( grffile   t)
 ( longtable nil)
diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index 0851066..8c1cd9f 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -144,6 +144,7 @@
 (:latex-text-markup-alist nil nil org-latex-text-markup-alist)
 (:latex-title-command nil nil org-latex-title-command)
 (:latex-toc-command nil nil org-latex-toc-command)
+(:latex-variant LATEX_VARIANT nil org-latex-variant)
 ;; Redefine regular options.
 (:date DATE nil \\today parse)))
 
@@ -395,6 +396,28 @@ references.
   :version 25.1
   :package-version '(Org . 8.3))
 
+(defcustom org-latex-variant pdflatex
+  Tex variant to use.
+  :group 'org-export-latex
+  :type '(choice
+	  (cons :tag pdfLaTeX pdflatex)
+	  (cons :tag XeLaTeX  xelatex)
+	  (cons :tag luaLaTeX lualatex))
+  :version 25.1
+  :package-version '(Org . 8.3))
+
+(defcustom org-latex-variant-file-string %% -*- LaTeX-command: %s -*-\n
+  Variant format-string written to file.
+Default value is a local variable for AUCTeX.
+  :group 'org-export-latex
+  :type 'string
+  :version 25.1
+  :package-version '(Org . 8.3)
+  )
+
+(defconst org-latex-variants '(pdflatex xelatex lualatex)
+  Known LaTeX variants.)
+
  Preamble
 
 (defcustom org-latex-default-class article
@@ -1032,14 +1055,15 @@ during latex export it will output
  Compilation
 
 (defcustom org-latex-pdf-process
-  '(pdflatex -interaction nonstopmode -output-directory %o %f
-pdflatex -interaction nonstopmode -output-directory %o %f
-pdflatex -interaction nonstopmode -output-directory %o %f)
+  '(%latex -interaction nonstopmode -output-directory %o %f
+%latex -interaction nonstopmode -output-directory %o %f
+%latex -interaction nonstopmode -output-directory %o %f)
   

Re: [O] Time-zone in dates

2015-07-08 Thread Eric S Fraga
On Wednesday,  8 Jul 2015 at 11:16, Russell Adams wrote:

[...]

 Then would you store the time in UTC only, or support a full timestamp
 that included timezone?

 Finally when being displayed they can use the user's $TZ by default,
 and maybe a suffix of @ TZ inside the date syntax?

The ideal implementation, in my opinion, would have time stamps defined
 stored with time zone information, as given by the user when creating
them (although this could default to UTC, say, if not present in the
time stamp) but displayed according to the user's $TZ (or overridden
with emacs variable) in cases like agenda views.

For upwards compatibility, however, it might be best if time stamps with
no time zone information be considered to be at the user's timezone,
as it is now.

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.1, Org release_8.3beta-1260-gcedef7



Re: [O] org-mode, file-link, tramp, and smb domain

2015-07-08 Thread Eric S Fraga
On Wednesday,  8 Jul 2015 at 18:08, Dov Grobgeld wrote:
 Hello,

 In tramp the syntax for specifying a domain in a smb link is by using a
 percentage sign [1]

 //smb:user%DOMAIN@host:D/path/

 but when trying to use this together with the org-mode file: link the
 result is that it changes %D to ^M (control-M). Similar results are gotten
 with other characters after the percentage sign. (If the letter is not in
 the hexadecimal range, ^@ (null) is received). Even %% does not escape the
 percentage sign.

 Is there any easy workaround?

Maybe encode the % using %25 (hex value for %) so ... user%25DOMAIN@ ...?

Untested, mind you!

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.1, Org release_8.3beta-1260-gcedef7



Re: [O] Time-zone in dates

2015-07-08 Thread Titus von der Malsburg

On 2015-07-08 Wed 09:40, Eric S Fraga wrote:
 On Wednesday,  8 Jul 2015 at 11:16, Russell Adams wrote:

 [...]

 Then would you store the time in UTC only, or support a full timestamp
 that included timezone?

 Finally when being displayed they can use the user's $TZ by default,
 and maybe a suffix of @ TZ inside the date syntax?

 The ideal implementation, in my opinion, would have time stamps defined
  stored with time zone information, as given by the user when creating
 them (although this could default to UTC, say, if not present in the
 time stamp) but displayed according to the user's $TZ (or overridden
 with emacs variable) in cases like agenda views.

I like this proposal because it solves the problem at hand (as far as I
can tell) but isn’t over-engineered.  I also like that the date string
that the user sees would be the string stored in the file, at least in
the default case (non-agenda view).  The mostly literal display of files
is what sets org-mode apart from other outlines because that allows
users to take full advantage of Emacs’ powerful text editing
capabilities.

 For upwards compatibility, however, it might be best if time stamps with
 no time zone information be considered to be at the user's timezone,
 as it is now.

This point is important.  Whatever the solution is it should not break
documents and workflows for users who don’t care about time zones.  I
agree that time zones are important for some people but let’s face it,
org-mode made it thus far without support time zones, which suggests
that it’s not that big of a deal for most users.

  Titus



signature.asc
Description: PGP signature


Re: [O] Tables recently stopped aligning

2015-07-08 Thread William Denton
Thanks for locating this.  I don't know enough about Org's workings to see what 
in the change introduced the bug, but something did go wrong, and column widths 
+ table alignments are broken.  I hope someone can fix it!


Bill

On 7 July 2015, Nick Dokos wrote:


William Denton w...@pobox.com writes:


Last week I got caught up on a week or two of Emacs and Org
development (I run both from development trees) and some tables
stopped aligning.  I worked one down to five lines:

https://gist.github.com/wdenton/ab890c36090cd4048d49

With Org compiled from the dev tree in Git, when I load that file
(align.org) and hit C-c C-c, it doesn't align.  emacs -Q loads Org
8.2.10 (from the Emacs source) and it does align.

Does it work for others?  I assume it does---surely if other people
noticed this problem they'd have reported it already.



I can reproduce it with release_8.3beta-1274-gc76fef.
I bisected it to the following commit:

--8---cut here---start-8---
6d60138260d54bf8403b9c87155682447808335e is the first bad commit
commit 6d60138260d54bf8403b9c87155682447808335e
Author: Nicolas Goaziou m...@nicolasgoaziou.fr
Date:   Sun Jun 28 15:45:31 2015 +0200

   org-table: Do not modify buffer needlessly when aligning table

   * lisp/org-table.el (org-table-align): Compare new table with old one
 before replacing it.  Only replace modified lines.

:04 04 2ef4220238baf6508c5de7270b6ac37733ac0934 
f7d7ff100f0fdaee2ddab08b3514908d6d7643a0 M  lisp
--8---cut here---end---8---




--
William Denton ↔  Toronto, Canada ↔  https://www.miskatonic.org/