Re: [O] Org 8 Bug in interactive formula editing mode?

2014-07-23 Thread Nick Dokos
Thorsten Grothe  writes:

>> Can you please try this patch out and report whether it
>> works or not and whether it causes any other problems?
>> I'm not sure if Bastien is around to vet it, but if it
>> seems to work for you, I can push it and deal with any
>> other breakage later.
>
> Seems to work here, the error is gone, very nice !!!
>

OK, I pushed the patch to maint and merged it into master.

Thanks to Robert, Thorsten and Luke for all the help!
-- 
Nick




[O] Exporting citations come out as citep instead of APA + bibliography not printing

2014-07-23 Thread Paul Harper
I am using Emacs  24.4.50.1 (Org
 mode 8.2.7b) I am not getting the bibliography or
references I need. I have a references.bib file on Dropbox at
/home/felixdz/Dropbox/bibliography/references.bib.

I am using Eric Schulte's Starter Kit for Emacs 24 along with Vikas Rawal's
research-toolkit.org.
https://github.com/vikasrawal/orgpaper/blob/master/orgpapers.org

The only other customization I have done is add the solarized-dark theme.

I am using this simple template from Ivan Hanigan with the R code stuff
edited out.
http://ivanhanigan.github.io/2013/11/a-sharp-looking-orgmode-latex-export-header/

The headers, text and general layout are printing well. However instead of
getting the nice .pdf's, .odt's or html like Mr Hanigan I get the following
output:

-
Sharp Report Template
Table of Contents

   - 1. Introduction <#sec-1>
   - 2. Section 1 <#sec-2>
   - 3. References <#sec-3>

1 Introduction

This is a test document.1 <#fn.1>

The pages after the first page have a nice looking header, footer and page
number. \clearpage
2 Section 1

Some more stuff.2 <#fn.2>
3 References

\bibliographystyle{apalike}
\bibliography{/home/felixdz/Dropbox/bibliography}
Footnotes:
1 <#fnr.1>

\citep{singer2014cybersecurity}
2 <#fnr.2>

\citep{schneier2011secrets}
--

How do I get my references and bibliography to print correctly?

-- 
Regards,


Paul

about.me/pauljamesharper

Women and cats will do as they please, and men and dogs should relax and
get used to the idea."

Robert Heinlein


Re: [O] Possible to use src block to generate org headlines for export?

2014-07-23 Thread Nick Dokos
Charles Berry  writes:

