Re: [O] mobile-org http links not recognized on iPhone

2014-04-03 Thread Sean Escriva
Chris Henderson  writes:

> If my link is like: [[http://orgmode.org]] - MobileOrg's view as document
> mode doesn't recognize this as a valid link. It only does that if the link
> is in [[link][description]] format. Is there any way around this?

I haven't noticed this myself, but could you report an issue here:
https://github.com/MobileOrg/mobileorg/issues

with any additional detail you'd like to add. That way I won't loose
track of it.

Thank you!

>
> Thanks.
>
>
> On Tue, Mar 18, 2014 at 3:26 AM, Sean Escriva wrote:
>
>>
>> Chris Henderson  writes:
>>
>> > http links on mobile-org on iPhone is not click-able and I need to select
>> > all, copy and paste the link on safari instead of just clicking and
>> opening
>> > it directly. Is this normal behavior?
>>
>> No links should be clickable, they are for me. For example, with the
>> following link in my one of my org agenda files:
>>
>>   - [[http://queue.acm.org/detail.cfm?id%3D2413037][Thinking Methodically
>> about Performance]]
>>
>> In MobilOrg I can view the node in the doc, using the right arrow, and
>> then choose View as Document. The links are clickable in this view, as
>> other views assume editing.
>>
>> --
>> -sean
>>

-- 
-sean



Re: [O] BBDB and Org

2014-04-03 Thread Eric Abrahamsen
Aric Gregson  writes:

> Eric Abrahamsen  writes:
>
>> I'm also not sure what you mean by "org pulling bbdb away from gnus" --
>> are you running two separate instances of emacs?
>
> Yes, that is precisely what I am doing. I tend to work in the Emacs
> instance running org mode and use the other just for email. Too much
> blocking if I do it all in one instance. Plus, previously there were
> lots of crashes, but things do appear more stable now.

Ah, check the variable bbdb-read-only then -- it's for precisely this
situation. If you set it to 't' in the emacs running org, it will
prevent clashes (though obviously you won't be able to edit the bbdb
file).

E




Re: [O] Help needed - export markdown is it supposed to pre-pend html?

2014-04-03 Thread Charles Berry
Rick DeNatale  gmail.com> writes:

> 
> Hi, I'm a fairly new org mode user.
> I'm trying to export to markdown and I can't understand the output:
> 
> For example with the simple org mode buffer
> 
> 
>

Add:

#+OPTIONS: toc:nil

 
> * Top level headline
> ** Second level
> *** Third level
>     Some text
> *** Third level
>     More text
> * Another top level headline
> 

[delete output with table-of-contents at top]

> 
> Is this expected? or is there something wrong with my installation?
> 

Yes. Use the line above to get rid of the table of contents.

Grep through the manual for '#+OPTIONS' to get up to speed.

HTH,

Chuck





[O] (org-insert-headline '(4)) should insert new headline before point

2014-04-03 Thread York Zhao
Hi list,

(org-insert-headline '(4)) used to insert new heading before point. But this had
broken recently. According to the docstring, this command inserts new
heading at the end of the parent subtree  ONLY if two universal prefix
arguments is given, not one. Here's the reproducer:

--8<---cut here---start->8---
emacs -Q -L path/to/org-mode/lisp/ --eval \
"(let ((buf (get-buffer-create \"test-org\")))
(with-current-buffer buf
(org-mode)
(insert \"* headline 1\")
(goto-char (line-beginning-position))
(org-insert-heading '(4)))
(switch-to-buffer buf))"
--8<---cut here---end--->8---

Thanks



Re: [O] How to get rid of clocktable summary time in the form "2d 02:00"

2014-04-03 Thread Buddy Butterfly

Solved it. If anyone is interested, here it goes:

Neither the 2 settings given below nor the links
helped very much.

Instead I customized the variable "org-time-clocksum-format"
and switcht off (deselected) the "Days" entry completely.

Cheers,
Matt


Am 02.04.2014 10:09, schrieb Buddy Butterfly:
> 
> Anyone? Still have no clue
> 
> Am 01.04.2014 00:59, schrieb Buddy Butterfly:
>> Am 31.03.2014 10:46, schrieb Sebastien Vauban:
>>> Bastien wrote:
 Buddy Butterfly  writes:

> I would like to have the summary times in a clocktable be displayed
> only in hours, like 48:00 instead of 2d. Or, is it possible to
> define that 1d corresponds to 8:00 as a working day? So in the
> above example I would rather like to see 5d (workingdays) corresponding
> to 40:00. Clocktable counts 1d as 24h (which is right ;-) but not
> in business.

 See `org-time-clocksum-use-effort-durations' and
 `org-effort-durations' for a start.
>>>
>>> Eventually take a look at related posts:
>>>
>>> - Multiple notions for what's a day
>>>   http://lists.gnu.org/archive/html/emacs-orgmode/2012-12/msg01093.html
>>>
>>> - Computations on efforts expressed in days
>>>   http://lists.gnu.org/archive/html/emacs-orgmode/2012-05/msg00049.html
>>
>> It looks like this links are describing exactly the same issue.
>> But I still have no clue how to change it. I upgraded to Kubuntu 13.10
>> from 12.10. This is where the change came in. Ubuntu 13.10 uses
>> Emacs 24.3.1. Will it be fixed in a later version?
>>
>>>
>>> Best regards,
>>>   Seb
>>>
>>
>>
>>
>>
> 
> 
> 
> 





[O] Help needed - export markdown is it supposed to pre-pend html?

2014-04-03 Thread Rick DeNatale
Hi, I'm a fairly new org mode user.

I'm trying to export to markdown and I can't understand the output:

For example with the simple org mode buffer

* Top level headline
** Second level
*** Third level
Some text
*** Third level
More text
* Another top level headline

When I export with C-c C-e m M
I end up with the resulting buffer:


Table of Contents


1. Top level headline

1.1. Second level

1.1.1. Third level
1.1.2. Third level




2. Another top level headline




# Top level headline

## Second level

### Third level

Some text

### Third level

More text

# Another top level headline

Is this expected? or is there something wrong with my installation?

M-x org-version gives
Org-mode version 8.2.5h (8.2.4h-94-g91175a-elpa
@ /Users/rick/.emacs.d/elpa/org-20140331/)

I installed then used M-x customize-variable RET org-export-backends RET to
turn md on.


-- 
Rick DeNatale


Re: [O] Bug: text export and multi-word link descriptions with line breaks

2014-04-03 Thread Nicolas Goaziou
Mathias Bauer  writes:

> I expect, Org to do the following steps while parsing the source
> text:
>
> 1. "Normalize" or clean the link description, i.e. remove any
>newlines, starting and trailing spaces, and replace any
>occurrences of "[ \t]+" in the interior by a single space
>only.  (To be done.)
>
> 2. Check the tuple (description,target) for duplicates and drop
>them.  (Seems ok to me.)
>
> 3. Below the paragraph list the tuples as "[description] target"
>in the order of occurrence in the original text.  (Also seems
>ok to me.)
>
> I hope this makes this issue a little bit more clear now.

Indeed. I missed the duplicates links. This should be fixed.

Thank you for the report.


Regards,

-- 
Nicolas Goaziou



Re: [O] Creating changelog with magit

2014-04-03 Thread Thorsten Jolitz
Florian Beck  writes:

> Thorsten Jolitz  writes:
>
>> I get a meager
>>
>> ,---
>> | 
>> | * org.el: 
>> | 
>> | # <>
>> | 
>> `---
>
> You get this when you are on the file that has changed. Press TAB
> (magit-toggle-section) and you see a diff. Move to the chunk you want to
> comment on and press "C": this should insert the defun/defvar/etc in the
> commit buffer.
>
> To automate this I have
>
>   (defun fb/magit-commit-add-log ()
> (interactive)
> (let* ((ol (car (overlays-at (point
>(beg (overlay-start ol))
>(end (overlay-end ol))
>commit-buffer)
>   (save-excursion
> (goto-char beg)
> (while (re-search-forward "^[+-]" end t)
>   (save-window-excursion
> (magit-commit-add-log)
> (setq commit-buffer (current-buffer)
>   (display-buffer commit-buffer)))
>
> ... but I don't really use this, because it is very slow and, usually,
> you want to arrange things differently.


Thanks, I hoped there is more than just this minimal skeleton, and there
is, like so often with emacs/org-mode.

I will try TAB/C and your function next time I commit. 

-- 
cheers,
Thorsten




Re: [O] BBDB and Org

2014-04-03 Thread Aric Gregson
Thanks Charles. I may try this again. I have had lots of issues moving
From v2 to v3 of bbdb. Still problems with Gnus, but workable at this
point.

Aric


signature.asc
Description: PGP signature


Re: [O] BBDB and Org

2014-04-03 Thread Aric Gregson
Eric Abrahamsen  writes:

> I'm also not sure what you mean by "org pulling bbdb away from gnus" --
> are you running two separate instances of emacs?

Yes, that is precisely what I am doing. I tend to work in the Emacs
instance running org mode and use the other just for email. Too much
blocking if I do it all in one instance. Plus, previously there were
lots of crashes, but things do appear more stable now.

Thanks, Aric




Re: [O] Does ELPA package work??

2014-04-03 Thread Achim Gratz
David Masterson writes:
> I've installed the complete Cygwin setup on my Windows 8.1 system.  This
> included Emacs 24.3 with Org v7.9.3f.  I then used the Emacs package
> system to install the latest version of Org (20140317 or 8.2.5h).
> Everything seemed to go without a problem, but org-version still says
> 7.9.3f with nothing in my .emacs.  Is there something I need to do to
> ensure that the new package is initialized?  I see that the new Org
> package directory has been added to load-path.

Put

(package-initialize)

at the very beginning of your .emacs.


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

SD adaptations for Waldorf Q V3.00R3 and Q+ V3.54R2:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada




Re: [O] [PATCH] Noweb expansion doesn't duplicate prefix across lines

2014-04-03 Thread Pontus Michael
Hello Eric.

I produced a list of arguments in the support of this change, which
can be reviewed here:
http://lists.gnu.org/archive/html/emacs-orgmode/2014-03/msg01543.html

Please let me know if your question still stands after taking those
concerns into account.



[O] Centos 6.5 => emacs 23.1 => org 6.21b => Need help

2014-04-03 Thread Suhas Pai
My kudos to the orgmode team. I love the package and want to use
it to teach a Fall course in engineering. I use Centos and typed the following
to get the latest:

sudo yum groupupdate emacs
Package 1:emacs-23.1-25.el6.x86_64 already installed and latest version
In order to preserve the integrity of all pacakges installed, I prefer not
deviate from "yum" so I don't have the latest emacs (24.1) or the orgmode 
pacakge.

* Shell mode
#+begin_src sh :exports both
echo "Hello world"  # C-c C-c
#+end_src

Currently, I'm running into the following issues and can easily share my 
session via VNC to 
see the problem firsthand.

1. C-c C-e b  says "exporting done" but it doesn't open it in firefox however 
when I open sh.html in emacs and type C-c C-s and C-c C-v, it displays in 
firefox.
2. When I keep my cursor on "Hello world" and do C-c C-c it comes back with 
"org-ctrl-c-ctrl-c: C-c C-c can do nothing useful at this location. I was 
expecitng "#+results:"
3. When publish, is there a way to tell org mode to create all files with 755 
permissions. It correctly creates them in ~/public_html directory but with 700 
permissions.
4. Is there a colorful stylesheet that allows me set the backgroud color, 
image, etc.? Should I just save it in ~/org/css directory. The html output is 
bit dull at the moment.
5. I plan to teach some hardware languages where I want to show compile, 
simulate and view waveforms using babel-org mode. How do I add HW language 
support?
6. I noticed that if I just have code without heading, it picks up the first 
line of the language as heading. 
7. It didn't auto complete submit in the current org version I have => M-x 
org-submit-bug-report RET

My apologies for not finding the solution to these problems even after 
extensive googling and youtubing.

Thanks,
Suhas


Re: [O] "No link found" on links in drawers

2014-04-03 Thread Karl Voit
Bon soir, Bastien!

* Bastien  wrote:
>
> Karl Voit  writes:
>
>> I am using custom links like "[[photo:FirstnameLastname.jpg]]" in my
>> contacts.org.
>>
>> Those links stopped working recently. Whenever I try to click or C-c
>> C-c the link, I get "user-error: No link found".
>
> This is a known issue, related to the recent rewrite of
> `org-open-at-point', which is more careful about handling links
> only in places where they are properly defined syntacticly-wise.
>
> I will provide a workaround for raw links in property drawers
> and comments, letting org-open-at-point to fall back on `ffap'
> there.  I don't have any good ideas for handling bracket links
> in property drawers so far.

FYI: I just updated my Org-mode from the git repos and the issue
still persists.

-- 
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] Bug: text export and multi-word link descriptions with line breaks

2014-04-03 Thread Mathias Bauer
Hello Nicolas,

* Nicolas Goaziou wrote on 2014-04-03 at 17:25 (+0200):

> Mathias Bauer  writes:
>
> > I just stumbled over Org's plain text export and how it works on
> > links with descriptions consisting of multiple words and line
> > breaks between them.  I'm running Org stable version 8.2.5h.
> >
> > Org source (spaces at the end of line 1 and 2 don't matter):
> >
> > snip
> > "OpenPGP Message Format" ([[https://tools.ietf.org/html/rfc4880][RFC
> > 4880]] which obsoletes [[https://tools.ietf.org/html/rfc1991][RFC
> > 1991]] and [[https://tools.ietf.org/html/rfc2440][RFC 2440]])...
> > ...
> > foo [[https://tools.ietf.org/html/rfc4880][RFC 4880]] bar
> > baz [[https://tools.ietf.org/html/rfc1991][RFC 1991]] foo
> > bar [[https://tools.ietf.org/html/rfc2440][RFC 2440]] baz
> > snip
> >
> > Text export result:
> >
> > snip
> > "OpenPGP Message Format" ([RFC 4880] which obsoletes [RFC 1991] and [RFC
> > 2440])...  ...  foo [RFC 4880] bar baz [RFC 1991] foo bar [RFC 2440] baz
> >
> >
> > [RFC 4880] https://tools.ietf.org/html/rfc4880
> >
> > [RFC 1991] https://tools.ietf.org/html/rfc1991
> >
> > [RFC 2440] https://tools.ietf.org/html/rfc2440
> >
> > [RFC 4880] https://tools.ietf.org/html/rfc4880
> >
> > [RFC 1991] https://tools.ietf.org/html/rfc1991
> > snip
> >
> > These multiple references look quite bad.  Is it possible to
> > "normalize" the descriptions in some way *before* checking
> > them for uniqueness and output them thereafter?
>
> Could you be more explicit? What does look quite bad? What did
> you expect instead? How is related to line breaks in the
> descriptions?

Ok, let's go into more details.  See the Org source text:

1. There are three links and each of them appears twice.  The
   link targets of every two of them are identical.

2. Each of the two "[...][RFC 2440]" links appear in one line; the
   links "[...][RFC 4880]" and "[...][RFC 1991]" each have a
   newline in their description.  They are in fact
   "[...][RFC\n4880]" and "[...][RFC 4880]" and, respectively,
   "[...][RFC\n1991]" and "[...][RFC 1991]".

So, now let's examine the Org text export:

The final reference part - the five links below the paragraph -
shows two links, [RFC 4880] and [RFC 1991], which appear twice
but the link [RFC 2440] appears only once there.

This is, at least, inconsistent.

The point is, that Org obviously considers "[...][RFC 4880]" and
"[...][RFC\n4880]" as being two different links internally and
list both of them in the reference part.  For this listing, the
\n is removed.  This is, what I called "normalization" in my
first post.

Human eyes, however, won't see any difference between this two
forms and start being surprised.

I expect, Org to do the following steps while parsing the source
text:

1. "Normalize" or clean the link description, i.e. remove any
   newlines, starting and trailing spaces, and replace any
   occurrences of "[ \t]+" in the interior by a single space
   only.  (To be done.)

2. Check the tuple (description,target) for duplicates and drop
   them.  (Seems ok to me.)

3. Below the paragraph list the tuples as "[description] target"
   in the order of occurrence in the original text.  (Also seems
   ok to me.)

I hope this makes this issue a little bit more clear now.

Kind regards,
Mathias



Re: [O] Creating changelog with magit

2014-04-03 Thread Florian Beck
Thorsten Jolitz  writes:

> I get a meager
>
> ,---
> | 
> | * org.el: 
> | 
> | # <>
> | 
> `---

You get this when you are on the file that has changed. Press TAB
(magit-toggle-section) and you see a diff. Move to the chunk you want to
comment on and press "C": this should insert the defun/defvar/etc in the
commit buffer.

To automate this I have

  (defun fb/magit-commit-add-log ()
(interactive)
(let* ((ol (car (overlays-at (point
   (beg (overlay-start ol))
   (end (overlay-end ol))
   commit-buffer)
  (save-excursion
(goto-char beg)
(while (re-search-forward "^[+-]" end t)
  (save-window-excursion
(magit-commit-add-log)
(setq commit-buffer (current-buffer)
  (display-buffer commit-buffer)))

... but I don't really use this, because it is very slow and, usually,
you want to arrange things differently.

-- 
Florian Beck



Re: [O] BBDB and Org

2014-04-03 Thread Eric Abrahamsen
Aric Gregson  writes:

> Hello,
>
> I am just wondering if there is a way to get org mode to stop playing
> with bbdb. Because I use both gnus and org, it is a bit of a hassle to
> have org always pulling bbdb away from gnus when I create an agenda. I
> have taken out all reference to bbdb and org in my start-up files. I
> don't use anniversary any longer (could not get it to work properly with
> version 3 of bbdb, despite some help from the list) and really don't see
> why org needs it. Any idea of how to turn it off? 
>
> Thanks, Aric

I'm also not sure what you mean by "org pulling bbdb away from gnus" --
are you running two separate instances of emacs?




Re: [O] Bug: text export and multi-word link descriptions with line breaks

2014-04-03 Thread Nicolas Goaziou
Hello,

Mathias Bauer  writes:

> I just stumbled over Org's plain text export and how it works on
> links with descriptions consisting of multiple words and line
> breaks between them.  I'm running Org stable version 8.2.5h.
>
> Org source (spaces at the end of line 1 and 2 don't matter):
>
> snip
> "OpenPGP Message Format" ([[https://tools.ietf.org/html/rfc4880][RFC
> 4880]] which obsoletes [[https://tools.ietf.org/html/rfc1991][RFC
> 1991]] and [[https://tools.ietf.org/html/rfc2440][RFC 2440]])...
> ...
> foo [[https://tools.ietf.org/html/rfc4880][RFC 4880]] bar
> baz [[https://tools.ietf.org/html/rfc1991][RFC 1991]] foo
> bar [[https://tools.ietf.org/html/rfc2440][RFC 2440]] baz
> snip
>
> Text export result:
>
> snip
> "OpenPGP Message Format" ([RFC 4880] which obsoletes [RFC 1991] and [RFC
> 2440])...  ...  foo [RFC 4880] bar baz [RFC 1991] foo bar [RFC 2440] baz
>
>
> [RFC 4880] https://tools.ietf.org/html/rfc4880
>
> [RFC 1991] https://tools.ietf.org/html/rfc1991
>
> [RFC 2440] https://tools.ietf.org/html/rfc2440
>
> [RFC 4880] https://tools.ietf.org/html/rfc4880
>
> [RFC 1991] https://tools.ietf.org/html/rfc1991
> snip
>
> These multiple references look quite bad.  Is it possible to
> "normalize" the descriptions in some way *before* checking them
> for uniqueness and output them thereafter?
>
> Thanks for considering this issue.

Could you be more explicit? What does look quite bad? What did you
expect instead? How is related to line breaks in the descriptions?


Regards,

-- 
Nicolas Goaziou



Re: [O] So many reading on gmane?

2014-04-03 Thread Thorsten Jolitz
Rainer M Krug  writes:

> This seems very strange - but it is the fact that gmane seems to be not
> available the reason why this list is so quiet today

Definitely.
Life without gmane is possible but does not really make sense ...

-- 
cheers,
Thorsten




[O] Bug: text export and multi-word link descriptions with line breaks

2014-04-03 Thread Mathias Bauer
Dear Maintainers,

I just stumbled over Org's plain text export and how it works on
links with descriptions consisting of multiple words and line
breaks between them.  I'm running Org stable version 8.2.5h.

Org source (spaces at the end of line 1 and 2 don't matter):

snip
"OpenPGP Message Format" ([[https://tools.ietf.org/html/rfc4880][RFC
4880]] which obsoletes [[https://tools.ietf.org/html/rfc1991][RFC
1991]] and [[https://tools.ietf.org/html/rfc2440][RFC 2440]])...
...
foo [[https://tools.ietf.org/html/rfc4880][RFC 4880]] bar
baz [[https://tools.ietf.org/html/rfc1991][RFC 1991]] foo
bar [[https://tools.ietf.org/html/rfc2440][RFC 2440]] baz
snip

Text export result:

snip
"OpenPGP Message Format" ([RFC 4880] which obsoletes [RFC 1991] and [RFC
2440])...  ...  foo [RFC 4880] bar baz [RFC 1991] foo bar [RFC 2440] baz


[RFC 4880] https://tools.ietf.org/html/rfc4880

[RFC 1991] https://tools.ietf.org/html/rfc1991

[RFC 2440] https://tools.ietf.org/html/rfc2440

[RFC 4880] https://tools.ietf.org/html/rfc4880

[RFC 1991] https://tools.ietf.org/html/rfc1991
snip

These multiple references look quite bad.  Is it possible to
"normalize" the descriptions in some way *before* checking them
for uniqueness and output them thereafter?

Thanks for considering this issue.

Kind regards
Mathias



Re: [O] Help tangling

2014-04-03 Thread Andreas Hilboll
On 03.04.2014 01:05, Eric Schulte wrote:
 and the ":tangle SConstruct"
>>>
>>> yes
>>>
>>> #+Property: tangle SConstruct
>>>
>>
>> Thanks for your feedback, Eric!  However, it doesn't seem to work properly.
>>
>> The first two lines of my file read
>>
>>#+OPTIONS: toc:4 h:4
>>#+PROPERTY: tangle SConstruct
>>
>> and I have several code blocks like
>>
>>#+begin_src python
>>[...]
>>#+end_src
>>
>> However, when I invoke org-babel-tangle, I get the message "Tangled 0
>> code blocks from SConstruct.org", and no output file is created.
>>
>> Have I misunderstood you?  What am I doing wrong?
>>
> 
> You may have to C-c C-c on the property line so that it is re-read by
> Emacs (which normally only happens when opening the file).

Cool -- thanks =)

-- Andreas.



Re: [O] :no-expand not working on variables?

2014-04-03 Thread Eric Schulte
Rainer M Krug  writes:

> Eric Schulte  writes:
>
>> According to the manual :no-expand is only supposed to have an effect
>> during tangling, not execution.
>
> Thanks Eric - re-reading the manual, it became clear. Maybe to clarify
> this in the manual, one could say:
>
> ,
> | The `:no-expand' header argument can be used to turn off this behavior
> | for tangling and has no effect on the expansion during code execution.
> `
>
> instead of:
>
> ,
> | The `:no-expand' header argument can be used to turn off this behavior.
> `
>

Could you supply a patch?

Sorry to ask for such a trivial thing, but I'm *very* short on time
these days, and applying a patch is *much* easier.

Thanks,

>
> Rainer
>
>>
>> Best,
>>
>> Rainer M Krug  writes:
>>
>>> Hi
>>>
>>> shouldn't the following not give an error from R as it should not be
>>> expanding the variables?
>>>
>>> --8<---cut here---start->8---
>>> #+PROPERTY: no-expand TRUE
>>> #+PROPERTY: var YEAR=2014
>>>
>>> * a noexpand code
>>>
>>> #+begin_src R :results output :no-expand
>>> cat(YEAR)
>>> #+end_src
>>>
>>> #+RESULTS:
>>> : 2014
>>> --8<---cut here---end--->8---
>>>
>>> The manual states:
>>>
>>> ,
>>> | 14.8.2.11 `:no-expand'
>>> | ..
>>> | 
>>> | By default, code blocks are expanded with `org-babel-expand-src-block'
>>> | during tangling.  This has the effect of assigning values to variables
>>> | specified with `:var' (see *Note var::), and of replacing "noweb"
>>> | references (see *Note Noweb reference syntax::) with their targets.  The
>>> | `:no-expand' header argument can be used to turn off this behavior.
>>> `
>>>
>>> Org-mode version 8.2.5h (release_8.2.5h-869-gdcfe09 @
>>> /Users/rainerkrug/.emacs.d/org-mode/lisp/)
>>>
>>> Cheers,
>>>
>>> Rainer

-- 
Eric Schulte
https://cs.unm.edu/~eschulte
PGP: 0x614CA05D



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

2014-04-03 Thread Eric Schulte
Rainer M Krug  writes:

> Eric Schulte  writes:
>
>>>
>>> Apologies - I am still struggling with encryption..
>>>
>>> So here is my example:
>>>
>>> --8<---cut here---start->8---
>>> #+TITLE: single_to_multi
>>> #+DATE: <2013-10-15 Tue>
>>> #+AUTHOR: Rainer M. Krug
>>> #+EMAIL: rai...@krugs.de
>>>
>>> ≈* Load R packages and data
>>> #+BEGIN_SRC R
>>> cat("Loading Data\n")
>>> #+END_SRC
>>> --8<---cut here---end--->8---
>>>
>>> I am using only org loaded and R enabled.
>>>
>>> C-c C-c on the block produces the error
>>>
>>> emacs version: 
>>> 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
>>>
>>> org version:
>>> Org-mode version 8.2.5h (release_8.2.5h-837-gb296cc @
>>> /Users/rainerkrug/.emacs.d/org-mode/lisp/)
>>>
>>
>> Thanks, a fixed version of the patch is attached.  If this works please
>> let me know and I'll apply.
>
> Still the same error:
>

Your previous example works as expected for me with the latest patch.

* Load R packages and data

#+BEGIN_SRC R :results output
cat("Loading Data\n")
#+END_SRC

#+RESULTS:
: Loading Data

Please double check that you applied the patch and reloaded Org-mode,
and if the bug persists provide another minimal example.

Thanks,

>
> ,
> | Debugger entered--Lisp error: (wrong-type-argument sequencep 99)
> |   Mapconcat(identity "cat(\"YEAR\")" "\n")
> |   Org-babel-execute:R("cat(\"YEAR\")" ((:comments . "") (:shebang
> | . "") (:cache . "no") (:padline . "") (:noweb . "no") (:tangle
> | . "no") (:exports . "code") (:results . "replace output") (:session
> | . "none") (:hlines . "no") (:result-type . output) (:result-params
> | "output" "replace") (:rowname-names) (:colname-names)))
> |   org-babel-execute-src-block(nil)
> |   org-babel-execute-src-block-maybe()
> |   org-babel-execute-maybe()
> |   org-babel-execute-safely-maybe()
> |   run-hook-with-args-until-success(org-babel-execute-safely-maybe)
> |   org-ctrl-c-ctrl-c(nil)
> |   call-interactively(org-ctrl-c-ctrl-c nil nil)
> `
>
> Cheers,
>
> Rainer
>
>
>>
>> Best,
>>
>>
>> From d67248db79faf19e1bdcac0230c37670b6115bdd Mon Sep 17 00:00:00 2001
>> From: Eric Schulte 
>> Date: Sun, 23 Mar 2014 20:01:37 -0600
>> Subject: [PATCH] only wrap R code graphics-file on execution
>>
>>   Move this out of the expand-body function so that it is *never*
>>   applied to tangled code.
>> ---
>>  lisp/ob-R.el | 40 +---
>>  1 file changed, 21 insertions(+), 19 deletions(-)
>>
>> diff --git a/lisp/ob-R.el b/lisp/ob-R.el
>> index 62aa7f2..780d99f 100644
>> --- a/lisp/ob-R.el
>> +++ b/lisp/ob-R.el
>> @@ -97,24 +97,15 @@ this variable.")
>>"Expand BODY according to PARAMS, return the expanded body."
>>(let ((graphics-file
>>   (or graphics-file (org-babel-R-graphical-output-file params
>> -(mapconcat
>> - #'identity
>> - (let ((inside
>> -(append
>> - (when (cdr (assoc :prologue params))
>> -   (list (cdr (assoc :prologue params
>> - (org-babel-variable-assignments:R params)
>> - (list body)
>> - (when (cdr (assoc :epilogue params))
>> -   (list (cdr (assoc :epilogue params)))
>> -   (if graphics-file
>> -   (append
>> -(list (org-babel-R-construct-graphics-device-call
>> -   graphics-file params))
>> -inside
>> -(list "},error=function(e){plot(x=-1:1, y=-1:1, type='n', 
>> xlab='', ylab='', axes=FALSE); text(x=0, y=0, labels=e$message, col='red'); 
>> paste('ERROR', e$message, sep=' : ')}); dev.off()"))
>> - inside))
>> - "\n")))
>> +(mapconcat #'identity
>> +   (append
>> +(when (cdr (assoc :prologue params))
>> +  (list (cdr (assoc :prologue params
>> +(org-babel-variable-assignments:R params)
>> +(list body)
>> +(when (cdr (assoc :epilogue params))
>> +  (list (cdr (assoc :epilogue params)
>> +   "\n")))
>>  
>>  (defun org-babel-execute:R (body params)
>>"Execute a block of R code.
>> @@ -127,7 +118,18 @@ This function is called by 
>> `org-babel-execute-src-block'."
>> (colnames-p (cdr (assoc :colnames params)))
>> (rownames-p (cdr (assoc :rownames params)))
>> (graphics-file (org-babel-R-graphical-output-file params))
>> -   (full-body (org-babel-expand-body:R body params graphics-file))
>> +   (full-body
>> +(let ((inside
>> +   (list (org-babel-expand-body:R body params graphics-file
>> +  (mapconcat #'identity
>> + (if graphics-file
>> + (append
>> +  (list (org-babel-R-construct-graphics-device-call
>> + graphics-file params))
>> +   

Re: [O] [PATCH] Noweb expansion doesn't duplicate prefix across lines

2014-04-03 Thread Eric Schulte
This simply seems to trade one use case (noweb expansion behind a
prefix), with another (multiple noweb expansions on the same line).

Is there a way to support both use cases?

Pontus Michael  writes:

> * lisp/ob-core.el (org-babel-expand-noweb-references): Change the the
>   behavior of noweb expansion by replacing the prefix duplication with
>   whitespace.  Fix handling of multiple noweb references on the same
>   line by using temporary buffer to replace noweb references in place
>   instead of collecting the intervals between references and their
>   expansion text into a variable.
>
> * doc/org.texi: Reflect the change by removing the section under
>   subheading "Noweb prefix lines".
>
> Tests pass and don't require actualization.
> ---
>  doc/org.texi| 24 
>  lisp/ob-core.el | 26 +++---
>  2 files changed, 7 insertions(+), 43 deletions(-)
>

-- 
Eric Schulte
https://cs.unm.edu/~eschulte
PGP: 0x614CA05D



Re: [O] Help tangling

2014-04-03 Thread Eric Schulte
>>> and the ":tangle SConstruct"
>> 
>> yes
>> 
>> #+Property: tangle SConstruct
>> 
>
> Thanks for your feedback, Eric!  However, it doesn't seem to work properly.
>
> The first two lines of my file read
>
>#+OPTIONS: toc:4 h:4
>#+PROPERTY: tangle SConstruct
>
> and I have several code blocks like
>
>#+begin_src python
>[...]
>#+end_src
>
> However, when I invoke org-babel-tangle, I get the message "Tangled 0
> code blocks from SConstruct.org", and no output file is created.
>
> Have I misunderstood you?  What am I doing wrong?
>

You may have to C-c C-c on the property line so that it is re-read by
Emacs (which normally only happens when opening the file).

Best,

-- 
Eric Schulte
https://cs.unm.edu/~eschulte
PGP: 0x614CA05D



Re: [O] Generate a table of contents without exporting

2014-04-03 Thread RG Williams
Charles Berry  ucsd.edu> writes:

> #+NAME: Table_of_Contents
> #+BEGIN_SRC emacs-lisp :wrap example
>...
> #+END_SRC
>
> HTH,
> Chuck

Thank you, Charles! That works really well :)

RG





Re: [O] Creating changelog with magit

2014-04-03 Thread Richard Lawrence
Hi Thorsten,

Thorsten Jolitz  writes:

> i.e. magit does not detect which files/definitions have changed and already
> offers the template for all changes of the current diff to HEAD.
>
> Am I doing something wrong or is this all there is?

As far as I am aware, this is all there is...at least on the version of
magit I'm running (1.1.1, which is old, but it's the current version in
Debian stable).  Maybe newer magit does something more useful?  Or maybe
there is some configuration incantation to make the default behavior of
"C" more useful for elisp files?  If someone knows, I would also like to
hear...

Best,
Richard




[O] Does ELPA package work??

2014-04-03 Thread David Masterson
I've installed the complete Cygwin setup on my Windows 8.1 system.  This
included Emacs 24.3 with Org v7.9.3f.  I then used the Emacs package
system to install the latest version of Org (20140317 or 8.2.5h).
Everything seemed to go without a problem, but org-version still says
7.9.3f with nothing in my .emacs.  Is there something I need to do to
ensure that the new package is initialized?  I see that the new Org
package directory has been added to load-path.

-- 
David Masterson




[O] tangle call lines

2014-04-03 Thread Andreas Leha
Hi all,

how do I go about to tangle a subtree full of call lines into a specific
file?  Of course, tangling is not execution and call lines are meant for
execution, but in a scripting language (this is all about R code) the
two are not too different.

Basically, I would love to see the code, that gets executed by
'org-babel-execute-subtree' to be saved to a given file.

Simply setting an tangle-file for the subtree does not work [fn:1].
(Which is not surprising...) 

But I guess I could use some pre-exec-hook together with some fine lisp
code to append the expanded call line code to a given file could do the
trick.

I'd be grateful for any help here.

Regards,
Andreas


Footnotes:

[fn:1] A simple example:
--8<---cut here---start->8---
#+PROPERTY: tangle test.R

I'd like to 'tangle' the 'Do all' subtree calls.  

* Do all
  :PROPERTIES:
  :tangle:   do_all.R
  :END:
#+call: src_b()
#+call: src_a()
#+call: src_c()

* Source
#+name: src_a
#+begin_src R
  a <- 10
#+end_src

#+name: src_b
#+begin_src R
  b <- 100
#+end_src

#+name: scr_c
#+begin_src R
  plot(a, b)
#+end_src
--8<---cut here---end--->8---





[O] Mobileorg doesn't correctly import one .org file

2014-04-03 Thread Pere Quintana Seguí
Hi,

I recently bought an iPad and I wanted to try Mobileorg again.

My org-mode installation was already configured as I tried it last year
with my iPhone. So I lauched org-mobile-push on my computer and I synced
Mobileorg.

Everything looks fine except one file which is not correctly imported.
It is just partially imported, the last part is missing, and the level
of the last headlines is not correct.

The .org file looks correct on my computer.

What could be going on? I would prefer not to share the file, as it
contains private information.

Thanks,

Pere




[O] Prepare release 8.2.6

2014-04-03 Thread Bastien
Hi all,

I'll try to fix a few remaining bugs in maint this afternoon
then release 8.2.6 so that we can merge it into Emacs emacs-24
branch, the pretest is scheduled to happen as soon as possible.

If you have important bugs you want us to look at, now is the
time to point at them.

Thanks,

-- 
 Bastien




Re: [O] how to enter ==

2014-04-03 Thread Eric S Fraga

Ah, I see.  The easy solution is to use ~ instead of = in any code
segment, as in the attached example of yours that I have modified.

#+TITLE: Python for Unicode
#+OPTIONS: toc:nil
* Collections

However there is a catch: ~⦃1,2,3⦄ == ⦃1,2,3,1,2⦄~ \\
Remember that in python ~set([1,2,3,1,2]) == set([1,2,3])~ \\
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.3.1, Org release_8.2.5h-660-gef207f


Re: [O] How to get rid of clocktable summary time in the form "2d 02:00"

2014-04-03 Thread Buddy Butterfly

Anyone? Still have no clue

Am 01.04.2014 00:59, schrieb Buddy Butterfly:
> Am 31.03.2014 10:46, schrieb Sebastien Vauban:
>> Bastien wrote:
>>> Buddy Butterfly  writes:
>>>
 I would like to have the summary times in a clocktable be displayed
 only in hours, like 48:00 instead of 2d. Or, is it possible to
 define that 1d corresponds to 8:00 as a working day? So in the
 above example I would rather like to see 5d (workingdays) corresponding
 to 40:00. Clocktable counts 1d as 24h (which is right ;-) but not
 in business.
>>>
>>> See `org-time-clocksum-use-effort-durations' and
>>> `org-effort-durations' for a start.
>>
>> Eventually take a look at related posts:
>>
>> - Multiple notions for what's a day
>>   http://lists.gnu.org/archive/html/emacs-orgmode/2012-12/msg01093.html
>>
>> - Computations on efforts expressed in days
>>   http://lists.gnu.org/archive/html/emacs-orgmode/2012-05/msg00049.html
> 
> It looks like this links are describing exactly the same issue.
> But I still have no clue how to change it. I upgraded to Kubuntu 13.10
> from 12.10. This is where the change came in. Ubuntu 13.10 uses
> Emacs 24.3.1. Will it be fixed in a later version?
> 
>>
>> Best regards,
>>   Seb
>>
> 
> 
> 
> 





Re: [O] Generate a table of contents without exporting

2014-04-03 Thread RG Williams
Nick Dokos  gmail.com> writes:

> Another more manual way: export to text and cut-and-paste the TOC into
> a noexport top-level section.
> 
> Nick

Thank Nick! That's a great idea, haha. Not sure why that never occurred to me.

RG




Re: [O] Get counting of items

2014-04-03 Thread Richard Lawrence
Thorsten Jolitz  writes:

> #+begin_src emacs-lisp
>   (with-current-buffer "my.org"
> (eval (append (list '+)
>   (org-map-entries
>(lambda () (if (eq (org-outline-level) 1) 1 0))
> #+end_src

Or, slightly more simply:

#+begin_src emacs-lisp
(with-current-buffer "my.org"
(apply '+ (org-map-entries
   (lambda () (if (eq (org-outline-level) 1) 1 0)
#+end_src

which you could wrap into a function like:

#+begin_src emacs-lisp
(defun count-toplevel-headlines ()
  "Count the top level headlines in the current buffer"
  (interactive)
  (message
(format "Number of first level headlines: %s" 
  (save-excursion
(apply '+ (org-map-entries
   (lambda () (if (eq (org-outline-level) 1) 1 0
#+end_src

Best,
Richard


(If possible, please encrypt your reply to me using my PGP key:
Key ID: CF6FA646
Fingerprint: 9969 43E1 CF6F A646.
See http://www.ocf.berkeley.edu/~rwl/encryption.html for more information.)




Re: [O] A file with 'org-mode rot'?

2014-04-03 Thread Karl Voit
Hello Sharon!

* Sharon Kimble  wrote:
>
> Has '2014.org' got "org-mode rot", so many hidden commands of change of
> org-mode functionality still within its meta-post that it makes the whole f=
> ile
> difficult to work with? I know that org-mode files are just plain text
> formatted in a certain way that emacs recognises and then performs certain
> predestined actions on, but somehow this file is slowing down in its
> interactions with the rest of emacs.
>
> So how can I keep a file 'healthy' and working well over many months please?

I am facing "weird" things as well. Mainly performance drop when
doing (very) simple things like adding | in front of a table line,
changing to the next table column, marking tasks as DONE, archiving
tasks, and so on.

I have no idea how to debug those issues since the profiler-report
does not seem to look strange.

This is why I asked here for an Org-mode syntax checker a couple of
days ago. There does not seem to exist such a thing.

I am afraid, that I have to do the painful task of commenting out
separate sections of my Org-mode configuration (2000 lines) and
check whether or not the behavior changes.

-- 
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] BBDB and Org

2014-04-03 Thread Charles Philip Chan
Charles Philip Chan  writes:

> %%(org-bbdb-anniversaries)

Sorry this should be:

,
| * Anniversaries|
| :PROPERTIES:   |
| :CATEGORY: Anniv   |
| :END:  |
| %%(org-bbdb-anniversaries) |
||
`

Charles

-- 
"I once witnessed a long-winded, month-long flamewar over the use of
mice vs. trackballs...It was very silly."
(By Matt Welsh)


signature.asc
Description: PGP signature


Re: [O] Using Emacs Org-mode on a server with ssh on an iPad

2014-04-03 Thread Peter Davis
On Wed, Apr 02, 2014 at 03:10:28PM +0200, Pere Quintana Seguí wrote:
> As I mentioned in a previous message, I recently bought an iPad.
> 
> I'm considering the possibility to not use Mobileorg and use Emacs on a
> server (Digital Ocean) with an ssh client and a bluetooth keyboard.
> 
> Is anyone using Emacs and org-mode this way regularly? Which ssh client
> are you using? Which bluetooth keyboard?
> 

When I had an iPad, I used iSSH and a Logitech Ultrathin Keyboard/Cover. That 
seemed to be a pretty successful combination, though there are other apps out 
there.


-pd


-- 

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com



Re: [O] Add TODO from external app?

2014-04-03 Thread Jeff Kowalski
I use org-etml to serve pages from within emacs and use a custom capture 
handler, like this:


(defun jeff/capture-handler (request)
  "Handle REQUEST objects meant for 'org-capture'.
GET header should contain a path in form '/capture/KEY/LINK/TITLE/BODY'."
  (with-slots (process headers) request
(let ((path (cdr (assoc :GET headers
  (if (string-match "/capture:?/\\(.*\\)" path)
  (progn
(org-protocol-capture (match-string 1 path))
(ws-response-header process 200))
(ws-send-404 process)

(setq jeff/org-ehtml-handler
  '(((:GET  . "/capture") . jeff/capture-handler)
((:GET  . ".*") . org-ehtml-file-handler)
((:POST . ".*") . org-ehtml-edit-handler)))

(when t
  (mapc (lambda (server)
  (if (=  (port server))
  (ws-stop server)))
ws-servers)
  (ws-start jeff/org-ehtml-handler ))


And the relevant org-capture looks like


("b" "entry.html" entry (file+headline (concat org-directory "toodledo.org") 
"TASKS")
   "* TODO [#C] %:description\nSCHEDULED: %t\n%:initial\n"
   :immediate-finish t)



Then, I post from a hosted form served as entry.html via org-ehtml, like 
this:

###



Org Entry



  
input[type=text] {
-webkit-appearance: none; -moz-appearance: none;
display: block;
margin: 0;
width: 100%; height: 40px;
line-height: 40px; font-size: 17px;
border: 1px solid #bbb;
}
input[type=submit],select {
-webkit-appearance: none; -moz-appearance: none;
display: block;
margin: 0;
height: 40px;
line-height: 40px; font-size: 17px;
border: 1px solid #bbb;
}
  

  http://code.jquery.com/jquery-1.10.2.min.js";>

  



  @agendas
  @calls  
  @errands
  @home   
  @quicken
  @view   
  @waiting
  @work   



  
  

  
$("#target").submit (function (event) {
event.preventDefault();

var link  = encodeURIComponent("LINK");
var title = encodeURIComponent($("#title").val() + "  :" + 
$("#context").val() + ":");
var body  = encodeURIComponent("");
var xurl   = "/capture/b" + "/" + link + "/" + title + "/" + body;

$.ajax({
url: xurl
}).success(function() {
$("span").text("captured "+xurl).show().fadeOut(1000);
$("#title").val("");
$("#context").val("@agendas");
}).fail(function(jqXHR, textStatus) {
$("span").text("failed " + xurl + "
" + textStatus).show(); //.fadeOut(1000); }); }); Forwarding ports from my machine running org-ehtml on emacs means I can access the page anywhere to add new tasks even from my cell phone. You could easily call this emacs-webservice from a PHP page, but it's just as easy to simply serve the page from emacs itself. Take a look at org- ehtml and the companion webserver that Schulte wrote.

Re: [O] Using Emacs Org-mode on a server with ssh on an iPad

2014-04-03 Thread Ken Mankoff

If you jailbreak the iPad, you can run a full emacs on the iPad
locally. http://gamma-level.com/iphoneos/ports/emacs 

  -k.

On 2014-04-02 at 09:10, Pere Quintana Seguí wrote:
> As I mentioned in a previous message, I recently bought an iPad.
>
> I'm considering the possibility to not use Mobileorg and use Emacs on a
> server (Digital Ocean) with an ssh client and a bluetooth keyboard.
>
> Is anyone using Emacs and org-mode this way regularly? Which ssh client
> are you using? Which bluetooth keyboard?
>
> Thanks
>
> Pere




Re: [O] BBDB and Org

2014-04-03 Thread Charles Philip Chan
Aric Gregson  writes:

Hi Aric:

I have no problems with bbdb (using 3 now, but 2 before) and org-mode.

> I am just wondering if there is a way to get org mode to stop playing
> with bbdb. Because I use both gnus and org, it is a bit of a hassle to
> have org always pulling bbdb away from gnus when I create an agenda.

I have no idea what you are talking about here. Please give an example.

> I don't use anniversary any longer (could not get it to work properly
> with version 3 of bbdb, despite some help from the list) and really
> don't see why org needs it.

To display it in a Agenda view. Again I have no problems have. All I
have to do is to put:

 %%(org-bbdb-anniversaries)

In one of my agenda files.

Charles

-- 
linux: because a PC is a terrible thing to waste
(k...@cis.ufl.edu put this on Tshirts in '93)


signature.asc
Description: PGP signature


[O] So many reading on gmane?

2014-04-03 Thread Rainer M Krug
This seems very strange - but it is the fact that gmane seems to be not
available the reason why this list is so quiet today

Rainer

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

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

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

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

email:  rai...@krugs.de

Skype:  RMkrug

PGP: 0x0F52F982


smime.p7s
Description: S/MIME cryptographic signature


[O] Using Emacs Org-mode on a server with ssh on an iPad

2014-04-03 Thread Pere Quintana Seguí
As I mentioned in a previous message, I recently bought an iPad.

I'm considering the possibility to not use Mobileorg and use Emacs on a
server (Digital Ocean) with an ssh client and a bluetooth keyboard.

Is anyone using Emacs and org-mode this way regularly? Which ssh client
are you using? Which bluetooth keyboard?

Thanks

Pere




[O] BBDB and Org

2014-04-03 Thread Aric Gregson
Hello,

I am just wondering if there is a way to get org mode to stop playing
with bbdb. Because I use both gnus and org, it is a bit of a hassle to
have org always pulling bbdb away from gnus when I create an agenda. I
have taken out all reference to bbdb and org in my start-up files. I
don't use anniversary any longer (could not get it to work properly with
version 3 of bbdb, despite some help from the list) and really don't see
why org needs it. Any idea of how to turn it off? 

Thanks, Aric

-- 
~O
/\_,
###-\  |_
(*) / (*)




Re: [O] org-export-format-source-code-or-example: End of Buffer

2014-04-03 Thread Mishal Awadah
Hi Bastien, 

I added the sample code that generates the error for me on 
http://stackoverflow.com/questions/22565379/emacs-org-mode-python-source-blocks-dont-export-with-python-mode-el

Thanks for your help

- Mish

On Mar 21, 2014, at 5:14 PM, Bastien  wrote:

> Hi Mishal,
> 
> Mishal Awadah  writes:
> 
>> I’m having a problem with org-mode source blocks in python when
>> python-mode.el is enabled for python-mode instead of python.el.
>> 
>> I detailed my problem here: http://stackoverflow.com/questions/
>> 22565379/
>> emacs-org-mode-python-source-blocks-dont-export-with-python-mode-el
>> 
>> and it looks like there is some history with a now non-existant
>> function org-html-do-format-code here:  http://lists.gnu.org/archive/
>> html/emacs-orgmode/2014-03/msg01018.html
> 
> Be reassured, `org-html-do-format-code' still exists!
> 
> I can't reproduce the problem: I installed python-mode.el from
> launchpad and tried to export a file containing some python code
> to HTML, it exports well.  Can you share a minimal example?
> 
> Thanks,
> 
> -- 
> Bastien




[O] using org-babel-trim in org-sbe?

2014-04-03 Thread Alan Schmitt
Hello,

I noticed a call to org-sbe failed because there were some extra spaces
present in one argument. I tried to clean them up before calling the
code block, but instead I'm getting literally what I'm writing. Here is
an example:

--8<---cut here---start->8---
#+name: spending
#+begin_src sh :var c="bar" :results output
echo "res:$c:"
#+end_src

| Name | Test1   | Test2|
|--+-+--|
| Food | res: Food : | res: (org-babel-trim Food) : |
#+TBLFM: $2='(org-sbe spending (c (concat "\"" $1 "\"")))::$3='(org-sbe 
spending (c (concat "\"" (org-babel-trim $1) "\"")))
--8<---cut here---end--->8---

The Test1 column shows the extra space, and the Test2 column my attempt
to clean things up.

I suppose this behavior is due to the fact that org-sbe is a macro, but
I don't know how tell it to evaluate its arguments and not pass them
literally.

Any suggestion on how to proceed?

Thanks,

Alan



Re: [O] Prepare release 8.2.6

2014-04-03 Thread Rainer M Krug
Bastien  writes:

> Hi all,
>
> I'll spend a few hours this afternoon chasing the last
> bugs in maint for Org 8.2.6.  This release will then be
> merged into the emacs-24 branch, which first pretest is
> to be released very soon now.
>
> If you have outstanding bugs, please point at them.
>
> As usual, thanks in advance for your help,
>
> PS: gmane.org seems to be down since April, 1st, so I
> could not follow the discussions since that time.


I don't know if this effects the release of 8.2.6, but I have a bug
which I would consider as serious. Using the following as the org file,
results in the error in R during export to latex / pdf:

--8<---cut here---start->8---
#+TITLE: single_to_multi
#+DATE: <2013-10-15 Tue>
#+AUTHOR: Rainer M. Krug
#+EMAIL: rai...@krugs.de


#+PROPERTY: session *R_MOBILIS*

* R functions
:PROPERTIES:
:eval:  never
:END:
Some function definitions and setting up of the compouting
environment.  The functions are in the ~./R/~ folder, while the data
has been stored in the ~./data/~ folder as an ~.rda~ file.
These can be put into a package later.
** Data IO Functions
Some functions to for interaction with SQLite database.
*** IFN data
 Load spatial forest inventory data
* Data Assessment Results
** IFN
*** Load spatial forest inventory data
#+begin_src R :results output
IFN.raw <- "Here it is"
#+end_src

*** Maps
 Raw point data
The data from the raw points is plotted as maps.
#+begin_src R  :results output
cat(IFN.raw)
#+end_src

* Versions:
- org :: Org-mode version 8.2.5h (release_8.2.5h-879-g23e62f @ 
/Users/rainerkrug/.emacs.d/org-mode/lisp/)
- 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
--8<---cut here---end--->8---

The error is:

,
| > cat(IFN.raw)
| 'org_babel_R_eoe'
| Error in cat(IFN.raw) : object 'IFN.raw' not found
| > [1] "org_babel_R_eoe"
| > 
`

In other words, the second code block is evaluated, but the second one
not.

If I remove the :evel: property *in the previous* tree, it works as
expected. But in the main document, I have code in there which I do not
want to have evaluated. 

This has been introduced within the previous week, if I am not mistaken.

Cheers,

Rainer

-- 
Rainer M. Krug

PGP: 0x0F52F982


smime.p7s
Description: S/MIME cryptographic signature


Re: [O] Prepare release 8.2.6

2014-04-03 Thread KDr2
Hi Bastien,

I sent a mail "[PATCH] ob-scheme.el: Fix scheme code blocks execution error
in batch mode" to the list yesterday, but I don't see it at
http://news.gmane.org/gmane.emacs.orgmode, so here I sent it to you again:

The bug:
write file ~/scheme-test.org with the content below:
---8<--
#+BEGIN_SRC scheme :exports results :results output raw
  (display "Hello Scheme in OrgMode")
#+END_SRC
---8<--

and run:

emacs --batch --eval='(load "~/.emacs.d/init.el")' ~/scheme-test.org -f
org-html-export-to-html

you will find the bug:

`org-babel-scheme-execute-with-geiser' uses `current-message' to get the
results of scheme code blocks, but `current-message' always returns nil in
batch mode, and the attached patch fixes this.

Please consider to apply it, thanks.


On Thu, Apr 3, 2014 at 3:53 PM, Bastien  wrote:

> Hi all,
>
> I'll spend a few hours this afternoon chasing the last
> bugs in maint for Org 8.2.6.  This release will then be
> merged into the emacs-24 branch, which first pretest is
> to be released very soon now.
>
> If you have outstanding bugs, please point at them.
>
> As usual, thanks in advance for your help,
>
> PS: gmane.org seems to be down since April, 1st, so I
> could not follow the discussions since that time.
>
> --
>  Bastien
>
>


-- 
-- 

KDr2, http://kdr2.com
From cebf9fc4fe09ab22fd31ff8e5606d0f680c121e9 Mon Sep 17 00:00:00 2001
From: KDr2 
Date: Wed, 2 Apr 2014 10:30:38 +0800
Subject: [PATCH] ob-scheme.el: Fix scheme code blocks execution error in batch
 mode

* lisp/ob-scheme.el (org-babel-scheme-capture-current-message, org-babel-scheme-execute-with-geiser): Capture scheme code results via current-message both in interactive mode and noninteractive mode.

`org-babel-scheme-execute-with-geiser' uses `current-message' to get the results of scheme code blocks, but `current-message' always returns nil in batch mode, and this patch fixes this.

Modified from a patch proposal by KDr2
---
 lisp/ob-scheme.el | 18 +++---
 1 file changed, 15 insertions(+), 3 deletions(-)

diff --git a/lisp/ob-scheme.el b/lisp/ob-scheme.el
index b7117e9..3b7ceb2 100644
--- a/lisp/ob-scheme.el
+++ b/lisp/ob-scheme.el
@@ -118,6 +118,17 @@ org-babel-scheme-execute-with-geiser will use a temporary session."
 	   (name
 result))
 
+(defmacro org-babel-scheme-capture-current-message (&rest body)
+  "Capture current message in both interactive and noninteractive mode"
+  `(if noninteractive
+   (let ((current-message nil))
+ (flet ((message (fmt &rest args) (setq current-message (apply #'format fmt args
+   ,@body
+   current-message))
+ (progn
+   ,@body
+   (current-message
+
 (defun org-babel-scheme-execute-with-geiser (code output impl repl)
   "Execute code in specified REPL. If the REPL doesn't exist, create it
 using the given scheme implementation.
@@ -142,10 +153,11 @@ is true; otherwise returns the last value."
 			 (current-buffer)
 	(setq geiser-repl--repl repl-buffer)
 	(setq geiser-impl--implementation nil)
-	(geiser-eval-region (point-min) (point-max))
+	(setq result (org-babel-scheme-capture-current-message
+		  (geiser-eval-region (point-min) (point-max
 	(setq result
-	  (if (equal (substring (current-message) 0 3) "=> ")
-		  (replace-regexp-in-string "^=> " "" (current-message))
+	  (if (and (stringp result) (equal (substring result 0 3) "=> "))
+		  (replace-regexp-in-string "^=> " "" result)
 		"\"An error occurred.\""))
 	(when (not repl)
 	  (save-current-buffer (set-buffer repl-buffer)
-- 
1.9.1



Re: [O] Prepare release 8.2.6

2014-04-03 Thread Alan Schmitt
Hi Bastien,

Bastien  writes:

> Hi all,
>
> I'll spend a few hours this afternoon chasing the last
> bugs in maint for Org 8.2.6.  This release will then be
> merged into the emacs-24 branch, which first pretest is
> to be released very soon now.
>
> If you have outstanding bugs, please point at them.

I don't know if this qualifies as a bug, but I have not been able to get
around this: http://article.gmane.org/gmane.emacs.orgmode/84472

I just checked out out the maint branch, and I see the same problematic
behavior as I get with ELPA. Things work correctly in the master branch.

Alan



Re: [O] Get counting of items

2014-04-03 Thread Martin Gross
Dear Thorsten

> Here is a generalised form:
>
> #+begin_src emacs-lisp
>   (defun count-org-items (&optional level operator match scope skip)
> "Print a counting of outline items."
> (interactive)
> (let ((headline-level (or level 1)) ; 1-8
>   (op (or operator '=))) ; '>= '<= '> '<
> (save-excursion
>   (message "Counting of level%s%d outline items (match=%s, scope=%s, 
> skip=%s): %d"
>op headline-level match scope skip
>(eval (append (list '+)
>  (org-map-entries
>   `(lambda () (if (,op (org-outline-level) 
> ,headline-level) 1 0))
>   match scope skip)))
> #+end_src
>
> usage:
>
> ,
> | (count-org-items 2 '<= "WAITING" 'file)
> `
>
> result:
>
> ,--
> | "Counting of level<=2 outline items (match=WAITING, scope=file, skip=nil): 
> 3"
> `--
>
> see C-h v org-map-entries for more info, its very powerfull. Use it
> with M-: (count-org-items ...) or write a more sophisticated
> (interactive) spec.
>

Very impressive. Thank you very much!

Martin



[O] Prepare release 8.2.6

2014-04-03 Thread Bastien
Hi all,

I'll spend a few hours this afternoon chasing the last
bugs in maint for Org 8.2.6.  This release will then be
merged into the emacs-24 branch, which first pretest is
to be released very soon now.

If you have outstanding bugs, please point at them.

As usual, thanks in advance for your help,

PS: gmane.org seems to be down since April, 1st, so I
could not follow the discussions since that time.

-- 
 Bastien