[O] Avoiding `intangible'

2015-04-15 Thread Stefan Monnier
I'm on a crusade to eradicate the `intangible' property, which happens
to rub me the wrong way because it's implemented at too-low a level (it
affects every point movement) which incurs a significant performance
penalty (even when not used) and affects a lot of code which then
needs to be fixed by binding inhibit-point-motion-hooks (which I'm
considering defaulting to t).

So I'd like to install the patch below.  Any objection?  The `invisible'
property already ensures that the command loop moves point away from
those overlays, so the `intangible' property should not be needed there
(tho I don't use Org enough to know how to test it).


Stefan


diff --git a/lisp/org/org-agenda.el b/lisp/org/org-agenda.el
index 8f7611f..bac8206 100644
--- a/lisp/org/org-agenda.el
+++ b/lisp/org/org-agenda.el
@@ -3847,8 +3847,7 @@ dimming them."
  e (point-at-eol)
  ov (make-overlay b e))
(if invis1
-   (progn (overlay-put ov 'invisible t)
-  (overlay-put ov 'intangible t))
+(overlay-put ov 'invisible t)
  (overlay-put ov 'face 'org-agenda-dimmed-todo-face))
(overlay-put ov 'org-type 'org-blocked-todo))
   (when (org-called-interactively-p 'interactive)
diff --git a/lisp/org/org-colview.el b/lisp/org/org-colview.el
index e14849f..2587aad 100644
--- a/lisp/org/org-colview.el
+++ b/lisp/org/org-colview.el
@@ -250,7 +250,6 @@ This is the compiled version of the format.")
  (setq ov (org-columns-new-overlay beg (point-at-eol)))
  (overlay-put ov 'invisible t)
  (overlay-put ov 'keymap org-columns-map)
- (overlay-put ov 'intangible t)
  (overlay-put ov 'line-prefix "")
  (overlay-put ov 'wrap-prefix "")
  (push ov org-columns-overlays)



Re: [O] Target and link text normalised to `orgtargetn'

2015-04-15 Thread Suvayu Ali
Hi Rasmus,

On Thu, Apr 16, 2015 at 12:57:46AM +0200, Rasmus wrote:
> 
> Could you try the attached patches and see if they solve your issues?

Seems to work nicely.  I'll keep using them rest of the week.

