Re: [O] Tangling from indirect buffer

2015-09-07 Thread Rainer M Krug
Kyle Meyer  writes:

> Rainer M Krug  writes:
>
>> Hi
>>
>> it seems that tangling from an indirect buffer does not work. Is this by
>> design or a bug?
>
> I don't think that's by design.
>
>> Would it be possible to make this possible?
>
> Does the below patch work for you?  If so, I can test it more thoroughly
> and send a proper patch.

Yes - works perfectly. I would really appreciate this. Please submit.

Thanks,

Rainer
>
>
>
> --
> Kyle

-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax :   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug

PGP: 0x0F52F982


signature.asc
Description: PGP signature


Re: [O] Is there a way to search for link target, not description?

2015-09-07 Thread Oleh Krehel
Marcin Borkowski  writes:

> Hi all,
>
> as in the subject.  So, when I have e.g. [[foo][bar]], C-s finds bar,
> but not foo.
>
> Any way to find foo without e.g. temporarily resorting to text-mode?

The `swiper' command can do this. Available in GNU ELPA. I haven't used
`isearch' for half a year now, only occasionally for testing.

Oleh



Re: [O] Is there a way to search for link target, not description?

2015-09-07 Thread Nicolas Goaziou
Hello,

Marcin Borkowski  writes:

> as in the subject.  So, when I have e.g. [[foo][bar]], C-s finds bar,
> but not foo.
>
> Any way to find foo without e.g. temporarily resorting to text-mode?

You might use `visible-mode' temporarily.

Regards,

-- 
Nicolas Goaziou



[O] compile latex on remote server

2015-09-07 Thread Zhihao Ding
Dear org experts,

I'm working on an org file on a remote server using tramp. Often I need to
export beamer slides from it. I realised that it has problems with the file
paths, which currently are local with respect to the server. I thus had to
first export a tex file, which worked fine over tramp, then compile it in a
shell on the server.

I'd like to speed this up to do the process in one go, as if I am working
on a local machine. Sometimes when the latex file has references I then had
to compile one extra time for bibtex, which soon became tedious.

Thanks !

Zhihao


Re: [O] paste from clip to code block

2015-09-07 Thread John Kitchin
Neat. Do you have some handy way to store a link to the source block, or
jump to them?

Grant Rettke writes:

> On Thu, May 7, 2015 at 2:59 AM, Sebastien Vauban
>  wrote:
>> John Kitchin wrote:
>>> I have these templates defined in my setup:
>
> I used my duplicated Org macros as an excuse to learn YASnippet and
> came up with this. It is work in progress, but it works. I got tired
> of entering a name so many times along with an output file during
> exploratory programming in the .emacs.el:
> https://github.com/grettke/help/blob/master/yasnippet/org-mode/sc. It
> does require learning YAS at some point, and it is worth it.
>
> # -*- mode: snippet -*-
> # key: sc
> # name: Source Block
> # group: HELP
> # contributor: g...@wisdomandwonder.com
> # --
> #+NAME: ${1:`(org-id-new)`}
> #+BEGIN_SRC ${2:$$(yas-choose-value '("emacs-lisp" "org" "sass" "R"
> "ditaa" "dot" "plantuml"))}${2:$(when (-contains? '("ditaa" "dot"
> "plantuml") yas-text) (concat " :file \\"./image/" (yas-field-value 1)
> ".png\\""))} $3
> $0
> #+END_SRC

--
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu



Re: [O] Multiple footnote references in included file

2015-09-07 Thread Leonard Randall
Thanks so much! It works.

One issue that I noticed, however, is that the exporter will still give an
error for an undefined footnote if a footnote is undefined in a heading
that is excluded from export via the exclude tags function. For example if
I have tagged a heading 'noexp' in one of my included files, and list noexp
on the excluded tags line of the header of my master file the exporter will
still complain if there is an undefined footnote under this header.
If I export a master file with this code:
---
#+EXCLUDE_TAGS: noexp archive notes tasks ARCHIVE
#+INCLUDE: "./1WorkingDraft.org"
---
It will complain if there is any undefined footnote reference in
1WorkingDraft.org , regardless if it is under a heading marked with one of
the excluded tags.

It will not complain about this, however, if I explicitly limit the range
of the include function to the headings that I wish to export using a
custom id.
---
#+INCLUDE: "./1WorkingDraft.org::#Chapter1"
---
This problem is not a big issue insofar as it is relatively easy to work
around, and I probably should not have undefined footnote references
hanging around in my org files anyway, but I figure that you should know
about the behaviour, as I do not think that it is intended.

All best,
Leonard

On 6 September 2015 at 21:21, Nicolas Goaziou 
wrote:

> Hello,
>
> Leonard Randall  writes:
>
> > I have my thesis divided into several chapters each with its own org
> file.
> > I was trying to use org's Include function to compile a pdf of the
> complete
> > draft using a master file. However, I found that if there was more than
> one
> > reference to the same footnote in one of my chapter files, the exporter
> > would complain that a footnote was undefined.
> >
>
> [...]
>
> > Suppose this is the master file:
> >
> >  Begin Master.org ---
> > * Here is my master file
> > It has an include command.
> > #+INCLUDE: "./Included.org"
> > --- End Master.org ---
> >
> > If I try to export this file it will throw up an error with either one of
> > the following include files.
> > --- begin Included.org ---
> > #+EXCLUDE_TAGS: noexp archive notes
> > #+ARCHIVE: ::* Archived
> > * This is a headline.
> >
> > This is some text. [fn:dd1cd1f9]
> > * Archive
> :archive:
> > ** This is a headline (draft 0)
> > Here is a previous version of the text to which I affixed the same
> > footnote. [fn:dd1cd1f9]
> > * Footnotes
> >
> > [fn:dd1cd1f9] Here is the footnote
>
> Fixed. Thank you.
>
> > --- begin Included.org ---
> > * This is a headline.
> > This is some text. [fn:dd1cd1f9]
> >
> > Here is some more text to which I wish to affix the same footnote.
> > [fn:dd1cd1f9]
>
> This is a footnote /definition/ since it starts at column 0.
>
> > * Footnotes
> >
> > [fn:dd1cd1f9] Here is a footnote
>
> This is a second footnote definition for the same label. Syntax is too
> much faulty for a clean export.
>
>
> Regards,
>
> --
> Nicolas Goaziou
>


Re: [O] compile latex on remote server

2015-09-07 Thread Charles C. Berry

On Mon, 7 Sep 2015, Zhihao Ding wrote:


My emacs session is local and I am using tramp to open the org file on the
remote server. Then when I tried to export it to latex and compile I get
that error messages.

Cheers,
Zhihao


On 7 September 2015 at 14:39, Loris Bennett 
wrote:


Hi Zhihao,

Zhihao Ding  writes:


Thanks for your reply. In export if I do "l P" or "l O" I get the follow
messages

Transcript written on .//texput.log.
This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/Debian)
restricted \write18 enabled.
entering extended mode
! I can't find file `/ssh:zhihao@server:/data/home/zhihao/sgt.tex'.


