[O] [Bug] org-open-at-point adds file+

2014-03-04 Thread Daimrod
Hello,

I think that since its recent rewrite, `org-open-at-point' adds 'file+'
before the name of the application before trying to find the correct
application.

For example the following link:
#+BEGIN_EXAMPLE
[[docview:foo.pdf]]
#+END_EXAMPLE
won't trigger the `org-docview-open' handler
because the following code:
#+BEGIN_SRC emacs-lisp
(or (let ((app (org-element-property :application context)))
 (nth 1 (assoc (concat file (and app (concat + 
app)))
   org-link-protocols)))
   #'org-open-file)
#+END_SRC
adds `file+' and then search in `org-link-protocols'.

-- 
Daimrod/Greg


signature.asc
Description: PGP signature


[O] org-element-context doesn't parse consistently link with spaces

2014-03-04 Thread Daimrod
Hello,

I think that there is a bug in `org-element-context' because it doesn't
seem to parse link with spaces consistently.

For example:
#+BEGIN_EXAMPLE
v
[[file:test 1 2 3]]
^
#+END_EXAMPLE
If the cursor is before the '1', then `org-element-context' will return:
#+BEGIN_EXAMPLE
(link (:type file :path test :raw-link file:test :application nil 
:search-option nil :begin 26 ...))
#+END_EXAMPLE
if the cursor is one or after the '1', then `org-element-context' will return:
#+BEGIN_EXAMPLE
(link (:type file :path test%201%202%203 :raw-link file:test%201%202%203 
:application nil :search-option nil :begin 1 ...))
#+END_EXAMPLE

Best,

-- 
Daimrod/Greg


signature.asc
Description: PGP signature


Re: [O] another blog exporter

2014-03-04 Thread Robert Klein
Hello,

thank you very much for your feedback.


On 02/10/2014 12:30 PM, Nicolas Goaziou wrote:
 Hello,
 
 Bastien b...@gnu.org writes:
 
 Somehow this calls for a way to let a backend use several affiliated
 keywords.  For example you would have:

 #+ATTR_HTML: :width 400px
 #+ATTR_BLOG: :lineno t
 
 Org already provided a syntax to number lines in source blocks. Couldn't
 it be used instead?
 
   #+begin_src emacs-lisp -n
   ...
   #+end_src
 

Thanks a lot, I didn't know about this feature. Now I use the -n/+n
flags.  When using -n flag the ATTR_BLOG attribute :firstline is used as
the first line number; the default is 1 as in the LaTeX exporter.


 and the exporter would take both into account, letting you to simply
 export to HTML without the need to add redundant information.

 Nicolas, did this cross your mind?  Or maybe this is already feasible?
 
 This is already feasible. See `org-beamer-plain-list' for an example.
 Both #+attr_latex and #+attr_beamer are read but the latter has
 precedence over the former.

I already use this, but I felt a need to document those attributes that
get extra treatment: wordpress uses class=alignleft instead of HTML
align=right  and I changed the style handling to support surrounding
double quotes ( :style margin: 9pt; background: red; )

Best regards
Robert




Re: [O] parser: verbatim or code?

2014-03-04 Thread Bastien
Hi Yasushi, Michael and Nicolas,

Michael Brand michael.ch.br...@gmail.com writes:

 The syntax for inline code snippets seems easier to read by human and
 to parse with ~ than with = because inline code snippets use ~
 less often than =. I avoid ~/ by using $HOME/ in my notes about
 shell and shell scripts. Some examples:

I've now fix those inconsistencies, both in the manual and in the
code.  I followed Michael suggestion to use ~code~ and =verbatim=.

We may need to update the way export backend treat this markup,
and try to be consistent here too.

Thanks,

-- 
 Bastien



Re: [O] [RFC] Move ox-koma-letter into core?

2014-03-04 Thread Bastien
Hi Viktor,

Viktor Rosenfeld listuse...@gmail.com writes:

 At this point, I'm considering to actually get proper legal advice
 about this form, because I'm not satisfied in the state of affairs
 where I have stopped participating in the Orgmode community because I
 do not understand the copyright assignment form.

Let us know how it goes.

Until your are 100% confident that signing the FSF paper is fine for
you, we won't consider moving ox-koma-letter.el into core.  (I fully
respect the decision *not* to sign the papers.)

Whether we should move ox-koma-letter.el into Org's core or into the
GNU ELPA archive is a separate issue, since both require that you sign
the papers.

Thanks,

-- 
 Bastien



Re: [O] Screencast of lispy.el with org-mode code base

2014-03-04 Thread Bastien
Hi Oleh,

Oleh ohwoeo...@gmail.com writes:

 I'm developing an Emacs minor mode called lispy (available at
 https://github.com/abo-abo/lispy and as lispy in MELPA).

It looks interesting -- the screencasts are nice.

One early neatpick: the name lispy does not help understanding
what the package is really about.  But maybe the package does a
lot and it's difficult to capture all what it does in a name.

Looking forwarding testing it,

-- 
 Bastien



Re: [O] verbatim and apostrophes

2014-03-04 Thread Bastien
Hi Alan,

Alan Schmitt alan.schm...@polytechnique.org writes:

 Is there a nice way to customize `org-emphasis-regexp-components'? It
 does not seem to be exposed to `customize-variable', and copying and
 tweaking its default value in my configuration file feels ugly.

Well, preventing users from shooting them in the foot is part of why
`org-emphasis-regexp-components' is not a custom variable (it used to
be, but that led to lots of confusion.)

I hope we can get rid of this variable one day or another.

In the meantime, copying and tweaking is the way to go...

HTH,

-- 
 Bastien



Re: [O] verbatim and apostrophes

2014-03-04 Thread Alan Schmitt
Hi Bastien,

Bastien b...@gnu.org writes:

 Hi Alan,

 Well, preventing users from shooting them in the foot is part of why
 `org-emphasis-regexp-components' is not a custom variable (it used to
 be, but that led to lots of confusion.)

 I hope we can get rid of this variable one day or another.

I don't see how to do it cleanly without some form of escaping (to allow
anything to be quoted), which goes against the verbatim idea.

A suggestion could be to allow any text inside the markers, except for
the marker itself which would need to be escaped. Escaping could take
the form of doubling the marker:

~foo bar~ -- foo bar
~foo ~~ bar~ -- foo ~ bar

As I've not thought this through, I'm pretty sure someone will find a
huge flaw in this suggestion.

Best,

Alan



Re: [O] Screencast of lispy.el with org-mode code base

2014-03-04 Thread Oleh
Hi Bastien,

 One early neatpick: the name lispy does not help understanding
 what the package is really about.  But maybe the package does a
 lot and it's difficult to capture all what it does in a name.

The package provides a key binding method that can work effectively
only for a Lisp-like language: Elisp, Scheme, Common Lisp and Clojure
all fit here.
The gist is that e.g. j will not self-insert when positioned at open
paren or after closing paren, but will instead move downwards list.

On top of that I've tacked on:

- my own type of Paredit: most functions are called from either
  side of the list and the result depends on the side.

- region manipulation based on sexps,
  e.g. j will extend/shrink region by a sexp forwards and k backwards.

- outline-minor-mode bindings
  `lispy-shifttab` (I) actually uses `org-overview` and `org-cycle`.

- IDE-like features (eval, eval-and-insert, inline doc, arglist,
  jump-to-tag and follow-to-definition)

- some refactoring support (defun-to-lambda, lambda-to-defun, inline-function,
  cond-to-ifs, ifs-to-cond, sexp-to-oneline, sexp-to-multiline,
string-to-oneline)

  I'm especially proud of the cond-to-ifs / ifs-to-cond stuff, because they
  (in theory and once properly debugged) preserve whitespace and comments
  and are invertible.

- misc stuff (bindings for edebug, multiple cursors, ediff-sexps)

  I'm quite fond of `lispy-ediff-regions` as well. Try it if you like
  `ediff-regions-linewise`.

So it's a bunch of stuff, all of it Lisp-related, hence lispy.

Btw, here's the new documentation: http://abo-abo.github.io/lispy/.
It's generated with org-mode export of this file:
https://raw.github.com/abo-abo/lispy/gh-pages/index.org.