Thanks,  :)

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] Target and link text normalised to `orgtargetn'

2015-04-15 Thread Rasmus
Hi,

Could you try the attached patches and see if they solve your issues?

Thanks,
Rasmus

-- 
C is for Cookie
>From 8951c689a7812d6557ba65888e549013814e5f8a Mon Sep 17 00:00:00 2001
From: Rasmus 
Date: Wed, 15 Apr 2015 21:50:53 +0200
Subject: [PATCH 2/2] ox: Change label naming scheme

* ox.el (org-export-get-reference): Change labeling scheme.

160820bc94 and later changed the label naming scheme to follow types.
This commit maps to types to more standard names, e.g. 'headline' to
'sec'.
---
 lisp/ox.el | 13 +++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/lisp/ox.el b/lisp/ox.el
index d6dcc82..f7d0ef5 100644
--- a/lisp/ox.el
+++ b/lisp/ox.el
@@ -4149,9 +4149,18 @@ alphanumeric characters only."
 		 h
 (or (gethash datum cache)
 	(puthash datum
-		 (format "org%s%d"
+		 (format "%s:%d"
 			 (if type
-			 (replace-regexp-in-string "-" "" (symbol-name type))
+			 (case type
+			   (headline "sec")
+			   (paragraph
+(if (org-element-property :caption datum)
+"fig" "paragraph"))
+			   (latex-environment "eq")
+			   (table "tbl")
+			   (otherwise
+(replace-regexp-in-string "-" ""
+			  (symbol-name type
 			   "secondarystring")
 			 (incf (gethash type cache 0)))
 		 cache
-- 
2.3.5

>From a01e6759a6a016fd4c684eaaa56544d8507c897f Mon Sep 17 00:00:00 2001
From: Rasmus 
Date: Wed, 15 Apr 2015 21:46:57 +0200
Subject: [PATCH 1/2] ox-latex: Wider user-label support

* ox-latex.el (org-latex--label): Add user-labels for targets and
  radio-target.
(org-latex--wrap-label, org-latex-link, org-latex-target)
(org-latex-radio-target): Use org-latex--label.
---
 lisp/ox-latex.el | 15 ---
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index 61d16b1..b22b0a7 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -1056,9 +1056,10 @@ return a unique label.
 Eventually, if FULL is non-nil, wrap label within \"\\label{}\"."
   (let* ((user-label
 	  (org-element-property
-	   (if (memq (org-element-type element) '(headline inlinetask))
-	   :CUSTOM_ID
-	 :name)
+	   (case (org-element-type element)
+	 ((headline inlinetask) :CUSTOM_ID)
+	 ((target radio-target) :value)
+	 (otherwise :name))
 	   element))
 	 (label
 	  (and (or user-label force)
@@ -1176,7 +1177,7 @@ should not be used for floats.  See
   (if (not (and (org-string-nw-p output) (org-element-property :name element)))
   output
 (concat (format "\\phantomsection\n\\label{%s}\n"
-		(org-export-get-reference element info))
+		(org-latex--label element info))
 	output)))
 
 (defun org-latex--text-markup (text markup info)
@@ -2088,7 +2089,7 @@ INFO is a plist holding contextual information.  See
   (let ((destination (org-export-resolve-radio-link link info)))
 	(if (not destination) desc
 	  (format "\\hyperref[%s]{%s}"
-		  (org-export-get-reference destination info)
+		  (org-latex--label destination info)
 		  desc
  ;; Links pointing to a headline: Find destination and build
  ;; appropriate referencing command.
@@ -2416,7 +2417,7 @@ holding contextual information."
   "Transcode a RADIO-TARGET object from Org to LaTeX.
 TEXT is the text of the target.  INFO is a plist holding
 contextual information."
-  (format "\\label{%s}%s" (org-export-get-reference radio-target info) text))
+  (format "\\label{%s}%s" (org-latex--label radio-target info) text))
 
 
  Section
@@ -3029,7 +3030,7 @@ a communication channel."
   "Transcode a TARGET object from Org to LaTeX.
 CONTENTS is nil.  INFO is a plist holding contextual
 information."
-  (format "\\label{%s}" (org-export-get-reference target info)))
+  (format "\\label{%s}" (org-latex--label target info)))
 
 
  Timestamp
-- 
2.3.5



Re: [O] HTML + RDFa export/publishing ?

2015-04-15 Thread John Kitchin
Can you give us an example of what you are trying to do? I don't think
org-mode supports this rich of behavior out of the box, but see
http://kitchingroup.cheme.cmu.edu/blog/2015/02/05/Extending-the-org-mode-link-syntax-with-attributes/
for an example idea of what you could imagine doing with a link type
approach that could be inline with text.

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 Wed, Apr 15, 2015 at 11:02 AM, Olivier Berger <
olivier.ber...@telecom-sudparis.eu> wrote:

> Hi.
>
> I'd like to create a publishing project to export HTML pages, and I'd
> like to use org-mode syntax for authoring, and I'd like to embed RDFa
> meta-data inside the generated HTML.
>
> I'm wondering if anyone has investigated a mean in org-mode to embed
> such meta-data.
>
> I kinda imagine properties may be used for this, but I'm not so much
> familiar with using org-mode for storing structured data...
>
> Maybe POSH is the answer, but org-mode syntax and editing modes are so
> cool ;)
>
> Thanks in advance.
>
> Best regards,
> --
> Olivier BERGER
> http://www-public.telecom-sudparis.eu/~berger_o/ - OpenPGP-Id:
> 2048R/5819D7E8
> Ingenieur Recherche - Dept INF
> Institut Mines-Telecom, Telecom SudParis, Evry (France)
>
>
>


[O] HTML + RDFa export/publishing ?

2015-04-15 Thread Olivier Berger
Hi.

I'd like to create a publishing project to export HTML pages, and I'd
like to use org-mode syntax for authoring, and I'd like to embed RDFa
meta-data inside the generated HTML.

I'm wondering if anyone has investigated a mean in org-mode to embed
such meta-data.

I kinda imagine properties may be used for this, but I'm not so much
familiar with using org-mode for storing structured data...

Maybe POSH is the answer, but org-mode syntax and editing modes are so
cool ;)

Thanks in advance.

Best regards,
-- 
Olivier BERGER 
http://www-public.telecom-sudparis.eu/~berger_o/ - OpenPGP-Id: 2048R/5819D7E8
Ingenieur Recherche - Dept INF
Institut Mines-Telecom, Telecom SudParis, Evry (France)




Re: [O] Beamer figure width

2015-04-15 Thread Josiah Schwab
Hi Ken,

> I'm having trouble specifying image sizes in Beamer. I am using the
> following code. Is this correct syntax?
>
> * Foo
> ** Bar
> *** Baz
> #+ATTR_LATEX: height=\textheight
> [[./map.png]]

Instead, use

#+ATTR_LATEX: :height \textheight

See the subheading "Images in LaTeX export" on

http://orgmode.org/manual/LaTeX-specific-attributes.html

Best,
Josiah



Re: [O] Beamer figure width

2015-04-15 Thread Andreas Leha
Hi Ken,

Ken Mankoff  writes:
> I'm having trouble specifying image sizes in Beamer. I am using the following 
> code. Is this correct syntax?
>
> * Foo
> ** Bar
> *** Baz
> #+ATTR_LATEX: height=\textheight
> [[./map.png]]
>

I think that should be 
#+ATTR_LATEX: :height \textheight

Andreas




[O] Beamer figure width

2015-04-15 Thread Ken Mankoff

I'm having trouble specifying image sizes in Beamer. I am using the following 
code. Is this correct syntax?

* Foo
** Bar
*** Baz
#+ATTR_LATEX: height=\textheight
[[./map.png]]

It exports to:

\section{Foo}
\label{sec-1}
\subsection{Bar}
\label{sec-1-1}
\begin{frame}[label=sec-1-1-1]{Baz}
\includegraphics[width=.9\linewidth]{./map.png}
\end{frame}

  -k.



Re: [O] Verbatim inverted commas?

2015-04-15 Thread Loris Bennett
Rasmus  writes:

> "Loris Bennett"  writes:
>
>> Rasmus  writes:
>>
>>> "Loris Bennett"  writes:
>>>
 Hi,

 I am writing a beamer presentation and would like to have the following
 exported in a monospaced font:

   sinfo -elo "%30N %.5D %9P %11T %.6m %20E"

 However, if I do

   =sinfo -elo "%30N %.5D %9P %11T %.6m %20E"=

 the second pair of inverted commas causes the markup to fail
 and the entire string, equals signs and all, is exported.

 Is there some way I can escape the inverted commas to get this to work?
>>>
>>> If inline use:
>>>
>>>~sinfo -elo "%30N %.5D %9P %11T %.6m %20E"​~
>>>
>>> Note the zero width space.  It should work with xelatex.  Otherwise remove
>>> it with a filter.
>>>
>>> If it's in its own line you could use
>>>
>>> #+BEGIN_EXAMPLE
>>> sinfo -elo "%30N %.5D %9P %11T %.6m %20E"
>>> #+END_EXAMPLE
>>>
>>> Hope it helps,
>>> Rasmus
>>
>> I'm actually using it as a heading:
>>
>>  =sinfo -elo "%30N %.5D %9P %11T %.6m %20E"=
>>
>> However, I've already tried using ~, but this doesn't work either.
>
> This works for me if using xelatex:
>
> * =sinfo -elo "%30N %.5D %9P %11T %.6m %20E"​=
>
> —Rasmus

I tried both adding the following to my org file:

,-
| #+BEGIN_SRC emacs-lisp :exports results :results silent
|   (setq org-latex-pdf-process
| '("xelatex -shell-escape -interaction nonstopmode -output-directory 
%o %f"))
| #+END_SRC
`-

