[O] Issue with commit 6062f9e in ox-publish

2014-03-25 Thread steckerhalter
This change:

@@ -1169,5 +1168,10 @@ the file including them will be republished as well.
- (while (re-search-forward
- ^#\\+INCLUDE:[ \t]+\\\([^\t\n\r\]*\\)\[ \t]*.*$ nil t)
-  (let* ((included-file (expand-file-name (match-string 1
-(add-to-list 'included-files-ctime
- (org-publish-cache-ctime-of-src included-file) t
+ (while (re-search-forward ^[ \t]*#\\+INCLUDE: nil t)
+  (let* ((element (org-element-at-point))
+ (included-file
+  (and (eq (org-element-type element) 'keyword)
+   (org-string-nw-p (org-element-property :value element)
+(when included-file
+  (add-to-list 'included-files-ctime
+   (org-publish-cache-ctime-of-src
+(expand-file-name included-file))
+   t)

causes an error for me:

org-publish-cache-ctime-of-src: No such file:
/home/user/org-mode-blog/posts/../elisp/org-mode-blog-setup.el src
emacs-lisp

When I revert the commit I do not get an error.

Probably it's just that it does not strip the src emacs-lisp part now?

cheers
steckerhalter


Re: [O] Question: how to disable htmlize during exporting?

2014-03-25 Thread Bastien
Hi Kelvin,

Kelvin Hu ini.kel...@gmail.com writes:

 Org is awesome and now I use it as my blogging tool, everything is
 perfect except the source code highlighting. Org uses htmlize.el to
 highlight source code, it's fine, but when I use another theme or on a
 different machine, the generated html(contains source code block) will
 change due to Emacs theme change. As I use git to manage my generated
 html files, so when publishing after a theme change, those html files
 contain source code will change and thus I need to *git commit* a lot
 of files without actual useful content change!

 So now I want to use google prettify.js to highlight my source code,
 but I cannot disable htmlize.el during exporting, I googled and
 someone said removing htmlize.el will achieve this, but I don't think
 it is a good idea.

I'd try to set `org-html-htmlize-output-type' to nil but I didn't
test.  If it does not work, this is a bug.

-- 
 Bastien



Re: [O] org-html5presentation

2014-03-25 Thread Bastien
Rustom Mody rustompm...@gmail.com writes:

 Bastien: Ive written to Takumi Kinjo

Thanks!

-- 
 Bastien



Re: [O] [PATCH] org-plot: Handle explicit date/time index

2014-03-25 Thread Bastien
Dear Yasushi,

Yasushi SHOJI ya...@atmark-techno.com writes:

 Meanwhile, Bastien, would you mind to revert the commit for me?

Done.  There is no hurry on this, thanks in advance for your time,

-- 
 Bastien



Re: [O] Issue with commit 6062f9e in ox-publish

2014-03-25 Thread Nicolas Goaziou
Hello,

steckerhalter org-m...@postmomentum.ch writes:

 This change:

 @@ -1169,5 +1168,10 @@ the file including them will be republished as well.
 - (while (re-search-forward
 - ^#\\+INCLUDE:[ \t]+\\\([^\t\n\r\]*\\)\[ \t]*.*$ nil t)
 -  (let* ((included-file (expand-file-name (match-string 1
 -(add-to-list 'included-files-ctime
 - (org-publish-cache-ctime-of-src included-file) t
 + (while (re-search-forward ^[ \t]*#\\+INCLUDE: nil t)
 +  (let* ((element (org-element-at-point))
 + (included-file
 +  (and (eq (org-element-type element) 'keyword)
 +   (org-string-nw-p (org-element-property :value element)
 +(when included-file
 +  (add-to-list 'included-files-ctime
 +   (org-publish-cache-ctime-of-src
 +(expand-file-name included-file))
 +   t)

 causes an error for me:

 org-publish-cache-ctime-of-src: No such file:
 /home/user/org-mode-blog/posts/../elisp/org-mode-blog-setup.el src
 emacs-lisp

 When I revert the commit I do not get an error.

 Probably it's just that it does not strip the src emacs-lisp part
 now?

Good catch. This should be fixed. Thank you for reporting it.


Regards,

-- 
Nicolas Goaziou



Re: [O] Radio targets with mixed capitalisation do not work in HTML export

2014-03-25 Thread Nicolas Goaziou
Hello,

Bastien b...@gnu.org writes:

 That's quite a premature and unstable intuition, but I think it's
 worth trying if your intuition goes in the same direction.  Otherwise
 let's just prevent apostrophes.

OK, let's try it. Time will tell.

Installed in 1c1936fbb1f0c42e5c7e1d3c903626aa5993a357.


Regards,

-- 
Nicolas Goaziou



Re: [O] [BABEL] BUG Re: Omitting try/catch blocks from tangled R code?

2014-03-25 Thread Rainer M Krug
Eric Schulte schulte.e...@gmail.com writes:

 Rainer M Krug rai...@krugs.de writes:

 Eric Schulte schulte.e...@gmail.com writes:

 Rainer M Krug rai...@krugs.de writes:

 Eric Schulte schulte.e...@gmail.com writes:

 Charles Berry ccbe...@ucsd.edu writes:

 John Hendy jw.hendy at gmail.com writes:

 [deleted]
 
  I think the default behavior should be reverted, as tangling and
  exporting are two different things. When I tangle, I want to see the
  code blocks as they are in the org document (with possible variables 
  and
  expansions) but not to create files where I do not put it explicitly
  into a code block. These wrappers have nothing to do with the code, 
  and
  are only there for the exported engine. So I would either revert to 
  the
  original behavior, or, introduce a new header argument,
  e.g. :include-wrappers, which would, if set to t, include the export
  wrappers in the tangled file. This might be useful for debugging
  exporting of code block results, but not for general tangling.
 
 Thanks for chiming in. This was my gut reaction to the default
 behavior. I guess we're still only a sample size of 2, but
 intuitively, I would think that tangling would be a separate beast in
 most cases from exporting. Just to have it on the record, if I tangle,
 it's usually to take the code I've used in something like a Beamer
 presentation or document and combine it into a single .R file so
 someone can run it without needing Org-mode.

 [deleted]

 Sorry to be late to add my $0.02...

 I never want the try/catch wrappers.

 But noweb is indispensable.

 I use noweb a lot to organize and collect blocks. In some cases, I export
 them and in others I just tangle them.

 I hope that the revised code will allow me to turn off try/catch wrapping
 and still be able to use noweb when tangling or exporting.


 In addition to noweb, there are cases where variable expansion is useful
 in tangled code.

 The simplest option is to move things like try/catch blocks out of the
 code block expansion function, and into the execution function.  Then if
 other language present similar constructs (which we want to add to
 execution by default but never want to tangle), we can think about
 abstracting this out into some new level of code block expansion.

 Thoughts?

 Makes perfect sense to me, and would definitely be the better place to
 add them.

 If one wants enclosing code in the tangling, there is always
 the :epilogue and :prologue header arguments, and the try/catch should
 be considered as internal to the execution.


 Great, how's this patch work?  If it looks good I'll apply it.

 Git still puzzles me a lot... If you tell me how I can apply this patch
 (from emacs?) I will try it out.


 Here are some instructions from the command line.

 1. write the patch out to a file on disk, say /tmp/0001-etc...patch

 2. cd into the org-mode directory

 3. make sure you're up to date with the latest

  git pull

 4. apply the patch

  git am /tmp/0001-etc...patch

 and that should do it.

OK - managed to apply the patch.

Using 

Org-mode version 8.2.5h (release_8.2.5h-846-geb806d @ 
/Users/rainerkrug/.emacs.d/org-mode/lisp/)

updated this morning, I get the following error:

,
| Debugger entered--Lisp error: (wrong-type-argument sequencep 67)
|   mapconcat(identity COLUMNS - 
read.table(\/var/folders/50/wcr5bjwn75q595n6x82gxj28gn/T/babel-21363l1U/R-import-21363S9b\,\n
  header=TRUE,\n  row.names=1,\n
  sep=\\\t\,\n  as.is=TRUE)\nCOLS_TO_EVAL - 
read.table(\/var/folders/50/wcr5bjwn75q595n6x82gxj28gn/T/babel-21363l1U/R-import-21363fHi\,\n
  header=TRUE,\n  row.names=1,\n
  sep=\\\t\,\n  as.is=TRUE)\nALLSPECIES - 
read.table(\/var/folders/50/wcr5bjwn75q595n6x82gxj28gn/T/babel-21363l1U/R-import-21363sRo\,\n
  header=TRUE,\n  row.names=1,\n
  sep=\\\t\,\n  as.is=TRUE)\nSPECIES - 
read.table(\/var/folders/50/wcr5bjwn75q595n6x82gxj28gn/T/babel-21363l1U/R-import-213635bu\,\n
  header=TRUE,\n  row.names=1,\n
  sep=\\\t\,\n  as.is=TRUE)\nYEARS - 
read.table(\/var/folders/50/wcr5bjwn75q595n6x82gxj28gn/T/babel-21363l1U/R-import-21363Gm0\,\n
  header=TRUE,\n  row.names=1,\n
  sep=\\\t\,\n  as.is=TRUE)\nPRESENT - 
2008\nMINEFFORT - 3\nPROPTRAIN - 0.6\nRNGSEED - 13\nRNGKIND - 
\Mersenne-Twister\\nRNGNORMALKIND - \Inversion\\nREFGRID - 
\./refGrid_8km.rds\\nIFN - 
\./__BOX__/IFN/DB_IFN/rds/tabplot.rds\\nIFNCOUNT - 
\./__BOX__/IFN/DB_IFN/rdsRasterized/tabplot.count.8km.rds\\nIFNMEAN - 
\./__BOX__/IFN/DB_IFN/rdsRasterized/tabplot.mean.8km.rds\\nIFNPRES - 

[O] Reverse lookup from pdf to org?

2014-03-25 Thread Rainer M Krug
Hi

I am working on a longish document which will be converted to pdf, and I
am doing debugging of scripts at the moment.

Therefore I export the document to pdf, and look for errors there. Now I
have to find the corresponding section in the org file - possible, but
tedious.

Would it be possibler to include reverse-lookup in org, so that I click
in the pdf, and the cursor jumps to the position in the org document? I
really like this feature when e.g. using LyX. 

I have no idea how this could be implemented and if this would be
difficult, but I think this could be a useful feature for longer documents.

Cheers,

Rainer

-- 
Rainer M. Krug
email: Raineratkrugsdotde
PGP: 0x0F52F982


pgp_b9JVxeb9P.pgp
Description: PGP signature


Re: [O] Org is awesome

2014-03-25 Thread chandan
On Tuesday 25 Mar 2014 09:48:59 James Harkins wrote:
 
 So, just be patient -- it'll happen, but not until project documentation is
 ready.
 

Sure. Looking forward to the new worg page.

Thanks,
chandan



Re: [O] Radio targets with mixed capitalisation do not work in HTML export

2014-03-25 Thread Bastien
Nicolas Goaziou n.goaz...@gmail.com writes:

 OK, let's try it. Time will tell.

 Installed in 1c1936fbb1f0c42e5c7e1d3c903626aa5993a357.

Thanks,

-- 
 Bastien



Re: [O] bug: org-shiftmetaright fails to shift the last child

2014-03-25 Thread Bastien
Samuel Wales samolog...@gmail.com writes:

 ===
 * org-shiftmetaright on the following folded header will fail to shift
 headline 3
 * bug
 *** 2
 * [[http://www.google.com][google]]
 *** 3
 ===

 this is in maint.

Fixed again, thanks and sorry for this regression.

There is still one glitch: the tag in the headline with the bracket
link will no be aligned properly when hidden.  I spent time on this
but cannot figure out how to fix it.  Patch/insight welcome.

-- 
 Bastien



[O] Fwd: Question: how to disable htmlize during exporting?

2014-03-25 Thread Kelvin Hu
[forwarding to mailing-list]

-- Forwarded message --
From: Kelvin Hu ini.kel...@gmail.com
Date: 2014-03-25 18:07 GMT+08:00
Subject: Re: Question: how to disable htmlize during exporting?
To: Bastien b...@gnu.org


Hi Bastien,

2014-03-25 16:25 GMT+08:00 Bastien b...@gnu.org:

 I'd try to set `org-html-htmlize-output-type' to nil but I didn't
 test.  If it does not work, this is a bug.

Thanks for your reply, I have tried this approach, but it reports
error: (void function nil).
Per the definition in `ox-html.el', it must be either 'inline-css or 'css.

After some research, now I use the following workaround:

(flet ((org-html-fontify-code
(code lang) (when code (org-html-encode-plain-text code
  ;; code here
  ;; e.g. (insert (org-export-as 'html nil nil t nil))
)

Redefine the function `org-html-fontify-code' will help, but I think
this workaround is a little ugly. So, I hope this feature can be
disabled gracefully, like set `org-html-htmlize-output-type' to nil.



Re: [O] org-html5presentation

2014-03-25 Thread Rustom Mody
On Tue, Mar 25, 2014 at 1:55 PM, Bastien b...@gnu.org wrote:
 Rustom Mody rustompm...@gmail.com writes:

 Bastien: Ive written to Takumi Kinjo

 Thanks!

 --
  Bastien

Well I should mention that the link mentions Carsten as the author
and Takumi (good deal lower) for 'modifications'.
I let common sense (I have a modest supply) prevail over technicality
so did not mention it earlier

Takumi wrote back saying he will try to look into it over the weekend
I wrote back suggesting that he may ask here for help on using the new
export infra-structure.

But I wonder whether it is necessary or whether org-reveal is good enough??

Rusi

-- 
http://www.the-magus.in
http://blog.languager.org



Re: [O] Reverse lookup from pdf to org?

2014-03-25 Thread Suvayu Ali
On Tue, Mar 25, 2014 at 11:07:54AM +0100, Rainer M Krug wrote:
 Hi
 
 I am working on a longish document which will be converted to pdf, and I
 am doing debugging of scripts at the moment.
 
 Therefore I export the document to pdf, and look for errors there. Now I
 have to find the corresponding section in the org file - possible, but
 tedious.
 
 Would it be possibler to include reverse-lookup in org, so that I click
 in the pdf, and the cursor jumps to the position in the org document? I
 really like this feature when e.g. using LyX. 
 
 I have no idea how this could be implemented and if this would be
 difficult, but I think this could be a useful feature for longer documents.

I think this is only possible with synctex.  See this thread:
http://thread.gmane.org/gmane.emacs.orgmode/78111

Hope this helps,

-- 
Suvayu

Open source is the future. It sets us free.



[O] org-entities: Another issue [was: org-entities: why \lang instead of \langle?]

2014-03-25 Thread Anders Johansson

(I continue in the same thread as this is related)

org-entities has:  (slash / nil / / / /)

A LaTeX user entering \slash would probably expect to have this exported 
as \slash (which produces a breaking /, not the same thing as just 
entering / in LaTeX).


So it should rather be:  (slash \\slash nil / / / /)

Could this be changed without breaking people's documents?


Cheers,
Anders Johansson



Re: [O] org-html5presentation

2014-03-25 Thread Dov Grobgeld
Rick Frankel's ox-slidy.el from:

http://lists.gnu.org/archive/html/emacs-orgmode/2013-10/msg00781.html

also works really well for me. He is just to modest to let you know
himself. :-)

Regards,
Dov


On Tue, Mar 25, 2014 at 2:28 PM, Rustom Mody rustompm...@gmail.com wrote:

 On Tue, Mar 25, 2014 at 1:55 PM, Bastien b...@gnu.org wrote:
  Rustom Mody rustompm...@gmail.com writes:
 
  Bastien: Ive written to Takumi Kinjo
 
  Thanks!
 
  --
   Bastien

 Well I should mention that the link mentions Carsten as the author
 and Takumi (good deal lower) for 'modifications'.
 I let common sense (I have a modest supply) prevail over technicality
 so did not mention it earlier

 Takumi wrote back saying he will try to look into it over the weekend
 I wrote back suggesting that he may ask here for help on using the new
 export infra-structure.

 But I wonder whether it is necessary or whether org-reveal is good enough??

 Rusi

 --
 http://www.the-magus.in
 http://blog.languager.org




Re: [O] org-entities: Another issue [was: org-entities: why \lang instead of \langle?]

2014-03-25 Thread Aaron Ecay
Hi Anders,

2014ko martxoak 25an, Anders Johansson-ek idatzi zuen:

 (I continue in the same thread as this is related)

 org-entities has:  (slash / nil / / / /)

 A LaTeX user entering \slash would probably expect to have this exported
 as \slash (which produces a breaking /, not the same thing as just
 entering / in LaTeX).

 So it should rather be:  (slash \\slash nil / / / /)

 Could this be changed without breaking people's documents?

It’s important for LaTeX users to have a way to write “/” into the
output – sometimes it might not possible to use a literal “/” in org,
because of the /emphasis/ markup.

It seems to me (as a user of both latex and html export) that most of
the time I want “/” in the output, regardless of backend.  Maybe (org’s)
\slash should retain its meaning, and there should be a new entity which
obeys your proposal.

It also seems like \slash in latex has some odd properties
wrt. hyphenation:
https://tex.stackexchange.com/questions/97310/slash-allows-for-hyphenation-of-only-the-word-on-its-left-how-to-fix-it-for-th.
So maybe latex power users would rather write something more complicated
using the @@latex:\slash\hspace{0pt}@@ syntax.

Thanks,

--
Aaron Ecay



Re: [O] org-html5presentation

2014-03-25 Thread Rick Frankel

On 2014-03-25 09:31, Dov Grobgeld wrote:

Rick Frankel's ox-slidy.el from:

http://lists.gnu.org/archive/html/emacs-orgmode/2013-10/msg00781.html 
[3]


also works really well for me. He is just to modest to let you know 
himself. :-)


Actually, i forgot i did the slidy port (it was a quick hack because 
someone wanted to use slidy)! I currently use ox-deck (also mine) for my 
presentations, i like the clean (swiss) presentation style w/o fancy 
transitions and colors, so reveal is a bit overkill for me.


rick




Re: [O] [ANN] orgbox: Mailbox-like task scheduling in org-agenda.

2014-03-25 Thread Alan Schmitt
Hi Aaron,

Aaron Ecay aarone...@gmail.com writes:

 Hi Alan,

 I installed the attached file with M-x package-install-file to avoid
 getting org pulled in via (M)ELPA.  The large version number means that
 new versions of org don’t look like upgrades, preventing them from
 overwriting this package.  Obviously, you should edit the path to your
 git checkout of org.  You’ll additionally have to add the org/lisp and
 org/contrib/lisp (if desired) directories from the git checkout to
 load-path in your init.el (before calling package-initialize).

 (I think the copyright line was put there because package.el would
 fuss if it was missing.  This code is so short I doubt it is actually
 copyrightable.)


 ;;; org.el --- Dummy org mode package

 ;; Copyright (C) 2013 Aaron Ecay

 ;; Version: 3101

 (let ((org-dir /home/aecay/development/org-mode/lisp/))
   (load (concat org-dir org.el)))

 ;;; org.el ends here

This is a great suggestion! As I'm already loading org, I follow
a similar approach. I installed the following file (with an updated
copyright ;-))

#+begin_src emacs-lisp
;;; org.el --- Dummy org mode package

;; Copyright (C) 2014 Alan Schmitt

;; Version: 3101

()

;;; org.el ends here
#+end_src

Thanks,

Alan



[O] Bug: [babel] #+PROPERTY: eval never-export disables interactive evaluation [8.2.5h (release_8.2.5h-806-gb1199e @ /Users/rainerkrug/.emacs.d/org-mode/lisp/)]

2014-03-25 Thread Rainer M Krug

The subject says it all - when I set 

#+PROPERTY: eval never-export 

the interactive evaluation of R code blocks is disabled. Message:

Evaluation of this R code-block is disabled.

#+PROPERTY: eval always

enables it again.

Let me know if you need more info.

Cheers,

Rainer


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.3.1 (x86_64-apple-darwin13.0.0, Carbon Version 1.6.0 
AppKit 1265)
 of 2014-02-13 on Rainers-MacBook-Pro-2.local
Package: Org-mode version 8.2.5h (release_8.2.5h-806-gb1199e @ 
/Users/rainerkrug/.emacs.d/org-mode/lisp/)

current state:
==
(setq
 org-src-lang-modes '((plantuml . plantuml) (ocaml . tuareg) (elisp . 
emacs-lisp)
  (ditaa . artist) (asymptote . asy) (dot . 
fundamental)
  (sqlite . sql) (calc . fundamental) (C . c) (cpp 
. c++)
  (C++ . c++) (screen . shell-script))
 org-hide-leading-stars t
 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-ellipsis 〖 ✎ 〗
 org-occur-hook '(org-first-headline-recenter)
 org-src-tab-acts-natively t
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-html-format-drawer-function '(lambda (name contents) contents)
 org-format-latex-options '(:foreground default :background default :scale 1.3 
:html-foreground
Black :html-background Transparent :html-scale 
1.0 :matchers
(begin $1 $ $$ \\( \\[))
 org-src-window-setup 'current-window
 org-latex-format-inlinetask-function 'ignore
 org-confirm-shell-link-function 'y-or-n-p
 org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
 org-latex-format-headline-function 'org-latex-format-headline-default-function
 org-capture-templates '((p Problem to be logged in buffer entry
  (file+headline (buffer-file-name) QUESTIONS)
  \n- revision :: %(symbol-name (vc-working-revision 
(buffer-file-name (org-capture-get :original-buffer\n- state:: 
%(symbol-name (vc-state (buffer-file-name (org-capture-get 
:original-buffer\n- link :: %a \n- author   :: Rainer M Krug, email: 
rai...@krugs.de\n* %?)
 (c Changes to be logged in buffer entry
  (file+headline (buffer-file-name) CHANGES)
  \n- revision :: %(symbol-name (vc-working-revision 
(buffer-file-name (org-capture-get :original-buffer\n- state:: 
%(symbol-name (vc-state (buffer-file-name (org-capture-get 
:original-buffer\n- link :: %a \n- author   :: Rainer M Krug, email: 
rai...@krugs.de %n\n* %T %?)
 (t TODO to be logged in buffer entry
  (file+headline (buffer-file-name) TODOs)
  * TODO\nSCHEDULED: %T\nDEADLINE:  %T\n- revision :: 
%(symbol-name (vc-working-revision (buffer-file-name (org-capture-get 
:original-buffer\n- state:: %(symbol-name (vc-state (buffer-file-name 
(org-capture-get :original-buffer\n- link :: %a \n- author   :: Rainer 
M Krug, email: rai...@krugs.de\n %?)
 (O toodledo to be logged in toodledo.org entry
  (file+headline (concat org-directory /toodledo.org) 
TASKS)
  * TODO [#D] %?\n%i\nSCHEDULED: %T\nDEADLINE:  
%T\n:PROPERTIES:\nToodledoFolder: To Be Filed\n:END:\n%a)
 (T TODO to be logged in notes.org entry
  (file+headline (concat org-directory /notes.org) 
Tasks)
  * TODO [#D]\n%i\nSCHEDULED: %T\nDEADLINE:  
%T\n:PROPERTIES:\n:END:\n %?\n%a)
 (M Misc to be logged in notes.org entry
  (file+headline (concat org-directory /notes.org) 
Misc)
  * %?\n  %i\n %T\n  %a)
 (I Info to be logged in notes.org entry
  (file+headline (concat org-directory /notes.org) 
Information)
  * %?\n  %i\n %T\n  %a)
 (B Things I can blog about to be logged in 
notes.org entry
  (file+headline (concat org-directory /notes.org) 
To Blog)
  * %?\n  %i\n %T\n  %a)
 (S Useful code snippets logged in programming.org 
entry
  (file+headline (concat org-directory 
/programming.org)
   Code Snippet)
  * %?  

Re: [O] adding options to the minted environment of exported source blocks in latex

2014-03-25 Thread Nicolas Goaziou
Hello,

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

 Using attr_latex would be great.

Here is the patch. WDYT?


Regards,

-- 
Nicolas Goaziou
From c56bd2754030fd999d50d349ee5282a6c16ba832 Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou n.goaz...@gmail.com
Date: Tue, 25 Mar 2014 15:58:41 +0100
Subject: [PATCH] ox-latex: Allow :options in LaTeX attributes

* lisp/ox-latex.el (org-latex-src-block): Allow to add options to
  listings or minted block-wise.
(org-latex-listings-options, org-latex-minted-options): Update
docstring.

* doc/org.texi (@LaTeX{} specific attributes): Document feature.
---
 doc/org.texi | 22 +++--
 lisp/ox-latex.el | 72 +++-
 2 files changed, 65 insertions(+), 29 deletions(-)

diff --git a/doc/org.texi b/doc/org.texi
index 2abfa66..2330835 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -9842,6 +9842,7 @@ Here is an example
 @end example
 
 @cindex formatting source code, markup rules
+@vindex org-latex-listings
 If the example is source code from a programming language, or any other text
 that can be marked up by font-lock in Emacs, you can ask for the example to
 look like the fontified Emacs buffer@footnote{This works automatically for
@@ -11833,8 +11834,10 @@ that environment.
 @cindex source blocks, in @LaTeX{} export
 
 In addition to syntax defined in @ref{Literal examples}, names and captions
-(@pxref{Images and tables}), source blocks also accept a @code{:float}
-attribute.  You may set it to:
+(@pxref{Images and tables}), source blocks also accept two additional
+attributes: @code{:float} and @code{:options}.
+
+You may set the former to
 @itemize @minus
 @item
 @code{t}: if you want to make the source block a float.  It is the default
@@ -11854,6 +11857,21 @@ Code that may not fit in a single page.
 #+END_SRC
 @end example
 
+@vindex org-latex-listings-options
+@vindex org-latex-minted-options
+The latter allows to specify options relative to the package used to
+highlight code in the output (e.g., @code{listings}).  This is the local
+counterpart to @code{org-latex-listings-options} and
+@code{org-latex-minted-options} variables, which see.
+
+@example
+#+ATTR_LATEX: :options commentstyle=\bfseries
+#+BEGIN_SRC emacs-lisp
+  (defun Fib (n)  ; Count rabbits.
+(if ( n 2) n (+ (Fib (- n 1)) (Fib (- n 2)
+#+END_SRC
+@end example
+
 @subsubheading Special blocks in @LaTeX{} export
 @cindex special blocks, in @LaTeX{} export
 @cindex abstract, in @LaTeX{} export
diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index 4616574..fdf1008 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -770,7 +770,13 @@ will typeset the code in a small size font with underlined, bold
 black keywords.
 
 Note that the same options will be applied to blocks of all
-languages.
+languages.  If you need block-specific options, you may use the
+following syntax:
+
+  #+ATTR_LATEX: :options key1=value1,key2=value2
+  #+BEGIN_SRC LANG
+  ...
+  #+END_SRC
   :group 'org-export-latex
   :type '(repeat
 	  (list
@@ -817,7 +823,13 @@ will result in src blocks being exported with
 \\begin{minted}[bgcolor=bg,frame=lines]{LANG}
 
 as the start of the minted environment. Note that the same
-options will be applied to blocks of all languages.
+options will be applied to blocks of all languages.  If you need
+block-specific options, you may use the following syntax:
+
+  #+ATTR_LATEX: :options key1=value1,key2=value2
+  #+BEGIN_SRC LANG
+  ...
+  #+END_SRC
   :group 'org-export-latex
   :type '(repeat
 	  (list
@@ -2279,14 +2291,17 @@ contextual information.
 		(format
 		 \\begin{minted}[%s]{%s}\n%s\\end{minted}
 		 ;; Options.
-		 (org-latex--make-option-string
-		  (if (or (not num-start)
-			  (assoc linenos org-latex-minted-options))
-		  org-latex-minted-options
-		(append
-		 `((linenos)
-		   (firstnumber ,(number-to-string (1+ num-start
-		 org-latex-minted-options)))
+		 (concat
+		  (org-latex--make-option-string
+		   (if (or (not num-start)
+			   (assoc linenos org-latex-minted-options))
+		   org-latex-minted-options
+		 (append
+		  `((linenos)
+			(firstnumber ,(number-to-string (1+ num-start
+		  org-latex-minted-options)))
+		  (let ((local-options (plist-get attributes :options)))
+		(and local-options (concat , local-options
 		 ;; Language.
 		 (or (cadr (assq (intern lang) org-latex-minted-langs)) lang)
 		 ;; Source code.
@@ -2328,23 +2343,26 @@ contextual information.
 	   ;; Options.
 	   (format
 	\\lstset{%s}\n
-	(org-latex--make-option-string
-	 (append
-	  org-latex-listings-options
-	  (cond
-	   ((and (not float) (plist-member attributes :float)) nil)
-	   ((string= multicolumn float) '((float *)))
-	   ((and float (not (assoc float org-latex-listings-options)))
-		`((float ,org-latex-default-figure-position
-	  `((language ,lst-lang))
-	  (when label `((label ,label)))
-	  

[O] Tasks with lots of logbook entries are very slow

2014-03-25 Thread Pere Quintana Seguí
I log most of my work with org-mode. Some of my tasks are repetitive,
this is, I do them weekly or daily (i.e. empty mail inbox). After many
years, the logs are very long. As a consequence, marking these tasks as
done is *very* slow.

Is there a workaround that does not involver deleting the logs?

Example:

 PNDT Processar la bústia d'entrada
SCHEDULED: 2014-03-25 dt ++1d
:LOGBOOK:
CLOCK: [2014-03-25 dt 15:31]
- State DONE   from PNDT   [2014-03-25 dt 15:20]
CLOCK: [2014-03-24 dl 13:21]--[2014-03-24 dl 13:36] =  0:15
- State DONE   from PNDT   [2014-03-21 dv 16:18]
CLOCK: [2014-03-21 dv 15:42]--[2014-03-21 dv 16:18] =  0:36
- State DONE   from PNDT   [2014-03-20 dj 16:25]

(very long list with log entries since 2009).
:END:

I use org-mode 7.8.11 with Emacs 23.4.1.

Thanks,
--
Pere Quintana
http://pere.quintanasegui.com




Re: [O] Issue with commit 6062f9e in ox-publish

2014-03-25 Thread Nicolas Goaziou
steckerhalter org-m...@postmomentum.ch writes:

 I still get an error:

 Debugger entered--Lisp error: (args-out-of-range #buffer
 org-mode-blog/posts/blogging-with-org-mode.org 0 33)
   match-string(1)

 I think you need to provide the original string to match-string, so either
 let it or like so:

 @@ -1171,7 +1171,7 @@ the file including them will be republished as well.
(and (eq (org-element-type element) 'keyword)
 (string-match ^\\(\.+?\\\|\\S-+\\)
   (org-element-property :value element))
 -   (org-remove-double-quotes (match-string 1)
 +   (org-remove-double-quotes (match-string 1 (org-element-property
 :value element))
  (when included-file
(add-to-list 'included-files-ctime
 (org-publish-cache-ctime-of-src

 with this change it works for me

Doh. This should be fixed... hopefully. Thank you again.


Regards,

-- 
Nicolas Goaziou



Re: [O] Issue with commit 6062f9e in ox-publish

2014-03-25 Thread steckerhalter
Hi Nicolas

On Tue, Mar 25, 2014 at 10:08 AM, Nicolas Goaziou n.goaz...@gmail.comwrote:


 Good catch. This should be fixed. Thank you for reporting it.


I still get an error:

Debugger entered--Lisp error: (args-out-of-range #buffer
org-mode-blog/posts/blogging-with-org-mode.org 0 33)
  match-string(1)

I think you need to provide the original string to match-string, so either
let it or like so:

@@ -1171,7 +1171,7 @@ the file including them will be republished as well.
   (and (eq (org-element-type element) 'keyword)
(string-match ^\\(\.+?\\\|\\S-+\\)
  (org-element-property :value element))
-   (org-remove-double-quotes (match-string 1)
+   (org-remove-double-quotes (match-string 1 (org-element-property
:value element))
 (when included-file
   (add-to-list 'included-files-ctime
(org-publish-cache-ctime-of-src

with this change it works for me

cheers


Re: [O] [PATCH] org-mac-link: Improve grabbing behavior for Chrome.

2014-03-25 Thread Anthony Lander
Thanks for improving the link grabber!

  -Anthony


On Sat, Mar 22, 2014 at 8:23 PM, Muchenxuan Tong demon...@gmail.com wrote:

 * contrib/lisp/org-mac-link.el (org-as-mac-chrome-get-frontmost-url):
   Improve AppleScript used for grabbing information from Chrome. Now
   it's shorter and doesn't require switching to the app. Also,
   starting and ending quote are trimmed only when necessary.
 ---
  contrib/lisp/org-mac-link.el | 32 
  1 file changed, 12 insertions(+), 20 deletions(-)

 diff --git a/contrib/lisp/org-mac-link.el b/contrib/lisp/org-mac-link.el
 index ef46171..d1687e0 100644
 --- a/contrib/lisp/org-mac-link.el
 +++ b/contrib/lisp/org-mac-link.el
 @@ -349,26 +349,18 @@ applications and inserting them in org documents

  (defun org-as-mac-chrome-get-frontmost-url ()
(let ((result (do-applescript
 -(concat
 - set oldClipboard to the clipboard\n
 - set frontmostApplication to path to frontmost
 application\n
 - tell application \Google Chrome\\n
 -  activate\n
 -  delay 0.15\n
 -  tell application \System Events\\n
 -  keystroke \l\ using command down\n
 -  keystroke \c\ using command down\n
 -  end tell\n
 -  delay 0.15\n
 -  set theUrl to the clipboard\n
 -  set the clipboard to oldClipboard\n
 -  set theResult to (get theUrl)  \::split::\ 
 (get name of window 1)\n
 - end tell\n
 - activate application (frontmostApplication as
 text)\n
 - set links to {}\n
 - copy theResult to the end of links\n
 - return links as string\n
 -(substring (car (split-string result [\r\n]+ t)) 1 -1)))
 +(concat
 +  set frontmostApplication to path to frontmost
 application\n
 +  tell application \Google Chrome\\n
 +  set theUrl to get URL of active tab of first
 window\n
 +  set theResult to (get theUrl)  \::split::\ 
 (get name of window 1)\n
 +  end tell\n
 +  activate application (frontmostApplication as text)\n
 +  set links to {}\n
 +  copy theResult to the end of links\n
 +  return links as string\n
 +(replace-regexp-in-string ^\\\|\$ 
 + (car (split-string result [\r\n]+ t)

  (defun org-mac-chrome-get-frontmost-url ()
(interactive)
 --
 1.9.1





Re: [O] Fwd: Question: how to disable htmlize during exporting?

2014-03-25 Thread Rick Frankel

On 2014-03-25 08:29, Kelvin Hu wrote:

2014-03-25 16:25 GMT+08:00 Bastien b...@gnu.org:

I'd try to set `org-html-htmlize-output-type' to nil but I didn't
test.  If it does not work, this is a bug.

Thanks for your reply, I have tried this approach, but it reports
error: (void function nil).
Per the definition in `ox-html.el', it must be either 'inline-css or 
'css.




But it's an excellent idea. I have a patch to ox-html which will allow 
ox-htmlize-output type to be set to `nil', to explicitly return plain 
text.


I will push it to master tonight when i get out from behind the 
firewall...


rick

P.S. Attached for review...
From b49fa8b36b983f32ca9ff090eec0be7ff45a50c3 Mon Sep 17 00:00:00 2001
From: Rick Frankel r...@rickster.com
Date: Tue, 25 Mar 2014 11:27:07 -0400
Subject: [PATCH] Allow disabling of htmlization in ox-html export.

* lisp/ox-html.el (org-html-htmlize-output-type): Add `nil'
  option (no htmlization).
(org-html-fontify-code): Return plain text if
`org-html-htmlize-output-type' is `nil'.
---
 lisp/ox-html.el | 13 +
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index 52795a3..a843441 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -756,9 +756,10 @@ link's path.
 
 (defcustom org-html-htmlize-output-type 'inline-css
   Output type to be used by htmlize when formatting code snippets.
-Choices are `css', to export the CSS selectors only, or `inline-css', to
-export the CSS attribute values inline in the HTML.  We use as default
-`inline-css', in order to make the resulting HTML self-containing.
+Choices are `css' to export the CSS selectors only,`inline-css'
+to export the CSS attribute values inline in the HTML or `nil' to
+export plain text.  We use as default `inline-css', in order to
+make the resulting HTML self-containing.
 
 However, this will fail when using Emacs in batch mode for export, because
 then no rich font definitions are in place.  It will also not be good if
@@ -771,7 +772,7 @@ all the faces you are interested in are defined, for example by loading files
 in all modes you want.  Then, use the command
 \\[org-html-htmlize-generate-css] to extract class definitions.
   :group 'org-export-html
-  :type '(choice (const css) (const inline-css)))
+  :type '(choice (const css) (const inline-css) (const nil)))
 
 (defcustom org-html-htmlize-font-prefix org-
   The prefix for CSS class names for htmlize font specifications.
@@ -1894,6 +1895,10 @@ is the language used for CODE, as a string, or nil.
   (message Cannot fontify src block (htmlize.el = 1.34 required))
   ;; Simple transcoding.
   (org-html-encode-plain-text code))
+ ;; Case 3: plain text explicitly set
+ ((not org-html-htmlize-output-type)
+  ;; Simple transcoding.
+  (org-html-encode-plain-text code))
  (t
   ;; Map language
   (setq lang (or (assoc-default lang org-src-lang-modes) lang))
-- 
1.8.0



Re: [O] Fwd: Question: how to disable htmlize during exporting?

2014-03-25 Thread Bastien
Rick Frankel r...@rickster.com writes:

 P.S. Attached for review...

Looks useful indeed, thanks in advance for pushing this!

-- 
 Bastien



Re: [O] adding options to the minted environment of exported source blocks in latex

2014-03-25 Thread Alan Schmitt
Nicolas Goaziou n.goaz...@gmail.com writes:

 Hello,

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

 Using attr_latex would be great.

 Here is the patch. WDYT?

It's working great, thanks a lot!

Alan



[O] Unconditionally turn off Flyspell mode during export

2014-03-25 Thread Sebastien Vauban
Hello,

I use Flyspell in all my text-mode and prog-mode buffers, hence as well
in my Org mode buffers -- as they ultimately derive from Text mode.

I do that with:

--8---cut here---start-8---
(add-hook 'text-mode-hook
  (lambda ()
(message Turning on Flyspell in buffer `%s' (buffer-name))
(flyspell-mode 1)))
--8---cut here---end---8---

Though, as you can see, that has the perverse impact that Flyspell gets
called (even multiple times) during the export process, when creating
copies of the source Org document:

--8---cut here---start-8---
Turning on Flyspell in buffer `ecm.txt2'
Turning on Flyspell in buffer `ecm.txt22'
Turning on Flyspell in buffer ` *temp*'
Turning on Flyspell in buffer `ecm.html'
Saving file d:/ecm.html...
Wrote d:/ecm.html
--8---cut here---end---8---

Is it possible to *automatically disable Flyspell during the export*
*process*, as it's completely useless (the export buffers are killed when
the export is done) and eats useful CPU cycles?

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Unconditionally turn off Flyspell mode during export

2014-03-25 Thread Bastien


Hi Sébastien,

Sebastien Vauban sva-news-D0wtAvR13HarG/idocf...@public.gmane.org
writes:

 I do that with:

 (add-hook 'text-mode-hook
   (lambda ()
 (message Turning on Flyspell in buffer `%s' (buffer-name))
 (flyspell-mode 1)))

 Though, as you can see, that has the perverse impact that Flyspell gets
 called (even multiple times) during the export process, when creating
 copies of the source Org document:

From master, you can check against `org-babel-exp-reference-buffer' to
see if you are currently exporting, and then activate flyspell-mode only
if you're not.

HTH,

-- 
 Bastien




Re: [O] Reverse lookup from pdf to org?

2014-03-25 Thread Brett Viren
Rainer M Krug rai...@krugs.de writes:

 Therefore I export the document to pdf, and look for errors there. Now I
 have to find the corresponding section in the org file - possible, but
 tedious.

Not quite what you have in mind and maybe only a half-measure but when I
produce draft latex documents I like to turn on this package:

\usepackage[color]{showkeys}

It prints the symbol used for labels, references and citations in light
gray in the PDF output.  I can then search for these in the tex to find
the corresponding region.  To the extent they are set in your .org
source you might do similar.

A little screen cap is attached to show an example output.


-Brett.

attachment: foo.png

pgp1YsNo_YSNM.pgp
Description: PGP signature


Re: [O] Bug: [babel] #+PROPERTY: eval never-export disables interactive evaluation [8.2.5h (release_8.2.5h-806-gb1199e at /Users/rainerkrug/.emacs.d/org-mode/lisp/)]

2014-03-25 Thread Charles Berry
Rainer M Krug Rainer at krugs.de writes:

 
 
 The subject says it all - when I set 
 
 #+PROPERTY: eval never-export 
 
 the interactive evaluation of R code blocks is disabled. Message:
 
 Evaluation of this R code-block is disabled.
 
[rest deleted]

It works as advertised for me. I copy and pasted your PROPERTY line
and ran interactively and then exported. Oh yes, I did C-c C-c.

I am running 

Org-mode version 8.2.5h (release_8.2.5h-757-gc444e4 @ ...

I tried with and without :session with same results.

HTH,

Chuck




Re: [O] [bug] cannot extract just one column of table for use in gnuplot src block

2014-03-25 Thread Achim Gratz
Bastien writes:
 Achim, feel free to apply the patch when you have time for this,

Done on maint.


Regards,
Achim.
-- 
+[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+

SD adaptations for KORG EX-800 and Poly-800MkII V0.9:
http://Synth.Stromeko.net/Downloads.html#KorgSDada




Re: [O] make test fails in maint

2014-03-25 Thread Achim Gratz
Achim Gratz writes:
 I've fixed that in master quite some time ago together with some other
 things.  I'm not sure how easily it would backport to maint, but IIRC
 that particular bug was just a wrongly quoted macro definition.

Cherry-picked to maint.


Regards,
Achim.
-- 
+[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+

SD adaptations for KORG EX-800 and Poly-800MkII V0.9:
http://Synth.Stromeko.net/Downloads.html#KorgSDada




Re: [O] Tasks with lots of logbook entries are very slow

2014-03-25 Thread Marcin Borkowski
Dnia 2014-03-25, o godz. 16:00:01
Pere Quintana Seguí p...@quintanasegui.com napisał(a):

 I log most of my work with org-mode. Some of my tasks are repetitive,
 this is, I do them weekly or daily (i.e. empty mail inbox). After many
 years, the logs are very long. As a consequence, marking these tasks
 as done is *very* slow.
 
 Is there a workaround that does not involver deleting the logs?

Archiving?

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



Re: [O] org-agenda-do-date-late and emacs freeze

2014-03-25 Thread Matt Lundin
Hi Bastien,

Matt Lundin m...@imapmail.org writes:

 Bastien b...@gnu.org writes:

 Hi Matt and all,

 thanks a lot for the detailed investigation -- I revisited the
 related problems and applied a fix.  Please let me know if you
 encoutner some glitches.

 Seems to work fine now. Thanks!

The only minor issue with the fix is that move-beginning-of-line (lines
9195-6 of org-agenda.el) is slower than beginning-of-line. It's not so
bad when you push an item one day forward, but it creates significant
lag when calling org-agenda-do-date-late several times in a row.

--8---cut here---start-8---
org-agenda-do-date-later1   0.289220361   0.289220361
org-agenda-date-later   1   0.289163161   0.289163161
move-beginning-of-line  84  0.2790279490  0.0033217612
--8---cut here---end---8---

vs. 

--8---cut here---start-8---
org-agenda-do-date-later1   0.010506186   0.010506186
org-agenda-date-later   1   0.010447660.01044766
beginning-of-line   93  0.001790849   1.925...e-05
--8---cut here---end---8---

Thanks,
Matt



Re: [O] using gnuplot's splot and every commands on org-mode table data

2014-03-25 Thread Achim Gratz
Eric Schulte writes:
 This looks great.  Please go ahead and apply this patch to ob-sh.

I just see that this was still sitting in my local branch… pushed to
master.


Regards,
Achim.
-- 
+[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+

Waldorf MIDI Implementation  additional documentation:
http://Synth.Stromeko.net/Downloads.html#WaldorfDocs




Re: [O] Tasks with lots of logbook entries are very slow

2014-03-25 Thread Achim Gratz
Pere Quintana Seguí writes:
 I log most of my work with org-mode. Some of my tasks are repetitive,
 this is, I do them weekly or daily (i.e. empty mail inbox). After many
 years, the logs are very long. As a consequence, marking these tasks as
 done is *very* slow.

 Is there a workaround that does not involver deleting the logs?

I've long resorted to using two drawers back-to-back:

:LOGBOOK:
 …stuff…
:END:
:CLOSED:
 …old stuff…
:END:

Now whenever you need to shorten the logbook drawer, just move the

:END:
:CLOSED:

up by however many lines you think it should.


Regards,
Achim.
-- 
+[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+

SD adaptation for Waldorf microQ V2.22R2:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada




Re: [O] adding options to the minted environment of exported source blocks in latex

2014-03-25 Thread Nicolas Goaziou
Alan Schmitt alan.schm...@polytechnique.org writes:

 It's working great, thanks a lot!

Applied, then.


Regards,

-- 
Nicolas Goaziou



Re: [O] Reverse lookup from pdf to org?

2014-03-25 Thread Nick Dokos
Rainer M Krug rai...@krugs.de writes:

 Hi

 I am working on a longish document which will be converted to pdf, and I
 am doing debugging of scripts at the moment.

 Therefore I export the document to pdf, and look for errors there. Now I
 have to find the corresponding section in the org file - possible, but
 tedious.

 Would it be possibler to include reverse-lookup in org, so that I click
 in the pdf, and the cursor jumps to the position in the org document? I
 really like this feature when e.g. using LyX. 

 I have no idea how this could be implemented and if this would be
 difficult, but I think this could be a useful feature for longer documents.


One more (half-)possibility is as follows: produce the tex file and
compile it not with pdflatex, but with plain latex, producing a DVI
file. Passing the -src option to the latex invocation inserts source
specials into the DVI file that some DVI viewers (in particular, xdvi)
can interpret to jump back from the DVI view to the (approximate)
corresponding location in the tex file:

  latex --shell-escape -src foo.tex
  xdvi foo.dvi

C-mouse1 at a location invokes your editor of choice (presumably
emacsclient) on the tex file and puts point in the general vicinity.

Invoking pdflatex with -src does not elicit any complaints, so it might
actually insert source specials in the PDF file, but even if it does I
don't know if any viewer is capable of interpreting them - xpdf does not
seem to be.

And it also leaves you in the tex file, not in the org file - hence
a half-possibility, or maybe even less.

Nick





[O] spreadsheet, generate a column beg end

2014-03-25 Thread Uwe Brauer
Hello

In most spreadsheets I know, it is possible to generate easily a column
say starting in 365 ending in 23.[1] 

Is there any way to do this in the org spreadsheet, without a  loop?

thanks

Uwe Brauer 

Footnotes:
[1]  (Or in matlab without a loop)





[O] Sorting headings one?

2014-03-25 Thread Sharon Kimble
I have a document of helpful emacs hints and tips saved under headings one, like
,
| * foobar
|   ipsum lorens
`
and they are scattered over the whole document with no sensible pattern to
them. Is it possible to be able to sort them alphabetically? And if so, how
please?

Thanks
Sharon.
-- 
A taste of linux = http://www.sharons.org.uk
my git repo = https://bitbucket.org/boudiccas/dots
TGmeds = http://www.tgmeds.org.uk
Debian testing, Fluxbox 1.3.5, emacs 24.3.1


pgpLStiWpIcgq.pgp
Description: PGP signature


Re: [O] Sorting headings one?

2014-03-25 Thread Nick Dokos
Sharon Kimble boudic...@talktalk.net writes:

 I have a document of helpful emacs hints and tips saved under headings one, 
 like
 ,
 | * foobar
 |   ipsum lorens
 `
 and they are scattered over the whole document with no sensible pattern to
 them. Is it possible to be able to sort them alphabetically? And if so, how
 please?


M-x org-sort RET a

Nick




Re: [O] Reverse lookup from pdf to org?

2014-03-25 Thread Brett Viren
Nick Dokos ndo...@gmail.com writes:

 One more (half-)possibility is as follows: produce the tex file and
 compile it not with pdflatex, but with plain latex, producing a DVI
 file. Passing the -src option to the latex invocation inserts source
 specials into the DVI file that some DVI viewers (in particular, xdvi)
 can interpret to jump back from the DVI view to the (approximate)
 corresponding location in the tex file:

   latex --shell-escape -src foo.tex
   xdvi foo.dvi

Okay, here is a crazy idea.  Maybe one can use hyperref and place \url{}
and/or \href{}{} macros in the org file.  These will turn into clickable
links in the final PDF.  In them place URLs that look like:

  file:///path/to/foo.tex.orglink?line=42

And then use .mailcap (or whatever MIME config that xpdf/evince/etc
honors) to map the .orglink extension to a script that parses the URL
(does that full URL get passed?) and invokes emacs to open foo.tex at
line 42?

If that much can be made to work (big if!) I see one problem in that the
/path/to will break if the source is moved.

Chance of success: 10%

-Brett.


pgpW9ggcB7moA.pgp
Description: PGP signature


Re: [O] Sorting headings one?

2014-03-25 Thread Sharon Kimble
Nick Dokos ndo...@gmail.com writes:

 Sharon Kimble boudic...@talktalk.net writes:

 I have a document of helpful emacs hints and tips saved under headings one, 
 like
 ,
 | * foobar
 |   ipsum lorens
 `
 and they are scattered over the whole document with no sensible pattern to
 them. Is it possible to be able to sort them alphabetically? And if so, how
 please?


 M-x org-sort RET a

 Nick

Brilliant, thanks very much, it works a treat. :)

Sharon.
-- 
A taste of linux = http://www.sharons.org.uk
my git repo = https://bitbucket.org/boudiccas/dots
TGmeds = http://www.tgmeds.org.uk
Debian testing, Fluxbox 1.3.5, emacs 24.3.1


pgp6NNXOYeCHK.pgp
Description: PGP signature


Re: [O] org-agenda-do-date-late and emacs freeze

2014-03-25 Thread Bastien
Hi Matt,

Matt Lundin m...@imapmail.org writes:

 The only minor issue with the fix is that move-beginning-of-line (lines
 9195-6 of org-agenda.el) is slower than beginning-of-line. It's not so
 bad when you push an item one day forward, but it creates significant
 lag when calling org-agenda-do-date-late several times in a row.

Indeed, fixed, thanks,

-- 
 Bastien



[O] Bug: Error with org-bibtex export with tags when using custom bibtypes [8.2.5h (8.2.5h-82-gd91d4b-elpaplus @ /Users/leonardaveryrandall/.emacs.d/elpa/org-plus-contrib-20140324/)]

2014-03-25 Thread Leonard Randall
Hello,

When I attempt to run M-x org-bibtex on a .org file with non-standard
bibtex types that have a tag, they fail to export if
org-bibtex-tags-are-keywords is set to t. This persists even if I add the
bibtex type to org-bibtex-types.  I checked, and this problem persists with
a minimal init file, and a minimal org file. I have also checked, and I get
the same problem with Emacs 24.3.5 from emacsforosx.  I just started using
org-bibtex so I do not know how far the bug goes back.

Here is a minimal example that gets the bug.


** Critique of Practical Reason  :ex:
:PROPERTIES:
:TITLE: Critique of Practical Reason
:BOOKTITLE: Practical Philosophy
:BTYPE: bookinbook
:CUSTOM_ID: Kant:1996a
:AUTHOR: Kant, Immanuel
:PAGES: 133--276
:TRANSLATOR: Gregor, Mary J
:EDITOR: Gregor, Mary J
:YEAR:  1996
:PUBLISHER: Cambridge University Press
:ADDRESS: Cambridge UK
:END:



I press ``M-x org-bibtex'' it returns ``Bibtex error on Critique of
Practical Reason. This error does not occur if I change ``BTYPE to
``book'' or if I remove the tag ``:ex:'' from the headline. As I noted
above, I added ``bookinbook'' to the org-bibtex-types and added the
appropriate fields there and in org-bibtex-fields.



Here is a minimal init:

(setq org-bibtex-types
  '((:article
 (:description . An article from a journal or magazine)
 (:required :author :title :journal :year)
 (:optional :volume :number :pages :month :note :annote :url :abstract
:keywords :file :uri))
(:book
 (:description . A book with an explicit publisher)
 (:required (:editor :author) :title :publisher :year)
 (:optional (:volume :number) :series (:address :location) :edition
:month :note :annote :url :abstract :keywords :file :uri))
(:bookinbook
 (:description . A part of a book, which could be, and once was, its
own book.)
 (:required :title (:chapter :pages) :publisher :year :booktitle)
 (:optional :crossref :author :editor :volume :translator :number
:series :type :address :location :edition :note :annote :url :abstract
:keywords :file :uri))
(:booklet
 (:description . A work that is printed and bound, but without a named
publisher or sponsoring institution.)
 (:required :title)
 (:optional :author :howpublished (:address :location) :month :year
:note :annote :url :abstract :keywords :file :uri))
(:conference
 (:description . )
 (:required :author :title :booktitle :year)
 (:optional :editor :pages :organization :publisher (:address
:location) :month :note :annote :url :abstract :keywords :file :uri))
(:inbook
 (:description . A part of a book, which may be a chapter (or section
or whatever) and/or a range of pages.)
 (:required (:author :editor) :title (:chapter :pages) :publisher :year)
 (:optional :crossref (:volume :number) :series :type (:address
:location) :edition :month :note :annote :url :abstract :keywords :file
:uri))
(:incollection
 (:description . A part of a book having its own title.)
 (:required :author :title :booktitle :publisher :year)
 (:optional :crossref :editor (:volume :number) :series :type :chapter
:pages (:address :location) :edition :month :note :annote :url :abstract
:keywords :file :uri))
(:inproceedings
 (:description . An article in a conference proceedings)
 (:required :author :title :booktitle :year)
 (:optional :crossref :editor (:volume :number) :series :pages
(:address :location) :month :organization :publisher :note :annote :url
:abstract :keywords :file :uri))
(:manual
 (:description . Technical documentation.)
 (:required :title)
 (:optional :author :organization (:address :location) :edition :month
:year :note :annote :url :abstract :keywords :file :uri))
(:mastersthesis
 (:description . A Masterâ EURO (tm)s thesis.)
 (:required :author :title :school :year)
 (:optional :type (:address :location) :month :note :annote :url
:abstract :keywords :file :uri))
(:misc
 (:description . Use this type when nothing else fits.)
 (:required)
 (:optional :author :crossref :booktitle :date :title :howpublished
:month :year :note :annote :location :url :abstract :keywords :file :uri))
(:phdthesis
 (:description . A PhD thesis.)
 (:required :author :title :school :year)
 (:optional :type (:address :location) :month :note :annote :url
:abstract :keywords :file :uri))
(:proceedings
 (:description . The proceedings of a conference.)
 (:required :title :year)
 (:optional :editor (:volume :number) :series (:address :location)
:month :organization :publisher :note :annote :url :abstract :keywords
:file :uri))
(:techreport
 (:description . A report published by a school or other institution.)
 (:required :author :title :institution :year)
 (:optional :type (:address :location) :month :note :annote :url
:abstract :keywords :file :uri))
(:unpublished
 (:description . A document having an author and title, but not
formally 

Re: [O] [bug] cannot extract just one column of table for use in gnuplot src block

2014-03-25 Thread Bastien
Achim Gratz strom...@nexgo.de writes:

 Bastien writes:
 Achim, feel free to apply the patch when you have time for this,

 Done on maint.

Thanks!

-- 
 Bastien



Re: [O] [PATCH] Source block fontification handling indentation

2014-03-25 Thread Pontus Michael
Source block fontification is achieved by copying source block contents
into temporary buffer under appropriate major mode and mirroring face
text-properties into original buffer.

Problem is that this procedure doesn't account for user option
`org-edit-src-content-indentation'. This option adds decorative indentation
to contents of source block after editing with command `org-edit-src-code'.

Correct behavior would be to strip this indentation in order to access the
actual actual source block content. This behavior can be observed during
expansion and during execution of `org-edit-src-code'.

However, when function `org-src-font-lock-fontify-block' copies contents of
src block into temporary buffer it leaves the indentation present.
Beginning whitespace can be significant to some languages semantics and
major-mode fontification  routines.

I have attached a file which will let you see examples of both correct and
incorrect behavior.


On 21 March 2014 12:23, Bastien b...@gnu.org wrote:

 Hi Michael,

 thanks for the patch.

 Pontus Michael m.pon...@gmail.com writes:

  Primary reason for this change is to fix the problem which I describe
  as
  follows:
 
  This function is not 100% compatible with a org-edit-src facility,
  which provides an option to have indentation added to the code inside
  the block after using command `org-edit-src-code' to edit it. This
  command also handles removal of indentation upon insertion of the
  code
  in temporary buffer where editing of the code will in relevant
  major-mode.

 I'm not sure I understand what the real problem is.

 Can you describe it against the behavior of the current version?
 And maybe provide a minimal recipe to reproduce it?

 Did you catch any side-effect of your patch?

 Thanks,

 --
  Bastien



fontification-example.org
Description: Lotus Organizer


Re: [O] [PATCH] Source block fontification handling indentation

2014-03-25 Thread Pontus Michael
Sorry, the code in last source block in my attachment got a little bit
messed up. I corrected it in this attachment.


On 21 March 2014 12:23, Bastien b...@gnu.org wrote:

 Hi Michael,

 thanks for the patch.

 Pontus Michael m.pon...@gmail.com writes:

  Primary reason for this change is to fix the problem which I describe
  as
  follows:
 
  This function is not 100% compatible with a org-edit-src facility,
  which provides an option to have indentation added to the code inside
  the block after using command `org-edit-src-code' to edit it. This
  command also handles removal of indentation upon insertion of the
  code
  in temporary buffer where editing of the code will in relevant
  major-mode.

 I'm not sure I understand what the real problem is.

 Can you describe it against the behavior of the current version?
 And maybe provide a minimal recipe to reproduce it?

 Did you catch any side-effect of your patch?

 Thanks,

 --
  Bastien



fontification-example.org
Description: Lotus Organizer


Re: [O] spreadsheet, generate a column beg end

2014-03-25 Thread Christian Moe

Hi,

Here's one way to do it, applied to an example that takes less space:
With ten rows, say we want to count down from 365 to 358 in the middle
of the middle column ($2), leaving an empty row on top and bottom (@1
and @10).

Set the value of @2$2 to 365, either manually or (as below) in the table
formula. Then set the rest of the range from rows @3 down to @9 to
decrement by one from the cell above (@-1):

|   | |   |
|   | 365 |   |
|   | 364 |   |
|   | 363 |   |
|   | 362 |   |
|   | 361 |   |
|   | 360 |   |
|   | 359 |   |
|   | 358 |   |
|   | |   |
#+TBLFM: @2$2=365::@3$2..@9$2=@-1-1

Yours,
Christian

Uwe Brauer writes:

 Hello

 In most spreadsheets I know, it is possible to generate easily a column
 say starting in 365 ending in 23.[1] 

 Is there any way to do this in the org spreadsheet, without a  loop?

 thanks

 Uwe Brauer 

 Footnotes:
 [1]  (Or in matlab without a loop)




Re: [O] [PATCH] Write org variables into own R environment

2014-03-25 Thread Aaron Ecay
Hi Rainer,

This patch looks very promising.  (I have not had a chance to test the
implementation yet).  One issue might be the name of the “org” variable
– maybe this should instead be “.org” or “_org” to lessen the chance of
stomping on pre-existing variables named “org” in people’s code.

Thanks (also for your previous patch for handling in graphics blocks),

--
Aaron Ecay