[O] Clock history as autocomplete?

2015-04-03 Thread Marcin Borkowski
Hi there,

I use C-u C-c C-x C-i (selecting clocking task from the history) /all
the time/.  However, I would very much prefer entering the clocking task
with autocompletion, from a longer history, or even all headings that
already have a clock (I have (setq org-clock-history-length 20) in my
init.el, and sometimes it's not enough...).  Is that possible?

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University



Re: [O] Best practices for dual HTML/LaTeX export for scientific papers

2015-04-03 Thread Ken Mankoff
On Thu, Apr 2, 2015 at 10:30 AM, David Dynerman da...@block-party.net
wrote:

 Hi all,

 I’m currently trying to use org mode to write a scientific paper. Here is
 my wishlist:

 4) LaTeX and HTML export


Have you considered just LaTeX export, and then using pdf2htmlEx
https://coolwanglu.github.io/pdf2htmlEX/ to convert to HTML? There are many
TeX or PDF - HTML converters, but that one seems to do it flawlessly.

-k.


Re: [O] Standard agenda views don't show file name after update (replaced by ???:)

2015-04-03 Thread Detlef Steuer
May be related:

My standard agenda view pulls in the last #+CATEGORY: line of a file only.

In my case *all* my TODOs are labelled Urlaub (holidays) now.
Reads nicely but sadly not quite true :-)

Urlaub happens to be the last CATEGORY defined in my todo.org.

Still happens after this fix.

emacs and org-mode freshly compiled from git.

Regards
Detlef

Am Thu, 2 Apr 2015 21:40:18 -0500
schrieb John Hendy jw.he...@gmail.com:

 Confirmed to be working great again. Thanks for the speedy response
 (as always)!
 
 John
 
 On Wed, Apr 1, 2015 at 3:44 PM, Nicolas Goaziou
 m...@nicolasgoaziou.fr wrote:
  Hello,
 
  John Hendy jw.he...@gmail.com writes:
 
  I just pulled for the first time in a while and found I get
  question marks in my agenda view instead of the former use of the
  file name (see attached). I did a bunch of git pulling/make
  cleaning/making, and traced it to this commit from Nicholas:
  - 80bccca4e249cbb5812963863ccffbdcf4b25edd
 
  Commit c1a744659d2b44c067ecb195b3e5d51e837bddd is working properly.
 
  I verified with a minimal config containing only:
 
  (add-to-list 'load-path ~/.elisp/org.git/lisp/)
 
  My test file contained:
 
  * TODO something
 
  * TODO something else
 
  Process:
  - emacs -Q
  - M-x load-file [RET] /path/to/min-config
  - M-x org-agenda-file-to-front
  - M-x org-agenda [RET] t
 
  Fixed in 22bf1b8ae3c2842945b9b9d9ab2ca203eae17946. Thank you.
 
  Regards,
 
  --
  Nicolas Goaziou
 
 






Re: [O] Best practices for dual HTML/LaTeX export for scientific papers

2015-04-03 Thread Sebastien Vauban
Charles C. Berry wrote:
 On Thu, 2 Apr 2015, Rasmus wrote:
 David Dynerman da...@block-party.net writes:

 2) Figures containing multiple side-by-side figures with subcaptions
(e.g. in LaTeX I would use minipage + subcaption)

 For LaTeX you can find solution on this list.  I would not know how
 to do it in plain HTML.  That would be the first step to
 a solution.

 You can get part way just by using a table.

I guess the most pragmatic answer for now (and maybe later?) would be to
use a MACRO call which translate all the bits and pieces correctly for
both HTML and LaTeX at least:

- using minipage and subcaption (or something else) for LaTeX
- using ??? for HTML

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Clock history as autocomplete?

2015-04-03 Thread Mike McLean
I get the general effect using Emacs Helm with some additional commands as
part of the helm definitions. My original idea was from Sacha Chua (
http://sachachua.com/blog/2015/03/getting-helm-org-refile-clock-create-tasks/
) but I didn't implement her stuff as written (in part I didn't
conceptually merge capture/create with goto/refile/clock as she did). I
went for simpler. I can call my mlm/helm-org-agenda-files-headings
with (kbd C-x c o), use Helm completion to find the right headline, and
then Goto, Refile current heading to, Clock In, Clock In and Goto, or
Insert Link