Is this file created on the remote server?  If so, can you open it in
Emacs via tramp?

Cheers,

Loris


I confirm this behavior. Looks like the shell command to produce the pdf 
runs on the remote, but uses the tramp filename.


Maybe something like

diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index ddbbd33..dce83af 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -3456,7 +3456,8 @@ Return PDF file name or an error if it couldn't be 
produced."

 (replace-regexp-in-string
  "%b" (shell-quote-argument base-name)
  (replace-regexp-in-string
-  "%f" (shell-quote-argument full-name)
+  "%f" (shell-quote-argument
+(org-babel-local-file-name full-name))
   (replace-regexp-in-string
"%o" (shell-quote-argument out-dir) command t t) t t) t t)
 outbuf))


will fix it.

It runs on my setup - producing a pdf on the remote 
server, but I have not run `make test'.


HTH,

Chuck



Re: [O] compile latex on remote server

2015-09-07 Thread Zhihao Ding
Thanks for your reply. In export if I do "l P" or "l O" I get the follow
messages


Transcript written on .//texput.log.
This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/Debian)
 restricted \write18 enabled.
entering extended mode
! I can't find file `/ssh:zhihao@server:/data/home/zhihao/sgt.tex'.
<*>  server:/data/home/zhihao/sgt.tex

(Press Enter to retry, or Control-D to exit)
Please type another input file name
! Emergency stop.
<*>  server:/data/home/zhihao/sgt.tex

!  ==> Fatal error occurred, no output PDF file produced!


On 7 September 2015 at 14:14, Loris Bennett 
wrote:

> Hi Zhihao,
>
> Zhihao Ding  writes:
>
> > Dear org experts,
> >
> > I'm working on an org file on a remote server using tramp. Often I need
> to
> > export beamer slides from it. I realised that it has problems with the
> file
> > paths, which currently are local with respect to the server. I thus had
> to first
> > export a tex file, which worked fine over tramp, then compile it in a
> shell on
> > the server.
> >
> > I'd like to speed this up to do the process in one go, as if I am
> working on a
> > local machine. Sometimes when the latex file has references I then had to
> > compile one extra time for bibtex, which soon became tedious.
> >
> > Thanks !
> >
> > Zhihao
>
> What errors are you getting?  I regularly export PDFs from remote org
> files (albeit via sshfs) and have no problems.
>
> Cheers,
>
> Loris
>
> --
> This signature is currently under construction.
>
>
>


-- 
Regards,
Zhihao Ding


Re: [O] compile latex on remote server

2015-09-07 Thread Loris Bennett
Hi Zhihao,

Zhihao Ding  writes:

> Thanks for your reply. In export if I do "l P" or "l O" I get the follow
> messages
>
> Transcript written on .//texput.log.
> This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/Debian)
> restricted \write18 enabled.
> entering extended mode
> ! I can't find file `/ssh:zhihao@server:/data/home/zhihao/sgt.tex'.

Is this file created on the remote server?  If so, can you open it in
Emacs via tramp?

Cheers,

Loris


> <*>  server:/data/home/zhihao/sgt.tex
> (Press Enter to retry, or Control-D to exit)
> Please type another input file name
> ! Emergency stop.
> <*>  server:/data/home/zhihao/sgt.tex
> ! ==> Fatal error occurred, no output PDF file produced!
>
> On 7 September 2015 at 14:14, Loris Bennett  
> wrote:
>
> Hi Zhihao,
> 
> 
> 
> Zhihao Ding  writes:
> 
> > Dear org experts,
> >
> > I'm working on an org file on a remote server using tramp. Often I need 
> to
> > export beamer slides from it. I realised that it has problems with the
> file
> > paths, which currently are local with respect to the server. I thus had 
> to
> first
> > export a tex file, which worked fine over tramp, then compile it in a
> shell on
> > the server.
> >
> > I'd like to speed this up to do the process in one go, as if I am 
> working
> on a
> > local machine. Sometimes when the latex file has references I then had 
> to
> > compile one extra time for bibtex, which soon became tedious.
> >
> > Thanks !
> >
> > Zhihao
> 
> 
> What errors are you getting? I regularly export PDFs from remote org
> files (albeit via sshfs) and have no problems.
> 
> Cheers,
> 
> Loris
> 
> --
> This signature is currently under construction.

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




Re: [O] compile latex on remote server

2015-09-07 Thread Loris Bennett
Hi Zhihao,

Zhihao Ding  writes:

> Dear org experts, 
>
> I'm working on an org file on a remote server using tramp. Often I need to
> export beamer slides from it. I realised that it has problems with the file
> paths, which currently are local with respect to the server. I thus had to 
> first
> export a tex file, which worked fine over tramp, then compile it in a shell on
> the server. 
>
> I'd like to speed this up to do the process in one go, as if I am working on a
> local machine. Sometimes when the latex file has references I then had to
> compile one extra time for bibtex, which soon became tedious. 
>
> Thanks !
>
> Zhihao

What errors are you getting?  I regularly export PDFs from remote org
files (albeit via sshfs) and have no problems.

Cheers,

Loris

-- 
This signature is currently under construction.




Re: [O] compile latex on remote server

2015-09-07 Thread Zhihao Ding
My emacs session is local and I am using tramp to open the org file on the
remote server. Then when I tried to export it to latex and compile I get
that error messages.

Cheers,
Zhihao


On 7 September 2015 at 14:39, Loris Bennett 
wrote:

> Hi Zhihao,
>
> Zhihao Ding  writes:
>
> > Thanks for your reply. In export if I do "l P" or "l O" I get the follow
> > messages
> >
> > Transcript written on .//texput.log.
> > This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/Debian)
> > restricted \write18 enabled.
> > entering extended mode
> > ! I can't find file `/ssh:zhihao@server:/data/home/zhihao/sgt.tex'.
>
> Is this file created on the remote server?  If so, can you open it in
> Emacs via tramp?
>
> Cheers,
>
> Loris
>
>
> > <*>  server:/data/home/zhihao/sgt.tex
> > (Press Enter to retry, or Control-D to exit)
> > Please type another input file name
> > ! Emergency stop.
> > <*>  server:/data/home/zhihao/sgt.tex
> > ! ==> Fatal error occurred, no output PDF file produced!
> >
> > On 7 September 2015 at 14:14, Loris Bennett 
> wrote:
> >
> > Hi Zhihao,
> >
> >
> >
> > Zhihao Ding  writes:
> >
> > > Dear org experts,
> > >
> > > I'm working on an org file on a remote server using tramp. Often I
> need to
> > > export beamer slides from it. I realised that it has problems with
> the
> > file
> > > paths, which currently are local with respect to the server. I
> thus had to
> > first
> > > export a tex file, which worked fine over tramp, then compile it
> in a
> > shell on
> > > the server.
> > >
> > > I'd like to speed this up to do the process in one go, as if I am
> working
> > on a
> > > local machine. Sometimes when the latex file has references I then
> had to
> > > compile one extra time for bibtex, which soon became tedious.
> > >
> > > Thanks !
> > >
> > > Zhihao
> >
> >
> > What errors are you getting? I regularly export PDFs from remote org
> > files (albeit via sshfs) and have no problems.
> >
> > Cheers,
> >
> > Loris
> >
> > --
> > This signature is currently under construction.
>
> --
> Dr. Loris Bennett (Mr.)
> ZEDAT, Freie Universität Berlin Email loris.benn...@fu-berlin.de
>
>
>


