Re: [O] Italics + footnote in latex export

2013-06-04 Thread Nick Dokos
James Harkins jamshar...@gmail.com writes:

 I have:

Western notation supports a type of /polyphony/[fn:1]

 I get:

Western notation supports a type of /polyphony/\footnote{ ... blah blah 
 ... }


I believe you have to fiddle with org-emphasis-regexp-components. The
default value is

(  ('\{ -   .,:!?;'\)}\\ 
,\' . 1)

Pretty, isn't it? Looks like Perl :-) There are four strings and an
integer in that list, if you squint hard enough and count (unescaped)
double quotes.

The second string in this list (i.e. - .,:!?;'\)}\\) specifies the
set of characters that are allowed as the postmatch, and they include
the dash, a space, a tab, a period, a comma, a colon, an exclamation
mark, a question mark, a semicolon, a single quote, a double quote
(escaped as \), a closing paren, a closing curly brace and a backslash
(which has to be escaped as \\ above). Note that this set does *not*
include the opening square bracket, so [ is not a valid postmatch
character. That's what needs to be done to have the parser recognize
``.../foo/[bar]'' as an italics ``foo''.

So we add it, but one has to be careful: you cannot add it at the
beginning of the string, before the dash. This whole set becomes a
character class in the *real* regexp, org-emph-re, that is used by the
rest of the code and if the dash does not come at the very beginning, it
takes on a special meaning, which we don't want to give it in this
case. So let's add the square bracket at the end of that string:

-  .,:!?;'\)}\\[

That should be safe.

BTW, don't cut and paste anything from here: I'm not sure that I've cut
and pasted everything correctly in the first place and additionally
mailers tend to mangle various things in email: this is much too
delicate to withstand even the slightest kind of mangling. Best to copy
the default definition of org-emphasis-regexp-components from org.el
into your .emacs and make the modification there. Make sure that you
restart emacs or reload org after adding the modification: the wheels have to
turn again in order to transform the pieces of
org-emphasis-regexp-components into the real regexp, org-emph-re.

This works (I tested it), but it is rather fiddly, so you have to double
and triple check to make sure that you got things right. Maybe there is
an easier method: if so, I'd appreciate a pointer.

NB: no warranty is offered. If it breaks, you get to pick up the
pieces.
-- 
Nick




Re: [O] [PATCH][ox-latex.el] Allow AUTO argument to org-latex-guess-babel-language.

2013-06-04 Thread Sebastien Vauban
Hello Rasmus,

Rasmus wrote:
 1.  As far as I remember, if more than one language is loaded the
 order is not neutral one one should issue a \selectlanguage{LANG}.

 If there are multiple languages, the main language is the latest loaded; 
 that
 is `english' in the following example:

 \RequirePackage[frenchb,english]{babel}

 So if a #+LANGUAGE: LANG cookie is present I guess it should be loaded
 last.  Or a \selectlanguage{LANG} should be issued.

 Non-rigorous testing suggests that it will do the former now on master
 and thus presumably also in the patch.

 AFAICT, this is so since a while. Nicolas implemented the above described
 behavior months ago...

 See http://lists.gnu.org/archive/html/emacs-orgmode/2012-06/msg00387.html.

 Doesn't that work for you already in Org core as it is?

 I'm sorry, I guess the changelog is too sparse or too unclear.  Let me
 try to annotate it.

 ** Goal: make  bable work similar to inputenc (and try to be less 'smart') ** 

 * ox-latex.el (org-latex-guess-babel-language): ignore AUTO
 if argument.

 I can now add (AUTO babel t) to
 org-latex-default-packages-alist—you'll recognize this syntax from
 inputenc (see org-latex-default-packages-alist).

 This means allows me to load babel every time I export a LaTeX
 document.  Babel is important enough that I want I always want to load
 it.

 Due to the exists of org-export-default-language there is's always a
 replacement for AUTO.

 Let's consider an example: 

 1. Say, org-export-default-language is en.

 2. In my document #+LANGUAGE: fr.  Using this patch AUTO is replaced
by 'french' when I have a LANGUAGE-cookie.  When no LANGUAGE is
present, it defaults to org-export-default-language.  Thus, I only
load one language and I can have a more general
org-latex-default-packages-alist.

 * ox-latex.el (org-lat ex-guess-babel-language): use language
 if is not in =`org-latex-inputenc-alist'=.

 Let's just continue the example above, but suppose I now want to write
 a German document.

 For instance with German there is both german and ngerman, and
 apparently a germanb.  Through the LANGUAGE-cookie I can only get
 ngerman (de-de) and germanb (de).  But I might want to get german for
 whatever reason.  So I might try

 #+LANGUAGE: german

 Currently it's discarded.  But why not just pass it along when the
 value of LANGUAGE is not in org-latex-babel-language-alist and assume
 I know what I am doing?

 * ox-latex.el (org-latex-guess-babel-language): retain case in final
 regexp of function.

 Needed for AUTO to replacing everything with uppercase.


 I hope the above makes the purpose of the patch clear.  I'll try to
 write better change logs in the future.

 Behavior changes:
 1.  =(AUTO babel t)= works like (AUTO inputenc t) in
  =`org-latex-default-packages-alist'=. I.e. the default
  language is choosen (sic).
 2. if #+LANGUAGE: mylang then then \usepackage[mylang]{babel} in
  outpu (sic). 

 This message in five line. . .  

That's much clearer. Do I understand correctly that your patch does not change
anything for people who don't use AUTO for Babel in their
`org-latex-default-packages-alist'?

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] A simple way to search only headlines

2013-06-04 Thread Thorsten Jolitz
Xebar Saram zelt...@gmail.com writes:

 Thx Seb and Tassilo

 That's great ,i appreciate it!

 Seb, is there a way to quick bind a key to the above series of commands?

Just to add another method to search only headlines: use navi-mode.el

,-
| https://github.com/tj64/navi
`-

There is a tutorial on Worg:

,---
| http://orgmode.org/worg/org-tutorials/org-outside-org.html
`---

Using the 'org-outside-org.org' file of this tutorial as an example, if
you do (after installation of course)

,-
| (navi-search-and-switch)
| It is bound to M-s n.
`-

on this file, a (Occur like) *Navi* buffer pops up showing you the first
level headlines:

,
| 3 matches for ^\*  in buffer: org-outside-org.org
|  15:* Introduction
|  46:* Org-mode everywhere
| 926:* Screencasts
`

Typing '4' in the *Navi* buffer shows you the headlines up to level 4:

,--
| 30 matches for ^\*\*?\*?\*?  in buffer: org-outside-org.org
|  15:* Introduction
|  46:* Org-mode everywhere
|  50:** File Structuring
|  54:*** Orgstruct
|  94:*** Outline with Outshine
|  99: History and Credits
| 129: Installation
| 190: Outshine's fundamental idea
| 234: Fontification, Navigation and Structure Editing
| 285:** Subtree and Comment Editing
| 289:*** Introduction
| 308:*** Outorg
| 313: Introduction and Installation
| 337: Usage
| 392: Outorg vs Poporg
| 419:*** Poporg
| 428: Introduction
| 452: Installation
| 480: Usage
| 523: Known bugs
| 559: Caveats
| 590: History
| 614: Other tools
| 644: Python
| 711:** Remote Buffer Control
| 751:*** Navi-mode
| 756: About navi-mode
| 774: Installation
| 795: Usage
| 926:* Screencasts
`--

Since these headlines are the result of grep searches, they are *not*
folded outline (Org-mode) subtrees but just single lines of text, so you
can easily search them with the basic Emacs search commands (C-s and C-r
e.g.).

Of course you can do much more things in addition to searching
headlines. Just to give you two examples:

1. type 'E' in the *Navi* buffer and the buffer is put in *Navi-Edit*
mode, i.e.you can edit the headline in the *Navi* buffer and all edits
are immediately applied to the associated Org-mode file. This is perfect
for runnung Emacs keyboard macros only on the headlines of an Org-mode
(or outshine) buffer. Type 'C-c C-c' to go back to read-only *Navi*
mode.

2. with point on a headline in the *Navi* buffer, type 'e' and the
subtree at point will be offered for editing in a temporary Org-mode
buffer. This makes no sense for an .org file, of course, but is great
when you structure your source code files (e.g. Emacs Lisp files) with
headlines and use outshine.el, because then you can write all comment
sections in Org-mode instead of as outcommented text in a source code
buffer.

--
cheers,
Thorsten




[O] export to LaTeX with TOC but without numbers

2013-06-04 Thread Andreas Leha
Hi all,

How can I export to LaTeX with the combined effect of toc:t and num:nil?

Setting num:nil results in an empty TOC.

I guess, I am looking for a way to automatically add
#+begin_latex
  \addcontentsline{toc}{the level}{the heading}
#+end_latex
to the exported document.

Regards,
Andreas




Re: [O] A simple way to search only headlines

2013-06-04 Thread Sebastien Vauban
Hello Xebar,

 Or, for a pure Org solution:

   C-c a  s *salsa dance

 searches for terms appearing only *in the headline* (including tags).

 That's great ,i appreciate it!

 Seb, is there a way to quick bind a key to the above series of commands?

The programming equivalent to C-c a s is:

(org-agenda nil s)

That's what you'd have to bind to a key (using a lambda function).

What you want is the restriction to the current buffer as well. You should
update the above, looking at the doc of `org-agenda' (sorry, no time now to do
it).