Actually, I have a few questions on the org to HTML export of this document:

How do I make HTML links that refer to heading, e.g.
not http://abo-abo.github.io/lispy/#sec-3-1,
but http://abo-abo.github.io/lispy/#lispy-forward?

And is there a good method to put babel source blocks into a HTML table?
I'm just using #+HTML: at the moment and it's pretty ugly.

regards,
Oleh



Re: [O] link interfering with brackets when abbreviated

2014-03-04 Thread Sebastien Vauban
Samuel Wales wrote:
 On 3/3/14, Sebastien Vauban sva-n...@mygooglest.com wrote:
 [[http://dangerous-place.com][know they are links]].

 M-x visible-mode

 the whole point is that comments and footnote definitions obscure the
 fact that there is a link there.

 who wants to run visible-mode all the time?  that would defeat the
 purpose of link collapsing.

OK. I thought you were asking for conscious, on-the-fly appearance of
links.

 nobody is going to run it if there is no indication that there is
 a link there.

What type of indication do you have in mind?

Best regards,
  Seb

-- 
Sebastien Vauban



Re: [O] Blank page in LaTeX/PDF output

2014-03-04 Thread Peter Davis

On Mon, Mar 3, 2014, at 10:46 PM, John Hendy wrote:
[snip]
 On Mon, Mar 3, 2014 at 7:13 PM, Peter Davis p...@pfdstudio.com wrote:
 From my fiddling:
 - As-is produces 4 pages, blank 3rd
 - Commenting out the hyperref package does *not* produce a blank 3rd page
 - Using \section* does *not* product a blank 3rd page

Thanks, John. It certainly seems that hyperref is at least partially to
blame here. I'll have to check on what the developers consider a 3rd
party package. hyperref itself loads a bunch of other packages, so it
gets very complicated.

 I added a comment linking to Wikipedia's Linux penguin that I used as
 ./image.png, just to make sure it wasn't possibly related to errors
 related to no image being found.

I first saw the problem when I was using actual images, so I knew it
wasn't that.

 I wondered if it had something to do with the numbered sections being
 treated as links (since hyperref was the culprit package). I fiddled
 with removing \label{sec-n}, but that didn't have an effect. I
 wondered if that was triggering something due to it having links sort
 of ready for the TOC even though none is present... no idea!

Seems plausible.

 Anyway, as long as graphicx and hyperref are not considered 3rd
 party, I think you could still submit the report. You may be told
 that since there are overfull hbox and vbox's that it's not their
 problem, but I'd still expect the results to be the same with \section
 vs. \section*, and with[out] hyperref.

Thanks again, John. I'll look into this and report back whatever I find.

Best,
-pd

-- 
  Peter Davis
  www.techcurmudgeon.com
  www.timebums.com



[O] [RFC] Creole-style / Support for **emphasis**__within__**a word**

2014-03-04 Thread Jambunathan K

Nicolas

[RFC] Creole-style / Support for **emphasis**__within__**a word**

The attached files should speak for themselves.  Such an arrangement

a) Does not change the status quo AT ALL.
b) Provide more rope.

The patch is in the spirit of show and tell.  I will not provide a
formal patch.

That said, if I were to say Let's formalize this arrangement what will
you say?



.emacs.minimal.el
Description: application/emacs-lisp


emphasis.odt
Description: application/vnd.oasis.opendocument.text
#+OPTIONS: ':nil *:t -:t ::t :t H:3 \n:nil ^:t arch:headline
#+OPTIONS: author:nil c:nil creator:comment d:(not LOGBOOK) date:nil
#+OPTIONS: e:t email:nil f:t inline:t num:nil p:nil pri:nil prop:nil
#+OPTIONS: stat:t tags:t tasks:t tex:t timestamp:t toc:nil todo:t |:t
#+TITLE: a
#+DATE: 2014-03-04 Tue
#+AUTHOR: Jambunathan K
#+EMAIL: kjambunathan@debian-6.05
#+DESCRIPTION:
#+KEYWORDS:
#+LANGUAGE: en
#+SELECT_TAGS: export
#+EXCLUDE_TAGS: noexport
#+CREATOR: Emacs 24.3.50.33 (Org mode 8.2.5h)

Support for **emphasis**__within__**a word**. ==A proposal==.

* Headline 1

**bold**and**bold**//italic// __underline__==and==++strike-through++ plain text


[O] [RFC] Creole-style / Support for **emphasis**__within__**a word**

2014-03-04 Thread Jambunathan K

Nicolas

(Re-sent with the diff file)

[RFC] Creole-style / Support for **emphasis**__within__**a word**

The attached files should speak for themselves.  Such an arrangement

a) Does not change the status quo AT ALL.
b) Provide more rope.

The patch is in the spirit of show and tell.

That said, if I were to say Let's formalize this arrangement what will
you say?

#+OPTIONS: ':nil *:t -:t ::t :t H:3 \n:nil ^:t arch:headline
#+OPTIONS: author:nil c:nil creator:comment d:(not LOGBOOK) date:nil
#+OPTIONS: e:t email:nil f:t inline:t num:nil p:nil pri:nil prop:nil
#+OPTIONS: stat:t tags:t tasks:t tex:t timestamp:t toc:nil todo:t |:t
#+TITLE: a
#+DATE: 2014-03-04 Tue
#+AUTHOR: Jambunathan K
#+EMAIL: kjambunathan@debian-6.05
#+DESCRIPTION:
#+KEYWORDS:
#+LANGUAGE: en
#+SELECT_TAGS: export
#+EXCLUDE_TAGS: noexport
#+CREATOR: Emacs 24.3.50.33 (Org mode 8.2.5h)

Support for **emphasis**__within__**a word**. ==A proposal==.

* Headline 1

**bold**and**bold**//italic// __underline__==and==++strike-through++ plain text


emphasis.odt
Description: application/vnd.oasis.opendocument.text


.emacs.minimal.el
Description: application/emacs-lisp
diff --git a/lisp/org-element.el b/lisp/org-element.el
index 0faf1fd..131b442 100644
--- a/lisp/org-element.el
+++ b/lisp/org-element.el
@@ -2612,6 +2612,11 @@ Assume point is at the first star marker.
 CONTENTS is the contents of the object.
   (format *%s* contents))
 