-- 
Regards,
Zhihao Ding


Re: [O] paste from clip to code block

2015-09-07 Thread Grant Rettke
On Mon, Sep 7, 2015 at 9:09 AM, John Kitchin  wrote:
> Neat. Do you have some handy way to store a link to the source block, or
> jump to them?

I don't, but please tell us more about what you mean.



[O] ob-csharp

2015-09-07 Thread thomas

Hi,

could not find ob-csharp in org mode. I created one to make the pointy 
haired boss happy.


It's based on Eric's ob-java.el with some bits taken from other ob files.

It works for the simple examples following below.

Hope this is useful and I'm open for hints to improve the code.

- thomas



* ob-csharp Tests

** Hello World

#+BEGIN_SRC csharp
class HelloWorld {
  public static void Main()
  {
System.Console.WriteLine("Hello World!");
  }
}
#+END_SRC

#+RESULTS:
: Hello World!



** Tables

#+BEGIN_SRC csharp
class Table {
  public static void Main()
  {
for (char  c = 'a'; c < 'd'; c++)
  System.Console.Write("{0} ",c);
System.Console.WriteLine();
for (int i = 0; i < 3; i++)
  System.Console.Write("{0} ",i);
  }
}
#+END_SRC

#+RESULTS:
| a | b | c |
| 0 | 1 | 2 |

** Compiler flags and command line args

#+BEGIN_SRC csharp :cmpflag -warnaserror+
public class TestFlags {
  public static void Main()
  {
   int i;  // unused; throw error
   System.Console.WriteLine("You won't see this!");
  }
}
#+END_SRC

#+RESULTS:

#+BEGIN_SRC csharp :results verbatim  :cmdline --version
public class TestCmd {
  public static void Main()
  {
   System.Console.WriteLine("You won't see this!");
  }
}
#+END_SRC

#+RESULTS:
#+begin_example
Mono JIT compiler version 3.2.8 (Debian 3.2.8+dfsg-10)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. 
www.mono-project.com

TLS:   __thread
SIGSEGV:   altstack
Notifications: epoll
Architecture:  amd64
Disabled:  none
Misc:  softdebug
LLVM:  supported, not enabled.
GC:sgen
#+end_example


;;; ob-csharp.el --- org-babel functions for csharp evaluation

;; Copyright (C) 2011-2015 Free Software Foundation, Inc.

;; Author: Eric Schulte
;; Keywords: literate programming, reproducible research
;; Homepage: http://orgmode.org

;; This file is part of GNU Emacs.

;; GNU Emacs is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.

;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;; GNU General Public License for more details.

;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs.  If not, see .

;;; Commentary:

;; Currently this only supports the external compilation and execution
;; of csharp code blocks (i.e., no session support).