#+begin_src emacs-lisp :tangle package-init/init-helm.el :comments both
(defun my/helm-org-clock-in (marker)
  (save-window-excursion
(helm-org-goto-marker marker)
(if (derived-mode-p 'org-agenda-mode) (org-agenda-clock-in)
(org-clock-in))
t))

(defun my/helm-org-clock-in-and-goto (marker)
  (helm-org-goto-marker marker)
  (if (derived-mode-p 'org-agenda-mode) (org-agenda-clock-in)
(org-clock-in)))

(cl-defun mlm/helm-source-org-headings-for-files (filenames
  optional (min-depth 1)
(max-depth 8))
  (helm-build-sync-source Org Headings
:candidates (helm-org-get-candidates filenames min-depth max-depth)
:persistent-help Go to line (keeping session); f1 Go to line; f2
Refile to this heading; f3 Clock In; f4 Clock in and Goto; f5 Insert
link to this heading
:action '((Go to line . helm-org-goto-marker)
  (Refile to this heading . helm-org-heading-refile)
  (Clock in . my/helm-org-clock-in)
  (Clock in and Go to . my/helm-org-clock-in-and-goto)
  (Insert link to this heading .
helm-org-insert-link-to-heading-at-marker


(defun mlm/helm-org-agenda-files-headings ()
  (interactive)
  (helm :sources (mlm/helm-source-org-headings-for-files (org-agenda-files))
:candidate-number-limit 9
:buffer *helm org headings*))

(global-set-key (kbd C-x c o) 'mlm/helm-org-agenda-files-headings)
#+end_src


On Fri, Apr 3, 2015 at 4:42 AM, Marcin Borkowski mb...@wmi.amu.edu.pl
wrote:

 Hi there,

 I use C-u C-c C-x C-i (selecting clocking task from the history) /all
 the time/.  However, I would very much prefer entering the clocking task
 with autocompletion, from a longer history, or even all headings that
 already have a clock (I have (setq org-clock-history-length 20) in my
 init.el, and sometimes it's not enough...).  Is that possible?

 Best,

 --
 Marcin Borkowski
 http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
 Faculty of Mathematics and Computer Science
 Adam Mickiewicz University




Re: [O] Define Keyboard Shortcut for Open in Emacs

2015-04-03 Thread J. David Boyd
John Kitchin jkitc...@andrew.cmu.edu writes:

 I find C-u RET on a link will open a pdf in emacs. or C-u C-c C-o

 Rainer M Krug writes:

 Hi

 I would like to open pdfs in emacs (using pdf-viewer) but there is only
 a shortcut (C-c C-o) to open a pdf externally, and no shortcut for the
 menu item below Open in Emacs in the context menu.

 How can I define a shortcut for this command (or re-use C-c C-o)?
 Thanks

 Rainer

 --
 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

It's too bad there's not some way to find out all the different things C-u
does to commands when used...

Dave




Re: [O] Define Keyboard Shortcut for Open in Emacs

2015-04-03 Thread Jorge A. Alfaro-Murillo

Rainer M Krug writes:

I would like to open pdfs in emacs (using pdf-viewer) but there 
is only a shortcut (C-c C-o) to open a pdf externally, and no 
shortcut for the menu item below Open in Emacs in the context 
menu. 

How can I define a shortcut for this command (or re-use C-c 
C-o)?


If you want C-c C-o to open in emacs, you can configure your 
org-file-apps:


#+BEGIN_SRC emacs-lisp
 (eval-after-load org
   '(if (assoc \\.pdf\\' org-file-apps)
(setcdr (assoc \\.pdf\\' org-file-apps) 'emacs)
  (add-to-list 'org-file-apps '(\\.pdf\\' . 'emacs) t)))
#+END_SRC

Alternatively, if you are on Linux, you could make your 
emacsclient your default pdf-viewer:


#+BEGIN_SRC shell
 xdg-mime default emacsclient.desktop application/pdf
#+END_SRC

Then the external program called by C-c C-o would also be emacs =)

Best,
--
Jorge.




Re: [O] Emacs-Orgmode Archive search fails

2015-04-03 Thread Charles Millar



On 04/03/2015 10:11 AM, Nick Dokos wrote:

Charles Millar mill...@verizon.net writes:


It has been a while since I searched the mailing list archives. Did I
miss an announcement or is the search engine broken?

For the past few days, any search request in the mailing list archives
either yields no result or just one and the same result - Citations,
continued, etc. /archive/html/ emacs-orgmode/2015-02/msg00028.html
(7,961 bytes)

This occurs on both Debian and Windows 7 machine.


I tried a simple search through Gnus search on the newsgroup (G G)
and on the web page http://news.gmane.org/gmane.emacs.orgmode. Both
succeeded, so whatever it was seems to have been fixed.


My searches on gmane.emacs.emacs succeeded,

In the past, when the search engine failed (and it has failed a couple
of times), a message to LarsI with the details of the failure has been
enough to get things going again (sometimes with a couple of days
delay).
Unfortunately searches on the orgmode list still fail. I will do as you 
suggest.


Thanks, Nick

Charlie



Re: [O] Standard agenda views don't show file name after update (replaced by ???:)

2015-04-03 Thread Detlef Steuer
Am Fri, 03 Apr 2015 17:59:16 +0200
schrieb Nicolas Goaziou m...@nicolasgoaziou.fr:

 This is to be expected. You can set :CATEGORY: node property in
 subtrees if needed.

So this beheaviour changed at some point in the past?

To be sure:

I have a file (modulo scheduling information)

* Line1
#+CATEGORY: one
** TODO very important

* Line2
#+CATEGORY: two
** TODO more stuff

It is expected to see both TODOs in an agenda as:

two:   very important
two:   more stuff

?

Detlef



Re: [O] Standard agenda views don't show file name after update (replaced by ???:)

2015-04-03 Thread Nicolas Goaziou
Hello,

Detlef Steuer detlef.ste...@gmx.de writes:

 May be related:

 My standard agenda view pulls in the last #+CATEGORY: line of a file only.

 In my case *all* my TODOs are labelled Urlaub (holidays) now.
 Reads nicely but sadly not quite true :-)

This is to be expected. You can set :CATEGORY: node property in subtrees
if needed.


Regards,

-- 
Nicolas Goaziou



[O] Bug: fix for latex export of doi links [8.2.10 (8.2.10-35-g19a7d6-elpaplus @ .../elpa/org-plus-contrib-20150330/)]

2015-04-03 Thread Derek Feichtinger
Hi

The current org latex export will export a link doi:10.xyz/abcd without
the protocol prefix as 10.xyz/abcd. Correctly, it should retain the
prefix.

An easy fix is adding doi to the list of protocols that retain
the link type string in ox-latex.el, below.

### ox-latex.el ###
(defun org-latex-link (link desc info)
  Transcode a LINK object from Org to LaTeX.

DESC is the description part of the link, or the empty string.
INFO is a plist holding contextual information.  See
`org-export-data'.
  (let* ((type (org-element-property :type link))
 (raw-path (replace-regexp-in-string
% \\% (org-element-property :path link) nil t))
 ;; Ensure DESC really exists, or set it to nil.
 (desc (and (not (string= desc )) desc))
 (imagep (org-export-inline-image-p
  link org-latex-inline-image-rules))
 (path (cond
;; - NEXT LINE CONTAINS THE FIX ---
((member type '(http https ftp mailto doi))
 (concat type : raw-path))
((and (string= type file) (file-name-absolute-p raw-path))
 (concat file: raw-path))
(t raw-path)))
 protocol)
#

Best regards,
Derek


Re: [O] Define Keyboard Shortcut for Open in Emacs

2015-04-03 Thread Nicolas Goaziou
Hello,

dbo...@mmm.com (J. David Boyd) writes:

 It's too bad there's not some way to find out all the different things C-u
 does to commands when used...

C-h k C-c C-o


Regards,

-- 
Nicolas Goaziou



Re: [O] getting an hline in a python generated table

2015-04-03 Thread Ken Mankoff

Sorry about that. I switched out of Org mode in my email client so C-c C-c sent 
the email instead of executing the code block. I was mid-sentence...

#+BEGIN_SRC python :results table :exports results
  from tabulate import tabulate
  import pandas as pd
  df = pd.DataFrame(np.random.rand(2,2), index=['foo','bar'])
  tab = tabulate(df, ['col1','col2'], tablefmt='orgtbl')
  print tab[1:-1]
#+END_SRC
#+RESULTS:

 I'm compensating for some bugs here. The tab[1:-1] is from, I think, 
 tabulate, or perhaps IPython. I don't get results without this being a 
 Since I use Org + IPython, I find that my 

 On 2015-04-01 at 16:07, John Kitchin jkitc...@andrew.cmu.edu wrote:
 Hi everyone,

 In emacs-lisp, I can get a table as output that has a horizontal line
 in it like this:

 (append '((name scopus-id h-index n-docs n-citations))
 '(hline)
 (some expression that generates a list))

 The first row is header names, then a horizontal line, followed by a row
 for each thing of interest. This seems to work because the result is an
 emacs-lisp array.

 I cannot figure out if this is possible in a Python block though. So far
 my experiments have failed because I don't know how to make an hline
 symbol in a Python array. Any kind of string just shows as a row. Any
 thoughts on if this is possible?

 thanks,


 #+OPTIONS: tex:imagemagick
 #+OPTIONS: toc:0




Re: [O] getting an hline in a python generated table

2015-04-03 Thread Ken Mankoff

I've been using the following to generate hline in Org Python blocks:

#+BEGIN_SRC python :results table :exports results
  from tabulate import tabulate
  import pandas as pd
  df = pd.DataFrame(np.random.rand(2,2), index=['foo','bar'])
  tab = tabulate(df, ['col1','col2'], tablefmt='orgtbl')
  return tab[1:-1]
#+END_SRC
#+RESULTS:
| |   col1 | col2 |
|-++--|
| foo |   0.363568 | 0.647676 |
| bar | 0.00663499 | 0.100717 |

I'm compensating for some bugs here. The tab[1:-1] is from, I think, tabulate, 
or perhaps IPython. I don't get results without this being a 
Since I use Org + IPython, I find that my 

On 2015-04-01 at 16:07, John Kitchin jkitc...@andrew.cmu.edu wrote:
 Hi everyone,

 In emacs-lisp, I can get a table as output that has a horizontal line
 in it like this:

 (append '((name scopus-id h-index n-docs n-citations))
 '(hline)
 (some expression that generates a list))

 The first row is header names, then a horizontal line, followed by a row
 for each thing of interest. This seems to work because the result is an
 emacs-lisp array.

 I cannot figure out if this is possible in a Python block though. So far
 my experiments have failed because I don't know how to make an hline
 symbol in a Python array. Any kind of string just shows as a row. Any
 thoughts on if this is possible?

 thanks,


#+OPTIONS: tex:imagemagick
#+OPTIONS: toc:0



[O] multiple agendas with different headers in agenda view

2015-04-03 Thread Alan Schmitt
Hello,

I'm trying to build an agenda that have two lists of scheduled items,
one when a tag is absent, the other when the tag is present. Here is
what I tried:

#+begin_src emacs-lisp
(setq org-agenda-custom-commands
  (quote (
  (w Work
   ((agenda
 
 ((org-agenda-skip-function '(org-agenda-skip-entry-if 'regexp 
:@Q2:
(agenda
 
 ((org-agenda-overriding-header Q2 Scheduled)
  (org-agenda-skip-function '(org-agenda-skip-entry-if 
'notregexp :@Q2:)
#+end_src

Here is the result of the command:

Friday  3 April 2015
  GTD:Sched. 5x:  TODO  :@work:
  Cours Caml: Scheduled:  TODO  :@work:
  Work:   In  13 d.:  TODO  :@work:
Friday  3 April 2015
  JScert: Sched. 5x:  TODO [0/2]   :@work:@Q2:
  Work:   Sched. 5x:  TODO ** :@work:@Q2:

The contents of the two agendas is correct, but the header for the
second one is not there. Is it possible to replace the date with
a custom header?

Thanks,

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7


signature.asc
Description: PGP signature


Re: [O] [bug] Effort and column view

2015-04-03 Thread Nicolas Goaziou
Myles English mylesengl...@gmail.com writes:

 I may have a look (in the next few months) to see if I can make it work
 the way I would like.

OK. Thank you.


Regards,



Re: [O] Bug: fix for latex export of doi links [8.2.10 (8.2.10-35-g19a7d6-elpaplus @ .../elpa/org-plus-contrib-20150330/)]

2015-04-03 Thread Derek Feichtinger
Patch for the latex export of doi links is attached to this mail.

Cheers,
Derek

On Fri, Apr 3, 2015 at 9:19 PM, Nicolas Goaziou m...@nicolasgoaziou.fr
wrote:

 Hello,

 Derek Feichtinger dfe...@gmail.com writes:

  The current org latex export will export a link doi:10.xyz/abcd without
  the protocol prefix as 10.xyz/abcd. Correctly, it should retain the
  prefix.
 
  An easy fix is adding doi to the list of protocols that retain
  the link type string in ox-latex.el, below.
 
  ### ox-latex.el ###
  (defun org-latex-link (link desc info)
Transcode a LINK object from Org to LaTeX.
 
  DESC is the description part of the link, or the empty string.
  INFO is a plist holding contextual information.  See
  `org-export-data'.
(let* ((type (org-element-property :type link))
   (raw-path (replace-regexp-in-string
  % \\% (org-element-property :path link) nil t))
   ;; Ensure DESC really exists, or set it to nil.
   (desc (and (not (string= desc )) desc))
   (imagep (org-export-inline-image-p
link org-latex-inline-image-rules))
   (path (cond
  ;; - NEXT LINE CONTAINS THE FIX ---
  ((member type '(http https ftp mailto doi))
   (concat type : raw-path))
  ((and (string= type file) (file-name-absolute-p raw-path))
   (concat file: raw-path))
  (t raw-path)))
   protocol)
  #

 Indeed. Thank you.

 Would you mind preparing a patch with git format-patch for correct
 attribution? See http://orgmode.org/worg/org-contribute.html for
 details.

 Regards,

 --
 Nicolas Goaziou

From b1e74964890f1b602d7c144cec8b83518a21ddd7 Mon Sep 17 00:00:00 2001
From: Derek Feichtinger derek.feichtin...@psi.ch
Date: Fri, 3 Apr 2015 22:11:15 +0200
Subject: [PATCH] fix for latex export of doi type links

* lisp/ox-latex.el: Add doi to the list of link types that retain
the protocol prefix in the exported link.

TINYCHANGE
---
 lisp/ox-latex.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index cfd1fdf..57962c1 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -2032,7 +2032,7 @@ INFO is a plist holding contextual information.  See
 	 (imagep (org-export-inline-image-p
 		  link (plist-get info :latex-inline-image-rules)))
 	 (path (cond
-		((member type '(http https ftp mailto))
+		((member type '(http https ftp mailto doi))
 		 (concat type : raw-path))
 		((and (string= type file) (file-name-absolute-p raw-path))
 		 (concat file: raw-path))
-- 
1.9.2



Re: [O] Bug: fix for latex export of doi links [8.2.10 (8.2.10-35-g19a7d6-elpaplus @ .../elpa/org-plus-contrib-20150330/)]

2015-04-03 Thread Nicolas Goaziou
Derek Feichtinger dfe...@gmail.com writes:

 Patch for the latex export of doi links is attached to this mail.

Applied. Thank you.

Regards,



Re: [O] Bug: fix for latex export of doi links [8.2.10 (8.2.10-35-g19a7d6-elpaplus @ .../elpa/org-plus-contrib-20150330/)]

2015-04-03 Thread Derek Feichtinger
Hi, Nicolas

thanks for responding so fast. Sure, I'll try and submit the patch.
Thanks for all your great work!

Happy Easter,
Derek

On Fri, Apr 3, 2015 at 9:19 PM, Nicolas Goaziou m...@nicolasgoaziou.fr
wrote:

 Hello,

 Derek Feichtinger dfe...@gmail.com writes:

  The current org latex export will export a link doi:10.xyz/abcd without
  the protocol prefix as 10.xyz/abcd. Correctly, it should retain the
  prefix.
 
  An easy fix is adding doi to the list of protocols that retain
  the link type string in ox-latex.el, below.
 
  ### ox-latex.el ###
  (defun org-latex-link (link desc info)
Transcode a LINK object from Org to LaTeX.
 
  DESC is the description part of the link, or the empty string.
  INFO is a plist holding contextual information.  See
  `org-export-data'.
(let* ((type (org-element-property :type link))
   (raw-path (replace-regexp-in-string
  % \\% (org-element-property :path link) nil t))
   ;; Ensure DESC really exists, or set it to nil.
   (desc (and (not (string= desc )) desc))
   (imagep (org-export-inline-image-p
link org-latex-inline-image-rules))
   (path (cond
  ;; - NEXT LINE CONTAINS THE FIX ---
  ((member type '(http https ftp mailto doi))
   (concat type : raw-path))
  ((and (string= type file) (file-name-absolute-p raw-path))
   (concat file: raw-path))
  (t raw-path)))
   protocol)
  #

 Indeed. Thank you.

 Would you mind preparing a patch with git format-patch for correct
 attribution? See http://orgmode.org/worg/org-contribute.html for
 details.

 Regards,

 --
 Nicolas Goaziou



Re: [O] getting an hline in a python generated table

2015-04-03 Thread John Kitchin
cool, thanks for the tip. I was not awware of that library.
Ken Mankoff writes:

 Sorry about that. I switched out of Org mode in my email client so C-c C-c 
 sent the email instead of executing the code block. I was mid-sentence...

 #+BEGIN_SRC python :results table :exports results :session
   from tabulate import tabulate
   import pandas as pd
   df = pd.DataFrame(np.random.rand(2,2), index=['foo','bar'])
   tab = tabulate(df, ['col1','col2'], tablefmt='orgtbl')
   tab[1:-1]
 #+END_SRC
 #+RESULTS:
 | | col1 | col2 |
 |-+--+--|
 | foo | 0.223272 | 0.433449 |
 | bar | 0.855854 |  0.13685 |

 I'm compensating for some bugs here. The tab[1:-1] is from, I think, 
 tabulate, or perhaps IPython. I don't get results without this being a 
 :session. If you don't use IPython/elpy in Org, then your final statement may 
 need to be different (add a 'return'?) to get this to work.

 Hope this helps with w/ tables + headers,

   -k.

--
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] Standard agenda views don't show file name after update (replaced by ???:)

2015-04-03 Thread Nicolas Goaziou
Detlef Steuer detlef.ste...@gmx.de writes:

 Am Fri, 03 Apr 2015 17:59:16 +0200
 schrieb Nicolas Goaziou m...@nicolasgoaziou.fr:

 This is to be expected. You can set :CATEGORY: node property in
 subtrees if needed.

 So this beheaviour changed at some point in the past?

This behaviour was long deprecated. Starting from Org 5.14 (released in
2008), the manual stated

  @cindex #+CATEGORY
  The category is a broad label assigned to each agenda item.  By default,
  the category is simply derived from the file name, but you can also
  specify it with a special line in the buffer, like this@footnote{For
  backward compatibility, the following also works: if there are several
  such lines in a file, each specifies the category for the text below it.
  The first category also applies to any text before the first CATEGORY
  line.  However, using this method is @emph{strongly} deprecated as it is
  incompatible with the outline structure of the document.  The correct
  method for setting multiple categories in a buffer is using a
  property.}:

I only removed the backward compatibility recently. I dropped a note in
ORG-NEWS.

 To be sure:

 I have a file (modulo scheduling information)

 * Line1
 #+CATEGORY: one
 ** TODO very important

 * Line2
 #+CATEGORY: two
 ** TODO more stuff

 It is expected to see both TODOs in an agenda as:

 two:   very important
 two:   more stuff

Yes, it is.

This should be

* Line1
  :PROPERTIES:
  :CATEGORY: one
  :END:
** TODO very important

* Line2
  :PROPERTIES:
  :CATEGORY: two
  :END:
** TODO more stuff


Regards,



Re: [O] Bug: fix for latex export of doi links [8.2.10 (8.2.10-35-g19a7d6-elpaplus @ .../elpa/org-plus-contrib-20150330/)]

2015-04-03 Thread Nicolas Goaziou
Hello,

Derek Feichtinger dfe...@gmail.com writes:

 The current org latex export will export a link doi:10.xyz/abcd without
 the protocol prefix as 10.xyz/abcd. Correctly, it should retain the
 prefix.

 An easy fix is adding doi to the list of protocols that retain
 the link type string in ox-latex.el, below.

 ### ox-latex.el ###
 (defun org-latex-link (link desc info)
   Transcode a LINK object from Org to LaTeX.

 DESC is the description part of the link, or the empty string.
 INFO is a plist holding contextual information.  See
 `org-export-data'.
   (let* ((type (org-element-property :type link))
  (raw-path (replace-regexp-in-string
 % \\% (org-element-property :path link) nil t))
  ;; Ensure DESC really exists, or set it to nil.
  (desc (and (not (string= desc )) desc))
  (imagep (org-export-inline-image-p
   link org-latex-inline-image-rules))
  (path (cond
 ;; - NEXT LINE CONTAINS THE FIX ---
 ((member type '(http https ftp mailto doi))
  (concat type : raw-path))
 ((and (string= type file) (file-name-absolute-p raw-path))
  (concat file: raw-path))
 (t raw-path)))
  protocol)
 #

Indeed. Thank you. 

Would you mind preparing a patch with git format-patch for correct
attribution? See http://orgmode.org/worg/org-contribute.html for
details.

Regards,

-- 
Nicolas Goaziou



Re: [O] getting an hline in a python generated table

2015-04-03 Thread William Henney
A simpler solution is to just use None, which gets automatically converted
to an hline by org-babel:

#+BEGIN_SRC python :return mytable
  NROWS, NCOLS = 6, 4
  mytable = []
  mytable.append(['A', 'B', 'C', 'D'])  # Table header
  mytable.append(None)  # hline
  for irow in range(NROWS):
  mytable.append([icol**irow for icol in range(NCOLS)])
  mytable.append(None)  # hline
#+END_SRC

#+RESULTS:
| A | B |  C |   D |
|---+---++-|
| 1 | 1 |  1 |   1 |
| 0 | 1 |  2 |   3 |
| 0 | 1 |  4 |   9 |
| 0 | 1 |  8 |  27 |
| 0 | 1 | 16 |  81 |
| 0 | 1 | 32 | 243 |
|---+---++-|

Will


On Wed, Apr 1, 2015 at 2:07 PM, John Kitchin jkitc...@andrew.cmu.edu
wrote:

 Hi everyone,

 In emacs-lisp, I can get a table as output that has a horizontal line
 in it like this:

 (append '((name scopus-id h-index n-docs n-citations))
 '(hline)
 (some expression that generates a list))

 The first row is header names, then a horizontal line, followed by a row
 for each thing of interest. This seems to work because the result is an
 emacs-lisp array.

 I cannot figure out if this is possible in a Python block though. So far
 my experiments have failed because I don't know how to make an hline
 symbol in a Python array. Any kind of string just shows as a row. Any
 thoughts on if this is possible?

 thanks,

 --
 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




-- 

  Dr William Henney, Centro de Radioastronomía y Astrofísica,
  Universidad Nacional Autónoma de México, Campus Morelia


Re: [O] getting an hline in a python generated table

2015-04-03 Thread John Kitchin
wow, that is some wizardry there! I did not know you could do a return
value that way! or get an hline from None! thanks!

William Henney writes:

 A simpler solution is to just use None, which gets automatically converted
 to an hline by org-babel:

 #+BEGIN_SRC python :return mytable
   NROWS, NCOLS = 6, 4
   mytable = []
   mytable.append(['A', 'B', 'C', 'D'])  # Table header
   mytable.append(None)  # hline
   for irow in range(NROWS):
   mytable.append([icol**irow for icol in range(NCOLS)])
   mytable.append(None)  # hline
 #+END_SRC

 #+RESULTS:
 | A | B |  C |   D |
 |---+---++-|
 | 1 | 1 |  1 |   1 |
 | 0 | 1 |  2 |   3 |
 | 0 | 1 |  4 |   9 |
 | 0 | 1 |  8 |  27 |
 | 0 | 1 | 16 |  81 |
 | 0 | 1 | 32 | 243 |
 |---+---++-|

 Will


 On Wed, Apr 1, 2015 at 2:07 PM, John Kitchin jkitc...@andrew.cmu.edu
 wrote:

 Hi everyone,

 In emacs-lisp, I can get a table as output that has a horizontal line
 in it like this:

 (append '((name scopus-id h-index n-docs n-citations))
 '(hline)
 (some expression that generates a list))

 The first row is header names, then a horizontal line, followed by a row
 for each thing of interest. This seems to work because the result is an
 emacs-lisp array.

 I cannot figure out if this is possible in a Python block though. So far
 my experiments have failed because I don't know how to make an hline
 symbol in a Python array. Any kind of string just shows as a row. Any
 thoughts on if this is possible?

 thanks,

 --
 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



--
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



[O] How to tell Org mode radio table translator not to wrap, Greeks in dollars ($$)

2015-04-03 Thread Omid
Hello,

I'm trying to use an Org mode Radio Table in LaTeX according to:

http://orgmode.org/manual/Radio-tables.html
http://orgmode.org/manual/A-LaTeX-example.html#A-LaTeX-example

My Org mode table is representing a matrix containing Greek letters
denoted by LaTeX commands (e.g., \mu). The radioing process wraps
these commands in dollars (\mu changes to $\mu$). I'm using `:splice
t' to return only table body lines (without wrapping them in a tabular
environment) to insert the table in my equation and matrix
environments. I tried `:fmt %s' hoping that the table fields would
be left untouched, but, no the translator still wraps my \mu's in $$.

Here is an example:

\begin{comment}
#+ORGTBL: SEND Ah-advection orgtbl-to-latex :splice t :skip 0 :fmt %s
| 1-\mu |||   |   |
| \mu   | 1-\mu  ||   |   |
|   | \ddots | \ddots |   |   |
|   || \mu| 1-\mu |   |
|   ||| \mu   | 1-\mu |
\end{comment}

with the translated result

\begin{equation}
  \label{eq:Ah-advection}
  A_{h}=
  \begin{bmatrix}
% BEGIN RECEIVE ORGTBL Ah-advection
1-$\mu$ \\
$\mu$  1-$\mu$   \\
  \ddots  \ddots \\
$\mu$  1-$\mu$   \\
  $\mu$  1-$\mu$ \\
% END RECEIVE ORGTBL Ah-advection
  \end{bmatrix}
\end{equation}

How can I tell the table translator not to wrap Greeks in $$?

Thanks,

-- 
Omid



[O] [question] How to filter a head based head name?

2015-04-03 Thread tumashu
The below is an example, I want to ignore *head1* and *its content* when
export to html, but for some reason I can't add tags to head, How to
solve this problem?

If I want to rename *head2* to *new-head2*, how to do?

#+BEGIN_ORG
* head1
  content1
  
* head2
  content2
  
* head3
  content3
#+END_ORG

Thanks!

Re: [O] How to tell Org mode radio table translator not to wrap, Greeks in dollars ($$)

2015-04-03 Thread William Henney
Hi Omid

It looks like orgtbl-to-latex is calling org-export-string-as on each table
cell, which is presumably what is wrapping each \mu inside $$.   This seems
wrong-headed to me, but I can't say I really understand what the code is
trying to achieve.

A workaround would be to directly use orgtbl-to-generic instead. Just
replace your ORGTBL line with

#+ORGTBL: SEND Ah-advection orgtbl-to-generic :splice t :skip 0 :lend 
 :sep   

Will


On Fri, Apr 3, 2015 at 8:52 PM, Omid omidl...@gmail.com wrote:

 Hello,

 I'm trying to use an Org mode Radio Table in LaTeX according to:

 http://orgmode.org/manual/Radio-tables.html
 http://orgmode.org/manual/A-LaTeX-example.html#A-LaTeX-example

 My Org mode table is representing a matrix containing Greek letters
 denoted by LaTeX commands (e.g., \mu). The radioing process wraps
 these commands in dollars (\mu changes to $\mu$). I'm using `:splice
 t' to return only table body lines (without wrapping them in a tabular
 environment) to insert the table in my equation and matrix
 environments. I tried `:fmt %s' hoping that the table fields would
 be left untouched, but, no the translator still wraps my \mu's in $$.

 Here is an example:

 \begin{comment}
 #+ORGTBL: SEND Ah-advection orgtbl-to-latex :splice t :skip 0 :fmt %s
 | 1-\mu |||   |   |
 | \mu   | 1-\mu  ||   |   |
 |   | \ddots | \ddots |   |   |
 |   || \mu| 1-\mu |   |
 |   ||| \mu   | 1-\mu |
 \end{comment}

 with the translated result

 \begin{equation}
   \label{eq:Ah-advection}
   A_{h}=
   \begin{bmatrix}
 % BEGIN RECEIVE ORGTBL Ah-advection
 1-$\mu$ \\
 $\mu$  1-$\mu$   \\
   \ddots  \ddots \\
 $\mu$  1-$\mu$   \\
   $\mu$  1-$\mu$ \\
 % END RECEIVE ORGTBL Ah-advection
   \end{bmatrix}
 \end{equation}

 How can I tell the table translator not to wrap Greeks in $$?

 Thanks,

 --
 Omid




-- 

  Dr William Henney, Centro de Radioastronomía y Astrofísica,
  Universidad Nacional Autónoma de México, Campus Morelia


Re: [O] Emacs-Orgmode Archive search fails

2015-04-03 Thread Nick Dokos
Charles Millar mill...@verizon.net writes:

 It has been a while since I searched the mailing list archives. Did I
 miss an announcement or is the search engine broken?

 For the past few days, any search request in the mailing list archives
 either yields no result or just one and the same result - Citations,
 continued, etc. /archive/html/ emacs-orgmode/2015-02/msg00028.html
 (7,961 bytes)

 This occurs on both Debian and Windows 7 machine.


I tried a simple search through Gnus search on the newsgroup (G G)
and on the web page http://news.gmane.org/gmane.emacs.orgmode. Both
succeeded, so whatever it was seems to have been fixed.

In the past, when the search engine failed (and it has failed a couple
of times), a message to LarsI with the details of the failure has been
enough to get things going again (sometimes with a couple of days
delay).
-- 
Nick




[O] Define Keyboard Shortcut for Open in Emacs

2015-04-03 Thread Rainer M Krug

Hi

I would like to open pdfs in emacs (using pdf-viewer) but there is only
a shortcut (C-c C-o) to open a pdf externally, and no shortcut for the
menu item below Open in Emacs in the context menu.

How can I define a shortcut for this command (or re-use C-c C-o)?
Thanks

Rainer

-- 
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] Define Keyboard Shortcut for Open in Emacs

2015-04-03 Thread John Kitchin
I find C-u RET on a link will open a pdf in emacs. or C-u C-c C-o

Rainer M Krug writes:

 Hi

 I would like to open pdfs in emacs (using pdf-viewer) but there is only
 a shortcut (C-c C-o) to open a pdf externally, and no shortcut for the
 menu item below Open in Emacs in the context menu.

 How can I define a shortcut for this command (or re-use C-c C-o)?
 Thanks

 Rainer

--
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] Clock history as autocomplete?

2015-04-03 Thread Marcin Borkowski

On 2015-04-03, at 12:36, Mike McLean mike.mcl...@pobox.com wrote:

 I get the general effect using Emacs Helm with some additional commands as
 part of the helm definitions. My original idea was from Sacha Chua (
 http://sachachua.com/blog/2015/03/getting-helm-org-refile-clock-create-tasks/
 [...]

Thanks a lot!  I'll look into your code soon (I don't use Helm, I used
to use Ido, but now I moved to Icicles - but I guess adapting this to
Icicles will be relatively easy).

Best, and Happy Easter to everyone!

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University