BTW, how to find that you have to bind `org-agenda'?  Simply `C-h k', followed
by the key binding for which you want to know more (here, `C-c a'), such as:
which function does it call?

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] How to omit h1 title heading in HTML export?

2013-06-04 Thread flammable project
Hi,

Here is what I usely do, I ommit (left blank) the content beside the
#+TITLE: option.

Maybe it will help you!

Regards,

Basile


2013/6/3 * viki.ve...@gmail.com

 Dear list

 When exporting an Org-mode file to HTML, I have noticed the following:
 the first child of the div with id=content is an h1 heading enclosing
 the filename (minus extension), or the value of TITLE keyword.

 How can I keep HTML export from producing this h1 heading?

 For instance say I have a homepage.org file, and that I export this
 file to HTML with default settings. In the exported HTML file, I would
 find the following snippet:

 body
 div id=content
 h1 class=titlehomepage/h1
 div id=table-of-contents

 For what I'm doing, it would be better if the exported file didn't
 include the line
 h1 class=titlehomepage/h1

 How can I tell HTML export to not put this line in the file that it
 produces?

 At the moment my fix is some CSS...
 div#content  h1:first-child { display: none; }

 I'm using Org-mode version 8.0.3, Emacs 24.3.1

 Best...




Re: [O] Other question concerning org-babel-tangle-jump-to-org

2013-06-04 Thread Julian M. Burgos
Hi Rainier,
If I understood correctly, you need to add the following to your
.emacs file:

(setq org-src-window-setup 'current-window)

With this when you use C-' to switch between editing your org mode file
and being in ESS mode you will say in the same windows.

All the best,

Julian

-- 
Julian Mariano Burgos, PhD
Hafrannsóknastofnun/Marine Research Institute
Skúlagata 4, 121 Reykjavík, Iceland
Sími/Telephone : +354-5752037
Bréfsími/Telefax:  +354-5752001
Netfang/Email: jul...@hafro.is



Rainer M Krug writes:

 Would it be possible, that the function does not open a new window when
 executed, but uses the same window the tangled file is in? I am using
 org for literate programming in R (ESS): 
 - R console left window 
 - when there is an error, I jump to the R file in the right window and
 call there org-babel-tangle-jump-to-org and the org file is opened in
 the left window. It would be easier for debugging, if it would open in
 the right window, where the R file is already open.

 Would that be possible?

 Thanks,

 Rainer





Re: [O] Other question concerning org-babel-tangle-jump-to-org

2013-06-04 Thread Rainer M Krug

#secure method=pgpmime mode=sign

Julian M. Burgos jul...@hafro.is writes:

 Hi Rainier,

Hi Julian,

 If I understood correctly, you need to add the following to your
 .emacs file:

 (setq org-src-window-setup 'current-window)

 With this when you use C-' to switch between editing your org mode file
 and being in ESS mode you will say in the same windows.

This is definitely true, but this is my setting, but this only effects
C-' to start an indirect buffer - the org file is opened in a normal
buffer, and not in an indirect buffer.

Cheers,

Rainer


 All the best,

 Julian

-- 
Rainer M. Krug

email: RMKrugatgmaildotcom




Re: [O] [PATCH (new version)][ox-latex.el] Allow AUTO argument to org-latex-guess-babel-language.

2013-06-04 Thread Rasmus
Hi Sebastien,

 Behavior changes:
 1.  =(AUTO babel t)= works like (AUTO inputenc t) in
 =`org-latex-default-packages-alist'=. I.e. the default
 language is choosen (sic).
 2. if #+LANGUAGE: mylang then then \usepackage[mylang]{babel} in
 outpu (sic). 

 This message in five line. . .  

 That's much clearer.

Thanks, and sorry for not being specific enough if the first case.

 Do I understand correctly that your patch does not change anything
 for people who don't use AUTO for Babel in their
 `org-latex-default-packages-alist'?

Yes, and no, but mainly yes.

The AUTO part should be completely autonomous to the setup you
referred to.  The AUTO part is always discarded.

It changes behavior for your setup in that you can define a LANGUAGE
that isn't a known abbreviation.

Given your points the attached is a much more robust version of the
patch, so thanks a lot.  Examples, omitted from the commit message:


Behavior changes:
1.  =(AUTO babel t)= works like (AUTO inputenc t) in
=`org-latex-default-packages-alist'=. If a LANGUAGE-cookie is 
present this will be used, otherwise the default,
=`org-export-default-language'=  language is choose.
2. If #+LANGUAGE: mylang then then \usepackage[mylang]{babel} in
   output.

Examples: 
 1. Assume (AUTO babel t) is a member of
=`org-latex-default-packages-alist'= and default language is en.
If =#+LANGUAGE: fr= is in the document AUTO is replaced with french.
If =#+LANGUAGE: mylang= then AUTO is replaced with mylang. 

2. Assume (AUTO babel t) is not a member of
   =`org-latex-default-packages-alist'= and assume LATEX_HEADER:
   \usepackage[english]{babel} and LANGUAGE: mylang.  Then the
   exported result is \usepackage[english, mylang]{babel}. 
   If \usepackage[AUTO,english]{babel} then 

As for 'robustness', the following case is handled correctly (from
emacs -q with default org-latex-default-package-alist):

#+LANGUAGE: da
#+LATEX_HEADER: \usepackage[AUTO, danish]{babel}

#+LANGUAGE: danish
#+LATEX_HEADER: \usepackage[AUTO, danish]{babel}

#+LANGUAGE: fr
#+LATEX_HEADER: \usepackage[AUTO, danish, english]{babel}

#+LANGUAGE: de
#+LATEX_HEADER: \usepackage[danish, english, AUTO]{babel}

Cheers,
Rasmus

-- 
Vote for proprietary math!From 4de4fde0a5ba6d0eb8a9898e7e262f3f8fa5c6ea Mon Sep 17 00:00:00 2001
From: rasmus.pank rasmus.p...@gmail.com
Date: Sat, 1 Jun 2013 00:20:18 +0200
Subject: [PATCH] Allow AUTO argument to org-latex-guess-babel-language.

* ox-latex.el (org-latex-guess-babel-language): ignore AUTO if it is
the argument to (the LaTeX package) babel.

* ox-latex.el (org-lat ex-guess-babel-language): if LANGUAGE: mylang
and mylang is not a member  =`org-latex-inputenc-alist'=
use mylang (rather than discard it).

* ox-latex.el	 (org-latex-guess-babel-language): retain case
in final regexp of function.
---
 lisp/ox-latex.el | 32 ++--
 1 file changed, 22 insertions(+), 10 deletions(-)

diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index ff0ca1d..09a9103 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -910,6 +910,9 @@ Insertion of guessed language only happens when Babel package has
 explicitly been loaded.  Then it is added to the rest of
 package's options.
 
+The argument to Babel may be \AUTO\ which is then replaced with
+the language of the document or `org-export-default-language'.
+
 Return the new header.
   (let ((language-code (plist-get info :language)))
 ;; If no language is set or Babel package is not loaded, return
@@ -917,17 +920,26 @@ Return the new header.
 (if (or (not (stringp language-code))
 	(not (string-match usepackage\\[\\(.*\\)\\]{babel} header)))
 	header
-  (let ((options (save-match-data
-		   (org-split-string (match-string 1 header) ,)))
-	(language (cdr (assoc language-code
-  org-latex-babel-language-alist
-	;; If LANGUAGE is already loaded, return header.  Otherwise,
+  (let ((options (save-match-data  
+		   ;; As with `org-latex-guess-inputenc' it only works with
+		   ;; uppercase AUTO
+		   (remove AUTO
+			   (org-split-string 
+;; in case of [lang_one, lang_two]
+(replace-regexp-in-string [ \t\n]* 
+			  (match-string 1 header)) ,
+	(language (or
+		   (cdr (assoc language-code
+   org-latex-babel-language-alist))
+		   language-code)))
+	;; If LANGUAGE is already loaded, return header without AUTO.  Otherwise,
 	;; append LANGUAGE to other options.
-	(if (member language options) header
-	  (replace-match (mapconcat 'identity
-(append options (list language))
-,)
-			 nil nil header 1))
+	(replace-match (mapconcat 'identity
+  (if (member language options) 
+  options
+(append options (list language)))
+  ,)
+		   t nil header 1)
 
 (defun org-latex--find-verb-separator (s)
   Return a character not used in string S.
-- 
1.8.3



[O] Installation of Org 8

2013-06-04 Thread SabreWolfy
rant
Please can someone point me to instructions to install Org 8? I've
downloaded the tar.gz file and searched and tried several sets of
instructions. The 'build instructions' are no help. Neither are the ELPA
instructions. I'm on Kubuntu 13.04. The default org-mode is 7.9.something.
I've purged that. I've done make and make install all and sudo make install
all. I'm not interested in installing and learning git.

The reason I want to try 8 is that the instructions here:

http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-R.html

about including output from R in ORG format to make nice HTML tables is not
working. I get a BEGIN_SRC org instead of BEGIN_ORG or something. I
thought it would be best to trouble-shoot this using the latest Org.
/rant





Re: [O] [patch] [3update] Add functions, Insert a exist contact name at point

2013-06-04 Thread Feng Shu


This is 4 update:

From 326642e8cdcfcb507d82a2508e1cde91e9236540 Mon Sep 17 00:00:00 2001
From: Feng Shu tuma...@gmail.com
Date: Mon, 3 Jun 2013 23:17:57 +0800
Subject: [PATCH] Insert (a) exist contact name(s) at point

* org-contacts.el (org-contacts-get-exist-contact-name-list): New
function, which can get exist contact name(s) matched 'string, return
a list.
(org-contacts-get-exist-contact-name-string): New macro, get exist
contact name(s) matched 'string, return names string.
(org-contacts-insert-contact-name): New function, which can insert (a)
exist contact name(s) matched user's input at point.

Add new functions, which can insert (a) exist contact name(s) at point,
which is matched user's input.
---
 contrib/lisp/org-contacts.el |   36 
 1 个文件被修改,插入 36 行(+)

diff --git a/contrib/lisp/org-contacts.el b/contrib/lisp/org-contacts.el
index 5d63fcc..70a78e1 100644
--- a/contrib/lisp/org-contacts.el
+++ b/contrib/lisp/org-contacts.el
@@ -967,6 +967,42 @@ is created and the VCard is written into that buffer.
 	(current-buffer)
   (progn (save-buffer) (kill-buffer)
 
+(defun org-contacts-get-exist-contact-name-list (string)
+  Get exist contact name(s) matched 'string, return a list.
+  (let ((contact-list (nconc
+		   (org-contacts-filter
+			nil nil
+			(cons org-contacts-alias-property string))
+		   (org-contacts-filter string
+(setq result-name-list
+	  (delete-dups
+	   (loop for contact in contact-list
+		 collect
+		 (substring-no-properties
+		  ((lambda (contact)
+		 (let* ((name
+			 (org-contacts-vcard-escape (car contact name))
+		   contact))
+  (if result-name-list result-name-list (list string)))
+
+(defmacro org-contacts-get-exist-contact-name-string (string)
+  Get exist contact name(s) matched 'string, return names string.
+ (if (stringp string)
+ `(mapconcat 'identity (org-contacts-get-exist-contact-name-list ,string)  )
+   `(mapconcat 'identity (org-contacts-get-exist-contact-name-list  (symbol-name (quote ,string)))  )))
+
+(defun org-contacts-insert-contact-name (string)
+  At point insert (a) exist contact name(s) matched 'input.
+  (interactive (list (read-string Contact Alias or Name: )))
+  (current-buffer)
+  (let ((inhibit-read-only t)))
+  (when (fboundp 'set-buffer-file-coding-system)
+(set-buffer-file-coding-system coding-system-for-write))
+  (let ((name-list (org-contacts-get-exist-contact-name-list string)))
+(while name-list
+  (insert (concat (car name-list)  ))
+(setq name-list (cdr name-list)
+
 (defun org-contacts-show-map (optional name)
   Show contacts on a map.
 Requires google-maps-el.
-- 
1.7.10.4



Re: [O] [html] non-lists showing up as lists

2013-06-04 Thread Bastien
Hi Samuel,

Samuel Wales samolog...@gmail.com writes:

 On 6/3/13, Carsten Dominik carsten.domi...@gmail.com wrote:
 4. Define that lists alway have to have a newline in front of them.

 I presume Michael means blank line.  I like this.

Mhhh... I don't.

 5. Define that lists always have to be indented.

 I like this also, and have long wanted c-c - on a region to indent the
 resulting list, but have not figured out how to implement it.

I strongly dislike this.

Instead, consider this:

,
|   Indented paragraph.
| 
| - Item 1
| - Item 2
`

I propose that:

1. TAB on the dash character of Item 1 could indent the item by two
   characters.

2. Selecting both items in a region then hitting TAB would indent both
   items by two characters.

2 cents of course,

-- 
 Bastien



Re: [O] Tag groups: thanks

2013-06-04 Thread Bastien
John Tait johngt...@gmail.com writes:

 Just a quick belated note to say thank-you very much for the tag
 groups feature in org-mode 8.

Glad you like it!

-- 
 Bastien



Re: [O] Installation of Org 8

2013-06-04 Thread Rasmus

Hi Sabre Wolfy,

 rant
 Please can someone point me to instructions to install Org 8? I've
 downloaded the tar.gz file and searched and tried several sets of
 instructions. The 'build instructions' are no help. Neither are the ELPA
 instructions. I'm on Kubuntu 13.04. The default org-mode is 7.9.something.
 I've purged that. I've done make and make install all and sudo make install
 all. I'm not interested in installing and learning git.

You can download a tarball of the latest version via cgit on the
Org-side.  I think there's even a link on the front page.  For a set
of instructions different from the official documentation see for
instance this PKGBUILD

https://aur.archlinux.org/packages/em/emacs-org-mode-git/PKGBUILD

Also, check org-version.  Mine says:
Org-mode version 8.0.3 (release_8.0.3-183-gca9937 @ 
/usr/share/emacs/site-lisp/org/)

 The reason I want to try 8 is that the instructions here:

 http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-R.html

 about including output from R in ORG format to make nice HTML tables is not
 working. I get a BEGIN_SRC org instead of BEGIN_ORG or something. I
 thought it would be best to trouble-shoot this using the latest Org.
 /rant

BEGIN_SRC org would seem OK, no?  My emacs -q won't even recognize
BEGIN_ORG. . .  I think it's an old syntax, but I could be wrong.

Here's an example for doing an R table.

#+NAME: R-tbl
#+BEGIN_SRC R :exports results :rownames yes :colnames yes
 a - runif(100)
 c - Quantiles of 100 random numbers
 b - data.frame(quantile(a))
 colnames(b) - my quantiles
 round(b,3)
#+END_SRC

Click C-c C-c on the code and you will get table [[tbl]].

#+NAME: tbl
#+CAPTION: my table
#+RESULTS: R-tbl
|  | my quantiles |
|--+--|
|   0% |0.017 |
|  25% |0.196 |
|  50% |0.378 |
|  75% |0.659 |
| 100% |0.988 |


Which outputs this html that looks like this.

http://image.bayimg.com/8e90d3d4ab568959c791011dab7064b222a47003.jpg

Finding an option to add numbers to your table captions is left to
you.

Oh, and feel free to update the Worg side given your new-gained
knowledge.

–Rasmus

-- 
There are known knowns; there are things we know that we know.





Re: [O] Tag groups: thanks

2013-06-04 Thread Bastien
Hi Karl,

Karl Voit devn...@karl-voit.at writes:

 * John Tait johngt...@gmail.com wrote:

 Just a quick belated note to say thank-you very much for the tag groups
 feature in org-mode 8.

 It's very similar to a tag hierarchy request I made on the list a while
 ago, so I'm delighted to see something similar in the new version.

 I am not sure how the situation is with the official releases.
 However, I am using these tag groups since I started with Org-mode
 in 2011.

Mhh.. quite impossible, as tag groups were really implemented
after 7.9.4 -- see the documentation:

  http://orgmode.org/manual/Tag-groups.html

surely you have something else in mind, like simple grouping
like { tag1 tag2 } ?

-- 
 Bastien



Re: [O] Use of a double symbol (IE !!) in for org-emphasis-alist?

2013-06-04 Thread Bastien
Hi Xebar,

Xebar Saram zelt...@gmail.com writes:

 Can one use a double symbol for org-emphasis-alist IE, !! instead of
 ! to get more color combinations? i cant seem to get this working so
 im wondering if this is something possible?

No, you can't use two characters as emphasis markers.

-- 
 Bastien



Re: [O] [patch][ox-koma-letter] Support for to and from headings

2013-06-04 Thread Bastien
Hi Rasmus,

Rasmus ras...@gmx.us writes:

 * ox-koma-letter.el: If tag wasn't given a headline could cause
   trouble.
 * ox-koma-letter.el: bug in subject-format defcustom.
 * ox-koma-letter.el: some newline changes
 * ox-koma-letter.el: changed varioues quoted things to symbols.

You need to tell what functions or variables are modified.

Simply open the diff in Emacs, use `n' to navigate to the
next difference, then hit `C-x 4 a' to create a changelog 
entry, Emacs change-log-mode will handle the formatting
correctly.

Hope this helps!

-- 
 Bastien



Re: [O] [patch] [2update] Add functions, which can quickly insert org-contacts template(s) in current buffer

2013-06-04 Thread Bastien
Hi Feng,

Feng Shu tuma...@gmail.com writes:

 * contrib/lisp/org-contacts.el 
 (org-contacts-build-template-with-exist-contact):Build
 a contact template with exist contact, It is useful when you want to update 
 exist contact(s).
 (org-contacts-build-template-with-string): Build contact template with
 a string, It is useful when you want to add a new contact.
 (org-contacts-insert-template): Insert contact template(s) at point,
 the template(s) will be built with the input string and exist contacts
 informations.

Here is a reformatted ChangeLog for your patch:

* contrib/lisp/org-contacts.el
(org-contacts-build-template-with-exist-contact)
(org-contacts-build-template-with-string): New methods for
building a contact template.
(org-contacts-insert-template): Insert a contact template at
point.  The template will be built with the input string and
existing contact informations.

The point is: try to be a bit more terse in your explanations,
and to pay attention to the punctuation.

Sorry to nitpick about this -- even if the change is for contrib/,
it's good to know about the rules early on, and to lower the work
of maintainers because all the change logs need to be reviewed
at some point.

Thanks for your efforts and your work on org-contacts.el!

-- 
 Bastien



Re: [O] how i can add a class to table when export org-mode to html

2013-06-04 Thread Bastien
Hi Tongzhu,

Tongzhu Zhang eggca...@gmail.com writes:

 how i can do that ? i tried define the html-table-attributes ,but
 seems noting changes

See the manual: 12.6.6 Tables.

Also please do not forget people on this list are not machines,
and always appreciate some words of politeness.

Thanks,

-- 
 Bastien



Re: [O] Rendering of source code on worg

2013-06-04 Thread Bastien
Hi Guido,

Guido Van Hoecke gui...@gmail.com writes:

 The .emacs.el on orgmode.org contains:

   (set-face-foreground 'font-lock-keyword-face DeepSkyBlue1)
   (set-face-foreground 'font-lock-string-face Goldenrod)

 This is used when publishing Worg files on the server.

 If you can find better colors, please submit some.

 I never intended to comment nor judge the specific colors used.

Sorry, I was a bit terse but I really meant what I said: I'm aware
the colors are not the best ones and I'd welcome improvements!

 I was under the impression that the elisp fragments on the website used
 to have exactly the same font and faces as in stock emacs elisp
 buffers. Apparently this is not the case, and I still don't know where I
 got that wrong idea.

I would find it nice to have the same colors than in emacs -q --
I'll apply patches for this, no doubt.

Thanks in advance!

-- 
 Bastien



Re: [O] {New exporter] What happened to the export template

2013-06-04 Thread Bastien
Hi Robert,

Robert Goldman rpgold...@sift.info writes:

 A very late follow-up:

 I note that the Worg instructions for HTML export still cite 
 org-insert-export-options-template: 

 http://orgmode.org/worg/org-tutorials/org-publish-html-tutorial.html

Can you fix this?

Please send me your public key if you don't have access to Worg
already, I'll give you push access.

Thanks in advance!

-- 
 Bastien



Re: [O] Installation of Org 8

2013-06-04 Thread Glyn Millington
SabreWolfy sabrewo...@gmail.com writes:

 rant Please can someone point me to instructions to install Org 8?
 I've downloaded the tar.gz file and searched and tried several sets of
 instructions. The 'build instructions' are no help. Neither are the
 ELPA instructions. I'm on Kubuntu 13.04. The default org-mode is
 7.9.something.  I've purged that. I've done make and make install all
 and sudo make install all. I'm not interested in installing and
 learning git.

Ok - part of the problem here is that you don't tell us what went wrong!
And I don't know anything about Ubuntu, though I used Debian thirteen
years ago..

You have downloaded the tarball - good.

You have unzipped it somewhere sensible - maybe in an .emacs.d directory

Then you went 

cd org-8.0 (or whatever it is called)

and did make - did that go wrong?

If it did there is a chance you don't have to tools on board to build
it. This command should get them for you:

apt-get build-dep package_name

where package name  is the name of your emacs package.

Try make again

If it runs this time then fire up emacs and add these line to your .emacs
file - you will of course need to edit the path.

(setq load-path (cons ~/path/to/orgdir/lisp load-path))
 (setq load-path (cons ~/path/to/orgdir/contrib/lisp load-path))

Restart your emacs and you should be good to go. 

Good luck!



Glyn




Re: [O] [patch][ox-koma-letter] Support for to and from headings

2013-06-04 Thread Rasmus
Bastien,

 * ox-koma-letter.el: If tag wasn't given a headline could cause
   trouble.
 * ox-koma-letter.el: bug in subject-format defcustom.
 * ox-koma-letter.el: some newline changes
 * ox-koma-letter.el: changed varioues (sic) quoted things to symbols.

 You need to tell what functions or variables are modified.

 Simply open the diff in Emacs, use `n' to navigate to the
 next difference, then hit `C-x 4 a' to create a changelog 
 entry, Emacs change-log-mode will handle the formatting
 correctly.

 Hope this helps!

Yes it does as I wasn't aware of that function.  I'll try to update
with a proper patch. 

Please do let me know if you find other mistakes. 

–Rasmus

-- 
And let me remind you also that moderation in the pursuit of justice
is no virtue



Re: [O] [patch] [2update] Add functions, which can quickly insert org-contacts template(s) in current buffer

2013-06-04 Thread Feng Shu
Bastien b...@gnu.org writes:

 Hi Feng,

 Feng Shu tuma...@gmail.com writes:

 * contrib/lisp/org-contacts.el
 (org-contacts-build-template-with-exist-contact):Build
 a contact template with exist contact, It is useful when you want to
 update exist contact(s).
 (org-contacts-build-template-with-string): Build contact template with
 a string, It is useful when you want to add a new contact.
 (org-contacts-insert-template): Insert contact template(s) at point,
 the template(s) will be built with the input string and exist contacts
 informations.

 Here is a reformatted ChangeLog for your patch:

 * contrib/lisp/org-contacts.el
 (org-contacts-build-template-with-exist-contact)
 (org-contacts-build-template-with-string): New methods for
 building a contact template.
 (org-contacts-insert-template): Insert a contact template at
 point.  The template will be built with the input string and
 existing contact informations.

 The point is: try to be a bit more terse in your explanations,
 and to pay attention to the punctuation.

 Sorry to nitpick about this -- even if the change is for contrib/,
 it's good to know about the rules early on, and to lower the work
 of maintainers because all the change logs need to be reviewed
 at some point.

Thanks for you information, I think this patch use a complex way to 
solve a simple problem, so I have writen a different patch to replace 
this patch! But the problem is that the new macro in the new patch 
can't work with org-capture and I can't figure out why 


I am afraid to write commit message, for I don't know many words.
I have to write the commit message in chinese and google translate it ..

So you can see many Chinese style English in my commit. :-(



 Thanks for your efforts and your work on org-contacts.el!

-- 



[O] icalendar-import-file into org

2013-06-04 Thread AW
Hi!

I'd like to have an external calendar file displayed in org and was very glad 
to find a hint in the manual. The name of the external calendar file is 
office.ics.

So I wrote into my .emacs-file:

(icalendar-import-file office.ics Diary)
(setq org-agenda-include-diary t)

As you can imagine, that caused an import of office.ics _every_ time I 
started 
Emacs. So I ended with a huge calendar file full of (no, not stars)[1] 
repetitions of office.ics.

The trouble obviously is the import into Diary. If I could write

(setq org-agenda-include office.ics t)

-- but as I'm not a programmer, I do not know how to do that.

If someone had a helping hand, I'd be glad,

Regards,

Alexander






[1] My God—it's full of stars! -- do you remember ?



Re: [O] export to LaTeX with TOC but without numbers

2013-06-04 Thread Eric S Fraga
Andreas Leha andreas.l...@med.uni-goettingen.de writes:

 Hi all,

 How can I export to LaTeX with the combined effect of toc:t and num:nil?

 Setting num:nil results in an empty TOC.

 I guess, I am looking for a way to automatically add
 #+begin_latex
   \addcontentsline{toc}{the level}{the heading}
 #+end_latex
 to the exported document.

 Regards,
 Andreas

Andreas,

the problem is that setting num:nil tells org to use the second form of
sectioning, as specified in org-latex-classes.  The unnumbered section
headings do not generate TOC information so no TOC is available.  It's a
latex issue, not org.

There are workarounds but they involve using latex directly (to add
entries to a TOC basically).


-- 
: Eric S Fraga, GnuPG: 0xC89193D8FFFCF67D
: in Emacs 24.3.50.1 and Org release_8.0.3-195-gd7e884




Re: [O] export to LaTeX with TOC but without numbers

2013-06-04 Thread Andreas Leha
Hi Eric,

thanks for your answer.

Eric S Fraga e.fr...@ucl.ac.uk writes:

 Andreas Leha andreas.l...@med.uni-goettingen.de writes:

 Hi all,

 How can I export to LaTeX with the combined effect of toc:t and num:nil?

 Setting num:nil results in an empty TOC.

 I guess, I am looking for a way to automatically add
 #+begin_latex
   \addcontentsline{toc}{the level}{the heading}
 #+end_latex
 to the exported document.

 Regards,
 Andreas

 Andreas,

 the problem is that setting num:nil tells org to use the second form of
 sectioning, as specified in org-latex-classes.  The unnumbered section
 headings do not generate TOC information so no TOC is available.  It's a
 latex issue, not org.

 There are workarounds but they involve using latex directly (to add
 entries to a TOC basically).

I am aware of that.  Sorry for being unclear.  I would like to automate
exactly that.

I use several LaTeX export classes and I would like that possibility
(TOC with unnumbered sections/subsections/...) in each of these classes.
Thus, I am searching for a (more) general approach, that I could 'switch on'
and have it insert the latex statement on its own.

Best,
Andreas




[O] Bug: when publish a project, it prompt the error message (void-variable org-export-html-special-string-regexps) [8.0.3 (8.0.3-27-g53784e-elpa @ /home/ryu/.emacs.d/elpa/org-20130603/)]

2013-06-04 Thread liuyouchao111

Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

 http://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org-mode mailing list.




backtrace
Description: error backtrace


Emacs  : GNU Emacs 24.2.1 (x86_64-pc-linux-gnu, GTK+ Version 3.6.4)
 of 2013-04-09 on allspice, modified by Debian
Package: Org-mode version 8.0.3 (8.0.3-27-g53784e-elpa @ 
/home/ryu/.emacs.d/elpa/org-20130603/)

current state:
==
(setq
 org-tab-first-hook '(org-hide-block-toggle-maybe 
org-src-native-tab-command-maybe org-babel-hide-result-toggle-maybe
  org-babel-header-arg-expand)
 org-speed-command-hook '(org-speed-command-default-hook 
org-babel-speed-command-hook)
 org-occur-hook '(org-first-headline-recenter)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-confirm-shell-link-function 'yes-or-no-p
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-src-mode-hook '(org-src-babel-configure-edit-buffer 
org-src-mode-configure-edit-buffer)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-babel-pre-tangle-hook '(save-buffer)
 org-mode-hook '((lambda nil (org-add-hook (quote change-major-mode-hook) 
(quote org-show-block-all) (quote append) (quote local)))
 (lambda nil (org-add-hook (quote change-major-mode-hook) 
(quote org-babel-show-result-all) (quote append) (quote local)))
 #[nil \300\301\302\303\304$\207 [org-add-hook 
change-major-mode-hook org-show-block-all append local] 5]
 #[nil \300\301\302\303\304$\207 [org-add-hook 
change-major-mode-hook org-babel-show-result-all append local] 5]
 org-babel-result-hide-spec org-babel-hide-all-hashes)
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point 
org-babel-execute-safely-maybe)
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers 
org-cycle-hide-inline-tasks org-cycle-show-empty-lines
  org-optimize-window-after-visibility-change)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-agenda-files '(/tmp/test.org)
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-publish-project-alist '((org-notes :base-directory ~/org/ 
:base-extension org :publishing-directory ~/public_html/ :recursive
  t :publishing-function org-publish-org-to-html 
:headline-levels 4 :auto-preamble t)
 (org-static :base-directory ~/org/ 
:base-extension css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf
  :publishing-directory ~/public_html/ :recursive 
t :publishing-function org-publish-attachment)
 (org :components (org-notes org-static)))
 )


Re: [O] Tag groups: thanks

2013-06-04 Thread Karl Voit
* Bastien b...@gnu.org wrote:
 Hi Karl,

 Karl Voit devn...@karl-voit.at writes:

 * John Tait johngt...@gmail.com wrote:

 Just a quick belated note to say thank-you very much for the tag groups
 feature in org-mode 8.

 I am not sure how the situation is with the official releases.
 However, I am using these tag groups since I started with Org-mode
 in 2011.

 Mhh.. quite impossible, as tag groups were really implemented
 after 7.9.4 -- see the documentation:

   http://orgmode.org/manual/Tag-groups.html

 surely you have something else in mind, like simple grouping
 like { tag1 tag2 } ?

You're absolutely right: I mixed up simple grouping with Tag groups.

Therefore, I add myself to the thank-you-list of this new feature I
was not aware of :-)

-- 
mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode:
get Memacs from https://github.com/novoid/Memacs 

https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on github




[O] Args out of range: 0, 1

2013-06-04 Thread SabreWolfy
Emacs/R is aborting running/exporting an R code block with the message:

Args out of range: 0, 1

in the mini-buffer line. This is triggered when I try to use ascii or print
to output a data structure. I've searched for this error and found it to be
related to converting HTML to text. with a number of posts from several
years ago. What can I do to solve it? I'm using Emacs 23.4.1, Org version
7.9.2, R 2.15.2 on Kubuntu 13.04. I'll try to prepare a minimal example,
separate from my actual input data.




[O] Bug: when pushing org-project, error message org-export-html-special-string-regexps is void is prompted, [8.0.3 (8.0.3-27-g53784e-elpa @ /home/ryu/.emacs.d/elpa/org-20130603/)]

2013-06-04 Thread liuyouchao111

Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

 http://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org-mode mailing list.

Emacs  : GNU Emacs 24.2.1 (x86_64-pc-linux-gnu, GTK+ Version 3.6.4)
 of 2013-04-09 on allspice, modified by Debian
Package: Org-mode version 8.0.3 (8.0.3-27-g53784e-elpa @ 
/home/ryu/.emacs.d/elpa/org-20130603/)

current state:
==
(setq
 org-tab-first-hook '(org-hide-block-toggle-maybe 
org-src-native-tab-command-maybe org-babel-hide-result-toggle-maybe
  org-babel-header-arg-expand)
 org-speed-command-hook '(org-speed-command-default-hook 
org-babel-speed-command-hook)
 org-occur-hook '(org-first-headline-recenter)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-confirm-shell-link-function 'yes-or-no-p
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-from-is-user-regexp \\ryu\\
 org-src-mode-hook '(org-src-babel-configure-edit-buffer 
org-src-mode-configure-edit-buffer)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-babel-pre-tangle-hook '(save-buffer)
 org-mode-hook '(#[nil \300\301\302\303\304$\207 [org-add-hook 
change-major-mode-hook org-show-block-all append local] 5]
 #[nil \300\301\302\303\304$\207 [org-add-hook 
change-major-mode-hook org-babel-show-result-all append local] 5]
 org-babel-result-hide-spec org-babel-hide-all-hashes)
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point 
org-babel-execute-safely-maybe)
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers 
org-cycle-hide-inline-tasks org-cycle-show-empty-lines
  org-optimize-window-after-visibility-change)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-publish-project-alist '((org-notes :base-directory ~/org_temp/ 
:base-extension org :publishing-directory ~/public_html/
  :recursive t :publishing-function 
org-publish-org-to-html :headline-levels 4 :auto-preamble t)
 (org-static :base-directory ~/org/ 
:base-extension css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf
  :publishing-directory ~/public_html/ :recursive 
t :publishing-function org-publish-attachment)
 (org_temp :components (org-notes 
org-static)))
 )



Re: [O] GFDL

2013-06-04 Thread Ben Finney
On 27-May-2013, Bastien wrote:
 Ben Finney ben+em...@benfinney.id.au writes:
  Do you have a reference from some FSF official for that restriction?
 
 See this discussion:
   http://lists.gnu.org/archive/html/emacs-devel/2012-12/msg00375.html

Thanks very much for that information.

I had not realised how obstructionist RMS has become on this issue,
blocking attempts event to dual-license a document under at least one free
license (the FDL is not a free license by the FSF's own definition), and
insisting that Debian change its social contract to allow non-free works.

Given that entrenched position, the only hope for new freely-licensed FSF
documentation now seems to be for RMS's authority to be over-ruled on this
from within FSF, which could take some time.

It's good to have this to refer back to, so I'm grateful for this
discussion.

-- 
 \  “Software patents provide one more means of controlling access |
  `\  to information. They are the tool of choice for the internet |
_o__) highwayman.” —Anthony Taylor |
Ben Finney b...@benfinney.id.au


signature.asc
Description: Digital signature


[O] Bug: when publish a project, it prompt error message (void-variable org-export-html-special-string-regexps) [8.0.3 (8.0.3-27-g53784e-elpa @ /home/ryu/.emacs.d/elpa/org-20130603/)]

2013-06-04 Thread ryu

As subject discribed, that's exactly what i encounted.

Emacs  : GNU Emacs 24.2.1 (x86_64-pc-linux-gnu, GTK+ Version 3.6.4)
 of 2013-04-09 on allspice, modified by Debian
Package: Org-mode version 8.0.3 (8.0.3-27-g53784e-elpa @ 
/home/ryu/.emacs.d/elpa/org-20130603/)

current state:
==
(setq
 org-tab-first-hook '(org-hide-block-toggle-maybe
  org-src-native-tab-command-maybe
  org-babel-hide-result-toggle-maybe
  org-babel-header-arg-expand)
 org-speed-command-hook '(org-speed-command-default-hook
  org-babel-speed-command-hook)
 org-occur-hook '(org-first-headline-recenter)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-confirm-shell-link-function 'yes-or-no-p
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
 org-src-mode-configure-edit-buffer)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-babel-pre-tangle-hook '(save-buffer)
 org-mode-hook '((lambda nil
  (org-add-hook (quote change-major-mode-hook)
   (quote org-show-block-all) (quote append) (quote local))
  )
 (lambda nil
  (org-add-hook (quote change-major-mode-hook)
   (quote org-babel-show-result-all) (quote append)
   (quote local))
  )
 #[nil \300\301\302\303\304$\207
   [org-add-hook change-major-mode-hook org-show-block-all
append local]
   5]
 #[nil \300\301\302\303\304$\207
   [org-add-hook change-major-mode-hook
org-babel-show-result-all append local]
   5]
 org-babel-result-hide-spec org-babel-hide-all-hashes)
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point
  org-babel-execute-safely-maybe)
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
  org-cycle-hide-inline-tasks org-cycle-show-empty-lines
  org-optimize-window-after-visibility-change)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-agenda-files '(/tmp/test.org)
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-publish-project-alist '((org-notes :base-directory ~/org_temp/
  :base-extension org :publishing-directory
  ~/public_html/ :recursive t
  :publishing-function org-publish-org-to-html
  :headline-levels 4 :auto-preamble t)
 (org-static :base-directory ~/org_temp/
  :base-extension
  
css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf :publishing-directory 
~/public_html/ :recursive t :publishing-function org-publish-attachment)
 (org :components (org-notes org-static)))
 )



[O] orgmode publish project issue

2013-06-04 Thread ryu

Hi all,

when i publish a project, it will prompt a error message (void-variable 
org-export-html-special-string-regexps). anyone who can give me an 
advice ?


Emacs  : GNU Emacs 24.2.1 (x86_64-pc-linux-gnu, GTK+ Version 3.6.4)
 of 2013-04-09 on allspice, modified by Debian
Package: Org-mode version 8.0.3 (8.0.3-27-g53784e-elpa 
@/home/ryu/.emacs.d/elpa/org-20130603/)




Re: [O] icalendar-import-file into org

2013-06-04 Thread Nick Dokos
AW alexander.will...@t-online.de writes:

 I'd like to have an external calendar file displayed in org and was very glad 
 to find a hint in the manual. The name of the external calendar file is 
 office.ics.

 So I wrote into my .emacs-file:

 (icalendar-import-file office.ics Diary)
 (setq org-agenda-include-diary t)

 As you can imagine, that caused an import of office.ics _every_ time I 
 started 
 Emacs. So I ended with a huge calendar file full of (no, not stars)[1] 
 repetitions of office.ics.


You can import the ics file into some temporary diary and
delete the temporary diary upon exit from emacs:

--8---cut here---start-8---
(setq tmp-diary (make-temp-file diary))
(icalendar-import-file /path/to/office.ics tmp-diary)

;; make it the default...
(setq diary-file tmp-diary)
;; so that org-agenda can find it
(setq org-agenda-include-diary t)

;; delete the tmp diary on exit
(add-to-list 'kill-emacs-hook 
 (function
  (lambda ()
(delete-file tmp-diary
--8---cut here---end---8---

That assumes that you don't have any other diary files
that you are interested in including. If you do, the basic
idea will still work but will require more fiddling.

Untested.
-- 
Nick




Re: [O] orgmode publish project issue

2013-06-04 Thread Bastien
Hi Ryu,

ryu liuyouchao...@gmail.com writes:

 when i publish a project, it will prompt a error message 
 (void-variable org-export-html-special-string-regexps). anyone who
 can give me an advice ?

You must have copied someone's configuration -- please double-check
there is no such variable in your .emacs.el (or other configuration
files.)

HTH,

-- 
 Bastien



Re: [O] Args out of range: 0, 1

2013-06-04 Thread Bastien
Hi,

SabreWolfy sabrewo...@gmail.com writes:

 Emacs/R is aborting running/exporting an R code block with the message:

 Args out of range: 0, 1

 in the mini-buffer line. This is triggered when I try to use ascii or print
 to output a data structure. I've searched for this error and found it to be
 related to converting HTML to text. with a number of posts from several
 years ago. What can I do to solve it? I'm using Emacs 23.4.1, Org version
 7.9.2, R 2.15.2 on Kubuntu 13.04. I'll try to prepare a minimal example,
 separate from my actual input data.

Please share a reproducible recipe with the content you want to
export.

-- 
 Bastien



Re: [O] Bug: when publish a project, it prompt error message (void-variable org-export-html-special-string-regexps) [8.0.3 (8.0.3-27-g53784e-elpa @ /home/ryu/.emacs.d/elpa/org-20130603/)]

2013-06-04 Thread Nick Dokos
ryu liuyouchao...@gmail.com writes:

 As subject discribed, that's exactly what i encounted.


The variable has been renamed in 8.03 to

  org-html-special-string-regexps.

The fact that the old name is being used somewhere probably
indicates that you are picking up the wrong version of org.
In particular, you are probably loading the old org-html.el
file, instead of (or in addition to) the current ox-html.el.
This is a recipe for disaster.

Note also org-publish-org-to-html does not exist any longer. It's
probably your use of it in org-publish-project-alist that is
causing org-html.el to be loaded. The new HTML publishing
function is org-html-publish-to-html, so try using that instead
and see if it fixes the problem.

Check Suvayu's document on Worg about 8.x changes:

  http://orgmode.org/worg/org-8.0.html

and Nicolas's announcement referenced therein.

-- 
Nick




Re: [O] orgmode publish project issue

2013-06-04 Thread ryu

On 2013?06?04? 22:13, Bastien wrote:

Hi Ryu,

ryu liuyouchao...@gmail.com writes:


when i publish a project, it will prompt a error message 
(void-variable org-export-html-special-string-regexps). anyone who
can give me an advice ?

You must have copied someone's configuration -- please double-check
there is no such variable in your .emacs.el (or other configuration
files.)

HTH,

thanks for your answer first, however i have do as the method described 
on http://orgmode.org/manual/Feedback.html#Feedback,
using minimal-org.el to start with emacs. It should not have any other's 
configure involved.


*below is the used minimal-org.el file : *
(add-to-list 'load-path (expand-file-name ~/.emacs.d/elpa/org-20130603))
(add-to-list 'auto-mode-alist '(\\.\\(org\\ |org_archive\\|txt\\)$ . 
org-mode))

(setq org-agenda-files '(/tmp/test.org))
(require 'org-install)
(require 'org-habit)

(global-set-key \C-cl 'org-store-link)
(global-set-key \C-ca 'org-agenda)
(global-set-key \C-cb 'org-iswitchb)


Re: [O] Bug: when pushing org-project, error message org-export-html-special-string-regexps is void is prompted, [8.0.3 (8.0.3-27-g53784e-elpa @ /home/ryu/.emacs.d/elpa/org-20130603/)]

2013-06-04 Thread Nick Dokos
You have now posted three messages on the same topic. Please stop.
And be patient.

-- 
Nick






Re: [O] Bug: when publish a project, it prompt error message (void-variable org-export-html-special-string-regexps) [8.0.3 (8.0.3-27-g53784e-elpa @ /home/ryu/.emacs.d/elpa/org-20130603/)]

2013-06-04 Thread ryu

On 2013年06月04日 22:22, Nick Dokos wrote:

ryu liuyouchao...@gmail.com writes:


As subject discribed, that's exactly what i encounted.


The variable has been renamed in 8.03 to

   org-html-special-string-regexps.

The fact that the old name is being used somewhere probably
indicates that you are picking up the wrong version of org.
In particular, you are probably loading the old org-html.el
file, instead of (or in addition to) the current ox-html.el.
This is a recipe for disaster.

Note also org-publish-org-to-html does not exist any longer. It's
probably your use of it in org-publish-project-alist that is
causing org-html.el to be loaded. The new HTML publishing
function is org-html-publish-to-html, so try using that instead
and see if it fixes the problem.

Check Suvayu's document on Worg about 8.x changes:

   http://orgmode.org/worg/org-8.0.html

and Nicolas's announcement referenced therein.

I am sorry for sending so many mails. because i just join into this 
group, and could receive others' mails successfully. but when i send my 
report through emacs i couldn't receive my own mail. so I think there 
may be something wrong with my emacs sending mail setup.. I am really 
sorry for this annoying mail...


as you said, i just use org-html-publish-to-html instead of 
org-publish-0rg-to-html, then this issue is resolved. thanks very much.






Re: [O] warning message while loading ox-bibtex.el

2013-06-04 Thread Vikas Rawal
 It should be fixed. Thank you.



Fixed now. Thanks.

Vikas


Re: [O] :include in org-project-publish-alist

2013-06-04 Thread Vikas Rawal
 I get an error if I use following in org-project-publish-alist
  :include bibliobase_bib.html
 
  The error message says:
  mapc: Wrong type argument: sequencep, 126
 
  The above mentioned html file is generated by ox-bibtex.el. I would
  like it to be published directly as part of the static content.

   ':include' List of files to be included regardless of
  ':base-extension' and ':exclude'.


 What happens if you provide a list instead of a string?


 Yes. this works:

:include (bibliobase_bib.html)

Thanks

Vikas


[O] [PATCH] Expand current word or string in region with matched contact names. (was: [3update] Add functions, Insert a exist contact name at point)

2013-06-04 Thread Feng Shu
Hi:

the function 'org-contacts-get-exist-contact-name-string  will be
used in org-capthure template, for example:

#+begin_example
(c Contacts: 手动输入 entry (file ~/org/i-contacts.org)
  * %(org-contacts-get-exist-contact-name-string %^{prompt})
#+end_example

Note: This function can't work as expect and I fail to find the solution
at this moment. If someone have good  ideas, please mail me. Thanks!

From 9db95556f60e83165edcec18c18e3d5aa65890af Mon Sep 17 00:00:00 2001
From: Feng Shu tuma...@gmail.com
Date: Mon, 3 Jun 2013 23:17:57 +0800
Subject: [PATCH] Expand current word or string in region with matched contact
 names

* org-contacts.el (org-contacts-get-exist-contact-name-list): New
function, return a list, which elements are  matched contact names.
(org-contacts-get-exist-contact-name-string): New macro, return a
string concated with all matched contact names.
(org-contacts-expand-with-contact-names): New function, expand current
word or string in region with matched contact names.

Add new functions, which can expand current word or string in region
with matched contact names. By default, match contact name and alias.
---
 contrib/lisp/org-contacts.el |   40 
 1 个文件被修改,插入 40 行(+)

diff --git a/contrib/lisp/org-contacts.el b/contrib/lisp/org-contacts.el
index 5d63fcc..b0eb838 100644
--- a/contrib/lisp/org-contacts.el
+++ b/contrib/lisp/org-contacts.el
@@ -967,6 +967,46 @@ is created and the VCard is written into that buffer.
 	(current-buffer)
   (progn (save-buffer) (kill-buffer)
 
+(defun org-contacts-get-exist-contact-name-list (string)
+  Return a list, which elements are matched contact names.
+  (let ((contact-list (nconc
+		   (org-contacts-filter
+			nil nil
+			(cons org-contacts-alias-property string))
+		   (org-contacts-filter string
+(setq result-name-list
+	  (delete-dups
+	   (loop for contact in contact-list
+		 collect
+		 (substring-no-properties
+		  ((lambda (contact)
+		 (let* ((name
+			 (org-contacts-vcard-escape (car contact name))
+		   contact)
+(if result-name-list result-name-list (list string
+
+(defmacro org-contacts-get-exist-contact-name-string (string)
+  Return a string, which are concated with all matched contact names.
+ (if (stringp string)
+ `(mapconcat 'identity (org-contacts-get-exist-contact-name-list ,string)  )
+   `(mapconcat 'identity (org-contacts-get-exist-contact-name-list  (symbol-name (quote ,string)))  )))
+
+(defun org-contacts-expand-with-contact-names ()
+  Expand current word or string in region with matched contact names.
+  (interactive)
+  (let ((str (if mark-active
+		 (buffer-substring-no-properties (region-beginning) (region-end))
+	   (current-word nil t
+(current-buffer)
+(let ((inhibit-read-only t)))
+(when (fboundp 'set-buffer-file-coding-system)
+  (set-buffer-file-coding-system coding-system-for-write))
+(backward-delete-char (length str))
+(insert (mapconcat
+	 'identity
+	 (org-contacts-get-exist-contact-name-list str)
+	  
+
 (defun org-contacts-show-map (optional name)
   Show contacts on a map.
 Requires google-maps-el.
-- 
1.7.10.4




feng
-- 


[O] #+EXPORT_SELECT_TAGS: Tags that select a tree for export - documentation incorrect?

2013-06-04 Thread Jean Wallemacq
Emacs 24.3.1
org-mode 8.0.3

In http://orgmode.org/manual/Export-options.html#fn-2, one refers to 
#+EXPORT_SELECT_TAGS: to select a tree for export.

Doesn't work for me.  I used: #+SELECT_TAGS: with success (this was generated 
by C-c C-e #) 


Same applies for #+EXCLUDE_TAGS: ?

Finally, the documentation refers to 
C-c C-e t (org-insert-export-options-template)
to generate a template, but C-c C-e # seems the way to go today

Would it be that the doc is out-of-sync with the code?

Jean




Re: [O] #+EXPORT_SELECT_TAGS: Tags that select a tree for export - documentation incorrect?

2013-06-04 Thread Rasmus
Jean Wallemacq jean.wallem...@skynet.be writes:

 Emacs 24.3.1
 org-mode 8.0.3

 In http://orgmode.org/manual/Export-options.html#fn-2, one refers to

I don't see them any reference to those variables.  Check the manual:

http://orgmode.org/org.html#Export-settings

‘SELECT_TAGS’
The tags that select a tree for export (org-export-select-tags). The 
default value is :export:. Within a subtree tagged with :export:, you can still 
exclude entries with :noexport: (see below).

‘EXCLUDE_TAGS’
The tags that exclude a tree from export (org-export-exclude-tags). The 
default value is :noexport:. Entries with the :noexport: tag will be 
unconditionally excluded from the export, even if they have an :export: tag.

 Would it be that the doc is out-of-sync with the code?

No.

 1. Go to http://orgmode.org/#docs
 2. Click Read the complete manual: HTML or PDF.  It will give you
the page linked to above (or the equivalent pdf version, which I
didn't check).

Also, the html is exported from the texi so you should be able to look
it up directly in Emacs.

–Rasmus

-- 
Hooray!







Re: [O] #+EXPORT_SELECT_TAGS: Tags that select a tree for export - documentation incorrect?

2013-06-04 Thread Nick Dokos
Jean Wallemacq jean.wallem...@skynet.be writes:

 Emacs 24.3.1
 org-mode 8.0.3

 In http://orgmode.org/manual/Export-options.html#fn-2, one refers to
 #+EXPORT_SELECT_TAGS: to select a tree for export.

 Doesn't work for me.  I used: #+SELECT_TAGS: with success (this was
 generated by C-c C-e #)


 Same applies for #+EXCLUDE_TAGS: ?

 Finally, the documentation refers to 
 C-c C-e t (org-insert-export-options-template)
 to generate a template, but C-c C-e # seems the way to go today

 Would it be that the doc is out-of-sync with the code?


Yes, the documentation is behind the code (and some things are
works-in-progress too.) There are some useful pointers at

 http://orgmode.org/worg/org-8.0.html

but the page does not include the ones you found, so thanks for pointing
them out. I might be able to add them to that page later on tonight, but
feel free to beat me to it. The worg page is useful in its own right,
but will also be useful later on when the real docs are updated too.

-- 
Nick




Re: [O] #+EXPORT_SELECT_TAGS: Tags that select a tree for export - documentation incorrect?

2013-06-04 Thread Nick Dokos
Rasmus ras...@gmx.us writes:

 Jean Wallemacq jean.wallem...@skynet.be writes:

 Emacs 24.3.1
 org-mode 8.0.3

 In http://orgmode.org/manual/Export-options.html#fn-2, one refers to

 I don't see them any reference to those variables.  Check the manual:

 http://orgmode.org/org.html#Export-settings

 ‘SELECT_TAGS’
 The tags that select a tree for export
 (org-export-select-tags). The default value is :export:. Within a
 subtree tagged with :export:, you can still exclude entries with
 :noexport: (see below).

 ‘EXCLUDE_TAGS’
 The tags that exclude a tree from export
 (org-export-exclude-tags). The default value is :noexport:. Entries
 with the :noexport: tag will be unconditionally excluded from the
 export, even if they have an :export: tag.

 Would it be that the doc is out-of-sync with the code?

 No.

  1. Go to http://orgmode.org/#docs
  2. Click Read the complete manual: HTML or PDF.  It will give you
 the page linked to above (or the equivalent pdf version, which I
 didn't check).

 Also, the html is exported from the texi so you should be able to look
 it up directly in Emacs.


Gah, that's right: I was looking at the 7.9 manual when I sent my
previous message. Sorry about that.

-- 
Nick




Re: [O] How to omit h1 title heading in HTML export?

2013-06-04 Thread *
Hey Basile
Thanks for your reply!

Yes, the suggestion helps :-)
A blank TITLE option seems to produce some empty tags like so:
h1 class=title/h1

And maybe there are also some jquery fixes, for instance...
$(#content h1:first-child).hide();

Sometimes tricks are fun,
but I guess one of my questions was: Do all documents generated by
HTML export contain the h1 class=titleblabla/h1 markup?

Best,
Ivan

On 6/4/13, flammable project flammable.proj...@gmail.com wrote:
 Hi,

 Here is what I usely do, I ommit (left blank) the content beside the
 #+TITLE: option.

 Maybe it will help you!

 Regards,

 Basile


 2013/6/3 * viki.ve...@gmail.com

 Dear list

 When exporting an Org-mode file to HTML, I have noticed the following:
 the first child of the div with id=content is an h1 heading enclosing
 the filename (minus extension), or the value of TITLE keyword.

 How can I keep HTML export from producing this h1 heading?

 For instance say I have a homepage.org file, and that I export this
 file to HTML with default settings. In the exported HTML file, I would
 find the following snippet:

 body
 div id=content
 h1 class=titlehomepage/h1
 div id=table-of-contents

 For what I'm doing, it would be better if the exported file didn't
 include the line
 h1 class=titlehomepage/h1

 How can I tell HTML export to not put this line in the file that it
 produces?

 At the moment my fix is some CSS...
 div#content  h1:first-child { display: none; }

 I'm using Org-mode version 8.0.3, Emacs 24.3.1

 Best...






Re: [O] How to omit h1 title heading in HTML export?

2013-06-04 Thread Rasmus
* viki.ve...@gmail.com writes:

 Hey Basile
 Thanks for your reply!

 Yes, the suggestion helps :-)
 A blank TITLE option seems to produce some empty tags like so:
 h1 class=title/h1

 And maybe there are also some jquery fixes, for instance...
 $(#content h1:first-child).hide();

 Sometimes tricks are fun,
 but I guess one of my questions was: Do all documents generated by
 HTML export contain the h1 class=titleblabla/h1 markup?

Yes seems like it.  check ox-html.el and org-html--build-meta-info.

If you are very unhappy with blank title solution proposed by
Bastien you could use a filter.  Here's a filter I use for headlines;
you can easily adapt it to your case:

(defun rasmus/org-html-ignore-title-if-present (string backend info)
Strip title if it's already there for html.
(when (and (org-export-derived-backend-p backend 'html)
   (string-match h1 class=\mytitle\ string))
  (replace-regexp-in-string h1 class=\title\.*?/h1  string)))

(add-to-list 'org-export-filter-final-output-functions
 'rasmus/org-html-ignore-title-if-present)




-- 
I hear there's rumors on the, uh, Internets. . .




Re: [O] [html] non-lists showing up as lists

2013-06-04 Thread Samuel Wales
Hi Bastien,

On 6/4/13, Bastien b...@gnu.org wrote:
 On 6/3/13, Carsten Dominik carsten.domi...@gmail.com wrote:
 4. Define that lists alway have to have a newline in front of them.

 I presume Michael means blank line.  I like this.

 Mhhh... I don't.

Perhaps can be optional the way alphabetic lists and numbered list types are.

 5. Define that lists always have to be indented.

 I like this also, and have long wanted c-c - on a region to indent the
 resulting list, but have not figured out how to implement it.

 I strongly dislike this.

Which part?  The latter means this:

Mline
line
  line
P

M and P indicate mark and point, active.

C-c - to make this:

M- line
- line
  - line
P

So I have to go to mark, mark, go to point, C-c -, manually fix the
list by going to M, ^G to deactivate, then actually control shift
right to indent to where I want.  I need to do this every time because
I never put lists at column 0.

All I was saying is that I'd like C-c - on an active region to produce this:

  - line
  - line
- line

Of course I am not saying that this should apply to everybody.
Michael and I like to indent by 2, so for us it would make sense to
make C-c - support that for us.

 Instead, consider this:

Instead of what?


 ,
 |   Indented paragraph.
 |
 | - Item 1
 | - Item 2
 `

 I propose that:

 1. TAB on the dash character of Item 1 could indent the item by two
characters.

 2. Selecting both items in a region then hitting TAB would indent both
items by two characters.

I don't indent paragraphs.  1 conflicts with cycling.  2 is a good
idea in general but not an improvement over the above cumbersome
procedure other than getting rid of ^G.

Samuel

-- 
The Kafka Pandemic: http://thekafkapandemic.blogspot.com

The disease DOES progress.  MANY people have died from it.  ANYBODY can get it.



[O] Two questions about org-export-insert-default-template in new org-exporter

2013-06-04 Thread Robert Goldman
1.  The original org-insert-export-options-template always inserted the
template at the top of the file.  The new one inserts at point.  Since
the options need to be at the top of the file, would there be any
objection to making the new template inserter behave the same way?

2.  Users can directly issue this command using M-x
org-export-insert-default-template, since it's tagged as (interactive).
 Since this is possible, wouldn't it make sense to have the function
query for the BACKEND argument when invoked interactively?

Best,
r



Re: [O] Two questions about org-export-insert-default-template in new org-exporter

2013-06-04 Thread Rasmus
Robert Goldman rpgold...@sift.info writes:

 1.  The original org-insert-export-options-template always inserted the
 template at the top of the file.  The new one inserts at point.  Since
 the options need to be at the top of the file, would there be any
 objection to making the new template inserter behave the same way?

I can't reproduce your claim on Org v8.03.

For instance this works great with html and LaTeX.

#+BEGIN_SRC org
* TODO my topic 
this is my documents with garbage in the bottom 
* hide the boring stuff  :noexport:
#+TITLE: my boring title
#+AUTHOR: my boring name 
#+DATE: Another day at the office
#+OPTIONS: toc:nil todo:nil
#+END_SRC

 2.  Users can directly issue this command using M-x
 org-export-insert-default-template, since it's tagged as (interactive).
  Since this is possible, wouldn't it make sense to have the function
 query for the BACKEND argument when invoked interactively?

Use the export dispatcher.  C-e # or C-e l # (for LaTeX).

–Rasmus

-- 
Enough with the bla bla!




Re: [O] Two questions about org-export-insert-default-template in new org-exporter

2013-06-04 Thread Jonathan Leech-Pepin

Hello,

Rasmus writes:

 Robert Goldman rpgold...@sift.info writes:

 1.  The original org-insert-export-options-template always inserted the
 template at the top of the file.  The new one inserts at point.  Since
 the options need to be at the top of the file, would there be any
 objection to making the new template inserter behave the same way?

 I can't reproduce your claim on Org v8.03.

 For instance this works great with html and LaTeX.

 #+BEGIN_SRC org
 * TODO my topic 
 this is my documents with garbage in the bottom 
 * hide the boring stuff  :noexport:
 #+TITLE: my boring title
 #+AUTHOR: my boring name 
 #+DATE: Another day at the office
 #+OPTIONS: toc:nil todo:nil
 #+END_SRC


I don't remember this being the case in previous versions either, I
usually had something along the lines of

#+BEGIN_SRC org
* Configuration 

 2.  Users can directly issue this command using M-x
 org-export-insert-default-template, since it's tagged as (interactive).
  Since this is possible, wouldn't it make sense to have the function
 query for the BACKEND argument when invoked interactively?

 Use the export dispatcher.  C-e # or C-e l # (for LaTeX).

 –Rasmus




Re: [O] Two questions about org-export-insert-default-template in new org-exporter

2013-06-04 Thread Jonathan Leech-Pepin
Oops, sent incomplete.

On 4 June 2013 14:19, Jonathan Leech-Pepin
jonathan.leechpe...@gmail.com wrote:

 Hello,

 Rasmus writes:

 Robert Goldman rpgold...@sift.info writes:

 1.  The original org-insert-export-options-template always inserted the
 template at the top of the file.  The new one inserts at point.  Since
 the options need to be at the top of the file, would there be any
 objection to making the new template inserter behave the same way?

 I can't reproduce your claim on Org v8.03.

 For instance this works great with html and LaTeX.

 #+BEGIN_SRC org
 * TODO my topic
 this is my documents with garbage in the bottom
 * hide the boring stuff  :noexport:
 #+TITLE: my boring title
 #+AUTHOR: my boring name
 #+DATE: Another day at the office
 #+OPTIONS: toc:nil todo:nil
 #+END_SRC


 I don't remember this being the case in previous versions either, I
 usually had something along the lines of

#+BEGIN_SRC org
,* Configuration :ARCHIVE:
,#+TITLE: TITLE
,#+AUTHOR: me
#+END_SRC

as the last headline in my file.

Regards,
Jon

 2.  Users can directly issue this command using M-x
 org-export-insert-default-template, since it's tagged as (interactive).
  Since this is possible, wouldn't it make sense to have the function
 query for the BACKEND argument when invoked interactively?

 Use the export dispatcher.  C-e # or C-e l # (for LaTeX).

 –Rasmus




Re: [O] export to LaTeX with TOC but without numbers

2013-06-04 Thread Eric S Fraga
Andreas Leha andreas.l...@med.uni-goettingen.de writes:
 Eric S Fraga e.fr...@ucl.ac.uk writes:

[...]

 There are workarounds but they involve using latex directly (to add
 entries to a TOC basically).

 I am aware of that.  Sorry for being unclear.  I would like to automate
 exactly that.

 I use several LaTeX export classes and I would like that possibility
 (TOC with unnumbered sections/subsections/...) in each of these classes.
 Thus, I am searching for a (more) general approach, that I could 'switch on'
 and have it insert the latex statement on its own.

 Best,
 Andreas

Ah, I see.  Well, you could do something along these lines (completely
untested and likely to be wrong...):

#+latex_header: 
\newcommand{\mysection}[1]{\section*{#1}\addcontentsline{toc}{section}{#1}}

and similar for subsection, subsubsection, ...

Then customise org-latex-classes and replace, for instance,
\\section*{%s} by \\mysection{%s}.

However, you'll probably need to put a bit more TeX in the
addcontentsline bit if you want some proper formatting (have a look at
latex.ltx [around line 5659 in my version of this file] to see how
content lines are handled by default...).

Not trivial but also not impossible!

I would suggest you look at latex-specific fora for answers to the more
general question of generating tables of contents for unnumbered
headings as I can imagine that there are simpler solutions.

HTH,
eric

-- 
: Eric S Fraga, GnuPG: 0xC89193D8FFFCF67D
: in Emacs 24.3.50.1 and Org release_8.0.3-193-g334581




[O] lazy command request

2013-06-04 Thread 42 147

Sometimes I accidentally hit a key combination on a headline that
produces the following in the minibuffer:

E-mails / 2013 / June / Meshuggah

So I see precisely where my headline is in the hierarchy. What is the
key combination to produce this information? Very useful, because I hide
stars.

42




[O] Unable to use +LaTeX_HEADER: \input{...} with latex-preview-fragment

2013-06-04 Thread Mark Edgington
I attempted recently to have org-mode use a preamble file when
previewing latex-fragments.  I used a line like the following:

+LaTeX_HEADER: \input{relative-path-to-file.tex}

Unfortunately, the file referenced by the \input{} command doesn't get
copied to the location where the preview tex file is compiled.
Certainly a way of making it work would be to use an absolute path
instead of a relative path, but I really want to have a self-contained
portable directory containing both org-mode and preamble files.

Would it be possible or sensible to make an option which makes
latex-preview-fragment parse +LaTeX_HEADER lines for \input{}
commands, and attempt to copy the input files to the preview
compilation-folder?

Regards,

Mark



Re: [O] export to LaTeX with TOC but without numbers

2013-06-04 Thread Nick Dokos
Andreas Leha andreas.l...@med.uni-goettingen.de writes:

 Hi Eric,

 thanks for your answer.

 Eric S Fraga e.fr...@ucl.ac.uk writes:

 Andreas Leha andreas.l...@med.uni-goettingen.de writes:

 Hi all,

 How can I export to LaTeX with the combined effect of toc:t and num:nil?

 Setting num:nil results in an empty TOC.

 I guess, I am looking for a way to automatically add
 #+begin_latex
   \addcontentsline{toc}{the level}{the heading}
 #+end_latex
 to the exported document.

 Regards,
 Andreas

 Andreas,

 the problem is that setting num:nil tells org to use the second form of
 sectioning, as specified in org-latex-classes.  The unnumbered section
 headings do not generate TOC information so no TOC is available.  It's a
 latex issue, not org.

 There are workarounds but they involve using latex directly (to add
 entries to a TOC basically).

 I am aware of that.  Sorry for being unclear.  I would like to automate
 exactly that.

 I use several LaTeX export classes and I would like that possibility
 (TOC with unnumbered sections/subsections/...) in each of these classes.
 Thus, I am searching for a (more) general approach, that I could 'switch on'
 and have it insert the latex statement on its own.


Instead of adding toc entries, you can use latex to delete section
numbers:

--8---cut here---start-8---
#+LATEX_HEADER: \setcounter{secnumdepth}{0}

* foo
This is foo.

** subfoo1
This is foo.1
** subfoo2
This is foo.2

* bar
This is bar.
--8---cut here---end---8---

The problem might be that the sections are not numbered in the TOC
either. But if you don't care about that, this is certainly simpler
than adding toc entries by hand.

-- 
Nick




Re: [O] export to LaTeX with TOC but without numbers

2013-06-04 Thread Andreas Leha
Hi Eric,

Eric S Fraga e.fr...@ucl.ac.uk writes:

 Andreas Leha andreas.l...@med.uni-goettingen.de writes:
 Eric S Fraga e.fr...@ucl.ac.uk writes:

 [...]

 There are workarounds but they involve using latex directly (to add
 entries to a TOC basically).

 I am aware of that.  Sorry for being unclear.  I would like to automate
 exactly that.

 I use several LaTeX export classes and I would like that possibility
 (TOC with unnumbered sections/subsections/...) in each of these classes.
 Thus, I am searching for a (more) general approach, that I could 'switch on'
 and have it insert the latex statement on its own.

 Best,
 Andreas

 Ah, I see.  Well, you could do something along these lines (completely
 untested and likely to be wrong...):

 #+latex_header: 
 \newcommand{\mysection}[1]{\section*{#1}\addcontentsline{toc}{section}{#1}}

 and similar for subsection, subsubsection, ...

 Then customise org-latex-classes and replace, for instance,
 \\section*{%s} by \\mysection{%s}.

 However, you'll probably need to put a bit more TeX in the
 addcontentsline bit if you want some proper formatting (have a look at
 latex.ltx [around line 5659 in my version of this file] to see how
 content lines are handled by default...).

 Not trivial but also not impossible!

 I would suggest you look at latex-specific fora for answers to the more
 general question of generating tables of contents for unnumbered
 headings as I can imagine that there are simpler solutions.


Thanks for these hints!  When I follow that route I'll have to do
more work I guess:
1. either I have to provide two versions of my org-latex-classes (one
   for numbered and one for un-numbered cases)
2. or I have to provide a filter or sth similar to replace sections
   with mysections, correct?

That's why I would prefer to follow Nick's suggestion.

Regards,
Andreas




Re: [O] lazy command request

2013-06-04 Thread Nick Dokos
42 147 aeus...@gmail.com writes:

 Sometimes I accidentally hit a key combination on a headline that
 produces the following in the minibuffer:

 E-mails / 2013 / June / Meshuggah

 So I see precisely where my headline is in the hierarchy. What is the
 key combination to produce this information? Very useful, because I hide
 stars.


I believe that the function is org-display-outline-path, but at least in
my case, it's not bound to a key. Do C-h w org-display-outline-path RET
and see what it says.

-- 
Nick




Re: [O] #+EXPORT_SELECT_TAGS: Tags that select a tree for export - documentation incorrect?

2013-06-04 Thread Jean Wallemacq
OK, I see indeed that by following the explicit path to the documentation 
(http://orgmode.org/#docs), one reaches the good page: 
http://orgmode.org/org.html#Export-settings.

But, http://orgmode.org/manual/Export-options.html#fn-2 still exists! I was 
there by following a google search.  Judging by the url, the information seemed 
actual and authoritative.  Is there a way to get old pages suppressed, or at 
least moved to a url indicating the version to which it corresponds?

J


Le 4 juin 2013 à 19:06, Nick Dokos ndo...@gmail.com a écrit :

 Rasmus ras...@gmx.us writes:
 
 Jean Wallemacq jean.wallem...@skynet.be writes:
 
 Emacs 24.3.1
 org-mode 8.0.3
 
 In http://orgmode.org/manual/Export-options.html#fn-2, one refers to
 
 I don't see them any reference to those variables.  Check the manual:
 
 http://orgmode.org/org.html#Export-settings
 
 ‘SELECT_TAGS’
The tags that select a tree for export
 (org-export-select-tags). The default value is :export:. Within a
 subtree tagged with :export:, you can still exclude entries with
 :noexport: (see below).
 
 ‘EXCLUDE_TAGS’
The tags that exclude a tree from export
 (org-export-exclude-tags). The default value is :noexport:. Entries
 with the :noexport: tag will be unconditionally excluded from the
 export, even if they have an :export: tag.
 
 Would it be that the doc is out-of-sync with the code?
 
 No.
 
 1. Go to http://orgmode.org/#docs
 2. Click Read the complete manual: HTML or PDF.  It will give you
the page linked to above (or the equivalent pdf version, which I
didn't check).
 
 Also, the html is exported from the texi so you should be able to look
 it up directly in Emacs.
 
 
 Gah, that's right: I was looking at the 7.9 manual when I sent my
 previous message. Sorry about that.
 
 -- 
 Nick
 
 
 




Re: [O] export to LaTeX with TOC but without numbers

2013-06-04 Thread Andreas Leha
Hi Nick,

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

 Andreas Leha andreas.l...@med.uni-goettingen.de writes:

 Hi Eric,

 thanks for your answer.

 Eric S Fraga e.fr...@ucl.ac.uk writes:

 Andreas Leha andreas.l...@med.uni-goettingen.de writes:

 Hi all,

 How can I export to LaTeX with the combined effect of toc:t and num:nil?

 Setting num:nil results in an empty TOC.

 I guess, I am looking for a way to automatically add
 #+begin_latex
   \addcontentsline{toc}{the level}{the heading}
 #+end_latex
 to the exported document.

 Regards,
 Andreas

 Andreas,

 the problem is that setting num:nil tells org to use the second form of
 sectioning, as specified in org-latex-classes.  The unnumbered section
 headings do not generate TOC information so no TOC is available.  It's a
 latex issue, not org.

 There are workarounds but they involve using latex directly (to add
 entries to a TOC basically).

 I am aware of that.  Sorry for being unclear.  I would like to automate
 exactly that.

 I use several LaTeX export classes and I would like that possibility
 (TOC with unnumbered sections/subsections/...) in each of these classes.
 Thus, I am searching for a (more) general approach, that I could 'switch on'
 and have it insert the latex statement on its own.


 Instead of adding toc entries, you can use latex to delete section
 numbers:

 #+LATEX_HEADER: \setcounter{secnumdepth}{0}

 * foo
 This is foo.

 ** subfoo1
 This is foo.1
 ** subfoo2
 This is foo.2

 * bar
 This is bar.

 The problem might be that the sections are not numbered in the TOC
 either. But if you don't care about that, this is certainly simpler
 than adding toc entries by hand.

Thanks for that!  That is really cool and having the entries in the TOC
un-numbered is exactly what I want!

As a follow-up, it would be nice if I could mix
that now again with num:1.  That way I could add a TOC with depth 1
(only sections) and have them un-numbered.

But num:1 add its own '\setcounter{secnumdepth}{1}' (why?) which by default
comes later than than the #+LATEX_HEADER definition:

--8---cut here---start-8---
#+OPTIONS: num:1
#+LATEX_HEADER: \setcounter{secnumdepth}{0}

* foo
This is foo.

** subfoo1
This is foo.1
** subfoo2
This is foo.2

* bar
This is bar.
--8---cut here---end---8---

Regards,
Andreas




Re: [O] icalendar-import-file into org

2013-06-04 Thread AW
Am Dienstag, 4. Juni 2013, 09:07:18 schrieb Nick Nick Dokos:
 AW alexander.will...@t-online.de writes:
  I'd like to have an external calendar file displayed in org and was very
  glad to find a hint in the manual. The name of the external calendar file
  is office.ics.
  
  So I wrote into my .emacs-file:
  
  (icalendar-import-file office.ics Diary)
  (setq org-agenda-include-diary t)
  
  As you can imagine, that caused an import of office.ics _every_ time I
  started Emacs. So I ended with a huge calendar file full of (no, not
  stars)[1] repetitions of office.ics.
 
 You can import the ics file into some temporary diary and
 delete the temporary diary upon exit from emacs:
 
 --8---cut here---start-8---
 (setq tmp-diary (make-temp-file diary))
 (icalendar-import-file /path/to/office.ics tmp-diary)
 
 ;; make it the default...
 (setq diary-file tmp-diary)
 ;; so that org-agenda can find it
 (setq org-agenda-include-diary t)
 
 ;; delete the tmp diary on exit
 (add-to-list 'kill-emacs-hook
  (function
   (lambda ()
 (delete-file tmp-diary
 --8---cut here---end---8---
 
 That assumes that you don't have any other diary files
 that you are interested in including. If you do, the basic
 idea will still work but will require more fiddling.
 
 Untested.

Hi Nick,

thank you for these lines. I realised that I've got a bug in one of my .emacs-
files, but I have to dig where: in Windows or Linux. However, both 
installations of Emacs should format the date exactly the same way. 

I will report when back on the surface,

Regards,
Alexander




Re: [O] lazy command request

2013-06-04 Thread Marcin Borkowski
Dnia 2013-06-04, o godz. 14:57:11
42 147 aeus...@gmail.com napisał(a):

 
 Sometimes I accidentally hit a key combination on a headline that
 produces the following in the minibuffer:
 
 E-mails / 2013 / June / Meshuggah
 
 So I see precisely where my headline is in the hierarchy. What is the
 key combination to produce this information? Very useful, because I
 hide stars.

Try C-h l (alternatively, M-x view-lossage).

 
 42
 
 

hth,


-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University



Re: [O] lazy command request

2013-06-04 Thread Nicolas Richard
42 147 aeus...@gmail.com writes:
 So I see precisely where my headline is in the hierarchy. What is the
 key combination to produce this information? Very useful, because I hide
 stars.

My guess is that you have speedkeys enabled, and you hit SPC at
beginning of a headline. See (info (org) Speed keys)

-- 
Nico.



Re: [O] export to LaTeX with TOC but without numbers

2013-06-04 Thread Nick Dokos
Andreas Leha andreas.l...@med.uni-goettingen.de writes:

 Instead of adding toc entries, you can use latex to delete section
 numbers:

 #+LATEX_HEADER: \setcounter{secnumdepth}{0}
 ...

 The problem might be that the sections are not numbered in the TOC
 either. But if you don't care about that, this is certainly simpler
 than adding toc entries by hand.

 Thanks for that!  That is really cool and having the entries in the TOC
 un-numbered is exactly what I want!

 As a follow-up, it would be nice if I could mix
 that now again with num:1.  That way I could add a TOC with depth 1
 (only sections) and have them un-numbered.


There is a tocdepth counter that you can set similarly. Will that
do what you want?

--8---cut here---start-8---
#+LATEX_HEADER: \setcounter{tocdepth}{1}
#+LATEX_HEADER: \setcounter{secnumdepth}{0}
--8---cut here---end---8---


 But num:1 add its own '\setcounter{secnumdepth}{1}' (why?) which by default
 comes later than than the #+LATEX_HEADER definition:

 #+OPTIONS: num:1
 #+LATEX_HEADER: \setcounter{secnumdepth}{0}



-- 
Nick




Re: [O] how i can add a class to table when export org-mode to html

2013-06-04 Thread Tongzhu Zhang
Hi Bastien ,

Thanks for your reply and sorry  for the wrong mail format i have been send
, that' s my first mail using gnus. so i was sending mail very quickly and
dirty.

Thanks,


On Tue, Jun 4, 2013 at 6:12 PM, Bastien b...@gnu.org wrote:

 Hi Tongzhu,

 Tongzhu Zhang eggca...@gmail.com writes:

  how i can do that ? i tried define the html-table-attributes ,but
  seems noting changes

 See the manual: 12.6.6 Tables.

 Also please do not forget people on this list are not machines,
 and always appreciate some words of politeness.

 Thanks,

 --
  Bastien



Re: [O] export to LaTeX with TOC but without numbers

2013-06-04 Thread Eric Abrahamsen
Andreas Leha andreas.l...@med.uni-goettingen.de writes:

 Hi Eric,

 Eric S Fraga e.fr...@ucl.ac.uk writes:

 Andreas Leha andreas.l...@med.uni-goettingen.de writes:
 Eric S Fraga e.fr...@ucl.ac.uk writes:

 [...]

 There are workarounds but they involve using latex directly (to add
 entries to a TOC basically).

 I am aware of that.  Sorry for being unclear.  I would like to automate
 exactly that.

 I use several LaTeX export classes and I would like that possibility
 (TOC with unnumbered sections/subsections/...) in each of these classes.
 Thus, I am searching for a (more) general approach, that I could 'switch on'
 and have it insert the latex statement on its own.

 Best,
 Andreas

 Ah, I see.  Well, you could do something along these lines (completely
 untested and likely to be wrong...):

 #+latex_header: 
 \newcommand{\mysection}[1]{\section*{#1}\addcontentsline{toc}{section}{#1}}

 and similar for subsection, subsubsection, ...

 Then customise org-latex-classes and replace, for instance,
 \\section*{%s} by \\mysection{%s}.

 However, you'll probably need to put a bit more TeX in the
 addcontentsline bit if you want some proper formatting (have a look at
 latex.ltx [around line 5659 in my version of this file] to see how
 content lines are handled by default...).

 Not trivial but also not impossible!

 I would suggest you look at latex-specific fora for answers to the more
 general question of generating tables of contents for unnumbered
 headings as I can imagine that there are simpler solutions.


 Thanks for these hints!  When I follow that route I'll have to do
 more work I guess:
 1. either I have to provide two versions of my org-latex-classes (one
for numbered and one for un-numbered cases)
 2. or I have to provide a filter or sth similar to replace sections
with mysections, correct?

I've gone the filter route before, with pretty good success: checking
for the type of heading and adding toc statements. In my case I *wanted*
something more complicated, though, using tocloft and \addtocontents. If
you don't need all that then Nick's suggestion seems perfect.




[O] [PATCH] Re: using orgtbl-sqlinsert

2013-06-04 Thread Eric Abrahamsen
Eric Abrahamsen e...@ericabrahamsen.net writes:

 Eric Abrahamsen e...@ericabrahamsen.net writes:

 A very quiet bump, to see if anyone knows how to handle this...

Clearly whining wasn't getting me anywhere, so here's a patch. I don't
claim to understand all the ins and outs of orgtbl-to-generic, so this
might not be complete, but at least it gets it working again. There were
plain old errors in the existing code (undefined variables, etc), so
this has to be an improvement, even if it's incomplete.

So with this patch, calling `org-babel-execute-src-block' on the
#+BEGIN_SRC line in the following:

#+TBLNAME: terms
| Chinese  | English|
|--+|
| 音像制品出版 | A/V Publishing |

#+NAME: insert-statements
#+BEGIN_SRC emacs-lisp :var terms=terms :wrap SRC sqlite :db \dbname.sqlite\
  (orgtbl-to-sqlinsert terms '(:sqlname terms))
#+END_SRC

#+RESULTS: insert-statements

Produces this:

#+RESULTS: insert-statements
#+BEGIN_SRC sqlite :db dbname.sqlite
BEGIN TRANSACTION;
INSERT INTO terms( Chinese, English ) VALUES ( '音像制品出版' , 'A/V Publishing' );
COMMIT;
#+END_SRC


Hope all's in order.

E

From dfec3ea34c4aca1c6e46064e2bd867252b87d46d Mon Sep 17 00:00:00 2001
From: Eric Abrahamsen e...@ericabrahamsen.net
Date: Wed, 5 Jun 2013 11:44:35 +0800
Subject: [PATCH] * contrib/lisp/orgtbl-sqlinsert.el (orgtbl-to-sqlinsert):
 Bugfixes regarding header line formatting

---
 contrib/lisp/orgtbl-sqlinsert.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/contrib/lisp/orgtbl-sqlinsert.el b/contrib/lisp/orgtbl-sqlinsert.el
index f07a0ba..b00c93d 100644
--- a/contrib/lisp/orgtbl-sqlinsert.el
+++ b/contrib/lisp/orgtbl-sqlinsert.el
@@ -70,14 +70,14 @@ this function is called.
  (*orgtbl-default-fmt* 'orgtbl-sql-strip-and-quote)
 	 (params2
 	  (list
-	   :sqlname name
+	   :sqlname (plist-get params :sqlname)
 	   :tstart (lambda () (concat (if nowebname
 	  (format %s= \n nowebname)
 	)
   BEGIN TRANSACTION;))
 	   :tend (lambda () (concat COMMIT; (if nowebname \n@  )))
-	   :hfmt (lambda (f) (progn (if firstheader (push f hdrlist)) ))
-	   :hlfmt (lambda (lst) (setq firstheader nil))
+	   :hfmt (lambda (f) (progn (if firstheader (push f hdrlist) )))
+	   :hlfmt (lambda (rest cells) (setq firstheader nil))
 	   :lstart (lambda () (concat INSERT INTO 
   sqlname ( 
   (mapconcat 'identity (reverse hdrlist)
-- 
1.8.3