and running xelatex directly in the shell on the tex file, but neither
worked for me.

Cheers,

Loris

-- 
Dr. Loris Bennett (Mr.)
ZEDAT, Freie Universität Berlin Email loris.benn...@fu-berlin.de




Re: [O] Verbatim inverted commas?

2015-04-15 Thread Rasmus
"Loris Bennett"  writes:

> Rasmus  writes:
>
>> "Loris Bennett"  writes:
>>
>>> Hi,
>>>
>>> I am writing a beamer presentation and would like to have the following
>>> exported in a monospaced font:
>>>
>>>   sinfo -elo "%30N %.5D %9P %11T %.6m %20E"
>>>
>>> However, if I do
>>>
>>>   =sinfo -elo "%30N %.5D %9P %11T %.6m %20E"=
>>>
>>> the second pair of inverted commas causes the markup to fail
>>> and the entire string, equals signs and all, is exported.
>>>
>>> Is there some way I can escape the inverted commas to get this to work?
>>
>> If inline use:
>>
>>~sinfo -elo "%30N %.5D %9P %11T %.6m %20E"​~
>>
>> Note the zero width space.  It should work with xelatex.  Otherwise remove
>> it with a filter.
>>
>> If it's in its own line you could use
>>
>> #+BEGIN_EXAMPLE
>> sinfo -elo "%30N %.5D %9P %11T %.6m %20E"
>> #+END_EXAMPLE
>>
>> Hope it helps,
>> Rasmus
>
> I'm actually using it as a heading:
>
>  =sinfo -elo "%30N %.5D %9P %11T %.6m %20E"=
>
> However, I've already tried using ~, but this doesn't work either.