> Matt Lundin  imapmail.org> writes:
>
> [deleted]
>
>> Footnotes:
>> 
>> [fn:1] If one really needs to see the headlines in the original org
>> buffer, a hook can be used to remove the :RESULTS: drawer.
>> 
>> --8<---cut here---start->8---
>> (defun my-remove-stray-results-drawer (backend)
>>   (when (eq backend 'html)
>> (while (re-search-forward "^\\s-*:RESULTS:\\s-*\n" nil t)
>>   (replace-match ""
>> 
>> (add-hook 'org-export-before-parsing-hook 'my-remove-results-drawer)
>> --8<---cut here---end--->8---
>> 
>> 
>
> Or wrap the results in a drawer when you type C-c C-c, but render them as 
> raw on export (which removes the drawer and replaces with raw results).
>
> Like so:
>
> #+header: :results (if (boundp 'backend) "raw" "drawer") 
> #+BEGIN_SRC emacs-lisp :exports both 
>
> (format "* headline\n1\n2\n5\n")
> #+END_SRC
>

That's a very nice tip - one small weakness is that it'll do the wrong
thing if you just happen to have a binding for "backend" outside of the
export mechanism.

-- 
Nick




Re: [O] Evaluating inline source blocks on export issue

2014-07-23 Thread Nick Dokos
Grant Rettke  writes:

> Thanks for looking Thomas and Nick.
>
> When I set this and export
>
> ,
> | (setq org-export-babel-evaluate t)
> `
>
> I get the expected result of
>
> ,
> | Here is a `16', stuck in the middle of some prose.
> `
>
> But when I do this and export
>
> ,
> | (setq org-export-babel-evaluate 'inline-only)
> `
>
> I get this output which is not what I expected
>
> ,
> | Here is a , stuck in the middle of some prose.
> `
>
> I thought that I was enabling inline code block execution correctly
> and making the inline call correctly.
>
> How does it look should it be doing what I had wanted?
>

I don't think you can: the `type' (see below) of the inline code is not
`inline' as one might think at first, but `lob', presumably because
call_foo is defined in the library-of-babel.

The relevant code is in ob-exp.el:org-babel-exp-results:

,
|   ...
|   (when (and (or (eq org-export-babel-evaluate t)
|(and (eq type 'inline)
| (eq org-export-babel-evaluate 'inline-only)))
|(not (and hash (equal hash (org-babel-current-result-hash)
|   ...
`

-- 
Nick




[O] Org-entities-user in caption of Latex export

2014-07-23 Thread Thomas S. Dye
Aloha all,

Recently, entities in org-entities-user haven't made it through LaTeX
export when they are in a caption.

This Org mode snippet:

  Test \umacron \ocirc \umacron \amacron.

  #+caption: Test \umacron \ocirc \umacron \amacron.

Yields this output:

  Test \={u} \^{o} \={u} \={a}.

  \caption{Test \umacron \^{o} \umacron \amacron.}

You can see that the org-entity (\ocirc) makes it through unscathed, but
that my user entities \umacron and \amacron don't.

All the best,
Tom

-- 
T.S. Dye & Colleagues, Archaeologists
735 Bishop St, Suite 315, Honolulu, HI 96813
Tel: 808-529-0866, Fax: 808-529-0884
http://www.tsdye.com



Re: [O] Translations

2014-07-23 Thread Glenn Morris
Carlos Sosa wrote:

>  Who do I send my notes to regarding "Guía Compacta de Org Mode"?

The address was given in rms's initial message:
http://lists.gnu.org/archive/html/emacs-devel/2014-07/msg00237.html

   David Arroyo Menéndez  has translated into Spanish
   two manuals pertaining to Emacs
   [...]
   Would some Spanish speakers like to check them for correctness
   and readability?  Please write to him if you want to do this.



Re: [O] A gentle introduction to Emacs & Org-mode?

2014-07-23 Thread John Hendy
I learned Emacs from scratch for the sake of Org-mode.
- I printed out an Emacs shortcut cheat sheet and tacked it on my cubicle wall.

- Basic Orgmode setup is pretty simple. My config, which allows
working with R and exporting to various formats:

#+begin_src

(add-to-list 'load-path "~/.elisp/org.git/lisp/")
(add-to-list 'load-path "~/.elisp/org.git/contrib/lisp")
(add-to-list 'load-path "~/.elisp/site-lisp/ess/lisp/")

(org-babel-do-load-languages
 'org-babel-load-languages
 '((latex . t)
   (R . t)))

;; font size, window height/width/placement
(set-face-attribute 'default nil :height 100)
(setq initial-frame-alist
 '((left . 0) (top . 16)
   (width . 120) (height . 45)))
(tool-bar-mode 0)

;; misc org stuff
(require 'org-inlinetask)
(require 'org-id)
(global-set-key "\C-cl" 'org-store-link)
(global-set-key "\C-ca" 'org-agenda)
(setq org-hide-leading-stars t)
(setq org-blank-before-new-entry nil)
(setq org-link-file-path-type (quote absolute))
(setq org-link-to-org-use-id 'create-if-interactive)

;; babel
(require 'ess-site)

;; get copy and paste to the clipboard
(global-set-key "\C-w" 'clipboard-kill-region)
(global-set-key "\M-w" 'clipboard-kill-ring-save)
(global-set-key "\C-y" 'clipboard-yank)


#+end_src

I have some agenda tweaks, todo keywords, fill-mode adjustments,
sunrise commander file manager settings, and other miscellany, but the
above would still cover 90% of my usage needs.

I think the biggest phrase that needs further clarification is
"...spend any more than, say, 2 days on [...] learning basics of
Em&Om." Where do you draw the line between basics and advanced usage,
and what qualifies as "learning." Having used Org for maybe 4 years
now, I still consider most of what I do fairly basic compared to
others I see, but my co-workers nearly soil themselves in fear/awe
sometimes when they see me working in Org-mode.

My recommendation, only because it worked for me, is simply to sell
the end result/benefits of Org, which is why I assume we all keep
using it (and started using it in the first place). It wasn't because
I just wanted to try something new on a whim that I learned Org. It
was because I'd tried other stuff (TiddlyWiki, iGTD, Chandler, Tracks,
Zim, EverNote, Google Notebook) and in simply watching videos and
reading about Org, I was sold.

Thus, it was the hope/desire/being-sold-in-advance on the benefits
that gave me the energy to overcome the learning curve (which was
definitely painful). I'm not sure that without understanding why one
is doing it that they'll go for it. I certainly don't think I could
have made the switch if I set a goal of 2 days to feel like I knew
what I was doing (I wouldn't have succeeded)!

Instead, I tried to just start simple. Just stop taking notes in
TiddlyWiki and start taking them in Org. Then I'd decide I wanted to
try something like time stamps and learn those. Then time tracking,
then beamer, then babel/in-document plot generation. And so on.

Long winded... but I'd suggest starting small. Maybe just get to the
point where he could take a recent document created with Scrivener and
re-create it in Org?


Good luck with the migration!
John


On Wed, Jul 23, 2014 at 4:20 PM, Marcin Borkowski  wrote:
> Hi list,
>
> this is only partially Org-ode related, but I hope I'll be excused.
> A friend of mine uses Scrivener; he also does some simple
> JavaScript/jQuery programming and HTML/CSS editing.  He *is* interested
> in Emacs & Org-mode, but does not want to spend more than, say, 2 days
> on installing, configuring and learning basics of E&Om.  Are there any
> resources which might help?  I offered him some help with installing
> and teaching, but what could I use?  (Of course, the built-in tutorial
> and Sacha Chua's sketch-tutorials are great, but what else does there
> exist?  Also, is prelude or Emacs Starter Kit a good idea?  I
> understand this is opinion-based, but maybe someone has some experience
> *teaching* Emacs and Org-mode?)
>
> Best,
>
> --
> Marcin Borkowski
> http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
> Adam Mickiewicz University
>



Re: [O] A gentle introduction to Emacs & Org-mode?

2014-07-23 Thread Leonard Avery Randall
Hi Marcin

I switched from Scrivener to org-mode about 11 months ago.  I would say
the biggest hurdles were getting used to the key bindings, and
configuring the back-ends.  The emacs tutorial was fairly useful. For
the Org-Mode key bindings, I just printed out the starter pdf and put it
next to my computer for a while.  Regarding the build, I tried several
distros and I found vanilla emacs with prelude to be most useful for me
as a beginner.  (Some people advise against starter packs, and I would
try to move away from the prelude custom key bindings, but the packages
it includes are fairly useful.  It is also fairly easy to customise).

Regarding writing in org-mode.  Does your friend use MMD and latex with
Scrivener?  If so the transition is not nearly as difficult. Some of the
markup is similar. If he uses rich text rather than MMD, it is worth
noting that Scrivener has facilities to transform rich text into MMD.
Once you have that, you can use regex searches to convert MMD syntax to
org syntax.  (I have some regex functions kicking around somewhere in my
init files, let me know if you want me to find them and send them to
you).  If he has a latex setup he likes, he should be able to move it
into his init file without too much effort.  (Worg and the org guide is
fairly useful for helping you figure out how to configure the
back-ends). If he does not already use latex the transition may be
harder, depending on how specific his formatting and citation
requirements are.  It will probably still be doable, but probably not in
two days.

Hope this helps,
All best,
Leonard


Marcin Borkowski writes:

> Hi list,
>
> this is only partially Org-ode related, but I hope I'll be excused.
> A friend of mine uses Scrivener; he also does some simple
> JavaScript/jQuery programming and HTML/CSS editing.  He *is* interested
> in Emacs & Org-mode, but does not want to spend more than, say, 2 days
> on installing, configuring and learning basics of E&Om.  Are there any
> resources which might help?  I offered him some help with installing
> and teaching, but what could I use?  (Of course, the built-in tutorial
> and Sacha Chua's sketch-tutorials are great, but what else does there
> exist?  Also, is prelude or Emacs Starter Kit a good idea?  I
> understand this is opinion-based, but maybe someone has some experience
> *teaching* Emacs and Org-mode?)
>
> Best,

-- 
Leonard A. Randall
PhD Candidate
Departments of Philosophy
University of St Andrews



Re: [O] Collecting unique selling proposition (USP) of Org-mode

2014-07-23 Thread M



> Von: Thorsten Jolitz 
> Datum: Wed, 23 Jul 2014 09:14:10 +0200
> An: 
> Betreff: Re: [O] Collecting unique selling proposition (USP) of Org-mode
> 
>>> 
>>> https://en.wikipedia.org/wiki/List_of_personal_information_managers
>> 
>> OK, the list is there, but it is not comparing features directly.
>> 
>> A very good example is the features comparison of docear with some of its
>> alternatives:
>> http://www.docear.org/2014/01/15/comprehensive-comparison-of-reference-manag
>> ers-mendeley-vs-zotero-vs-docear/
> 
> #+begin_quote
> A while ago, Mendeley was acquired by Elsevier for an estimated
> 69-100 Million Dollars.
> #+end_quote
> 
> wow
> 
> If Org-mode is better than Mendeley (which I don't know at all), then
> its worth a fortune ;)

;-)

yes, WOW!
Well, to come up with Mendeley concerning ease of use and intuitive GUI I'd
say that Emacs and org-mode will still have some way to go..

@Thorsten: maybe this short video gives you a idea about Mendeley and its
features: http://www.youtube.com/watch?v=1Ct4O0Ect18
(Remark: I am in no way affiliated with Mendeley and I only use it rarely)






Re: [O] A gentle introduction to Emacs & Org-mode?

2014-07-23 Thread Thorsten Jolitz
Marcin Borkowski  writes:

> Hi list,
>
> this is only partially Org-ode related, but I hope I'll be excused.
> A friend of mine uses Scrivener; he also does some simple
> JavaScript/jQuery programming and HTML/CSS editing.  He *is* interested
> in Emacs & Org-mode, but does not want to spend more than, say, 2 days
> on installing, configuring and learning basics of E&Om.  Are there any
> resources which might help?  I offered him some help with installing
> and teaching, but what could I use?  (Of course, the built-in tutorial
> and Sacha Chua's sketch-tutorials are great, but what else does there
> exist?  Also, is prelude or Emacs Starter Kit a good idea?  I
> understand this is opinion-based, but maybe someone has some experience
> *teaching* Emacs and Org-mode?)

Have you seen Bastien's

,
| http://bzg.fr/learn-emacs-lisp-in-15-minutes.html
`

? 

Looks like a good starting point to me. The .emacs file won't look that
cryptic anymore after this 15 min ...

-- 
cheers,
Thorsten




Re: [O] Translations

2014-07-23 Thread Carlos Sosa
David Arroyo Menendez  writes:

> Bastien  writes:
>
>> Hi David,
>>
>> David Arroyo Menendez  writes:
>>
 * Guía Compacta de Org Mode (http://davidam.com/docu/orgguide.es.html y
   fuentes en worg)
>>>
>>> This book needs a full review.
>>
>> You may also want to ask on the orgmode mailing list, where there are
>> more users who are both Org-mode users and spanish speakers.
>>
>> Thanks for your continued efforts about this,
>
> Good idea! I'm looking for people who is interested in make a full
> review of Guía Compacta de Org Mode. I will do a new call, when I've
> finished my own review of Una Introducción a Emacs Lisp en Español.
>
> Thanks!

I would like to review both guides. I will look first at the "Guía
Compacta de Org Mode". Is "Una Introducción a Emacs Lisp en Español."
available? Who do I send my notes to regarding "Guía Compacta de Org
Mode"?

Thanks.
-- Carlos Sosa




[O] A gentle introduction to Emacs & Org-mode?

2014-07-23 Thread Marcin Borkowski
Hi list,

this is only partially Org-ode related, but I hope I'll be excused.
A friend of mine uses Scrivener; he also does some simple
JavaScript/jQuery programming and HTML/CSS editing.  He *is* interested
in Emacs & Org-mode, but does not want to spend more than, say, 2 days
on installing, configuring and learning basics of E&Om.  Are there any
resources which might help?  I offered him some help with installing
and teaching, but what could I use?  (Of course, the built-in tutorial
and Sacha Chua's sketch-tutorials are great, but what else does there
exist?  Also, is prelude or Emacs Starter Kit a good idea?  I
understand this is opinion-based, but maybe someone has some experience
*teaching* Emacs and Org-mode?)

Best,

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



Re: [O] Possible to use src block to generate org headlines for export?

2014-07-23 Thread Matt Lundin
Brett Viren  writes:

> Matt Lundin  writes:
>
>> Brett Viren  writes:
>>>
>>> Maybe it would be more convenient to add the "meta-ness" you want as
>>> part of a new exporter process?  
>>
>> To change the "meta" wrappers for code block results, we would have to
>> modify org babel (ob-core.el). 
>
> Just to be clear (hopefully) I actually meant something different. I
> was suggesting to *not* use org babel to produce your extra headlines.
> Rather, have whatever logic produces them reside in some new exporter.
>
> I'm may be making incorrect guesses as to what you are actually going
> for with these extra headlines.  You mentioning this is for a blog made
> me think they are some kind of "standard augmentation" for every blog
> post or something.  If not then I'm probably barking up the wrong tree.
> But if so, putting them into an exporter seems apt.

I am using org-babel (+ perl) to gather a page containing the content of
the most recent posts. I also export this page to rss via ox-rss.el. I
could simply use a perl script to generate the file during the export
process, but a babel source block makes it convenient to modify the text
before and after the dynamic content and to test modifications to the
code.

To generate dynamic content for just one page, babel works fine.
However, if I wanted to update every page with such content, it would
make *much* more sense (as you suggest) to create an exporter.

> This is an approach I'm taking in a JSON+HTML exporter (analogous to
> the latex+pdf one) that I'm working on. For example, I'd like to have
> a "tag cloud" generated from tags on org headlines. This tag cloud
> won't explicitly exist on the org side. Rather it will be implicitly
> produced and updated by some (Python) code that runs as part of the
> JSON->HTML stage of the exporter.

That sounds interesting. I look forward to hearing more!

Thanks for the clarification!

Best,
Matt



Re: [O] Possible to use src block to generate org headlines for export?

2014-07-23 Thread Brett Viren
Matt Lundin  writes:

> Brett Viren  writes:
>>
>> Maybe it would be more convenient to add the "meta-ness" you want as
>> part of a new exporter process?  
>
> To change the "meta" wrappers for code block results, we would have to
> modify org babel (ob-core.el). 

Just to be clear (hopefully) I actually meant something different.  I
was suggesting to *not* use org babel to produce your extra headlines.
Rather, have whatever logic produces them reside in some new exporter.

I'm may be making incorrect guesses as to what you are actually going
for with these extra headlines.  You mentioning this is for a blog made
me think they are some kind of "standard augmentation" for every blog
post or something.  If not then I'm probably barking up the wrong tree.
But if so, putting them into an exporter seems apt.

This is an approach I'm taking in a JSON+HTML exporter (analogous to the
latex+pdf one) that I'm working on.  For example, I'd like to have a
"tag cloud" generated from tags on org headlines.  This tag cloud won't
explicitly exist on the org side.  Rather it will be implicitly produced
and updated by some (Python) code that runs as part of the JSON->HTML
stage of the exporter.

Cheers,
-Brett.


pgp43MvSLzUiN.pgp
Description: PGP signature


[O] [PATCH] Fix id generation in ox-rss.el

2014-07-23 Thread Matt Lundin
The attached patch fixes a bug in ox-rss.el that causes org-publish to
generate IDs in whatever org buffer emacs happens to be currently
visiting. I was puzzled why my org files were suddenly filled with
hundreds of ID entries. I discovered it happened when I called org
publish while visiting those files.

Thanks,
Matt

>From b482d2ebd53a60a91355433f49350b450869451e Mon Sep 17 00:00:00 2001
From: Matt Lundin 
Date: Wed, 23 Jul 2014 14:18:06 -0500
Subject: [PATCH] Fix ID generation in org-rss-publish-to-rss

* contrib/lisp/ox-rss.el: (org-rss-publish-to-rss) Fix a bug that
  causes ID properties to be generated in org buffer emacs is
  currently visiting rather than the file containing the feed. This
  bug can cause hundreds of ID entries to be added to an org file
  unrelated to the publishing project.
---
 contrib/lisp/ox-rss.el | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/contrib/lisp/ox-rss.el b/contrib/lisp/ox-rss.el
index c69a37b..5cae288 100644
--- a/contrib/lisp/ox-rss.el
+++ b/contrib/lisp/ox-rss.el
@@ -204,11 +204,10 @@ publishing directory.
 Return output file name."
   (let ((bf (get-file-buffer filename)))
 (if bf
-	(progn
-	  (org-icalendar-create-uid filename 'warn-user)
 	  (with-current-buffer bf
+	(org-icalendar-create-uid filename 'warn-user)
 	(org-rss-add-pubdate-property)
-	(write-file filename)))
+	(write-file filename))
   (find-file filename)
   (org-icalendar-create-uid filename 'warn-user)
   (org-rss-add-pubdate-property)
-- 
2.0.2



Re: [O] Possible to use src block to generate org headlines for export?

2014-07-23 Thread Matt Lundin
Charles Berry  writes:

> Matt Lundin  imapmail.org> writes:
>
> Or wrap the results in a drawer when you type C-c C-c, but render them as 
> raw on export (which removes the drawer and replaces with raw results).
>
> Like so:
>
> #+header: :results (if (boundp 'backend) "raw" "drawer") 
> #+BEGIN_SRC emacs-lisp :exports both 
>
> (format "* headline\n1\n2\n5\n")
> #+END_SRC

Thanks so much! I'm clipping this for reference. This is very helpful
when one wants to preview the results in the buffer.

Best,
Matt



Re: [O] Infinite loop with org-log-done 'time?

2014-07-23 Thread Ethan
I just noticed that there was a commit
3c14db868574c97eff0eb0df7a72a618d5517292 that might have fixed it. The
linked bug report seems to sound very similar to what I experienced. Thanks!

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

Ethan



On Wed, Jul 23, 2014 at 1:03 PM, Ethan  wrote:

> Sorry for the late reply. Thanks for the advice Nicolas. Today I tried to
> reproduce it with the same file and couldn't. However, I have hit the bug
> (whatever it is) without org-log-done 'time, so I guess that was a red
> herring. I'll keep an eye on it.
>
> Ethan
>
>
>
> On Fri, Jul 18, 2014 at 3:50 AM, Nicolas Goaziou 
> wrote:
>
>> Hello,
>>
>> Ethan  writes:
>>
>> > I'm running org-mode from git (version "8.3beta"), and recently I
>> started
>> > to get hangs in org files.
>>
>> First ensure you're using the latest Org revision. A lot of changes
>> happened between "release_8.3beta" tag and HEAD.
>>
>> > The bug has been tricky to track down. I can reproduce it reliably in
>> one
>> > particular file by switching DONE to TODO on one particular heading.
>> > Changing DONE to TODO on another nearby heading doesn't seem to cause
>> the
>> > problem. For this reason, I don't have a minimal example.
>> >
>> > It doesn't happen in org-mode in stock emacs. It also doesn't happen,
>> even
>> > with org-mode from git, if I disable my '(org-log-done 'time)
>> > customization. I managed to get a backtrace using gdb (attached). I can
>> > provide (off-list) the .org file that I used to induce the failure.
>>
>> If you can reproduce the problem with an up-to-date Org, I'm interested
>> in the org file. You can also consider calling the function below first
>>
>>   (defun ngz-scramble-contents ()
>> "Copy current buffer, preserving structure but not contents.
>>   The copy is done in \"*Scrambled text*\" buffer.  The function
>>   assumes current major mode is `org-mode'."
>> (interactive)
>> (let ((tree (org-element-parse-buffer)))
>>   (org-element-map tree '(code comment comment-block example-block
>> fixed-width
>>keyword link node-property plain-text
>> verbatim)
>> (lambda (obj)
>>   (case (org-element-type obj)
>> ((code comment comment-block example-block fixed-width keyword
>>node-property verbatim)
>>  (let ((value (org-element-property :value obj)))
>>(org-element-put-property
>> obj :value (replace-regexp-in-string "[[:alnum:]]" "x"
>> value
>> (link
>>  (unless (string= (org-element-property :type obj) "radio")
>>(org-element-put-property obj :raw-link "
>> http://orgmode.org";)))
>> (plain-text
>>  (org-element-set-element
>>   obj (replace-regexp-in-string "[[:alnum:]]" "x" obj)
>> nil nil nil t)
>>   (let ((buffer (get-buffer-create "*Scrambled text*")))
>> (with-current-buffer buffer
>>   (insert (org-element-interpret-data tree))
>>   (goto-char (point-min)))
>> (switch-to-buffer buffer
>>
>>
>> Regards,
>>
>> --
>> Nicolas Goaziou
>>
>
>


Re: [O] Infinite loop with org-log-done 'time?

2014-07-23 Thread Ethan
Sorry for the late reply. Thanks for the advice Nicolas. Today I tried to
reproduce it with the same file and couldn't. However, I have hit the bug
(whatever it is) without org-log-done 'time, so I guess that was a red
herring. I'll keep an eye on it.

Ethan



On Fri, Jul 18, 2014 at 3:50 AM, Nicolas Goaziou 
wrote:

> Hello,
>
> Ethan  writes:
>
> > I'm running org-mode from git (version "8.3beta"), and recently I started
> > to get hangs in org files.
>
> First ensure you're using the latest Org revision. A lot of changes
> happened between "release_8.3beta" tag and HEAD.
>
> > The bug has been tricky to track down. I can reproduce it reliably in one
> > particular file by switching DONE to TODO on one particular heading.
> > Changing DONE to TODO on another nearby heading doesn't seem to cause the
> > problem. For this reason, I don't have a minimal example.
> >
> > It doesn't happen in org-mode in stock emacs. It also doesn't happen,
> even
> > with org-mode from git, if I disable my '(org-log-done 'time)
> > customization. I managed to get a backtrace using gdb (attached). I can
> > provide (off-list) the .org file that I used to induce the failure.
>
> If you can reproduce the problem with an up-to-date Org, I'm interested
> in the org file. You can also consider calling the function below first
>
>   (defun ngz-scramble-contents ()
> "Copy current buffer, preserving structure but not contents.
>   The copy is done in \"*Scrambled text*\" buffer.  The function
>   assumes current major mode is `org-mode'."
> (interactive)
> (let ((tree (org-element-parse-buffer)))
>   (org-element-map tree '(code comment comment-block example-block
> fixed-width
>keyword link node-property plain-text
> verbatim)
> (lambda (obj)
>   (case (org-element-type obj)
> ((code comment comment-block example-block fixed-width keyword
>node-property verbatim)
>  (let ((value (org-element-property :value obj)))
>(org-element-put-property
> obj :value (replace-regexp-in-string "[[:alnum:]]" "x"
> value
> (link
>  (unless (string= (org-element-property :type obj) "radio")
>(org-element-put-property obj :raw-link "http://orgmode.org
> ")))
> (plain-text
>  (org-element-set-element
>   obj (replace-regexp-in-string "[[:alnum:]]" "x" obj)
> nil nil nil t)
>   (let ((buffer (get-buffer-create "*Scrambled text*")))
> (with-current-buffer buffer
>   (insert (org-element-interpret-data tree))
>   (goto-char (point-min)))
> (switch-to-buffer buffer
>
>
> Regards,
>
> --
> Nicolas Goaziou
>


Re: [O] Translations

2014-07-23 Thread David Arroyo Menendez
Bastien  writes:

> Hi David,
>
> David Arroyo Menendez  writes:
>
>>> * Guía Compacta de Org Mode (http://davidam.com/docu/orgguide.es.html y
>>>   fuentes en worg)
>>
>> This book needs a full review.
>
> You may also want to ask on the orgmode mailing list, where there are
> more users who are both Org-mode users and spanish speakers.
>
> Thanks for your continued efforts about this,

Good idea! I'm looking for people who is interested in make a full
review of Guía Compacta de Org Mode. I will do a new call, when I've
finished my own review of Una Introducción a Emacs Lisp en Español.

Thanks!



Re: [O] Possible to use src block to generate org headlines for export?

2014-07-23 Thread Rick Frankel

On 2014-07-22 22:35, Matt Lundin wrote:

Nick Dokos  writes:

In short, is there a more graceful and export-friendly way to use babel
to generate org headlines for export? Or is there an easy way to get 
the

export backend to delete the opening part of the drawer (i.e.,
:RESULTS:)?

Any advice would be greatly appreciated.


No solace for your pain alas.  See
http://thread.gmane.org/gmane.emacs.orgmode/88557

My suggestion (as it was for Ronald, except that he had already 
rejected

it :-) ) would be to use raw: you lose the idempotency of results
production, but I don't know of any other problems.

However, since the headlines I'm generating are always at the end of 
the

file, I've hacked my way to a solution with the following:

#+BEGIN_SRC emacs-lisp :exports none :results none
(save-excursion
(goto-char (point-min))
(while (re-search-forward "#\\+RESULTS: generate-blog-summary" nil t)
(beginning-of-line)
(delete-region (point) (point-max
#+END_SRC

#+NAME: generate-blog-summary
#+BEGIN_SRC perl :exports results :results output org raw
print "* Headline One\n";
print "* Headline Two\n";
print "* Headline Three\n";
#+END_SRC



Close. I have a complex process which generates org source that is
then executed as part of the export. I generate org under a single
heading and give the heading a unique id. You can the goto the named
reference and `org-cut-subtree' to remove the output before
re-executing the block to generate the code. This way it can go
anywhere in the file and you don't have to worry about the
`RESULTS:' tag. Here's an abbreviated version of the code i use
(which generated a lot of org tables):

#+BEGIN_SRC org
,#+name: run-parse-spreadsheet
,#+BEGIN_SRC emacs-lisp :results raw none :exports results
(condition-case nil
(progn
(widen)
(org-id-goto "REFERENCE-TABLES")
(org-cut-subtree))
(error t))
(org-babel-goto-named-src-block "parse-spreadsheet")
(org-babel-execute-src-block
nil nil '((:eval . yes) (:results . "raw output")))
(org-table-map-tables 'org-table-align 'quietly)
,#+END_SRC

# *Note:* This is set to =:eval never= because the generated output
# needs to be removed before execution and "refreshed" after
# generation by executing the source block [[run-parse-spreadsheet]]
# above instead of running this directly.
,#+name: parse-spreadsheet
,#+HEADER: :var spreadsheet=spreadsheet
,#+BEGIN_SRC perl :results output :eval never
print join("\n",
"*** Tables",
":PROPERTIES:",
":ID: REFERENCE-TABLES",
":END:",
'',
);
print " Table 1\n";
# ...
,#+END_SRC
#+END_SRC



Re: [O] Possible to use src block to generate org headlines for export?

2014-07-23 Thread Charles Berry
Matt Lundin  imapmail.org> writes:

[deleted]

> Footnotes:
> 
> [fn:1] If one really needs to see the headlines in the original org
> buffer, a hook can be used to remove the :RESULTS: drawer.
> 
> --8<---cut here---start->8---
> (defun my-remove-stray-results-drawer (backend)
>   (when (eq backend 'html)
> (while (re-search-forward "^\\s-*:RESULTS:\\s-*\n" nil t)
>   (replace-match ""
> 
> (add-hook 'org-export-before-parsing-hook 'my-remove-results-drawer)
> --8<---cut here---end--->8---
> 
> 

Or wrap the results in a drawer when you type C-c C-c, but render them as 
raw on export (which removes the drawer and replaces with raw results).

Like so:


#+header: :results (if (boundp 'backend) "raw" "drawer") 
#+BEGIN_SRC emacs-lisp :exports both 
(format "* headline\n1\n2\n5\n")
#+END_SRC

HTH,

Chuck




Re: [O] Possible to use src block to generate org headlines for export?

2014-07-23 Thread Matt Lundin
Hi Brett,

Brett Viren  writes:

> Matt Lundin  writes:
>
>> Let's hope the real blog (when I get around to publishing it) is more
>> interesting than the example above. ;)
>
> Maybe it would be more convenient to add the "meta-ness" you want as
> part of a new exporter process?  

To change the "meta" wrappers for code block results, we would have to
modify org babel (ob-core.el). Right now, the only wrapper that org
babel uses to contain the results of *raw* org output is a :RESULTS:
drawer. However, headlines wrapped in a drawer is something that
org-element, by definition, cannot recognize. For the same reason, no
custom export backend is going to be able to recognize this element.

But I've discovered to my delight all this is moot.

The *best and simplest solution* for automatically generating org
headlines for export is...

...never to execute the source block by hand in org source file. That
way, the results will appear only in the *temporary* copy of the buffer
is parsed for export and one does need to worry about demarcating the
output with a :RESULTS: drawer...

--8<---cut here---start->8---
#+BEGIN_SRC perl :exports results :results output org raw
[code to generate org source]
#+END_SRC
--8<---cut here---end--->8---

The above works perfectly so long I as resist the temptation to hit C-c
C-c.[fn:1]

And that can be solved easily by adding the following line to the top of
the file:

--8<---cut here---start->8---
# -*- org-babel-no-eval-on-ctrl-c-ctrl-c: t; -*-
--8<---cut here---end--->8---

Isn't emacs wonderful?

In short, it is much easier than I assumed to use babel blocks (and any
language one wants) to generate org headlines destined for publishing.

This is amazing! The applications are endless. E.g., I will use this to
generate a blog summary when publishing my website. I'll post a tutorial
sometime soon. Suffice it to say, one can easily use babel blocks to
generate content on a web page, thus implementing the functionality of a
static site generator like Jekyll, docpad, octopress, etc. (but with
infinitely more flexibility).

Best,
Matt

Footnotes:

[fn:1] If one really needs to see the headlines in the original org
buffer, a hook can be used to remove the :RESULTS: drawer.

--8<---cut here---start->8---
(defun my-remove-stray-results-drawer (backend)
  (when (eq backend 'html)
(while (re-search-forward "^\\s-*:RESULTS:\\s-*\n" nil t)
  (replace-match ""

(add-hook 'org-export-before-parsing-hook 'my-remove-results-drawer)
--8<---cut here---end--->8---



[O] What is Babel's language model?

2014-07-23 Thread Grant Rettke
Good morning,

Whenever I learn a new programming language, I want to start by learning
about it's language model. The language model explains, among other
things, the order of evaluation, eagerness of evaluation, scope, and
binding approach. For example the Racket programming language has their
documentation here [1].

When I started learning `babel', I viewed it only as a means to and end,
the end being literate programming. Consequently, I just identified
goals and then either found a way to do it myself or had the kind and
generous `org-mode' users here explain the right way to do it. Please
don't take my laziness in learning as a mark of disrespect to `babel' or
to the community. The thing is that I failed to internalize literate
programming when I failed to view `babel' as a programming
language. Despite having read this [2] quite informative paper, I still
kind of missed the point. Now, I think that I get that I missed the
point, and here is how: when I read through [org-scraps], I still get
surprised and confused.

`org-scraps' is great. I understand 10% of it and have a lot to
learn. It never occurred to me that we may utilize the data structures
that define the document itself. That is so /lispy/. Looking at how one
may easily utilize souce code to assemble the very document in which it
is defined is really, really great. When I play with it though, I get it
wrong. My language model in my head is wrong, clearly.

My goal, then, is to develop a correct language model for `babel'.

My questions are:
• What is the best possible way to approach this goal?
• How have other `babelers' been documenting their pursuit of that goal?

Some thoughts on the goal:
• Thinking of a typical LISP language learning approach of evalutaion
  and binding review and study
  • `org-scraps' does this already, I just don't understand it
• Thinking of a flow chart of how things are processed between
  • The document
  • The meta-language in which `babel' itself runs via emacs-lisp
  • The guest languages managed and data-brokered with `babel'
• Target audience would be `babel' users but not implementers
  • Wouldn't need to dig into the source or `babel'
• Or is that the best approach?
  • Measure of success would be to have people be productive without
using up the time and resources of the `babel' maintainers
  • Perhaps users who want to understand the language model would need
to also learn [org-element] just as one would understand how to
parse/implement a LISP interpreter in LISP?

Looking for comments, questions, and concerns about this goal.

Kind regards,

gcr


[org-scraps]
https://raw.githubusercontent.com/eschulte/org-scraps/master/scraps.org

[org-element]
http://orgmode.org/w/?p=org-mode.git;a=blob;f=lisp/org-element.el;h=352482ef825fa495fd4e0daa7f6f236a442d2b01;hb=0be96db56e0ab973463376997fe1198a28d89e5b



Footnotes
─

[1] [http://docs.racket-lang.org/reference/model.html]

[2] [http://www.jstatsoft.org/v46/i03]



[O] <2014-07-19 Sa .+2d> date switching no more working after some time

2014-07-23 Thread Rainer Stengele
Hi,

I see a buggy behaviour since upgrading from 8.2 to Org-mode version 8.3beta 
(release_8.3beta-51-g02f2d5

I have this task:

*** TODO [#A] 100 LS
:@HOME:
SCHEDULED: <2014-07-19 Sa .+2d>

progressing the status to "DONE" switches to:

*** TODO [#A] 100 LS
:@HOME:
CLOSED: [2014-07-23 Mi 11:30] SCHEDULED: <2014-07-19 Sa .+2d>

which is wrong. Why is the task CLOSED and the SCHEDULED date not forwarded?


Now, after freshly restarting emacs the wrong behavior is gone.
I had the same problem yesterday. It seems that the current Org mode does 
"crash" somewhere in the daily work and then show the wrong behavior as 
described.
I know this is not information to be able to debug.
I will try to track this.

Thank you.

Regards, Rainer




Re: [O] Possible to use src block to generate org headlines for export?

2014-07-23 Thread Brett Viren
Matt Lundin  writes:

> Let's hope the real blog (when I get around to publishing it) is more
> interesting than the example above. ;)

Maybe it would be more convenient to add the "meta-ness" you want as
part of a new exporter process?  

-Brett.


pgpX0dUH7NC9P.pgp
Description: PGP signature


Re: [O] org-contacts development

2014-07-23 Thread Karl Voit
* Alexis  wrote:
>
> Hi all,

Hi!

> What would be useful would be an 'official', fleshed-out spec for
> org-contacts data, which handles a greater range of contact-related
> info. At the moment, for example, my org-contacts file makes use of the
> properties:
>
> #+PROPERTY: LANDLINE
> #+PROPERTY: MOBILE
> #+PROPERTY: POST
> #+PROPERTY: RESIDENCE
>
> A search of this list's archives for references to 'org-contacts':
>
> https://lists.gnu.org/archive/cgi-bin/namazu.cgi?query=org-contacts&submit=Search!&idxname=emacs-orgmode&max=20&result=normal&sort=date%3Alate
>
> suggests that org-contacts is something people are using heavily enough
> that they're writing code, ad-hoc, to provide functionality they
> require, e.g.
>
> http://lists.gnu.org/archive/html/emacs-orgmode/2013-11/msg00869.html

My current solution:
http://article.gmane.org/gmane.emacs.orgmode/57231/ and
http://article.gmane.org/gmane.emacs.orgmode/75346/

> i'm wondering if it might now be appropriate for org-contacts to become
> part of org-mode proper, rather than simply a contrib, to reduce
> unnecessary duplication of efforts. 

Absolutely.

Lacking any standard here, I created my own and meanwhile I do even
generate spam-filters and whitelist items out of my org-contacts
file. Also handy: when I filled out :ITOLDTHEM_EMAIL: my mail client
is using the specified "from"-email-address instead of my normal one
whenever I compose an email to this contact :-)

> Fleshing out an extended spec for org-contacts data could be part of the
> process of making org-contacts a first-class citizen of org-mode, and
> provide a more solid foundation on which people can build (and share)
> the org-contacts functionality they're after. And in my own particular
> case, it would greatly facilitate my work in org-contacts / Android
> Contacts integration. :-)
>
> What do people think?

Absolutely! I copy that.

My current yasnippet for a contact:

,
| # name : Org-contacts template for a person
| # --
| ** $1 $2  :$1$2:
| :PROPERTIES:
| :TYPE: ${3:$$(yas/choose-value '("person" "company"))}
| :TITLE:
| :EMAIL: $4
| :URL:
| :MOBILE: 0043/
| :HOMEPHONE:
| :WORKPHONE:
| :PHONE:
| :COMPANY:
| :STREET:
| :POSTALCODE:
| :CITY:
| :COUNTRY: Österreich
| :PHOTOGRAPH: [[photo:$1$2.jpg]]
| :BORN:
| :ITOLDTHEM_EMAIL:
| :ITOLDTHEM_ADDRESS:
| :ITOLDTHEM_PHONE:
| :ADDRESS_CHANGE_METHOD:
| :END:
|
| - first met at: $0
`

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

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




Re: [O] Evaluating inline source blocks on export issue

2014-07-23 Thread Grant Rettke
Thanks for looking Thomas and Nick.

When I set this and export

,
| (setq org-export-babel-evaluate t)
`

I get the expected result of

,
| Here is a `16', stuck in the middle of some prose.
`

But when I do this and export

,
| (setq org-export-babel-evaluate 'inline-only)
`

I get this output which is not what I expected

,
| Here is a , stuck in the middle of some prose.
`

I thought that I was enabling inline code block execution correctly
and making the inline call correctly.

How does it look should it be doing what I had wanted?

I have not yet begun trimming down my org initialization, and trying
to decide when I need to start narrowing things down by deduction.
Grant Rettke | ACM, ASA, FSF, IEEE, SIAM
g...@wisdomandwonder.com | http://www.wisdomandwonder.com/
“Wisdom begins in wonder.” --Socrates
((λ (x) (x x)) (λ (x) (x x)))
“Life has become immeasurably better since I have been forced to stop
taking it seriously.” --Thompson


On Wed, Jul 23, 2014 at 7:43 AM, Nick Dokos  wrote:
> Grant Rettke  writes:
>
>> Good evening,
>>
>> From [org-scraps] I pasted this example into a buffer:
>>
>> ,—-
>> ━
>>
>>  #+name: square
>>  #+begin_src emacs-lisp :var it=0
>>
>>  (* it it)
>>  #+end_src
>>
>>  Here is a call_square(it=4), stuck in the middle of some prose.
>> ━
>> `—-
>>
>> When I export the buffer I get:
>>
>> ,—-
>> 
>>  ╭
>>  │   (* it it)
>>  ╰
>>
>>  Here is a , stuck in the middle of some prose.
>> 
>> `—-
>>
>> I expected a 16 to have appeared there.
>>
>
> The following works for me:
>
> --8<---cut here---start->8---
>  #+name: square
>  #+begin_src emacs-lisp :var it=0 :exports none
>  (* it it)
>  #+end_src
>
>  Here is a call_square(it=4), stuck in the middle of some prose.
> --8<---cut here---end--->8---
>
> --
> Nick
>
>


Re: [O] Emacs with Org 8?

2014-07-23 Thread SabreWolfy
Nicolas Richard  yahoo.fr> writes:

> ...
> This is because Emacs 24.3.1 was released before Org 8 was released.
> ...

As an aside, where does the "sub-minor" version number for Emacs originate?
I'm running 24.3.1 and the next release is 24.4. However, even though I
can't find any information about 24.3.2, a search of this list for "24.3.2"
returns results...




Re: [O] Evaluating inline source blocks on export issue

2014-07-23 Thread Nick Dokos
Grant Rettke  writes:

> Good evening,
>
> From [org-scraps] I pasted this example into a buffer:
>
> ,—-
> ━
>
>  #+name: square
>  #+begin_src emacs-lisp :var it=0
>
>  (* it it)
>  #+end_src
>
>  Here is a call_square(it=4), stuck in the middle of some prose.
> ━
> `—-
>
> When I export the buffer I get:
>
> ,—-
> 
>  ╭
>  │   (* it it)
>  ╰
>
>  Here is a , stuck in the middle of some prose.
> 
> `—-
>
> I expected a 16 to have appeared there.
>

The following works for me:

--8<---cut here---start->8---
 #+name: square
 #+begin_src emacs-lisp :var it=0 :exports none
 (* it it)
 #+end_src

 Here is a call_square(it=4), stuck in the middle of some prose.
--8<---cut here---end--->8---

-- 
Nick




[O] ODT exporter does not seem to respect quotation mark for list items

2014-07-23 Thread Baptiste
Hi,

I do not manage to get all my lists correctly exported in odt. The main point 
seems the respect of quotation marks …

See example below.

Thank you,

-- 
~^v^~ Baptiste

-

#+TITLE: Test for lists in quotes and Odt export
#+AUTHOR: Baptiste
#+DATE: 2014-07-23

* Rational

  =ODT= exporter does not seem to manage quotation style for lists (may be 
other elements).

  : org-mode 8.3.15.g2241054 (git)

* Org source

  #+BEGIN_QUOTE
  This is a quotation text, with a list inside
  - First item
1. sub item
2. second sub-item
  - Second item

  Text in quote after the list
  #+END_QUOTE

  I am now out of quote

* From odt file, =content.xml=

  The list is made out of /Quotation/ style, then back to normal margin and so 
on.
  
  #+BEGIN_SRC xml
Org source

This is a quotation text, with a list 
inside




  

First item




  

sub item


  

  

second sub-item


  


  

  

Second item


  



Text in quote after the list



I am now out of quote


  #+END_SRC

* What I would expect

  I would expect the /Quotation/ style to be respected even in list item, 
something like :
  
  #+BEGIN_SRC xml
Org source

This is a quotation text, with a list 
inside




  

First item




  

sub item


  

  

second sub-item


  


  

  

Second item


  



Text in quote after the list



I am now out of quote


  #+END_SRC



Re: [O] [bug?, org-element] latex-environment delimiters must be at BOL

2014-07-23 Thread Nicolas Goaziou
Hello,

Rasmus  writes:

> Note that the maint/master version of org-element--current-element
> does not including a trailing "^".

That's becasue `org-element--current-element' always does the check at
the beginning of line.

> I'm not sure the location of stars matter much in a technical sense,
> though I have never come across any environments using stars other
> than for the last character.
>
> This document compiles fine, although it is an exercise is obscurity:
>
>  \documentclass{minimal}
>  \newenvironment{ab*cd}[1]{\bfseries{#1}}{}
>  \newenvironment{*abcd}[1]{\bfseries{#1}}{}
>  \begin{document}
>  \begin{ab*cd} x \end{ab*cd}
>  \begin{*abcd} x \end{*abcd}
>  \end{document}
>
> I'm happy to accept only stars in the end, though.

I somehow was convinced that star characters were only allowed at the
end of the environment name. You're right, enforcing stars at the end is
unnecessary, and \\([A-Za-z0-9*]+\\) is better.

> Sorry, I can't push to Org-git.  But a patch is attached.

I applied your patch with aforementioned change. Thank you.


Regards,

-- 
Nicolas Goaziou



Re: [O] Test failure

2014-07-23 Thread Nicolas Goaziou
Hello,

Rasmus  writes:

> Nick Dokos  writes:
>
>> I just pulled (HEAD is 02f2d5b42aabe9e272a5967ad0483b38750a8392)
>> and got this test failure:

[...]

> Nicolas removed the "$" at the end of the regexps identifying LaTeX
> environments here:
>
> 
> http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=ec0e3cf70ba353ea59a5e66235462f659c99

Actually that was a mistake for maint. This should now be fixed.


Regards,

-- 
Nicolas Goaziou



Re: [O] Collecting unique selling proposition (USP) of Org-mode

2014-07-23 Thread Thorsten Jolitz
M  writes:

>> Von: Karl Voit 
>> Organisation: www.karl-voit.at
>> Antworten an: Karl Voit 
>> Datum: Tue, 1 Jul 2014 21:07:32 +0200
>> An: 
>> Betreff: Re: [O] Collecting unique selling proposition (USP) of Org-mode
>> 
>>> I think the best thing to compare different tools is making a list with
>>> features and mark which tools support which ones.
>>> I assume there is already such a list
>> 
>> https://en.wikipedia.org/wiki/List_of_personal_information_managers
>
> OK, the list is there, but it is not comparing features directly.
>
> A very good example is the features comparison of docear with some of its
> alternatives:
> http://www.docear.org/2014/01/15/comprehensive-comparison-of-reference-manag
> ers-mendeley-vs-zotero-vs-docear/

#+begin_quote
A while ago, Mendeley was acquired by Elsevier for an estimated 

69-100 Million Dollars.
#+end_quote

wow

If Org-mode is better than Mendeley (which I don't know at all), then
its worth a fortune ;)

-- 
cheers,
Thorsten