+(defvar org-element--marker-type 
+  (loop for markers in  (mapcar 'car org-emphasis-alist)
+	for element-type in '(bold italic underline verbatim code strike-through)
+	collect (cons markers element-type)))
+
 (defun org-element-text-markup-successor ()
   Search for the next text-markup object.
 
@@ -2622,15 +2627,10 @@ and CDR is beginning position.
 (unless (bolp) (backward-char))
 (when (re-search-forward org-emph-re nil t)
   (let ((marker (match-string 3)))
-	(cons (cond
-	   ((equal marker *) 'bold)
-	   ((equal marker /) 'italic)
-	   ((equal marker _) 'underline)
-	   ((equal marker +) 'strike-through)
-	   ((equal marker ~) 'code)
-	   ((equal marker =) 'verbatim)
-	   (t (error Unknown marker at %d (match-beginning 3
-	  (match-beginning 2))
+	(cons
+	 (or (assoc-default marker org-element--marker-type)
+	 (error Unknown marker at %d (match-beginning 3)))
+	 (match-beginning 2))
 
 
  Code
diff --git a/lisp/org.el b/lisp/org.el
index f2bb99f..24f07f9 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -4191,10 +4191,14 @@ After a match, the match groups contain these elements:
 	   (body (nth 3 e))
 	   (nl (nth 4 e))
 	   (body1 (concat body *?))
-	   (markers (mapconcat 'car org-emphasis-alist ))
+	   (markers (mapconcat (lambda (em)
+ (regexp-quote (car em))
+ )
+			   org-emphasis-alist \\|))
 	   (vmarkers (mapconcat
-		  (lambda (x) (if (eq (nth 2 x) 'verbatim) (car x) ))
-		  org-emphasis-alist )))
+		  (lambda (x)
+			(regexp-quote (if (eq (nth 2 x) 'verbatim) (car x) )))
+		  org-emphasis-alist \\|)))
   ;; make sure special characters appear at the right position in the class
   (if (string-match \\^ markers)
 	  (setq markers (concat (replace-match  t t markers) ^)))
@@ -4211,7 +4215,7 @@ After a match, the match groups contain these elements:
   (setq org-emph-re
 	(concat \\([ pre ]\\|^\\)
 		\\(
-		\\([ markers ]\\)
+		\\( markers \\)
 		\\(
 		[^ border ]\\|
 		[^ border ]
@@ -4223,7 +4227,7 @@ After a match, the match groups contain these elements:
   (setq org-verbatim-re
 	(concat \\([ pre ]\\|^\\)
 		\\(
-		\\([ vmarkers ]\\)
+		\\( vmarkers \\)
 		\\(
 		[^ border ]\\|
 		[^ border ]


Re: [O] Namespace problem org-mode / Clojure

2014-03-04 Thread Soapy Smith
I installed the update and ran Volker's test code.  It works!  The
namespace is preserved from block-to-block.  Thank you Bastien!

I experimented with the :session option, however, I am now not sure I
understand how it is supposed to work.  I believed it would cause the
code block to switch namespaces with a unique session name, however, it
does not do this.  My older system (7.9 org) behaves the same.

Regards,
Greg



On Mon, 2014-03-03 at 21:35 -0500, Soapy Smith wrote:
 Hi Bastien-
 
 I will check it tomorrow and report.  Thank you!
 
 Regarding TODOs related to Clojure code blocks; where is the best place
 for them?
 
 Greg





[O] [RFC] Creole-style / Support for **emphasis**__within__**a word**

2014-03-04 Thread Jambunathan K

Nicolas

(Sorry for multiple posts.  `customize-save-variable' in the attached
minimal emacs -- which I foolishly added to the top of my .emacs --
wiped out all my customizations including IMAP and SMTP settings)

[RFC] Creole-style / Support for **emphasis**__within__**a word**

The attached files should speak for themselves.  Such an arrangement

a) Does not change the status quo AT ALL.
b) Provide more rope.

The patch is in the spirit of show and tell.  I will not provide a
formal patch.

What about formalizing such an arrangement...

#+OPTIONS: ':nil *:t -:t ::t :t H:3 \n:nil ^:t arch:headline
#+OPTIONS: author:nil c:nil creator:comment d:(not LOGBOOK) date:nil
#+OPTIONS: e:t email:nil f:t inline:t num:nil p:nil pri:nil prop:nil
#+OPTIONS: stat:t tags:t tasks:t tex:t timestamp:t toc:nil todo:t |:t
#+TITLE: a
#+DATE: 2014-03-04 Tue
#+AUTHOR: Jambunathan K
#+EMAIL: kjambunathan@debian-6.05
#+DESCRIPTION:
#+KEYWORDS:
#+LANGUAGE: en
#+SELECT_TAGS: export
#+EXCLUDE_TAGS: noexport
#+CREATOR: Emacs 24.3.50.33 (Org mode 8.2.5h)

Support for **emphasis**__within__**a word**. ==A proposal==.

* Headline 1

**bold**and**bold**//italic// __underline__==and==++strike-through++ plain text


emphasis.odt
Description: application/vnd.oasis.opendocument.text


.emacs.minimal.el
Description: application/emacs-lisp
diff --git a/lisp/org-element.el b/lisp/org-element.el
index 0faf1fd..131b442 100644
--- a/lisp/org-element.el
+++ b/lisp/org-element.el
@@ -2612,6 +2612,11 @@ Assume point is at the first star marker.
 CONTENTS is the contents of the object.
   (format *%s* contents))
 
+(defvar org-element--marker-type 
+  (loop for markers in  (mapcar 'car org-emphasis-alist)
+	for element-type in '(bold italic underline verbatim code strike-through)
+	collect (cons markers element-type)))
+
 (defun org-element-text-markup-successor ()
   Search for the next text-markup object.
 
@@ -2622,15 +2627,10 @@ and CDR is beginning position.
 (unless (bolp) (backward-char))
 (when (re-search-forward org-emph-re nil t)
   (let ((marker (match-string 3)))
-	(cons (cond
-	   ((equal marker *) 'bold)
-	   ((equal marker /) 'italic)
-	   ((equal marker _) 'underline)
-	   ((equal marker +) 'strike-through)
-	   ((equal marker ~) 'code)
-	   ((equal marker =) 'verbatim)
-	   (t (error Unknown marker at %d (match-beginning 3
-	  (match-beginning 2))
+	(cons
+	 (or (assoc-default marker org-element--marker-type)
+	 (error Unknown marker at %d (match-beginning 3)))
+	 (match-beginning 2))
 
 
  Code
diff --git a/lisp/org.el b/lisp/org.el
index f2bb99f..24f07f9 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -4191,10 +4191,14 @@ After a match, the match groups contain these elements:
 	   (body (nth 3 e))
 	   (nl (nth 4 e))
 	   (body1 (concat body *?))
-	   (markers (mapconcat 'car org-emphasis-alist ))
+	   (markers (mapconcat (lambda (em)
+ (regexp-quote (car em))
+ )
+			   org-emphasis-alist \\|))
 	   (vmarkers (mapconcat
-		  (lambda (x) (if (eq (nth 2 x) 'verbatim) (car x) ))
-		  org-emphasis-alist )))
+		  (lambda (x)
+			(regexp-quote (if (eq (nth 2 x) 'verbatim) (car x) )))
+		  org-emphasis-alist \\|)))
   ;; make sure special characters appear at the right position in the class
   (if (string-match \\^ markers)
 	  (setq markers (concat (replace-match  t t markers) ^)))
@@ -4211,7 +4215,7 @@ After a match, the match groups contain these elements:
   (setq org-emph-re
 	(concat \\([ pre ]\\|^\\)
 		\\(
-		\\([ markers ]\\)
+		\\( markers \\)
 		\\(
 		[^ border ]\\|
 		[^ border ]
@@ -4223,7 +4227,7 @@ After a match, the match groups contain these elements:
   (setq org-verbatim-re
 	(concat \\([ pre ]\\|^\\)
 		\\(
-		\\([ vmarkers ]\\)
+		\\( vmarkers \\)
 		\\(
 		[^ border ]\\|
 		[^ border ]


[O] [Bug] org-open-at-point does not work inside properties block

2014-03-04 Thread Michael Strey
Hello,

Since some days links in properties blocks do not work any more.  With
org-open-at-point on the URL in the following block

#+begin_src org
** Media Broadcast
:PROPERTIES:
:KIND: organisation
:URL:  http://www.media-broadcast.com
:END:
#+end_src

I get the message No link found.  The same link outside the PROPERTIES
block opens the browser like expected.

Best regards
-- 
Michael Strey   
http://www.strey.biz




Re: [O] How to ensure that (org-get-heading) is pretty?

2014-03-04 Thread Sebastien Vauban
Oleh wrote:
 I'm working on a helm interface to org headings.

Doesn't it already exist?  What about:

  ╭
  │ helm-org-headlines is an interactive autoloaded compiled Lisp function in
  │ `helm-org.el'.
  │ 
  │ It is bound to menu-bar tools Helm Org Org headlines.
  │ 
  │ (helm-org-headlines)
  │ 
  │ Preconfigured helm to show org headlines.
  ╰

Do you want to write something else?

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Screencast of lispy.el with org-mode code base

2014-03-04 Thread Sebastien Vauban
Oleh wrote:
 Actually, I have a few questions on the org to HTML export of this document:

 How do I make HTML links that refer to heading, e.g.
 not http://abo-abo.github.io/lispy/#sec-3-1,
 but http://abo-abo.github.io/lispy/#lispy-forward?

Isn't this a use case for CUSTOM_ID (instead of ID)?  In this case,
you'd name it `lispy-forward'...

Best regards,
  Seb

-- 
Sebastien Vauban




[O] Parser - which values are possible for `archivedp'?

2014-03-04 Thread Thorsten Jolitz

Hi List, 

the name of headline attribute `archivedp' suggests its just a boolean
nil/t variable, but in parse trees I see e.g. a list as value 

,---
| :archivedp (ARCHIVE)
`---

and I vaguely remember that I have seen different symbols as values of
this attribute too. 

So what do I have to expect as values here? A list of strings or nil? Or
something else too? Whatever is defined in 

,---
| org-archive-tag is a variable defined in `org.el'.
| Its value is ARCHIVE
`---

? 

PS 

If the tag is just a string like in this case, why is it shown as
list in the parse tree?

-- 
cheers,
Thorsten





Re: [O] Screencast of lispy.el with org-mode code base

2014-03-04 Thread Oleh
 How do I make HTML links that refer to heading, e.g.
 not http://abo-abo.github.io/lispy/#sec-3-1,
 but http://abo-abo.github.io/lispy/#lispy-forward?

 Isn't this a use case for CUSTOM_ID (instead of ID)?  In this case,
 you'd name it `lispy-forward'...


Thanks again, Sebastien,

I'm off to make an epic macro to replace all those ID with CUSTOM_ID.

regards,
Oleh



Re: [O] Parser - which values are possible for `archivedp'?

2014-03-04 Thread Nick Dokos
Thorsten Jolitz tjol...@gmail.com writes:

 Hi List, 

 the name of headline attribute `archivedp' suggests its just a boolean
 nil/t variable, but in parse trees I see e.g. a list as value 

 ,---
 | :archivedp (ARCHIVE)
 `---

 and I vaguely remember that I have seen different symbols as values of
 this attribute too. 

 So what do I have to expect as values here? A list of strings or nil? Or
 something else too? Whatever is defined in 

 ,---
 | org-archive-tag is a variable defined in `org.el'.
 | Its value is ARCHIVE
 `---

 ? 

 PS 

 If the tag is just a string like in this case, why is it shown as
 list in the parse tree?

It is set like this
  (let
   ...
   (archivedp (member org-archive-tag tags))
   ...)

in org-element.el. It is effectively a boolean, but there is no
need to reduce the return value of ``member'' to t if it is non-nil:

,
|member is a built-in function in `C source code'.
| 
| (member ELT LIST)
| 
| Return non-nil if ELT is an element of LIST.  Comparison done with `equal'.
`

So if non-nil, it will be a list of tags, starting with the value of
org-archive-tag. AFAICT, the rest of the tags can be arbitrary.

-- 
Nick




Re: [O] Parser - which values are possible for `archivedp'?

2014-03-04 Thread Thorsten Jolitz
Nick Dokos ndo...@gmail.com writes:

 Thorsten Jolitz tjol...@gmail.com writes:

 Hi List, 

 the name of headline attribute `archivedp' suggests its just a boolean
 nil/t variable, but in parse trees I see e.g. a list as value 

 ,---
 | :archivedp (ARCHIVE)
 `---

 and I vaguely remember that I have seen different symbols as values of
 this attribute too. 

 So what do I have to expect as values here? A list of strings or nil? Or
 something else too? Whatever is defined in 

 ,---
 | org-archive-tag is a variable defined in `org.el'.
 | Its value is ARCHIVE
 `---

 ? 

 PS 

 If the tag is just a string like in this case, why is it shown as
 list in the parse tree?

 It is set like this
   (let
...
(archivedp (member org-archive-tag tags))
...)

 in org-element.el. It is effectively a boolean, but there is no
 need to reduce the return value of ``member'' to t if it is non-nil:

 ,
 |member is a built-in function in `C source code'.
 | 
 | (member ELT LIST)
 | 
 | Return non-nil if ELT is an element of LIST.  Comparison done with
 | equal'.
 `

 So if non-nil, it will be a list of tags, starting with the value of
 org-archive-tag. AFAICT, the rest of the tags can be arbitrary.


** Second Level 2 :tag:my:ARCHIVE:


,
| :tags (tag my) [...] :archivedp (ARCHIVE)
`

-- 
cheers,
Thorsten




Re: [O] Parser - which values are possible for `archivedp'?

2014-03-04 Thread Thorsten Jolitz
Nick Dokos ndo...@gmail.com writes:

 Thorsten Jolitz tjol...@gmail.com writes:

 Hi List, 

 the name of headline attribute `archivedp' suggests its just a boolean
 nil/t variable, but in parse trees I see e.g. a list as value 

 ,---
 | :archivedp (ARCHIVE)
 `---

 and I vaguely remember that I have seen different symbols as values of
 this attribute too. 

 So what do I have to expect as values here? A list of strings or nil? Or
 something else too? Whatever is defined in 

 ,---
 | org-archive-tag is a variable defined in `org.el'.
 | Its value is ARCHIVE
 `---

 ? 

 PS 

 If the tag is just a string like in this case, why is it shown as
 list in the parse tree?

 It is set like this
   (let
...
(archivedp (member org-archive-tag tags))
...)

 in org-element.el. It is effectively a boolean, but there is no
 need to reduce the return value of ``member'' to t if it is non-nil:

 ,
 |member is a built-in function in `C source code'.
 | 
 | (member ELT LIST)
 | 
 | Return non-nil if ELT is an element of LIST.  Comparison done with
 | equal'.
 `

 So if non-nil, it will be a list of tags, starting with the value of
 org-archive-tag. AFAICT, the rest of the tags can be arbitrary.

[ups ... I sent this unfinished by accident first]

Ok, thanks, this explains a lot, and it seems that Org-mode inserts the
:ARCHIVE: tag always at the end, and other tags in front of it: 

,---
| ** Second Level 2 :tag:my:ARCHIVE:
`---

so it will almost always look like this:

,
| :tags (tag my) [...] :archivedp (ARCHIVE)
`



-- 
cheers,
Thorsten




Re: [O] Parser - which values are possible for `archivedp'?

2014-03-04 Thread Jonathan Leech-Pepin
Hello,

On 4 March 2014 09:47, Thorsten Jolitz tjol...@gmail.com wrote:

 Nick Dokos ndo...@gmail.com writes:

  Thorsten Jolitz tjol...@gmail.com writes:
 
  Hi List,
 
  the name of headline attribute `archivedp' suggests its just a boolean
  nil/t variable, but in parse trees I see e.g. a list as value
 
  ,---
  | :archivedp (ARCHIVE)
  `---
 
  and I vaguely remember that I have seen different symbols as values of
  this attribute too.
 
  So what do I have to expect as values here? A list of strings or nil? Or
  something else too? Whatever is defined in
 
  ,---
  | org-archive-tag is a variable defined in `org.el'.
  | Its value is ARCHIVE
  `---
 
  ?
 
  PS
 
  If the tag is just a string like in this case, why is it shown as
  list in the parse tree?
 
  It is set like this
(let
 ...
 (archivedp (member org-archive-tag tags))
 ...)
 
  in org-element.el. It is effectively a boolean, but there is no
  need to reduce the return value of ``member'' to t if it is non-nil:
 
  ,
  |member is a built-in function in `C source code'.
  |
  | (member ELT LIST)
  |
  | Return non-nil if ELT is an element of LIST.  Comparison done with
  | equal'.
  `
 
  So if non-nil, it will be a list of tags, starting with the value of
  org-archive-tag. AFAICT, the rest of the tags can be arbitrary.


 ** Second Level 2 :tag:my:ARCHIVE:


 ,
 | :tags (tag my) [...] :archivedp (ARCHIVE)
 `


Change the order of the tags so that Archive comes before the others and
you get:

** Second level 2 :ARCHIVE:tag:my:
:tags (tag my) :archivedp (ARCHIVE tag my)

Regards,
Jon


 --
 cheers,
 Thorsten





Re: [O] How to ensure that (org-get-heading) is pretty?

2014-03-04 Thread Oleh
 I'm working on a helm interface to org headings.

 Doesn't it already exist?  What about:

   ╭
   │ helm-org-headlines is an interactive autoloaded compiled Lisp function in
   │ `helm-org.el'.
   │
   │ It is bound to menu-bar tools Helm Org Org headlines.
   │
   │ (helm-org-headlines)
   │
   │ Preconfigured helm to show org headlines.
   ╰

 Do you want to write something else?


Thanks, Sebastien,

I wasn't aware of `helm-org-headlines`.
I've just tried it and I like my implementation better,
exactly because my implementation is using font-locked strings, while
`helm-org-headlines` uses plain strings.
And I don't like the whole menu-like interface.
A list is better in my opinion.

So the question still stands.

regards,
Oleh



Re: [O] [RFC] Creole-style / Support for **emphasis**__within__**a word**

2014-03-04 Thread Jambunathan K

Jambunathan K kjambunat...@gmail.com writes:

 (with-eval-after-load 'org
   (setcar org-emphasis-regexp-components ^\\n)
   (setcar (cdr org-emphasis-regexp-components) ^\\n)
   (customize-save-variable 'org-emphasis-alist org-emphasis-alist))

A small correction 

Instead of \\n it should be \n.  So use the below form instead.

(with-eval-after-load 'org
  (setcar org-emphasis-regexp-components ^\n)
  (setcar (cdr org-emphasis-regexp-components) ^\n)
  (customize-save-variable 'org-emphasis-alist org-emphasis-alist))




Re: [O] Parser - which values are possible for `archivedp'?

2014-03-04 Thread Thorsten Jolitz
Jonathan Leech-Pepin jonathan.leechpe...@gmail.com writes:

 Hello,

 On 4 March 2014 09:47, Thorsten Jolitz tjol...@gmail.com wrote:

 
 Nick Dokos ndo...@gmail.com writes:
 
  Thorsten Jolitz tjol...@gmail.com writes:
 
  Hi List,
 
  the name of headline attribute `archivedp' suggests its just a
 boolean
  nil/t variable, but in parse trees I see e.g. a list as value
 
  ,---
  | :archivedp (ARCHIVE)
  `---
 
  and I vaguely remember that I have seen different symbols as
 values of
  this attribute too.
 
  So what do I have to expect as values here? A list of strings
 or nil? Or
  something else too? Whatever is defined in
 
  ,---
  | org-archive-tag is a variable defined in `org.el'.
  | Its value is ARCHIVE
  `---
 
  ?
 
  PS
 
  If the tag is just a string like in this case, why is it shown
 as
  list in the parse tree?
 
  It is set like this
  (let
  ...
  (archivedp (member org-archive-tag tags))
  ...)
 
  in org-element.el. It is effectively a boolean, but there is no
  need to reduce the return value of ``member'' to t if it is
 non-nil:
 
  ,
  | member is a built-in function in `C source code'.
  |
  | (member ELT LIST)
  |
  | Return non-nil if ELT is an element of LIST. Comparison done
 with
  | equal'.
  `
 
  So if non-nil, it will be a list of tags, starting with the
 value of
  org-archive-tag. AFAICT, the rest of the tags can be arbitrary.
 
 
 
 ** Second Level 2 :tag:my:ARCHIVE:
 
 
 ,
 | :tags (tag my) [...] :archivedp (ARCHIVE)
 `

 Change the order of the tags so that Archive comes before the others
 and you get:

 ** Second level 2 :ARCHIVE:tag:my:
 :tags (tag my) :archivedp (ARCHIVE tag my)

A very useful feature of the `member' function in lisp programming, but
not that great in this case I would say ... why not use (car (member ...))?
Then its just a string, and the single value of interest.

-- 
cheers,
Thorsten




[O] [Announcement] Orgmk (automate export of Org documents to PDF, HTML, etc.)

2014-03-04 Thread Fabrice Niessen
Hello,

For the interested ones, please find Orgmk at
https://github.com/fniessen/orgmk.

Orgmk is a suite of Bash scripts [1] for automating the conversion of
Org documents to different formats, such as HTML or PDF.

Objectives?

- Be more productive, by running the export only when the source Org
  files are updated.

- Share some common Emacs and Org configuration inside your team,
  separately of what you have in your personal Emacs configuration file.

- Offload compilation into an external batch Emacs process, allowing you
  to go on editing or working while exporting the documents.

It still can be improved, but is already fully usable.

Note that, prior to exporting, Orgmk will ensure that the tables found
in your Org document are up-to-date... Other improvements could concern:

- checking links and cross-references,
- checking BibTeX entries,
- checking word spelling, and
- any more...

But these are only in my (Org) TODO list.

Best regards,
Fabrice

[1] The scripts run on both Unix and Microsoft Windows (with Cygwin).

-- 
Fabrice Niessen
Leuven, Belgium
http://www.pirilampo.org/




Re: [O] [Bug] org-open-at-point does not work inside properties block

2014-03-04 Thread Bastien
Hi Michael,

Michael Strey mst...@strey.biz writes:

 Since some days links in properties blocks do not work any more.

This is a temporary limitation due to the recent rewrite
of `org-open-at-point'.

There is a discussion on how to compensate the limitations:
http://article.gmane.org/gmane.emacs.orgmode/82949

Another limitation is that you cannot open links in comments.

One idea is to let `org-open-at-point' fall back on (browse-url
(thing-at-point 'url)) in areas where links are not syntactically
accepted, while still visually present.

We cannot sort this out too quickly, as this needs reasonable
feedback from users.

Thanks,

-- 
 Bastien



[O] advice on ways to quicken refiling..perhaps a hotkey to refile to specific org file/header?

2014-03-04 Thread Xebar Saram
Hi all

i find the normal C-c w then manually choosing a file to allocate each
'capture' pretty slow. i am looking for any advice on workflows you guys
have to make this quicker.

one thing i was thinking of was maybe assigning a hotkey to do a refile to
a specific note/heading. so ill have 5-6 hotkeys to my most common files to
speed things up, can this be done? if so can anyone show my an example of
such a thing?

kind regards

Z.


Re: [O] advice on ways to quicken refiling..perhaps a hotkey to refile to specific org file/header?

2014-03-04 Thread Oleh
I have this in my config, although I don't refile that much lately:

(setq org-refile-targets
  '((nil :maxlevel . 3)
(org-agenda-files :maxlevel . 3)))

This should give you an ido choice of all headings up to level 3 in
all your agenda files
as refile targets. Then just give a few headings a unique enough name
and you're done.

regards,
Oleh

On Tue, Mar 4, 2014 at 4:43 PM, Xebar Saram zelt...@gmail.com wrote:
 Hi all

 i find the normal C-c w then manually choosing a file to allocate each
 'capture' pretty slow. i am looking for any advice on workflows you guys
 have to make this quicker.

 one thing i was thinking of was maybe assigning a hotkey to do a refile to a
 specific note/heading. so ill have 5-6 hotkeys to my most common files to
 speed things up, can this be done? if so can anyone show my an example of
 such a thing?

 kind regards

 Z.



Re: [O] [Bug] org-open-at-point does not work inside properties block

2014-03-04 Thread Michael Strey
Hi Bastien,

Thank you for your fast reply.

Bastien b...@gnu.org writes:

 This is a temporary limitation due to the recent rewrite
 of `org-open-at-point'.

[...]

 We cannot sort this out too quickly, as this needs reasonable
 feedback from users.

I'm using links in PROPERTIES blocks on a regular basis in my contacts
file.  There I have email addresses, urls and phone numers that are
custom links.

Best regards
-- 
Michael Strey   
http://www.strey.biz




Re: [O] Parser - which values are possible for `archivedp'?

2014-03-04 Thread Thorsten Jolitz
Nick Dokos ndo...@gmail.com writes:

 Thorsten Jolitz tjol...@gmail.com writes:

  So if non-nil, it will be a list of tags, starting with the
 value of
  org-archive-tag. AFAICT, the rest of the tags can be arbitrary.
 
 
 
 ** Second Level 2 :tag:my:ARCHIVE:
 
 
 ,
 | :tags (tag my) [...] :archivedp (ARCHIVE)
 `

 Change the order of the tags so that Archive comes before the others
 and you get:

 ** Second level 2 :ARCHIVE:tag:my:
 :tags (tag my) :archivedp (ARCHIVE tag my)

 A very useful feature of the `member' function in lisp programming, but
 not that great in this case I would say ... why not use (car (member
 ...))?
 Then its just a string, and the single value of interest.

 Why? All that matters is whether it's nil or not.

Why not? With a tiny change in the code one would get rid of potential
redundancy in the parse tree, would cause less surprise for people who
look at the parsers output (what does :archivedp (ARCHIVE tag
my) mean?) and would get something more logical (the value of
:archivedp is either nil or the string in org-archive-tag). 

But its not really that important I guess, I just needed to know what
kind of values to expect in that place - thanks for the hints. I
use that in another program where it does matter if its a boolean, a
string or a list of strings ...

-- 
cheers,
Thorsten




[O] org-element cache and LAST_REPEAT

2014-03-04 Thread Michael Brand
Hi Nicolas

With today's release_8.2.5h-676-gfb8a042 and C-c C-t on the todo
below, the last headline gets corrupted. Only when cache is enabled.

--
* bla
:PROPERTIES:
:bla:  bla
:END:
* TODO bla
SCHEDULED: 2014-03-04 Tue +1d
:PROPERTIES:
:LAST_REPEAT: [2014-03-04 Tue 12:00]
:LOGGING:  logrepeat
:END:
* bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla
--

Michael



Re: [O] advice on ways to quicken refiling..perhaps a hotkey to refile to specific org file/header?

2014-03-04 Thread Xebar Saram
Thx Oleh
 you said you dont refile much latley, is there a better solution ;-)

the ido thing is not bad but i really think i preffer key to quick send the
heading to a specific note, is that possible?

best

Z


On Tue, Mar 4, 2014 at 5:49 PM, Oleh ohwoeo...@gmail.com wrote:

 I have this in my config, although I don't refile that much lately:

 (setq org-refile-targets
   '((nil :maxlevel . 3)
 (org-agenda-files :maxlevel . 3)))

 This should give you an ido choice of all headings up to level 3 in
 all your agenda files
 as refile targets. Then just give a few headings a unique enough name
 and you're done.

 regards,
 Oleh

 On Tue, Mar 4, 2014 at 4:43 PM, Xebar Saram zelt...@gmail.com wrote:
  Hi all
 
  i find the normal C-c w then manually choosing a file to allocate each
  'capture' pretty slow. i am looking for any advice on workflows you guys
  have to make this quicker.
 
  one thing i was thinking of was maybe assigning a hotkey to do a refile
 to a
  specific note/heading. so ill have 5-6 hotkeys to my most common files to
  speed things up, can this be done? if so can anyone show my an example of
  such a thing?
 
  kind regards
 
  Z.



Re: [O] Org release 8.2.5g (minor release from maint)

2014-03-04 Thread Eric Schulte
Nick Dokos ndo...@gmail.com writes:

 Achim Gratz strom...@nexgo.de writes:

 Eric Schulte writes:

 I look forward to the day when Org-mode can simply require cl-lib and
 cease maintaining org- versions of common cl utilities.

 WIth cl-lib in ELPA I don't really see what's the holdup there if you
 want to go that route.

 I have the impression that cl-lib is (was?) frowned upon by upstream for
 packages that are included in the emacs distribution. But it's only
 a vague recollection at this point: am I wrong? am I thinking of
 something else common-lispish?

I thought that the point of cl-lib was so that packages like Org-mode
and gnus would stop re-implementing pieces of the cl package.  I could
easily be wrong.

-- 
Eric Schulte
https://cs.unm.edu/~eschulte
PGP: 0x614CA05D



Re: [O] org-element cache and LAST_REPEAT

2014-03-04 Thread Matt Lundin
Michael Brand michael.ch.br...@gmail.com writes:

 Hi Nicolas

 With today's release_8.2.5h-676-gfb8a042 and C-c C-t on the todo
 below, the last headline gets corrupted. Only when cache is enabled.

Hi Michael and Nicolas,

I suspect this is related the bug I reported earlier today:

http://permalink.gmane.org/gmane.emacs.orgmode/82979

I had not realized it had to do with org-element-cache. I can confirm
that setting org-element-cache to nil solves the problem.

Matt


 --
 * bla
 :PROPERTIES:
 :bla:  bla
 :END:
 * TODO bla
 SCHEDULED: 2014-03-04 Tue +1d
 :PROPERTIES:
 :LAST_REPEAT: [2014-03-04 Tue 12:00]
 :LOGGING:  logrepeat
 :END:
 * bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla
 --

 Michael



Re: [O] link interfering with brackets when abbreviated

2014-03-04 Thread Samuel Wales
hi sebastien,

as i wrote, my preference is for links to be fontified in comments and
inline footnote definitions the same way as everywhere else.

samuel

On 3/4/14, Sebastien Vauban sva-n...@mygooglest.com wrote:
 What type of indication do you have in mind?



[O] Change key binding in math mode only

2014-03-04 Thread Rafael

Hi all,

I have been writing presentations in org-mode lately with a lot of math
content. I am using org-cdlatex, and have already customized it to, say,
type R'B inside math mode to obtain \mathbb{R}. I wonder, however, if it
would be possible to make this procedure shorter, and obtain \mathbb{R}
as soon as pressing R, *but only inside math mode*. 

I guess I could approximate this with abbrevs or yasnippet, but I think
this would require an extra key besides the R, which is closer to what I
already have. 

I would appreciate any tips in this direction!

Rafael



Re: [O] Org-link-escape-chars (was Incorrect hexification in URLs in LaTeX Export)

2014-03-04 Thread Simon Thum
This seems to be a question of objective. Do you want to encode, i.e. 
maintain some reversible original in an url no matter what, or do you 
want to fix url's which wouldn't otherwise be legal? In the latter case, 
the question mark should probably be retained.


On 03/03/2014 09:06 PM, R. Michael Weylandt michael.weyla...@gmail.com 
wrote:



On Feb 28, 2014, at 15:26, Andreas Leha andreas.l...@med.uni-goettingen.de 
wrote:


R. Michael Weylandt michael.weyla...@gmail.com
michael.weyla...@gmail.com writes:


I've tried this with Org 7.9.3 and 8.2.5h to the same result:

--
#+TITLE: Test
* One
Here is a [[http://google.com/search?q=orgmode][link]]
--

Exporting to HTML doesn't transform the link but exporting to LaTeX results in 
the (non-working) http://google.com/search?%3Dorgmode

Is there a reason for this behavior and, if so, a way to work around it?

RFC 3986 2.2 explicitly says URLs may include `=` and =url-encode-url= doesn't 
change the link in question.

I've played with org-url-hexify-p and read past ML discussions, but
they seem primarily concerned with characters which should not appear
in URIs.

Thanks,
Michael




Hi Michael,

I have recently been bitten by this as well.  Based on a block
post [fn:1], I now have this in my .emacs as a work-around:

--8---cut here---start-8---
(defun al-link-filter (contents backend info)
  (let ((contents (replace-regexp-in-string #\\+name:.*$  contents)));; 
old and unrelated
  (replace-regexp-in-string %3D = contents)))
(add-to-list 'org-export-filter-final-output-functions 'al-link-filter)
--8---cut here---end---


Hi Andreas,

Thanks for this. I had time to dig further and it seems that the 'problem'  is 
the default value of org-link-escape-chars, which explicitly escapes = as well 
as other valid URL characters.

Perhaps someone more familiar with this code could explain the choice these 
escapes.

Michael

[Subject updated because the problem isn't LaTeX specific in 8.2.5h, only in 
7.9.3]






Re: [O] org-element cache and LAST_REPEAT

2014-03-04 Thread Michael Brand
Hi Matt

On Tue, Mar 4, 2014 at 8:58 PM, Matt Lundin m...@imapmail.org wrote:
 I suspect this is related the bug I reported earlier today:

 http://permalink.gmane.org/gmane.emacs.orgmode/82979

I guess the same bug. I have overseen your report.

Michael



[O] In-line code, italics, quotation marks, etc.

2014-03-04 Thread Peter Davis
I'm trying to create an org page that contains a list of instructions, some of 
this include code and/or URLs. I'm having a dickens of a time trying to get 
this to format correctly,
and the documentation isn't much help. For example:

 - I want to have a numbered list with some of the steps being or containing 
code, in monospaced text:

 7) =something abc=

   However, the second quote seems to prevent the =...= notation from being 
recognized.

 - I want a URL that does NOT get converted to a link, and in which I can place 
italics to indicate that parts of the sample URL should be replaced with other 
text:
   http://localhost:port number/path/to/file/file.html
   In this case, port number and probably /path/to/file/ should be 
italicized.

 - Of course, combining these, I get situations like:
   =var str1 = replace me some other text.=
   Embedded equal signs, quotation marks and emphasized text make this a 
nightmare.

Can this be done, or is this just more complicated than org was designed to 
handle? I can, of course, edit the exported files, but that's pretty limiting.

Thanks,
-pd


-- 

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com



Re: [O] In-line code, italics, quotation marks, etc.

2014-03-04 Thread John Hendy
On Tue, Mar 4, 2014 at 3:08 PM, Peter Davis p...@pfdstudio.com wrote:
 I'm trying to create an org page that contains a list of instructions, some 
 of this include code and/or URLs. I'm having a dickens of a time trying to 
 get this to format correctly,
 and the documentation isn't much help. For example:

  - I want to have a numbered list with some of the steps being or containing 
 code, in monospaced text:

  7) =something abc=

However, the second quote seems to prevent the =...= notation from being 
 recognized.

Perhaps annoying, but 0 width spaces have been used in the past (found
by googling verbatim quotes orgmode
- http://lists.gnu.org/archive/html/emacs-orgmode/2010-04/msg00332.html

Not sure if those still work, as null characters were suggested here
as well, but then cited to possibly break export?
- http://comments.gmane.org/gmane.emacs.orgmode/52575

What's the export backend? Sometimes I just deal with manually
inserting \(\verbatim{someting abc}\) (or not using \(\) if you have
tex:t latex:t in #+options).


  - I want a URL that does NOT get converted to a link, and in which I can 
 place italics to indicate that parts of the sample URL should be replaced 
 with other text:
http://localhost:port number/path/to/file/file.html
In this case, port number and probably /path/to/file/ should be 
 italicized.


Not sure what others will say, but I typically rely on raw backend
syntax for situations like these. Seems too hard to escape the parsing
while also imparting your own markup, but I could be wrong!

  - Of course, combining these, I get situations like:
=var str1 = replace me some other text.=
Embedded equal signs, quotation marks and emphasized text make this a 
 nightmare.

Same suggestion. Hopefully you don't have an insane number of these or
aren't using a bunch of export engines. If it's limited to one and you
have, say, a handful of them... hopefully just going raw export
language could work?


 Can this be done, or is this just more complicated than org was designed to 
 handle? I can, of course, edit the exported files, but that's pretty limiting.


Nicolas could explain much better, but from my perusing Google results
for you, it didn't seem promising. There are instances of folks
tweaking their parsing string:
- http://thread.gmane.org/gmane.emacs.orgmode/20915/focus=20922
- http://stackoverflow.com/questions/16443386/how-to-escape-double-quote


John


 Thanks,
 -pd


 --
 
 Peter Davis
 The Tech Curmudgeon
 www.techcurmudgeon.com




Re: [O] Bug? org-set-tags never uses ido

2014-03-04 Thread Anders Johansson
Looking at this again I realize that the reason for this behavior is 
that we want completion of possibly several tags. This is what the 
org-tags-completion-function does when supplied as the second argument 
of completing-read. As ido-completing-read and 
org-iswitchb-completing-read doesn't support this, they are not used.


I don't know if there would be a way of getting both ido and multiple 
input. As it is now though, it's pretty meaningless to have that call to 
org-icompleting-read there as it never gets activated. It could as well be:


(completing-read Tags: 
'org-tags-completion-function
nil nil current 'org-tags-history)


Cheers,
Anders Johansson


2013-11-01 02:33, Eric Abrahamsen skrev:

Anders Johansson mejlaande...@gmail.com writes:


Greetings,
I want to use ido everywhere and wanted to know why this doesn't seem
to work for setting org-mode tags (it never has for me).

Using edebug to step through the call to org-icompleting-read which
org-set-tags does I can see that it never gets to using ido since the
last condition below is false:
org.el:10147-10150 (package repository version 20131028):
(if (and org-completion-use-ido
 (fboundp 'ido-completing-read)
 (boundp 'ido-mode) ido-mode
 (listp (second args)))

This is not strange, since org-icompleting-read is called like this in
org-set-tags:

org.el:14519-14521
(org-icompleting-read Tags: 
  'org-tags-completion-function
  nil nil current 'org-tags-history))

Hmm, shouldn't that 'org-tags-completion-function be replaced with
org-last-tags-completion-table? A quick test shows that works, and from
glancing at the code it seems like org-last-tags-completion-table should
hold the proper assortment of tags...

E


ido apparently needs a list of possible completions, not a single symbol.

I don't understand much more of this really.
Is it a bug? Have I misunderstood something?

Greetings,
Anders Johansson







Re: [O] Bug: Problems with sub/super-script when using: org-cdlatex + org-pretty-entities + org-catch-invisible-edits

2014-03-04 Thread shwouchk
Hello Anders,

Anders Johansson mejlaandersj at gmail.com writes:

 
 Hi,
 I used the configuration:
 
 org-catch-invisible-edits 'show
 org-pretty-entities t


Did you fish around enough to find a workaround? I have the same problem...

Cheers!




Re: [O] Change key binding in math mode only

2014-03-04 Thread Rafael
Rafael rvf0...@gmail.com writes:

 I have been writing presentations in org-mode lately with a lot of math
 content. I am using org-cdlatex, and have already customized it to, say,
 type R'B inside math mode to obtain \mathbb{R}. I wonder, however, if it
 would be possible to make this procedure shorter, and obtain \mathbb{R}
 as soon as pressing R, *but only inside math mode*. 

 I guess I could approximate this with abbrevs or yasnippet, but I think
 this would require an extra key besides the R, which is closer to what I
 already have. 

I remembered that Org knows already if point is inside a math
expression, so by looking at the source I came up with the following,
that seems to work. Sorry for the noise.

#+BEGIN_SRC emacs-lisp
   (defun org-cdlatex-real-numbers ()
 (interactive)
 (if (org-inside-LaTeX-fragment-p)
 (insert \\mathbb{R})
   (insert R)
   ))
   
   (add-hook 'org-mode-hook
 (lambda ()
   (local-set-key (kbd R)
  'org-cdlatex-real-numbers
  )))
#+END_SRC



Re: [O] Bug? org-set-tags never uses ido

2014-03-04 Thread Samuel Wales
There are several packages that allow ido to work everywhere.  The one
I use, ido-hacks, works fine for tags out of the box.



[O] exporter for latex g-brief - extending \begin{document}

2014-03-04 Thread LanX
Hi

Im using a latex class called g-brief to create formal german letters (see
e.g. http://vimpy.org/wp/archives/47) and I'm trying to add an exporter to
org-mode.

my problem is that I need to enclose the text within

\begin{document}
\begin{g-brief}

... here comes text

\end{g-brief}
\end{document}

so any customization possibilities to nest the document within
begin/end{g-brief} (before I try patching the org-mode.el)

Does it help to upgrade, my org-version is 7.7

Thanks
 Rolf


Re: [O] Bug? org-set-tags never uses ido

2014-03-04 Thread Anders Johansson

2014-03-05 01:20, Samuel Wales wrote:

There are several packages that allow ido to work everywhere.  The one
I use, ido-hacks, works fine for tags out of the box.


A quick look at ido-hacks.el here: 
https://github.com/scottjad/ido-hacks/blob/master/ido-hacks.el suggests 
that this doesn't really solve the problem of being able to select 
multiple tags separated by colon at the same time with ido.


I haven't tried it but the docstring for the advice of completing-read says:

Advice `completing-read' to always use `ido-read-internal',
unless `this-command' has a (ido ignore) property or the
inherit-input-method argument is non-nil or the collection
argument is a function (which ido can't handle).

which seems to suggest that passing 'org-tags-completion-function as the 
second argument (collection) to the advised completing-read wouldn't use 
ido in this case either


Cheers,
Anders Johansson




Re: [O] Bug? org-set-tags never uses ido

2014-03-04 Thread Samuel Wales
with my settings, i do c-c c-c tab [select] tab and it sets the first
one correctly.  but if i do tab after that, it doesn't allow
completion.  so i guess you're right.

i can do shortcuts which work at the same time and i can do ret c-c
c-c tab to set more.

ido-hacks is the best of all the ido everywhere thingies i know of, btw.



Re: [O] Bug? org-set-tags never uses ido

2014-03-04 Thread Eric Abrahamsen
Samuel Wales samolog...@gmail.com writes:

 with my settings, i do c-c c-c tab [select] tab and it sets the first
 one correctly.  but if i do tab after that, it doesn't allow
 completion.  so i guess you're right.

 i can do shortcuts which work at the same time and i can do ret c-c
 c-c tab to set more.

 ido-hacks is the best of all the ido everywhere thingies i know of, btw.

I think this is what completing-read-multiple is supposed to do: allow
insertion of multiple completion candidates from the list, separated by
the value of crm-separator (a comma by default, but it could be let to
:). If I recall correctly there's a bug in earlier versions of crm,
and the fix might not be present until later versions of emacs, but take
a look...




Re: [O] Org release 8.2.5g (minor release from maint)

2014-03-04 Thread Eric Abrahamsen
Eric Schulte schulte.e...@gmail.com writes:

 Nick Dokos ndo...@gmail.com writes:

 Achim Gratz strom...@nexgo.de writes:

 Eric Schulte writes:

 I look forward to the day when Org-mode can simply require cl-lib and
 cease maintaining org- versions of common cl utilities.

 WIth cl-lib in ELPA I don't really see what's the holdup there if you
 want to go that route.

 I have the impression that cl-lib is (was?) frowned upon by upstream for
 packages that are included in the emacs distribution. But it's only
 a vague recollection at this point: am I wrong? am I thinking of
 something else common-lispish?

 I thought that the point of cl-lib was so that packages like Org-mode
 and gnus would stop re-implementing pieces of the cl package.  I could
 easily be wrong.

I remembered seeing something on emacs-devel about this, and just found
this statement from Stefan Monnier from a few days ago:


Note that the main motivation behind the move to cl-lib is so that it's
perfectly acceptable to use cl-lib functions (since they don't pollute
the global namespace any more).  So if you prefer to avoid cl-lib
functions, that's fine, but if you want to use them, that's perfectly
fine as well.


Stefan

Interpret as you will!




Re: [O] Org release 8.2.5g (minor release from maint)

2014-03-04 Thread Nick Dokos
Eric Abrahamsen e...@ericabrahamsen.net writes:

 I have the impression that cl-lib is (was?) frowned upon by upstream for
 packages that are included in the emacs distribution. But it's only
 a vague recollection at this point: am I wrong? am I thinking of
 something else common-lispish?

 I thought that the point of cl-lib was so that packages like Org-mode
 and gnus would stop re-implementing pieces of the cl package.  I could
 easily be wrong.

 I remembered seeing something on emacs-devel about this, and just found
 this statement from Stefan Monnier from a few days ago:


 Note that the main motivation behind the move to cl-lib is so that it's
 perfectly acceptable to use cl-lib functions (since they don't pollute
 the global namespace any more).  So if you prefer to avoid cl-lib
 functions, that's fine, but if you want to use them, that's perfectly
 fine as well.


 Stefan

 Interpret as you will!



Thanks for putting me right!

-- 
Nick




[O] [ob-calc] bug when given table data as a variable

2014-03-04 Thread Daniel Hackney
I am trying to use data from a table in a calc source block, but I get
the following error when trying to eval the block:

#+BEGIN_EXAMPLE
math-format-stack-value: Wrong type argument: symbolp, 10
#+END_EXAMPLE

Here is an example file which demonstrates the problem:

#+BEGIN_EXAMPLE
Org version: 8.2.5h (org-20140224 from package)
Emacs version: 24.3.1

Run after starting Emacs with =emacs -Q=

#+BEGIN_SRC elisp
(add-to-list 'org-babel-load-languages '(calc . t))
(require 'ob-calc)
#+END_SRC

#+NAME: the-table
| a |  b |   c |
|---++-|
| 1 | 10 | 100 |
| 2 | 20 | 200 |
| 3 | 30 | 300 |
| 4 | 40 | 400 |

#+BEGIN_SRC calc :var data=the-table[,1]
1
#+END_SRC

#+BEGIN_SRC elisp :var data=the-table[,1]
(format %s data)
#+END_SRC
#+END_EXAMPLE

I'm not familiar with the workings of calc, but is there a workaround?

P.S. Please CC me in replies since I'm not subscribed to the list.

--
Daniel Hackney



Re: [O] In-line code, italics, quotation marks, etc.

2014-03-04 Thread Nick Dokos
Peter Davis p...@pfdstudio.com writes:

 I'm trying to create an org page that contains a list of instructions,
 some of this include code and/or URLs. I'm having a dickens of a time
 trying to get this to format correctly, and the documentation isn't
 much help. For example:

  - I want to have a numbered list with some of the steps being or
  containing code, in monospaced text:

  7) =something abc=

However, the second quote seems to prevent the =...= notation from
being recognized.

  - I want a URL that does NOT get converted to a link, and in which I
  can place italics to indicate that parts of the sample URL should be
  replaced with other text:

   http://localhost:port number/path/to/file/file.html

 In this case, port number and probably /path/to/file/ should be
 italicized.

  - Of course, combining these, I get situations like: =var str1 =
  replace me some other text.= Embedded equal signs, quotation
  marks and emphasized text make this a nightmare.

 Can this be done, or is this just more complicated than org was
 designed to handle? I can, of course, edit the exported files, but
 that's pretty limiting.


Some of it can be done by modifying org-emphasis-regexp-components -
the default value prohibits quotes from appearing in the border
(right after the initial = or right before the final one) -
see

http://thread.gmane.org/gmane.emacs.orgmode/82300
and
http://thread.gmane.org/gmane.emacs.orgmode/82571

for more. In particular, Oleh shared his method of modifying this
variable - see

http://thread.gmane.org/gmane.emacs.orgmode/82571/focus=82669

A slight modification of his method:

  (setf (nth 2 org-emphasis-regexp-components)  \t\r\n,)
  (custom-set-variables `(org-emphasis-alist ',org-emphasis-alist))

allows both single and double quotes in the border.

Since this is the third time in as many weeks that somebody brings this
exact problem up, this probably qualifies as a FAQ. But before going
there, is there *any* reason to forbid quotes in the border? IOW, maybe
it's a better idea to change the default value of
org-emphasis-regexp-components instead.

AFAIK, you cannot have nested emphasis, so getting emphasized text
within verbatim text will require the more backend-specific methods that
John describes.
-- 
Nick




[O] how to force org-mode to interpret number as string

2014-03-04 Thread Stefan Huchler

I try to generate mail drafts from a table as template-tokens. 

The Problem is that that org-mode seems to auto-format the salary column
as a number. I don´t need to calc this numbers so saving/getting it as
string would be what I want. 

It not only butchers the string because he interprets the numbers behind
of the . as decimal point, while in germany we use the , for that, and
the point as a way to mark thousends.

But even if he would understand that the number is 5000 and not 5, if
the outcommented replace-regexp throughs a error because its not string.

To convert it back makes no sense, the fields will always be interpreted
as replacement-strings.


#+TBLNAME: jobs
| jobname | city  |  salary | email |
| Taxi-driver | New York City | 500.000 | ma...@gotham-city.com |
| Butcher | Peking|   5.000 | jinp...@china.cn  |

#+SRC_NAME: generate_job_mails_from_table
#+BEGIN_SRC emacs-lisp :var table=jobs header=jobs[0] data=jobs[1:-1] :results 
output

(setq column-length (length header))
(setq lines)
(dolist (line data)
  (setq tmp-line)
  (dotimes (i column-length)
(add-to-list 'tmp-line (cons (nth i header) (nth i line)))
;(print (nth i line)
  )
  (add-to-list 'lines tmp-line)
)

(message-mail)
(setq line1 (car lines))
(insert (cdr (assoc email line1)))
(message-goto-subject)
(insert applying for the job: $jobname)
(dolist (var line1)
;  (replace-regexp (concat $(car var)) (cdr var ))
  (print (cdr var))
)
  
#+END_SRC

#+RESULTS:
: 
: jinp...@china.cn
: 
: 5.0
: 
: Peking
: 
: Butcher


btw, is there a easier way to generate this dict(python) like lines in
elisp?