;;; Code:
(require 'ob)
(require 'csharp-mode) ;; http://www.emacswiki.org/emacs/CSharpMode

(defvar org-babel-tangle-lang-exts)
(add-to-list 'org-babel-tangle-lang-exts '("cs" . "cs"))

(defcustom org-babel-csharp-command "mono"
  "Name of the csharp command.
May be either a command in the path, like mono
or an absolute path name, like /usr/local/bin/mono
parameters may be used, like mono -verbose"
  :group 'org-babel
  :version "24.3"
  :type 'string)

(defcustom org-babel-csharp-compiler "mcs"
  "Name of the csharp compiler.
May be either a command in the path, like mcs
or an absolute path name, like /usr/local/bin/mcs
parameters may be used, like mcs -warnaserror"
  :group 'org-babel
  :version "24.3"
  :type 'string) 


(defun org-babel-execute:csharp (body params)
  (let* ((full-body (org-babel-expand-body:generic body params))
	 (cmpflag (or (cdr (assoc :cmpflag params)) ""))
	 (cmdline (or (cdr (assoc :cmdline params)) ""))
	 (src-file (org-babel-temp-file "csharp-src-" ".cs"))
	 (exe-file (concat (file-name-sans-extension src-file)  ".exe"))
	 (compile 
	  (progn (with-temp-file  src-file (insert full-body))
		 (org-babel-eval 
		  (concat org-babel-csharp-compiler " " cmpflag " "  src-file) ""
(let ((results (org-babel-eval (concat org-babel-csharp-command " " cmdline " " exe-file) "")))
  (org-babel-reassemble-table
   (org-babel-result-cond (cdr (assoc :result-params params))
	 (org-babel-read results)
 (let ((tmp-file (org-babel-temp-file "c-")))
   (with-temp-file tmp-file (insert results))
   (org-babel-import-elisp-from-file tmp-file)))
   (org-babel-pick-name
(cdr (assoc :colname-names params)) (cdr (assoc :colnames params)))
   (org-babel-pick-name
(cdr (assoc :rowname-names params)) (cdr (assoc :rownames params)))

(defun org-babel-prep-session:csharp (session params)
  "Return an error because csharp does not support sessions."
  (error "csharp does not support sessions"))


(provide 'ob-csharp)



;;; ob-csharp.el ends here


Re: [O] maybe ordered list broken

2015-09-07 Thread Jude DaShiell
It was my file that had the wrong format.  This brings up another 
couple questions.  What is the correct left margin for notes/list items 
that will take up more than a single line using ordered list mode inside 
org-mode?  A second question and if an answer or answers for this one 
exist they may be helpful for others.  Can org-mode be set so that say in 
ordered list mode when a note or list item gets beyond x margin org-mode 
will wrap lines and keep succeeding lines between the correct left margin 
for continuation lines and the x right margin?  That is, a user can type a 
list item/note on a single line or at least it appears that way to them, 
but org-mode will automatically split continuation lines correctly and 
that is how the ordered list mode will save that document.




--




Re: [O] Exporting multilingual documents (with Japanese) to PDF

2015-09-07 Thread Robert Klein
Hi,

On Mon, 07 Sep 2015 19:18:02 -0500
Luis Felipe López Acevedo  wrote:

> Hi,
> 
> I'm using Emacs 24.4.1 on Debian 8. I currently can export to PDF 
> documents that mix English and Spanish, but a simple document like
> the following produces a PDF with no Japanese characters at all. Only
> the English and Spanish text is visible.
> 
>  #+TITLE: Notes on Japanese
>  #+DATE: 2015-09-07
> 
> 
>  * 2015年9月7日
> 
>  - おはようございます!
>  - Good morning!
>  - ¡Buenos días!
> 
> The "Org PDF LaTeX Output" shows several errors like this one:
> 
>  ! Package inputenc Error: Unicode char \u8:年 not set up for use
> with LaTeX.
> 
> The complete log: 
> https://bitbucket.org/sirgazil/dnd/downloads/nihongo.log
> 
> Searching for a solution on the Web I found this post 
> http://blogs.fsfe.org/ciaran/?p=150. When I use "pdflatex JIS.tex" as 
> indicated there, I get a good PDF with Japanese characters.
> 
> So I'm wondering how to get this working on Org mode...
> 

like Thomas Dye showed in his mail, you have to encapsulate the
Japanese text in LaTeX with \begin{CJK} and \end{CJK}.

You can also use links or macros (using links).  An example (for
Chinese, but Japanese is basically the same, except the fonts):

Put the following in your .emacs:

#+begin_src elisp
  (org-add-link-type
   "zh" nil
   (lambda (path desc format)
 (cond
  ((eq format 'html)
   (format "%s" desc))
  ((eq format 'latex)
   (format "\\zh{%s}" desc)
#+end_src

Put the following in the head of your org file:

#+begin_src org
  #+LaTeX_HEADER: %% CJK stuff
  #+LaTeX_HEADER: \usepackage[encapsulated]{CJK}
  #+LaTeX_HEADER: \usepackage[CJK, overlap]{ruby}
  #+LaTeX_HEADER: \usepackage{pinyin}

  #+LaTeX_HEADER: \newcommand{\zh}[1]{\begin{CJK}{UTF8}{gkai}\Large
#1\end{CJK}} % gb2312 kai #+LaTeX_HEADER: \renewcommand{\rubysize}{0.5}

  #+LaTeX_HEADER: %% pinyin 1st and 3rd tone (shortened)
  #+LaTeX_HEADER: \usepackage{newunicodechar}
  #+LaTeX_HEADER: \newunicodechar{ǎ}{\v{a}}
  #+LaTeX_HEADER: \newunicodechar{ǐ}{\v{\i}}

  #+Macro: zh [[zh:][$1]]
#+end_src org 


Then use CJK in your org file like this:

#+begin_src org
  Now you can user CJK characters like {{{zh(你好!)}}} (Nǐ hǎo) or
  [[zh:][你好!]].
#+end_src

Best regards
Robert




Re: [O] Archiving method

2015-09-07 Thread edward sillador
Hi Tobias,

For archiving, I follow Bernt Hansen's nice tutorial here.

http://doc.norang.ca/org-mode.html#Archiving


On Tue, Sep 8, 2015 at 1:36 PM, Tobias Frischholz  wrote:

> Hi there,
>
> I’m curious about how you archive your DONE items.
> I’ve stumbled upon this snippet, which seems good enough for me:
>
> http://stackoverflow.com/questions/6997387/how-to-archive-all-the-done-tasks-using-a-single-command/27043756#27043756
>
> However, I think I would like to have the archived items in a datetree.
> The manual mentions that this is possible with the variable
> "org-archive-location”, but I couldn’t find any information about it.
>
>
> Best regards,
> Tobias Frischholz
>
> PGP PUBLIC KEY: http://pgp.mit.edu/pks/lookup?search=0xCD463AC1=index
>
>


Re: [O] Helm update brings "funcall: Symbol's value as variable is void: helm-walk-ignore-directories"

2015-09-07 Thread Malcolm Purvis
> "Eduardo" == Eduardo Mercovich  writes:

Eduardo> Just found it. The new installed version was not included in
Eduardo> .emacs in the (add-to-list 'load-path "[snip]") part.

Eduardo> Is this the expected behavior when we update through the
Eduardo> package manager?

The package manager does not unload the old package and load new package
as part of the upgrade.  As a consequence, I always restart Emacs after
upgrading packages to avoid problems like this.

Malcolm

-- 
   Malcolm Purvis 



[O] Where to get started in creating my own org-mode exporter?

2015-09-07 Thread edward sillador
Hello,

I want to create my own org-mode exporter to support back end for latex
pgfgantt package. Could someone please point me on a
tutorial/reference on how to get started?

Thank you.


[O] [PATCH v2 3/3] org-capture.el: Add support for week trees.

2015-09-07 Thread Rüdiger Sonderfeld
* lisp/org-capture.el (org-capture-templates): Add
  file+weektree(+prompt) options.
  (org-capture-set-target-location): Add support for week trees.
* doc/org.texi (Template elements): Document file+weektree(+prompt)
  options.
---
 doc/org.texi|  7 +++
 lisp/org-capture.el | 26 +-
 2 files changed, 28 insertions(+), 5 deletions(-)

diff --git a/doc/org.texi b/doc/org.texi
index ed808be..d894f91 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -7187,6 +7187,13 @@
 @item (file+datetree+prompt "path/to/file")
 Will create a heading in a date tree, but will prompt for the date.
 
+@item (file+weektree "path/to/file")
+Will create a heading in a week tree for today's date.  Week trees are sorted
+by week and not by month unlike datetrees.
+
+@item (file+weektree+prompt "path/to/file")
+Will create a heading in a week tree, but will prompt for the date.
+
 @item (file+function "path/to/file" function-finding-location)
 A function to find the right location in the file.
 
diff --git a/lisp/org-capture.el b/lisp/org-capture.el
index 93a7f2a..320954e 100644
--- a/lisp/org-capture.el
+++ b/lisp/org-capture.el
@@ -149,6 +149,12 @@ (defcustom org-capture-templates nil
  (file+datetree+prompt \"path/to/file\")
  Will create a heading in a date tree, prompts for date
 
+ (file+weektree \"path/to/file\")
+ Will create a heading in a week tree for today's date
+
+ (file+weektree+prompt \"path/to/file\")
+ Will create a heading in a week tree, prompts for date
+
  (file+function \"path/to/file\" function-finding-location)
  A function to find the right location in the file
 
@@ -321,6 +327,12 @@ (defcustom org-capture-templates nil
  (list :tag "File & Date tree, prompt for date"
(const :format "" file+datetree+prompt)
(file :tag "  File"))
+ (list :tag "File & Week tree"
+   (const :format "" file+weektree)
+   (file :tag "  File"))
+ (list :tag "File & Week tree, prompt for date"
+   (const :format "" file+weektree+prompt)
+   (file :tag "  File"))
  (list :tag "File & function"
(const :format "" file+function)
(file :tag "  File")
@@ -895,21 +907,25 @@ (defun org-capture-set-target-location ( target)
  (setq target-entry-p (and (derived-mode-p 'org-mode) 
(org-at-heading-p
  (error "No match for target regexp in file %s" (nth 1 target
 
-   ((memq (car target) '(file+datetree file+datetree+prompt))
+   ((memq (car target) '(file+datetree file+datetree+prompt file+weektree 
file+weektree+prompt))
(require 'org-datetree)
(set-buffer (org-capture-target-buffer (nth 1 target)))
(org-capture-put-target-region-and-position)
(widen)
-   ;; Make a date tree entry, with the current date (or yesterday,
-   ;; if we are extending dates for a couple of hours)
-   (org-datetree-find-date-create
+   ;; Make a date/week tree entry, with the current date (or
+   ;; yesterday, if we are extending dates for a couple of hours)
+   (funcall
+(cond
+ ((memq (car target) '(file+weektree file+weektree+prompt))
+  #'org-datetree-find-iso-week-create)
+ (t #'org-datetree-find-date-create))
 (calendar-gregorian-from-absolute
  (cond
   (org-overriding-default-time
;; use the overriding default time
(time-to-days org-overriding-default-time))
 
-  ((eq (car target) 'file+datetree+prompt)
+  ((memq (car target) '(file+datetree+prompt file+weektree+prompt))
;; prompt for date
(let ((prompt-time (org-read-date
nil t nil "Date for tree entry:"
-- 
2.5.1




Re: [O] [PATCH 2/3] org-datetree.el: Add support for ISO week trees.

2015-09-07 Thread Rüdiger Sonderfeld
On Thursday 03 September 2015 07:55:08 Nicolas Goaziou wrote:
> Rüdiger Sonderfeld  writes:
> > On Wednesday 02 September 2015 21:58:17 Nicolas Goaziou wrote:
> >> Rüdiger Sonderfeld  writes:
> >> > +(let ((prop (org-find-property "DATE_WEEK_TREE")))
> >> 
> >> I don't think we need to introduce a new property for that. DATE_TREE is
> >> enough.
> > 
> > Since DATE_TREE and DATE_WEEK_TREE (or WEEK_TREE instead?) are structured
> > differently it might make sense to keep the property separated.
> 
> If you want both a date tree and a week tree in the same, you probably
> want them to start at the same level, don't you?

I don't think that's necessarily true since both formats don't mix well.  If 
anyone still wants it then they can simply add both properties.

I've send updated versions of the patches as a reply to this message.

Regards,

Rüdiger




[O] Exporting multilingual documents (with Japanese) to PDF

2015-09-07 Thread Luis Felipe López Acevedo

Hi,

I'm using Emacs 24.4.1 on Debian 8. I currently can export to PDF 
documents that mix English and Spanish, but a simple document like the 
following produces a PDF with no Japanese characters at all. Only the 
English and Spanish text is visible.


#+TITLE: Notes on Japanese
#+DATE: 2015-09-07


* 2015年9月7日

- おはようございます!
- Good morning!
- ¡Buenos días!

The "Org PDF LaTeX Output" shows several errors like this one:

! Package inputenc Error: Unicode char \u8:年 not set up for use with 
LaTeX.


The complete log: 
https://bitbucket.org/sirgazil/dnd/downloads/nihongo.log


Searching for a solution on the Web I found this post 
http://blogs.fsfe.org/ciaran/?p=150. When I use "pdflatex JIS.tex" as 
indicated there, I get a good PDF with Japanese characters.


So I'm wondering how to get this working on Org mode...

--
Luis Felipe López Acevedo
http://sirgazil.bitbucket.org/



Re: [O] Exporting multilingual documents (with Japanese) to PDF

2015-09-07 Thread Thomas S . Dye
Aloha Luis,

Luis Felipe López Acevedo  writes:

> Hi,
>
> I'm using Emacs 24.4.1 on Debian 8. I currently can export to PDF 
> documents that mix English and Spanish, but a simple document like the 
> following produces a PDF with no Japanese characters at all. Only the 
> English and Spanish text is visible.
>
>  #+TITLE: Notes on Japanese
>  #+DATE: 2015-09-07
>
>
>  * 2015年9月7日
>
>  - おはようございます!
>  - Good morning!
>  - ¡Buenos días!
>
> The "Org PDF LaTeX Output" shows several errors like this one:
>
>  ! Package inputenc Error: Unicode char \u8:年 not set up for use with 
> LaTeX.
>
> The complete log: 
> https://bitbucket.org/sirgazil/dnd/downloads/nihongo.log
>
> Searching for a solution on the Web I found this post 
> http://blogs.fsfe.org/ciaran/?p=150. When I use "pdflatex JIS.tex" as 
> indicated there, I get a good PDF with Japanese characters.
>
> So I'm wondering how to get this working on Org mode...

The following illustrates one approach.  You'll probably have to augment
the definition of the LaTeX class by adding fonts, etc., but if you have
a working example on your system that should not be hard.  Note that
the example relies on the setup code, so you'll either need to read the
code from its own file or refresh the setup with C-c C-c when point is
on one of the #+ lines at the top.

#+SELECT_TAGS: export
#+EXCLUDE_TAGS: noexport
#+CREATOR: Emacs 24.5.1 (Org mode 8.3.1)
#+OPTIONS: ':nil *:t -:t ::t <:t H:3 \n:nil ^:t arch:headline
#+OPTIONS: author:nil c:nil creator:nil d:(not "LOGBOOK") date:nil e:t
#+OPTIONS: email:nil f:t inline:t num:t p:nil pri:nil prop:nil stat:t
#+OPTIONS: tags:t tasks:t tex:t timestamp:t title:nil toc:nil todo:t |:t
#+LATEX_CLASS: japanese

* Acevedo example

#+attr_latex: :options [dnp]{JIS}{min}
#+begin_CJK*
I can write this 私はキランです in Japanese.
#+end_CJK*

* Setup code   :noexport:
#+name: japanese-class
#+header: :results silent
#+begin_src emacs-lisp
(add-to-list 'org-latex-classes
'("japanese"
  "\\documentclass{scrartcl}
 [NO-DEFAULT-PACKAGES]
 [PACKAGES]
 [EXTRA]
   \\usepackage{CJK}
   \\usepackage{hyperref}"
 ("\\section{%s}" . "\\section*{%s}")
 ("\\subsection{%s}" . "\\subsection*{%s}")
 ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
 ("\\paragraph{%s}" . "\\paragraph*{%s}")
 ("\\subparagraph{%s}" . "\\subparagraph*{%s}")))
#+end_src


* Local variables  :noexport:
# Local Variables:
# coding: euc-japan
# eval: (sbe "japanese-class")

hth,
Tom

-- 
Thomas S. Dye
http://www.tsdye.com



[O] [PATCH v2 2/3] org-datetree.el: Add support for ISO week trees.

2015-09-07 Thread Rüdiger Sonderfeld
* lisp/org-datetree.el (org-datetree-find-iso-date-create): New function.
(org-datetree--find-create): Support fixed text for insert.
(org-datetree-insert-line): Support fixed text for insert.
* testing/lisp/test-org-datetree.el (test-org-datetree/find-iso-date-create):
New test.

ISO week trees order dates by week and not by month.
---
 lisp/org-datetree.el  | 68 -
 testing/lisp/test-org-datetree.el | 92 +++
 2 files changed, 149 insertions(+), 11 deletions(-)

diff --git a/lisp/org-datetree.el b/lisp/org-datetree.el
index ea7afe7..1c24927 100644
--- a/lisp/org-datetree.el
+++ b/lisp/org-datetree.el
@@ -78,11 +78,55 @@ (defun org-datetree-find-date-create (date  
keep-restriction)
"^\\*+[ \t]+%d-%02d-\\([0123][0-9]\\) \\w+$"
year month day
 
-(defun org-datetree--find-create (regex year  month day)
+;;;###autoload
+(defun org-datetree-find-iso-week-create (date  keep-restriction)
+  "Find or create an ISO week entry for DATE.
+Compared to `org-datetree-find-date-create' this function creates
+entries ordered by week instead of months.
+If KEEP-RESTRICTION is non-nil, do not widen the buffer.  When it
+is nil, the buffer will be widened to make sure an existing date
+tree can be found."
+  (org-set-local 'org-datetree-base-level 1)
+  (or keep-restriction (widen))
+  (save-restriction
+(let ((prop (org-find-property "WEEK_TREE")))
+  (when prop
+   (goto-char prop)
+   (org-set-local 'org-datetree-base-level
+  (org-get-valid-level (org-current-level) 1))
+   (org-narrow-to-subtree)))
+(goto-char (point-min))
+(require 'cal-iso)
+(let* ((year (calendar-extract-year date))
+  (month (calendar-extract-month date))
+  (day (calendar-extract-day date))
+  (time (encode-time 0 0 0 day month year))
+  (iso-date (calendar-iso-from-absolute
+ (calendar-absolute-from-gregorian date)))
+  (weekyear (nth 2 iso-date))
+  (week (nth 0 iso-date))
+  (weekday (nth 1 iso-date)))
+  ;; ISO 8601 week format is %G-W%V(-%u)
+  (org-datetree--find-create
+   "^\\*+[ \t]+\\([12][0-9]\\{3\\}\\)\\(\\s-*?\
+\\([ \t]:[[:alnum:]:_@#%%]+:\\)?\\s-*$\\)"
+   weekyear nil nil
+   (format-time-string "%G" time))
+  (org-datetree--find-create
+   "^\\*+[ \t]+%d-W\\([0-5][0-9]\\)$"
+   weekyear week nil
+   (format-time-string "%G-W%V" time))
+  ;; For the actual day we use the regular date instead of ISO week.
+  (org-datetree--find-create
+   "^\\*+[ \t]+%d-%02d-\\([0123][0-9]\\) \\w+$"
+   year month day
+
+(defun org-datetree--find-create (regex year  month day insert)
   "Find the datetree matched by REGEX for YEAR, MONTH, or DAY.
 REGEX is passed to `format' with YEAR, MONTH, and DAY as
 arguments.  Match group 1 is compared against the specified date
-component."
+component.  If INSERT is non-nil and there is no match then it is
+inserted into the buffer."
   (when (or month day)
 (org-narrow-to-subtree))
   (let ((re (format regex year month day))
@@ -95,25 +139,27 @@ (defun org-datetree--find-create (regex year  
month day)
  ((not match)
   (goto-char (point-max))
   (unless (bolp) (insert "\n"))
-  (org-datetree-insert-line year month day))
+  (org-datetree-insert-line year month day insert))
  ((= (string-to-number (match-string 1)) (or day month year))
   (beginning-of-line))
  (t
   (beginning-of-line)
-  (org-datetree-insert-line year month day)
+  (org-datetree-insert-line year month day insert)
 
-(defun org-datetree-insert-line (year  month day)
+(defun org-datetree-insert-line (year  month day text)
   (delete-region (save-excursion (skip-chars-backward " \t\n") (point)) 
(point))
   (insert "\n" (make-string org-datetree-base-level ?*) " \n")
   (backward-char)
   (when month (org-do-demote))
   (when day (org-do-demote))
-  (insert (format "%d" year))
-  (when month
-(insert
- (if day
-(format-time-string "-%m-%d %A" (encode-time 0 0 0 day month year))
-   (format-time-string "-%m %B" (encode-time 0 0 0 1 month year)
+  (if text
+  (insert text)
+(insert (format "%d" year))
+(when month
+  (insert
+   (if day
+  (format-time-string "-%m-%d %A" (encode-time 0 0 0 day month year))
+(format-time-string "-%m %B" (encode-time 0 0 0 1 month year))
   (when (and day org-datetree-add-timestamp)
 (save-excursion
   (insert "\n")
diff --git a/testing/lisp/test-org-datetree.el 
b/testing/lisp/test-org-datetree.el
index bbc8e14..dab54ba 100644
--- a/testing/lisp/test-org-datetree.el
+++ b/testing/lisp/test-org-datetree.el
@@ -113,5 +113,97 @@ (ert-deftest test-org-datetree/find-date-create ()
(org-datetree-find-date-create '(3 29 2012)))
   (buffer-substring (point) (line-end-position))
 
+(ert-deftest 

[O] [PATCH v2 1/3] org-datetree.el: Code cleanup.

2015-09-07 Thread Rüdiger Sonderfeld
* lisp/org-datetree.el (org-datetree--find-create): New function.
(org-datetree-find-year-create, org-datetree-find-month-create,
org-datetree-find-day-create): Removed functions
(org-datetree-find-date-create): Use `org-datetree--find-create' instead
of removed functions.  Use calendar extract functions.
(org-datetree-insert-line): Do more formatting in `format-time-string'
since we call it anyway
* testing/lisp/test-org-datetree.el (test-org-datetree/find-date-create):
  Test if new entries are put at the right place.
---
 lisp/org-datetree.el  | 90 +--
 testing/lisp/test-org-datetree.el |  9 
 2 files changed, 38 insertions(+), 61 deletions(-)

diff --git a/lisp/org-datetree.el b/lisp/org-datetree.el
index a97a9d0..ea7afe7 100644
--- a/lisp/org-datetree.el
+++ b/lisp/org-datetree.el
@@ -64,70 +64,42 @@ (defun org-datetree-find-date-create (date  
keep-restriction)
   (org-get-valid-level (org-current-level) 1))
(org-narrow-to-subtree)))
 (goto-char (point-min))
-(let ((year (nth 2 date))
- (month (car date))
- (day (nth 1 date)))
-  (org-datetree-find-year-create year)
-  (org-datetree-find-month-create year month)
-  (org-datetree-find-day-create year month day
-
-(defun org-datetree-find-year-create (year)
-  "Find the YEAR datetree or create it."
-  (let ((re "^\\*+[ \t]+\\([12][0-9]\\{3\\}\\)\\(\\s-*?\\([ 
\t]:[[:alnum:]:_@#%]+:\\)?\\s-*$\\)")
+(let ((year (calendar-extract-year date))
+ (month (calendar-extract-month date))
+ (day (calendar-extract-day date)))
+  (org-datetree--find-create
+   "^\\*+[ \t]+\\([12][0-9]\\{3\\}\\)\\(\\s-*?\
+\\([ \t]:[[:alnum:]:_@#%%]+:\\)?\\s-*$\\)"
+   year)
+  (org-datetree--find-create
+   "^\\*+[ \t]+%d-\\([01][0-9]\\) \\w+$"
+   year month)
+  (org-datetree--find-create
+   "^\\*+[ \t]+%d-%02d-\\([0123][0-9]\\) \\w+$"
+   year month day
+
+(defun org-datetree--find-create (regex year  month day)
+  "Find the datetree matched by REGEX for YEAR, MONTH, or DAY.
+REGEX is passed to `format' with YEAR, MONTH, and DAY as
+arguments.  Match group 1 is compared against the specified date
+component."
+  (when (or month day)
+(org-narrow-to-subtree))
+  (let ((re (format regex year month day))
match)
 (goto-char (point-min))
 (while (and (setq match (re-search-forward re nil t))
(goto-char (match-beginning 1))
-   (< (string-to-number (match-string 1)) year)))
+   (< (string-to-number (match-string 1)) (or day month year
 (cond
  ((not match)
   (goto-char (point-max))
-  (or (bolp) (newline))
-  (org-datetree-insert-line year))
- ((= (string-to-number (match-string 1)) year)
-  (goto-char (point-at-bol)))
- (t
-  (beginning-of-line 1)
-  (org-datetree-insert-line year)
-
-(defun org-datetree-find-month-create (year month)
-  "Find the datetree for YEAR and MONTH or create it."
-  (org-narrow-to-subtree)
-  (let ((re (format "^\\*+[ \t]+%d-\\([01][0-9]\\) \\w+$" year))
-   match)
-(goto-char (point-min))
-(while (and (setq match (re-search-forward re nil t))
-   (goto-char (match-beginning 1))
-   (< (string-to-number (match-string 1)) month)))
-(cond
- ((not match)
-  (goto-char (point-max))
-  (or (bolp) (newline))
-  (org-datetree-insert-line year month))
- ((= (string-to-number (match-string 1)) month)
-  (goto-char (point-at-bol)))
- (t
-  (beginning-of-line 1)
-  (org-datetree-insert-line year month)
-
-(defun org-datetree-find-day-create (year month day)
-  "Find the datetree for YEAR, MONTH and DAY or create it."
-  (org-narrow-to-subtree)
-  (let ((re (format "^\\*+[ \t]+%d-%02d-\\([0123][0-9]\\) \\w+$" year month))
-   match)
-(goto-char (point-min))
-(while (and (setq match (re-search-forward re nil t))
-   (goto-char (match-beginning 1))
-   (< (string-to-number (match-string 1)) day)))
-(cond
- ((not match)
-  (goto-char (point-max))
-  (or (bolp) (newline))
+  (unless (bolp) (insert "\n"))
   (org-datetree-insert-line year month day))
- ((= (string-to-number (match-string 1)) day)
-  (goto-char (point-at-bol)))
+ ((= (string-to-number (match-string 1)) (or day month year))
+  (beginning-of-line))
  (t
-  (beginning-of-line 1)
+  (beginning-of-line)
   (org-datetree-insert-line year month day)
 
 (defun org-datetree-insert-line (year  month day)
@@ -139,13 +111,9 @@ (defun org-datetree-insert-line (year  month day)
   (insert (format "%d" year))
   (when month
 (insert
- (format "-%02d" month)
  (if day
-(format "-%02d %s"
-day
-(format-time-string "%A" (encode-time 0 0 0 day month year)))
-   (format " %s"
-  (format-time-string "%B" 

[O] Archiving method

2015-09-07 Thread Tobias Frischholz
Hi there,

I’m curious about how you archive your DONE items.
I’ve stumbled upon this snippet, which seems good enough for me:
http://stackoverflow.com/questions/6997387/how-to-archive-all-the-done-tasks-using-a-single-command/27043756#27043756
 


However, I think I would like to have the archived items in a datetree. The 
manual mentions that this is possible with the variable "org-archive-location”, 
but I couldn’t find any information about it.


Best regards,
Tobias Frischholz

PGP PUBLIC KEY: http://pgp.mit.edu/pks/lookup?search=0xCD463AC1=index



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [O] ob-csharp

2015-09-07 Thread Rüdiger Sonderfeld
On Monday 07 September 2015 15:10:59 Grant Rettke wrote:
> On Mon, Sep 7, 2015 at 2:28 PM, Thomas S. Dye  wrote:
> > It can live in core, contrib, or as an emacs package.
> 
> When it lives in core, it is available to everyone who downloads
> Emacs. That is valuable because some users never install a single
> package.

But it requires csharp-mode, which is not part of GNU Emacs.

Regards,

Rüdiger




Re: [O] ob-csharp

2015-09-07 Thread Grant Rettke
On Mon, Sep 7, 2015 at 2:28 PM, Thomas S. Dye  wrote:
> It can live in core, contrib, or as an emacs package.

When it lives in core, it is available to everyone who downloads
Emacs. That is valuable because some users never install a single
package.



Re: [O] paste from clip to code block

2015-09-07 Thread John Kitchin
For example with the cursor on a src-block press C-c l to store a link
to that name, and later type C-c C-l to insert a link to that
src-block.

It would look a little like this:
#+BEGIN_SRC emacs-lisp
(defun org-src-block-store-link ()
  (let* ((object (org-element-context)))
(when (equal (org-element-type object) 'src-block)
  (org-store-link-props
   :type "src-block"
   :link (concat "src-block:" (org-element-property :name object))

(add-hook 'org-store-link-functions 'org-src-block-store-link)

(org-add-link-type
 "src-block"
 (lambda (label)
   (org-mark-ring-push)
   (widen)
   (goto-char (point-min))
   (re-search-forward (regexp-quote (format "#+NAME: %s" label)))
   (beginning-of-line)))
#+END_SRC

it only works in the current file though.


Grant Rettke writes:

> On Mon, Sep 7, 2015 at 9:09 AM, John Kitchin  wrote:
>> Neat. Do you have some handy way to store a link to the source block, or
>> jump to them?
>
> I don't, but please tell us more about what you mean.

--
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu



Re: [O] Bug: org-estimate-print [8.2.10 (release_8.2.10 @ /Applications/Emacs.app/Contents/Resources/lisp/org/)]

2015-09-07 Thread Nicolas Goaziou
Hello,

Michał Adamczyk  writes:

> I'm trying to use 'low-high' estimates with {esp+} attribute in my
> columns definitions for the Effort property. No matter what syntax I try
> I always get: "Wrong type argument: sequencep, 0"

I think this was fixed in Org 8.3. You may want to Org.

Regards,

-- 
Nicolas Goaziou



Re: [O] org-clock-into-drawer t is broken

2015-09-07 Thread Nicolas Goaziou
Hello,

Nikolay Kudryavtsev  writes:

> After I switched to org 8.3 I've noticed that org-clock-into-drawer
> does not really behave as advertised. Docs say that if it's set to t,
> which is the default value, this should create a :LOGBOOK and move old
> entries there. But this does not happen in practice. :LOGBOOK gets
> created only for headings that don't have any clock entries. Or is
> having no drawer considered a form of drawer? Setting
> org-clock-into-drawer 0 works.

Could you provide an ECM?

> This assumes the latest elpa org. In the latest git dev verison,
> clocking in does not work at all.

Could you elaborate? "Does not work at all" is not very clear.


Regards,

-- 
Nicolas Goaziou



Re: [O] [DEV] Text quoting backports

2015-09-07 Thread Nicolas Goaziou
Hello,

Kyle Meyer  writes:

> There have been several commits made recently in the Emacs repo related
> to quoting style in docstrings and messages.  I've backported the
> changes touching Org files and pushed to the branch maint-quotes.  I put
> them there instead of installing them directly on maint to allow time
> for things in the Emacs repo to settle and to get feedback about how I
> plan to incorporate these changes.  (Judging from the discussion on
> emacs.devel [1-5], there may be various opinions on this.)

There is no hurry indeed. Most changes can wait, IMO, however

> * Added substitute-command-keys calls
>
>   Keep changes, but extend to use command names instead of hard coding
>   keys.

is something we should already be doing in maint. I think they can be
applied there right away.


Regards,

-- 
Nicolas Goaziou



Re: [O] Bug: Typo in entities documentation [8.2.10 (8.2.10-42-g2e1bc4-elpa @ /Users/leafac/.emacs.d/elpa/org-20150727/)]

2015-09-07 Thread Nicolas Goaziou
Hello,

Leandro Facchinetti  writes:

> Fix entity infinity documentation.
>
> This was probably an error while copy and pasting.

Correct. Done. Thank you.

Regards,

-- 
Nicolas Goaziou



Re: [O] ob-csharp

2015-09-07 Thread Thomas S . Dye
Aloha thomas,

thomas  writes:

> Hi,
>
> could not find ob-csharp in org mode. I created one to make the pointy 
> haired boss happy.
>
> It's based on Eric's ob-java.el with some bits taken from other ob files.
>
> It works for the simple examples following below.
>
> Hope this is useful and I'm open for hints to improve the code.
>
> - thomas

Thanks for your contribution.  I hope the pointy haired boss is happy :)

Please give some thought to exactly how you'd like to contribute
ob-csharp.  See http://orgmode.org/worg/org-contribute.html

It can live in core, contrib, or as an emacs package.

I'm not sure who makes decisions about Babel code these days, but
someone will step up when you choose your path.

All the best,
Tom

-- 
Thomas S. Dye
http://www.tsdye.com



[O] Bug: org-estimate-print [8.2.10 (release_8.2.10 @ /Applications/Emacs.app/Contents/Resources/lisp/org/)]

2015-09-07 Thread Michał Adamczyk

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.

I'm trying to use 'low-high' estimates with {esp+} attribute in my
columns definitions for the Effort property. No matter what syntax I try
I always get: "Wrong type argument: sequencep, 0"


Emacs  : GNU Emacs 24.5.1 (x86_64-apple-darwin13.4.0, NS apple-appkit-1265.=
21)
 of 2015-04-10 on builder10-9.porkrind.org
Package: Org-mode version 8.2.10 (release_8.2.10 @ /Applications/Emacs.app/=
Contents/Resources/lisp/org/)



[O] [PATCH] Nuke org-find-if.

2015-09-07 Thread Matus Goljer
Message-ID: <874mj6xg25@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain
--text follows this line--
* org.el (org-find-if): Function removed in favour of `cl-find-if'.
* org-contacts.el (org-find-if): Function removed in favour of
  `cl-find-if'.

This function does exactly the same as `cl-find-if', there is no reason
to have it.  It is only used once in org itself and 6 times in one
contrib package.  Both files already require cl, so just use the cl
function.
---
 contrib/lisp/org-contacts.el | 12 ++--
 lisp/org.el  |  9 +
 2 files changed, 7 insertions(+), 14 deletions(-)

diff --git a/contrib/lisp/org-contacts.el b/contrib/lisp/org-contacts.el
index edc09fe..e42436f 100644
--- a/contrib/lisp/org-contacts.el
+++ b/contrib/lisp/org-contacts.el
@@ -232,7 +232,7 @@ A regexp matching strings of whitespace, `,' and `;'.")
 (defun org-contacts-db-need-update-p ()
   "Determine whether `org-contacts-db' needs to be refreshed."
   (or (null org-contacts-last-update)
-  (org-find-if (lambda (file)
+  (cl-find-if (lambda (file)
 (or (time-less-p org-contacts-last-update
  (elt (file-attributes file) 5
   (org-contacts-files))
@@ -322,12 +322,12 @@ cell corresponding to the contact properties.
   (org-string-match-p name-match
   (first contact)))
  (and prop-match
-  (org-find-if (lambda (prop)
+  (cl-find-if (lambda (prop)
  (and (string= (car prop-match) (car prop))
   (org-string-match-p (cdr prop-match) 
(cdr prop
(caddr contact)))
  (and tags-match
-  (org-find-if (lambda (tag)
+  (cl-find-if (lambda (tag)
  (org-string-match-p tags-match tag))
(org-split-string
 (or (cdr (assoc-string "ALLTAGS" (caddr 
contact))) "") ":"
@@ -489,10 +489,10 @@ prefixes rather than just the beginning of the string."
  completions))
 
 (defun org-contacts-test-completion-prefix (string collection predicate)
-  ;; Prevents `org-find-if' from redefining `predicate' and going into
+  ;; Prevents `cl-find-if' from redefining `predicate' and going into
   ;; an infinite loop.
   (lexical-let ((predicate predicate))
-(org-find-if (lambda (el)
+(cl-find-if (lambda (el)
   (and (or (null predicate) (funcall predicate el))
(string= string el)))
 collection)))
@@ -594,7 +594,7 @@ description."
   "Remove all ignore-list's elements from list and you can use
regular expressions in the ignore list."
 (org-remove-if (lambda (el)
-(org-find-if (lambda (x)
+(cl-find-if (lambda (x)
(string-match-p x el))
  ignore-list))
   list))
diff --git a/lisp/org.el b/lisp/org.el
index ef6836e..72f8fdd 100755
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -1102,7 +1102,7 @@ Or return the original if not disputed.
 Also apply the translations defined in `org-xemacs-key-equivalents'."
   (when org-replace-disputed-keys
 (let* ((nkey (key-description key))
-  (x (org-find-if (lambda (x)
+  (x (cl-find-if (lambda (x)
 (equal (key-description (car x)) nkey))
   org-disputed-keys)))
   (setq key (if x (cdr x) key
@@ -1110,13 +1110,6 @@ Also apply the translations defined in 
`org-xemacs-key-equivalents'."
 (setq key (or (cdr (assoc key org-xemacs-key-equivalents)) key)))
   key)
 
-(defun org-find-if (predicate seq)
-  (catch 'exit
-(while seq
-  (if (funcall predicate (car seq))
- (throw 'exit (car seq))
-   (pop seq)
-
 (defun org-defkey (keymap key def)
   "Define a key, possibly translated, as returned by `org-key'."
   (define-key keymap (org-key key) def))
-- 
2.4.6




[O] Submitting patches for org-info-src.js

2015-09-07 Thread Piyush Srivastava
Hi,

In an earlier message on this list, I pointed out how a change in the
export routines in org 8.3.1 has broken many of the features of org-info,
and identified changes that need to be made to org-info-js-src to fix these
problems (while retaining backward compatibility with the earlier system).

I wanted to know what is the procedure for submitting patches for
org-info-src.js.  The page at
http://orgmode.org/worg/code/org-info-js/#sec-1-1 suggests that it is a
github repository  owned by Sebastian Rose.  However, the versions of
org-info-src.js available from Sebastian Rose's repository and from worg
are different.  So I wanted to know which repository I should fork from to
create the patch.

Thanks,

-- Piyush.