This works for me if using xelatex:

* =sinfo -elo "%30N %.5D %9P %11T %.6m %20E"​=

—Rasmus

-- 
And I faced endless streams of vendor-approved Ikea furniture. . .




Re: [O] Verbatim inverted commas?

2015-04-15 Thread Loris Bennett
Andreas Leha  writes:

> Rasmus  writes:
>> "Loris Bennett"  writes:
>>
>>> Hi,
>>>
>>> I am writing a beamer presentation and would like to have the following
>>> exported in a monospaced font:
>>>
>>>   sinfo -elo "%30N %.5D %9P %11T %.6m %20E"
>>>
>>> However, if I do
>>>
>>>   =sinfo -elo "%30N %.5D %9P %11T %.6m %20E"=
>>>
>>> the second pair of inverted commas causes the markup to fail
>>> and the entire string, equals signs and all, is exported.
>>>
>>> Is there some way I can escape the inverted commas to get this to work?
>>
>> If inline use:
>>
>>~sinfo -elo "%30N %.5D %9P %11T %.6m %20E"​~
>>
>> Note the zero width space.  It should work with xelatex.  Otherwise remove
>> it with a filter.
>>
>
> You could also do sth like (untested):
>@@beamer:{\ttfamily @@sinfo -elo "%30N %.5D %9P %11T %.6m %20E"@@beamer:}@@
>
> Andreas

Thanks.  This works.

Cheers,

Loris

>> If it's in its own line you could use
>>
>> #+BEGIN_EXAMPLE
>> sinfo -elo "%30N %.5D %9P %11T %.6m %20E"
>> #+END_EXAMPLE
>>
>> Hope it helps,
>> Rasmus
>
>
>

-- 
Dr. Loris Bennett (Mr.)
ZEDAT, Freie Universität Berlin Email loris.benn...@fu-berlin.de




Re: [O] Verbatim inverted commas?

2015-04-15 Thread Loris Bennett
Rasmus  writes:

> "Loris Bennett"  writes:
>
>> Hi,
>>
>> I am writing a beamer presentation and would like to have the following
>> exported in a monospaced font:
>>
>>   sinfo -elo "%30N %.5D %9P %11T %.6m %20E"
>>
>> However, if I do
>>
>>   =sinfo -elo "%30N %.5D %9P %11T %.6m %20E"=
>>
>> the second pair of inverted commas causes the markup to fail
>> and the entire string, equals signs and all, is exported.
>>
>> Is there some way I can escape the inverted commas to get this to work?
>
> If inline use:
>
>~sinfo -elo "%30N %.5D %9P %11T %.6m %20E"​~
>
> Note the zero width space.  It should work with xelatex.  Otherwise remove
> it with a filter.
>
> If it's in its own line you could use
>
> #+BEGIN_EXAMPLE
> sinfo -elo "%30N %.5D %9P %11T %.6m %20E"
> #+END_EXAMPLE
>
> Hope it helps,
> Rasmus

I'm actually using it as a heading:

 =sinfo -elo "%30N %.5D %9P %11T %.6m %20E"=

However, I've already tried using ~, but this doesn't work either.

Cheers,

Loris

-- 
Dr. Loris Bennett (Mr.)
ZEDAT, Freie Universität Berlin Email loris.benn...@fu-berlin.de




Re: [O] Verbatim inverted commas?

2015-04-15 Thread Andreas Leha
Rasmus  writes:
> "Loris Bennett"  writes:
>
>> Hi,
>>
>> I am writing a beamer presentation and would like to have the following
>> exported in a monospaced font:
>>
>>   sinfo -elo "%30N %.5D %9P %11T %.6m %20E"
>>
>> However, if I do
>>
>>   =sinfo -elo "%30N %.5D %9P %11T %.6m %20E"=
>>
>> the second pair of inverted commas causes the markup to fail
>> and the entire string, equals signs and all, is exported.
>>
>> Is there some way I can escape the inverted commas to get this to work?
>
> If inline use:
>
>~sinfo -elo "%30N %.5D %9P %11T %.6m %20E"​~
>
> Note the zero width space.  It should work with xelatex.  Otherwise remove
> it with a filter.
>

You could also do sth like (untested):
   @@beamer:{\ttfamily @@sinfo -elo "%30N %.5D %9P %11T %.6m %20E"@@beamer:}@@

Andreas


> If it's in its own line you could use
>
> #+BEGIN_EXAMPLE
> sinfo -elo "%30N %.5D %9P %11T %.6m %20E"
> #+END_EXAMPLE
>
> Hope it helps,
> Rasmus




Re: [O] Question about org-publish-project-alist

2015-04-15 Thread Thomas Moyer
That was what finally worked. Thanks!

Tom
On Apr 14, 2015 9:49 AM, "Feng Shu"  wrote:

>
>
> (defvar base-dir "~/Documents/org/")
> (defvar pub-dir "~/Public/notes/")
>
> (setq org-publish-project-alist
>   `(("org"
>  :base-directory ,base-dir
>  :base-extension "org"
>  :publishing-directory ,pub-dir
>  :recursive t
>  :publishing-function org-html-publish-to-html
>  :exclude "level-..org"
>  )
> ("static"
>  :base-directory base-dir
>  :base-extension
> "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf"
>  :publishing-directory pub-dir
>  :recursive t
>  :publishing-function org-publish-attachment
>  )
> ("project-root" :components ("org" "static"
>
> --
>
>
>


Re: [O] multiple calendars

2015-04-15 Thread Gour

0xFAb <0x...@free.fr> writes:

> Does someone use multiple calendars ?
> I'd like to publish my tasks in my calendar and some tasks in some other
> calendars like one for my wife, another at office.

I do using similar setup...on the instance of my own ownCloud server I
created one commonuser for me & my wife and have separate calendars as well
as (org-)contacts for two of us and using org-vcard for contacts and
org-caldav for syncing of calendars.

On my Android phone, each one is in different color and at the org-mode side,
there is separate org file for each.

Here is the setup:

;; org-caldav
(require 'org-caldav)


;; store unique identifier
(setq org-icalendar-store-UID t)

;; The CalDAV URL with your full and primary email address at the end.
(setq org-caldav-url 
"https://owncloud.domain.tld/remote.php/caldav/calendars/commonuser";)

;; The name of your calendar, typically "Calendar" or similar
(setq org-caldav-calendar-id "my-calendar") ; my calendar

;; Local file that gets events from the server
(setq org-caldav-inbox "~/org/my-calendar.org")

(setq org-caldav-calendars
  '((:calendar-id "wife-calendar" :files ("~/org/my.org"
 "~/org/mywife-calendar.org")
  :inbox "~/org/mywife-calendar.org"
  :url 
"https://owncloud.domain.tld/remote.php/caldav/calendars/commonuser";)
(:calendar-id "my-calendar" :files ("~/org/my.org"
  "~/org/my-calendar.org")
  :inbox "~/org/my-calendar.org"
  :url 
"https://owncloud.domain.tld/remote.php/caldav/calendars/commonuser";)
)
  )


Sincerely,
Gour

-- 
>From wherever the mind wanders due to its flickering and unsteady 
nature, one must certainly withdraw it and bring it back under 
the control of the self.




[O] multiple calendars

2015-04-15 Thread 0xFAb
Hi,

Does someone use multiple calendars ?
I'd like to publish my tasks in my calendar and some tasks in some other
calendars like one for my wife, another at office.

Currently I use scpc into a webdav folder (ownCloud) and OrgMobile sync
it with GoogleCalendar. Utimatly I hope that ownCloud instances would
rule all my calendars and orgmode can duplicate by keywords...

Thanks,
FAb



Re: [O] Verbatim inverted commas?

2015-04-15 Thread Rasmus
"Loris Bennett"  writes:

> Hi,
>
> I am writing a beamer presentation and would like to have the following
> exported in a monospaced font:
>
>   sinfo -elo "%30N %.5D %9P %11T %.6m %20E"
>
> However, if I do
>
>   =sinfo -elo "%30N %.5D %9P %11T %.6m %20E"=
>
> the second pair of inverted commas causes the markup to fail
> and the entire string, equals signs and all, is exported.
>
> Is there some way I can escape the inverted commas to get this to work?

If inline use:

   ~sinfo -elo "%30N %.5D %9P %11T %.6m %20E"​~

Note the zero width space.  It should work with xelatex.  Otherwise remove
it with a filter.

If it's in its own line you could use

#+BEGIN_EXAMPLE
sinfo -elo "%30N %.5D %9P %11T %.6m %20E"
#+END_EXAMPLE

Hope it helps,
Rasmus

-- 
May the Force be with you




Re: [O] Colon in block name?

2015-04-15 Thread Loris Bennett
Nicolas Goaziou  writes:

> Hello,
>
> "Loris Bennett"  writes:
>
>> BTW, I'm still more interested in the colon thing ...
>
> Babel apparently supports (undocumented) "filename:reference" syntax for
> foreign references. In your case, "tab:my_data" is mistakenly seen as
> a reference to "my_data" in the file "tab".
>
> As a safety measure, I suggest not using colons in reference names.
>
>
> Regards,

Thanks for the information.  I'll probably use "tab~my_date".  As yet I
haven't noticed this trigger any other undocumented features ...

-- 
This signature is currently under construction.




[O] Verbatim inverted commas?

2015-04-15 Thread Loris Bennett
Hi,

I am writing a beamer presentation and would like to have the following
exported in a monospaced font:

  sinfo -elo "%30N %.5D %9P %11T %.6m %20E"

However, if I do

  =sinfo -elo "%30N %.5D %9P %11T %.6m %20E"=

the second pair of inverted commas causes the markup to fail
and the entire string, equals signs and all, is exported.

Is there some way I can escape the inverted commas to get this to work?

Cheers,

Loris

-- 
This signature is currently under construction.