Re: [Orgmode] [OT] recutils

2010-12-03 Thread Michael Brand
On Fri, Dec 3, 2010 at 22:16, Jose E. Marchesi  wrote:
> I apologize in advance for the off-topic, but this could be of interest
> to people liking to "organize their life" in plain text.  This is about
> "storing your data" in plain text :D
>
> I just made the first release of the GNU recutils, a set of tools and
> libraries to access human-editable, text-based databases called
> recfiles.  The data is stored as a sequence of records, each record
> containing an arbitrary number of named fields.  Advanced capabilities
> usually found in other data storage systems are supported by GNU
> recutils: data types, data integrity (keys, mandatory fields, etc) as
> well as the ability of records to refer to other records (sort of
> foreign keys).  Despite its simplicity, recfiles can be used to store
> medium-sized databases.
>
> I have been using org-mode for years and it rocks.  In some way it
> changed my life.  It is perfect to store all kind of hierarchical data.
> At some point I though about applying a similar philosophy to
> "sequential" repetitive data with relationships.  Data that we would
> store in a relational database.  A nice complement to org.  The recutils
> are the result of those thoughts.
>
> I would highly appreciate any comment or suggestion on improving the
> format, the utilities, or whatever.

Hi Jose

Wow! The ability to have a _relational_ database with foreign keys in
a simple text file is so great news for me. A dream I had for many
years now. Or is it lack of knowledge from my side about already
existing solutions before recutils? Thank you a lot for your work,
sharing it to the community, posting it also on this list here and for
asking for suggestions which I would like to give at the end.

I was thinking about using sqlite from the command line and together
with shell scripts for stuff like my collection of music with
recordings, MIDI files, scores and so on. Because at least for me
editing a text file is by far simpler, more interactive and more
convenient than editing with SQL I will prefer recutils over sqlite.

But since recfiles, the text files of recutils, are not hierarchically
organized I am still considering to use only Org for the case of my
collection of music. Org would have the advantages of outlining,
hyperlinks, column view, todo, tags, agenda view, export for
publishing and many others.

Thus my wish for the file format would be to somehow keep in mind Org
to potentially
- convert the files bidirectionally between the format of recfiles and
  Org, with or without something like "literate programming" of
  org-babel
- use recutils as a language extension to org-babel, recutils reading
  data streamed to its stdin from org-babel and piping back to into
  org-babel result (no writing by recutils to the file)
- as an imagination: run recutils on a file in the format of Org, only
  reading or even read/write.

I will follow up with an example of what I plan to do for my
collection of music, the database table relations squeezed
hierarchically into Org as a first attempt.

Michael

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] exporting as latex sections

2010-12-03 Thread suvayu ali
Hi org-mode users,

I have been collaborating on a big (many contributors) paper. For all
my various contributions to the paper I need to provide the latex
source as a section of a latex document. Is there some way I can
export to latex without all the preamble and header information from
the org-mode file? Or just exporting to latex and manually removing
all that is the only way to do it?

While we are at it if I were to attempt to write my own version of
latex export function which does this instead, where should I be
looking? I'm not very good at lisp, so some suggestions would be
really helpful if I need to take this route.

Thanks for any help/suggestions.

-- 
Suvayu

Open source is the future. It sets us free.

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Excluding DONE todo items from the agenda

2010-12-03 Thread Memnon Anon
Hi Robert, 

Robert Pluim  writes:

> is there a way to not show TODO items that are DONE in the agenda view
> ('C-aa') by default? It seems I have them showing up because they have a
> deadline, but when they're done, that doesn't matter anymore :)

,
|  org-agenda-skip-deadline-if-done t
|  org-agenda-skip-scheduled-if-done t
`

Does this help?

- Memnon



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] specifying priority with template expansion

2010-12-03 Thread David A. Thompson

On 12/03/2010 12:40 PM, Jeff Horn wrote:

Can you give us a better idea of the use case? As I understand,
unprioritzed todos count as "B" by default. Since most of my tasks
have a priority of B, I've never found setting priorities to be
helpful until I sit down to review my work for the day.

I prioritize items that are important (or urgent) with A at the
beginning of the day (no more than a couple, usually). Most items are
"B" and rarely more than half of those get done.

If I want to "sink" an item but keep it scheduled, it gets a priority of "C".


Most of my todos are neither associated with deadlines nor are they 
scheduled. Schedules and deadlines have seemed a more time-intensive way 
to go relative to setting priorities (but perhaps this is a 'Green Eggs 
and Ham' thing?)



These are often things I do not know when recording an item.


I guess the main difference is that I generally am typically able to 
recognize, when recording a todo, whether it's in the 'urgent/asap' pile 
(A), the 'try-and-get-it-done-sometime-soon' pile (B), or in a 
'sure-would-be-nice-to-get-it-done' pile (C). Given that, it seemed both 
logical and more efficient to immediately prioritize the item rather 
than going back later and prioritizing the item.


Thanks for any additional thoughts/suggestions...

- Alan





___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: org-indent mode not indenting free text?

2010-12-03 Thread Carsten Dominik

Hi Erik,

thank you for your persistence, and sorry that I have
not been taking the time to explain myself clearly, in
this way I have made this thread unnecessarily long.

OK, lets look at exhibit 1:

   ((and org-indent-mode
 (not (org-version-check "23.1.50" "Org Indent  
mode" :predicate)))
 (message "org-indent-mode can crash Emacs 23.1 - refusing to  
turn it on!")


This test is run when someone tries to turn
on org-indent mode.  If this is not Emacs 23.1.50 or later, org-indent
mode will not be turned on, and none of the remaining code in
org-indent.el will actually run, because the mode is never turned on.

Now, exhibit 2:

(if (and (not (fboundp 'with-silent-modifications))
 (or (< emacs-major-version 23)
 (and (= emacs-major-version 23)
  (< emacs-minor-version 2
(defmacro with-silent-modifications (&rest body)
  `(org-unmodified ,@body)))

This is code to supply a replacement macro in Emacsen where
`with-silent-modifications' was not defined.  The idea was that
maybe there are a few minor versions of Emacs where this
macro is not defined, and where org-indent-mode might still
be able to work.  Since I did not know
exactly when the macro was introduced, I put in some
version test which I now see is not very useful at all.

Is there anyone here who has Emacs 23.1.50 currently running?
Can you tell me if with-silent-modifications is defined in
"emacs -q" [1]?  If that is the case, then we can remove the
entire top-level form.

I hope I am making a bit more sense now.

Thanks



On Dec 3, 2010, at 10:21 PM, Erik Iverson wrote:




Carsten Dominik wrote:

Hi Erik,
On Dec 3, 2010, at 5:18 PM, Erik Iverson wrote:

Just a guess here: This may be some weirdness
because the check in org-indent *will* allow
people using GNU Emacs 23.1.50 to turn on
org-indent, as far as I can tell.

org-indent-mode should work in 23.1.50, this is the
release where the fix was made.


The message "org-indent-mode can crash Emacs 23.1"
does not fully explain if it can also crash 23.1.50.

Yes, may be this is not so clear.  The current setup forbids it
before 23.1.50, and allows it from 23.1.50.  At least that is
what I meant.  Is there a bug?


No, I did not realize that this is what was indeed meant.
More below...




Could you back out the change
(most likely the defmacro for with-silent-modifications in org- 
macs.el,
even though I have no clue why this would interact with org- 
indent-mode
as it should not be defined for versions >23.1) and tell us if  
that
solves your problem (which I can't test because org-indent-mode  
doesn't

even start on Emacs 23.1)?

Yes it does! I commented out:
;;(if (or (< emacs-major-version 23)
;;(and (<= emacs-major-version 23)
;; (< emacs-minor-version 2)))
;;(defmacro with-silent-modifications
;;  (org-unmodified)))
and it now works correctly. Thanks a lot!

I have now changed the definition like this:
(if (and (not (fboundp 'with-silent-modifications))
(or (< emacs-major-version 23)
(and (= emacs-major-version 23)
 (< emacs-minor-version 2
   (defmacro with-silent-modifications (&rest body)
 `(org-unmodified ,@body)))


I must admit I don't understand the above macro,
but what I was getting at before was:

It only appears defined for Emacs < 23.2,
So in particular, 23.1.50 is 'stuck' in
between these two version checks, and maybe
that's causing Antti's issue?


May I ask you to pull and check if this is
working for you out of the box?


Works for me fine on Emacs 23.2, we will see
if it does for Antti also.





___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Older versions

2010-12-03 Thread David Dyer-Bennet

On Fri, December 3, 2010 13:48, Puneeth wrote:
> On Sat, Dec 4, 2010 at 1:07 AM, David Dyer-Bennet  wrote:
>> The only org-mode distributions I can find on the website say they don't
>> work with the versions of emacs I have available.
>>
>> Our latest servers are running with CentOS 5.5 (same as Redhat
>> Enterprise
>> 5.5), which has emacs 21.4.1. Â Many of our older servers are running
>> CentOS 4.7 or so.
>>
>> How badly does org-mode 7.3 not work with emacs 21.4? Â And/or where can
>> I
>> find older versions, with info on which emacs they work with?
>
> I'm not sure where you can find this, but as this page [1] says,
> support for emacs has been dropped from Orgmode 7.x only. Use 6.36c
> instead. A link to it, is provided in that page.
>
> [1] -- http://orgmode.org/Changes.html#sec-2_1_1

Given the two URLs, I have now deduced the pattern for downloading
older distributions :-) .  I still can't see a list of what's
available, but the ones mentioned publicly that I've tried have all
existed.  (It's just the obvious:
http://orgmode.org/org-.tar.gz )

Thanks for finding the confirmation that 6.36c is supposed to work
with Emacs 21.

Unfortunately it doesn't.  I've gotten failures on two missing files
so far, sha1.el and hex-utils.el.  I brought those over from a 23
distribution, they don't seem to have anything that won't work in 21.

So now I'm getting:

emacs -batch -q -no-site-file -eval "(setq load-path (cons
(expand-file-name \"./lisp/\\
") (cons \"/usr/local/share/emacs/site-lisp\" load-path)))" -f
batch-byte-compile lisp/\
org-freemind.el
Loading /usr/libexec/emacs/21.4/x86_64-redhat-linux-gnu/fns-21.4.1-x.el
(source)...
While compiling toplevel forms in file
/nfshome/ddb/org-6.36c/lisp/org-freemind.el:
  !! error (("Invalid escape character syntax"))
Done
make: *** [lisp/org-freemind.elc] Error 1

Examining org-freemind.el doesn't show me anything obvious.  Trying to
byte-compile within emacs gives me a completely unrelated error:

Compiling file /nfshome/ddb/org-6.36c/lisp/org-freemind.el at Fri Dec  3
16:11:57 2010
  !! File error (("Cannot open load file" "org"))

(This seems to be load-path related, and I think just changing my load-path
will fix this, and then MAYBE I'll see what the error in
org-freemind.el is perhaps, I dunno.)

Anyway, no, 6.36c certainly doesn't work with emacs 21.4.1 as
installed by Centos 5.5 (emacs-21.4-20.el5, to be precise).
-- 
David Dyer-Bennet, d...@dd-b.net; http://dd-b.net/
Snapshots: http://dd-b.net/dd-b/SnapshotAlbum/data/
Photos: http://dd-b.net/photography/gallery/
Dragaera: http://dragaera.info



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] [OT] recutils

2010-12-03 Thread Jose E. Marchesi

Hi.

I apologize in advance for the off-topic, but this could be of interest
to people liking to "organize their life" in plain text.  This is about
"storing your data" in plain text :D

I just made the first release of the GNU recutils, a set of tools and
libraries to access human-editable, text-based databases called
recfiles.  The data is stored as a sequence of records, each record
containing an arbitrary number of named fields.  Advanced capabilities
usually found in other data storage systems are supported by GNU
recutils: data types, data integrity (keys, mandatory fields, etc) as
well as the ability of records to refer to other records (sort of
foreign keys).  Despite its simplicity, recfiles can be used to store
medium-sized databases.

I have been using org-mode for years and it rocks.  In some way it
changed my life.  It is perfect to store all kind of hierarchical data.
At some point I though about applying a similar philosophy to
"sequential" repetitive data with relationships.  Data that we would
store in a relational database.  A nice complement to org.  The recutils
are the result of those thoughts.

I would highly appreciate any comment or suggestion on improving the
format, the utilities, or whatever.

Please see the GNU recutils homepage for more information:
http://www.gnu.org/software/recutils (due to the crack of savannah the
webpages replication facility is not yet working, so the page there is
old and does not reflect the release).  The tarball can be downloaded
from ftp://ftp.gnu.org/gnu/recutils/recutils-1.0.tar.gz

The GNU recutils suite comprises:

- A texinfo manual, describing the Rec format and the accompaying
  software.

- A C library (librec) that provides a rich set of functions to
  manipulate rec data.

- A set of C utilities that can be used in shell scripts and in the
  command line to operate on rec files:

  + `recinf' prints information about the contents of recfiles.
  + `recsel' prints records and field values.
  + `recins' adds new records to a recfile.
  + `recdel' deletes records.
  + `recset' manipulates fields.
  + `recfix' checks and fixes recfiles.
  + `csv2rec' converts comma-separated-values files to recfiles.
  + `mdb2rec' converts mdb files (used by MS-Access) to recfiles.

- rec-mode.el - An emacs mode to edit and navigate recfiles.  Still
  experimental and without a manual.

Whatever... sorry for the spam! XD

-- 
Jose E. Marchesijema...@gnu.org
GNU Project http://www.gnu.org

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: org-indent mode not indenting free text?

2010-12-03 Thread Erik Iverson



Carsten Dominik wrote:

Hi Erik,

On Dec 3, 2010, at 5:18 PM, Erik Iverson wrote:


Just a guess here: This may be some weirdness
because the check in org-indent *will* allow
people using GNU Emacs 23.1.50 to turn on
org-indent, as far as I can tell.


org-indent-mode should work in 23.1.50, this is the
release where the fix was made.



The message "org-indent-mode can crash Emacs 23.1"
does not fully explain if it can also crash 23.1.50.


Yes, may be this is not so clear.  The current setup forbids it
before 23.1.50, and allows it from 23.1.50.  At least that is
what I meant.  Is there a bug?


No, I did not realize that this is what was indeed meant.
More below...




Could you back out the change
(most likely the defmacro for with-silent-modifications in org-macs.el,
even though I have no clue why this would interact with org-indent-mode
as it should not be defined for versions >23.1) and tell us if that
solves your problem (which I can't test because org-indent-mode doesn't
even start on Emacs 23.1)?

Yes it does! I commented out:
;;(if (or (< emacs-major-version 23)
;;(and (<= emacs-major-version 23)
;; (< emacs-minor-version 2)))
;;(defmacro with-silent-modifications
;;  (org-unmodified)))
and it now works correctly. Thanks a lot!



I have now changed the definition like this:

(if (and (not (fboundp 'with-silent-modifications))
 (or (< emacs-major-version 23)
 (and (= emacs-major-version 23)
  (< emacs-minor-version 2
(defmacro with-silent-modifications (&rest body)
  `(org-unmodified ,@body)))


I must admit I don't understand the above macro,
but what I was getting at before was:

It only appears defined for Emacs < 23.2,
So in particular, 23.1.50 is 'stuck' in
between these two version checks, and maybe
that's causing Antti's issue?


May I ask you to pull and check if this is
working for you out of the box?


Works for me fine on Emacs 23.2, we will see
if it does for Antti also.



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] MobileOrg and Voice Capturing (Android)

2010-12-03 Thread Mark Elston

Arghh!

Never mind.  I didn't read Matthew's announcement well enough.

If anyone is interested a script to do this is:


# Capture.py
import android
droid = android.Android()

resStr = droid.recoggnizeSpeech().result

droid.startActivity("com.matburt.mobileorg.CAPTURE",
None,
None,
{'txtValue' : resStr})



Of course, it could be made fancier by not bringing up
the Activity if the string is empty, etc

Thanks again, Matt.  Great work.

Mark

On 12/3/2010 12:51 PM, Mark Elston wrote:

Sven,

I have tried this according to what you suggested earlier
but haven't had any luck yet. My script is:

# Capture.py
import android
droid = android.Android()
droid.setClipboard(droid.recoggnizeSpeech().result)
droid.startActivity("com.matburt.mobileorg.Capture")

When I run this the voice capture dialog comes up and
the script exits without an exception but the Capture
activity doesn't come up and nothing is added to the
MobileOrg data. What do you have that is different?

Mark

On 12/3/2010 5:45 AM, Sven Bretfeld wrote:

Hi Matthew

Matthew Jones writes:


Alright guys, I've gotten this to work I've posted an early build of
MobileOrg that supports this here:

http://matburt.net/files/mobileorg-debug.apk


Thank you very much for your wonderful work. It works like a charm. I
have tested it over ten times now, and it seems to be completely stable.
I will do some further testing during the weekend and also try to create
some tasker profiles with it. My ten year old son sits next to me and
suggests some ideas for you to become a millionaire :-)

Thanks again and have a nice weekend

Sven




___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode




___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: org-indent mode not indenting free text?

2010-12-03 Thread Achim Gratz
Carsten Dominik  writes:
> I have now changed the definition like this:
>
> (if (and (not (fboundp 'with-silent-modifications))
>(or (< emacs-major-version 23)
>(and (= emacs-major-version 23)
> (< emacs-minor-version 2
> (defmacro with-silent-modifications (&rest body)
>   `(org-unmodified ,@body)))
>
> May I ask you to pull and check if this is
> working for you out of the box?

Beat me to it... :-)

My own solution looked very similar, I can confirm this works with Emacs
23.1.1 (without org-indent-mode of course).


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

SD adaptation for Waldorf rackAttack V1.04R1:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] placement of \title, \author,...

2010-12-03 Thread Carsten Dominik

Applied, thanks.

- Carsten

On Nov 28, 2010, at 8:11 PM, Sebastian Hofer wrote:


Hi,

would it be possible to move the \title, \author, \date commands to  
after \begin{document}?
This may sound like a stupid suggestion, but some classes (in  
particular revtex - the standard class for journals of the american  
physical society) throw errors otherwise. A possible patch is  
attached. I tested the modification for the standard classes  
(article, report, book and beamer) and they all work fine.

I'm wondering if Carsten never experienced this problem...

TIA
Sebastian

diff --git a/lisp/org-latex.el b/lisp/org-latex.el
index 91bf380..e58c11d 100644
--- a/lisp/org-latex.el
+++ b/lisp/org-latex.el
@@ -1281,6 +1281,8 @@ OPT-PLIST is the options plist for current  
buffer."
 (org-export-apply-macros-in-string org-export-latex-append- 
header)

 ;; define alert if not yet defined
 "\n\\providecommand{\\alert}[1]{\\textbf{#1}}"
+ ;; beginning of the document
+ "\n\\begin{document}\n\n"
 ;; insert the title
 (format
  "\n\n\\title{%s}\n"
@@ -1297,8 +1299,6 @@ OPT-PLIST is the options plist for current  
buffer."

(format-time-string
 (or (plist-get opt-plist :date)
 org-export-latex-date-format)))
- ;; beginning of the document
- "\n\\begin{document}\n\n"
 ;; insert the title command
 (when (string-match "\\S-" title)
   (if (string-match "%s" org-export-latex-title-command)


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: org-indent mode not indenting free text?

2010-12-03 Thread Carsten Dominik

Hi Erik,

On Dec 3, 2010, at 5:18 PM, Erik Iverson wrote:


Just a guess here: This may be some weirdness
because the check in org-indent *will* allow
people using GNU Emacs 23.1.50 to turn on
org-indent, as far as I can tell.


org-indent-mode should work in 23.1.50, this is the
release where the fix was made.



The message "org-indent-mode can crash Emacs 23.1"
does not fully explain if it can also crash 23.1.50.


Yes, may be this is not so clear.  The current setup forbids it
before 23.1.50, and allows it from 23.1.50.  At least that is
what I meant.  Is there a bug?

[...]


Antti Kaihola wrote:

2010/12/2 Achim Gratz :

What version of Emacs are you running?

This is:
GNU Emacs 23.1.50.1 (i486-pc-linux-gnu, GTK+ Version 2.18.0) of
2009-09-27 on palmer, modified by Debian

What does C-h f with-silent-modifications result in?

with-silent-modifications is a Lisp macro in `org-macs.el'.
(with-silent-modifications ORG-UNMODIFIED)
Not documented.

Could you back out the change
(most likely the defmacro for with-silent-modifications in org- 
macs.el,
even though I have no clue why this would interact with org-indent- 
mode

as it should not be defined for versions >23.1) and tell us if that
solves your problem (which I can't test because org-indent-mode  
doesn't

even start on Emacs 23.1)?

Yes it does! I commented out:
;;(if (or (< emacs-major-version 23)
;;  (and (<= emacs-major-version 23)
;;   (< emacs-minor-version 2)))
;;(defmacro with-silent-modifications
;;  (org-unmodified)))
and it now works correctly. Thanks a lot!



I have now changed the definition like this:

(if (and (not (fboundp 'with-silent-modifications))
 (or (< emacs-major-version 23)
 (and (= emacs-major-version 23)
  (< emacs-minor-version 2
(defmacro with-silent-modifications (&rest body)
  `(org-unmodified ,@body)))



May I ask you to pull and check if this is
working for you out of the box?

Thank you.

- Carsten



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] MobileOrg and Voice Capturing (Android)

2010-12-03 Thread Mark Elston

Sven,

I have tried this according to what you suggested earlier
but haven't had any luck yet.  My script is:

# Capture.py
import android
droid = android.Android()
droid.setClipboard(droid.recoggnizeSpeech().result)
droid.startActivity("com.matburt.mobileorg.Capture")

When I run this the voice capture dialog comes up and
the script exits without an exception but the Capture
activity doesn't come up and nothing is added to the
MobileOrg data.  What do you have that is different?

Mark

On 12/3/2010 5:45 AM, Sven Bretfeld wrote:

Hi Matthew

Matthew Jones  writes:


Alright guys, I've gotten this to work I've posted an early build of
MobileOrg that supports this here:

http://matburt.net/files/mobileorg-debug.apk


Thank you very much for your wonderful work. It works like a charm. I
have tested it over ten times now, and it seems to be completely stable.
I will do some further testing during the weekend and also try to create
some tasker profiles with it. My ten year old son sits next to me and
suggests some ideas for you to become a millionaire :-)

Thanks again and have a nice weekend

Sven




___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] specifying priority with template expansion

2010-12-03 Thread Jeff Horn
Can you give us a better idea of the use case? As I understand,
unprioritzed todos count as "B" by default. Since most of my tasks
have a priority of B, I've never found setting priorities to be
helpful until I sit down to review my work for the day.

I prioritize items that are important (or urgent) with A at the
beginning of the day (no more than a couple, usually). Most items are
"B" and rarely more than half of those get done.

If I want to "sink" an item but keep it scheduled, it gets a priority of "C".

These are often things I do not know when recording an item.

Interested to hear your thoughts,
Jeff

On Fri, Dec 3, 2010 at 3:00 PM, David A. Thompson  wrote:
> An expansion for setting priority doesn't seem to be an option when using
> capture functionality with template expansion (at least in the online
> documentation). Instead, setting priority seems to require a few additional
> key strokes after capturing an item.
>
> Is there a straightforward way to pull off cuing for priority in a capture
> template? Mailing list/google searches didn't reveal much along these lines
> leaving me wondering if I've missed something obvious...
>
> Thanks for any and all suggestions (I've found org-mode to be a very helpful
> tool -- thanks to the authors/contributors for their efforts).
>
> - Alan
>
> ___
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>



-- 
Jeffrey Horn
Graduate Lecturer and PhD Student in Economics
George Mason University

(704) 271-4797
jh...@gmu.edu
jrhorn...@gmail.com

http://www.failuretorefrain.com/jeff/

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] spreadsheet

2010-12-03 Thread Eric S Fraga
Henri-Paul Indiogine  writes:

> Dear Orgmoders:
>
> I would like to use org-mode spreadsheet for my small business.  I would
> like to have some type of ledger with running balance.
>
> I have done this sort of calculation with many spreadsheets
> e.g. OpenOffice Calc, but I am not able to do so with org-mode.
>
> This is what I would like to set up:
>
> | Date  | Debit/Credit | Balance |
> |---+--+-|
> | day 1 | -10.00   |-10  |
> | day 2 |  50.00   | 40  |
> | day 3 | -20.00   | 20  |
> | day 4 |  40.00   | 60  |
>
> and so on.
>
> I tried the following in cell @2$3 :  =$2 + @-1$2  but that does not
> work.
>
> Any suggestions?
>
> Thanks,
> Henri-Paul

The following seems to work for me:

--8<---cut here---start->8---
* balance
| Date  | Debit/Credit | Balance |
|---+--+-|
| Start |  |0.00 |
| day 1 |   -10.00 |  -10.00 |
| day 2 |50.00 |   40.00 |
| day 3 |   -20.00 |   20.00 |
| day 4 |40.00 |   60.00 |
  #+TBLFM: $3=...@-1;%.2f::@2$3=0;%.2f
--8<---cut here---end--->8---

Alternatively, use babel with ledger if you want a full accounting
-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 23.2.1
: using Org-mode version 7.3 (release_7.3.172.g40812)

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Org-mode Code Blocks Manuscript: Request For Comments

2010-12-03 Thread Eric S Fraga
"Thomas S. Dye"  writes:

[...]

> Thanks for the helpful suggestions, which we'll follow up.  

You're very welcome.

> I think the idea of submitting to JSS came from the functional
> overlap with Sweave, which is widely used by the R community, and the
> ease with which compendia can be implemented in Org-mode.  The
> compendium idea seems to have developed largely within the
> statistical computing community, with strong ties to R in particular.
>  JSS is one place the R community congregates, so we thought the
> article would get some attention there. 

Ah, I see.  This is something I knew nothing about.  Very interesting!
I can now see the rationale for considering JSS.

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 23.2.1
: using Org-mode version 7.3 (release_7.3.172.g40812)

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] spreadsheet

2010-12-03 Thread Henri-Paul Indiogine
Dear Orgmoders:

I would like to use org-mode spreadsheet for my small business.  I would
like to have some type of ledger with running balance.

I have done this sort of calculation with many spreadsheets
e.g. OpenOffice Calc, but I am not able to do so with org-mode.

This is what I would like to set up:

| Date  | Debit/Credit | Balance |
|---+--+-|
| day 1 | -10.00   |-10  |
| day 2 |  50.00   | 40  |
| day 3 | -20.00   | 20  |
| day 4 |  40.00   | 60  |

and so on.

I tried the following in cell @2$3 :  =$2 + @-1$2  but that does not
work.

Any suggestions?

Thanks,
Henri-Paul


-- 
Henri-Paul Indiogine
Email: hindiog...@gmail.com
Running: Ubuntu Linux 10.10, Emacs 24.0.50.1, org-mode 7.3

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] specifying priority with template expansion

2010-12-03 Thread David A. Thompson
An expansion for setting priority doesn't seem to be an option when 
using capture functionality with template expansion (at least in the 
online documentation). Instead, setting priority seems to require a few 
additional key strokes after capturing an item.


Is there a straightforward way to pull off cuing for priority in a 
capture template? Mailing list/google searches didn't reveal much along 
these lines leaving me wondering if I've missed something obvious...


Thanks for any and all suggestions (I've found org-mode to be a very 
helpful tool -- thanks to the authors/contributors for their efforts).


- Alan

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Older versions

2010-12-03 Thread Puneeth
On Sat, Dec 4, 2010 at 1:07 AM, David Dyer-Bennet  wrote:
> The only org-mode distributions I can find on the website say they don't
> work with the versions of emacs I have available.
>
> Our latest servers are running with CentOS 5.5 (same as Redhat Enterprise
> 5.5), which has emacs 21.4.1.  Many of our older servers are running
> CentOS 4.7 or so.
>
> How badly does org-mode 7.3 not work with emacs 21.4?  And/or where can I
> find older versions, with info on which emacs they work with?

I'm not sure where you can find this, but as this page [1] says,
support for emacs has been dropped from Orgmode 7.x only. Use 6.36c
instead. A link to it, is provided in that page.

[1] -- http://orgmode.org/Changes.html#sec-2_1_1

-- Puneeth

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Older versions

2010-12-03 Thread David Dyer-Bennet
The only org-mode distributions I can find on the website say they don't
work with the versions of emacs I have available.

Our latest servers are running with CentOS 5.5 (same as Redhat Enterprise
5.5), which has emacs 21.4.1.  Many of our older servers are running
CentOS 4.7 or so.

How badly does org-mode 7.3 not work with emacs 21.4?  And/or where can I
find older versions, with info on which emacs they work with?

(I hope there's a good reason for this high a level of version dependency!)
-- 
David Dyer-Bennet, d...@dd-b.net; http://dd-b.net/
Snapshots: http://dd-b.net/dd-b/SnapshotAlbum/data/
Photos: http://dd-b.net/photography/gallery/
Dragaera: http://dragaera.info


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] [PATCH] org-edit-src-code

2010-12-03 Thread Dan Davison
Sometimes one wants to set `org-edit-src-content-indentation' for a
single buffer, without running the risk of altering the indentation in
other files. At the moment it's not possible to use a buffer-local value
for that variable, because the buffer-local value is not inherited
correctly by the org-src edit buffer.

This patch fixes that. It also substantially tidies up the code in
org-edit-src-code. It changes quite a few lines in the function, so if
any src block users could stick the patch in their set ups and watch for
problems that would be good.

Dan

commit 85597d28b25f4e64d535f61d2115ed2069a28be8
Author: Dan Davison 
Date:   Fri Dec 3 18:24:38 2010 +

Reorganize org-edit-src-code; allow buffer-local 
`org-edit-src-content-indentation'

* lisp/org-src.el (org-edit-src-code): When generating the code edit
buffer, it is necessary for several variables to inherit their values
from the parent org buffer. These changes collect all such variables
together into a single association list of (variable-name value)
pairs. In addition, a new variable is added to the list:
`org-edit-src-content-indentation'. This has the effect that a buffer
local value can be used for that variable.

diff --git a/lisp/org-src.el b/lisp/org-src.el
index fd827f9..06d0297 100644
--- a/lisp/org-src.el
+++ b/lisp/org-src.el
@@ -215,14 +215,12 @@ buffer."
   (let ((mark (and (org-region-active-p) (mark)))
(case-fold-search t)
(info (org-edit-src-find-region-and-lang))
-   (babel-info (org-babel-get-src-block-info 'light))
-   (org-mode-p (eq major-mode 'org-mode))
+   (org-mode-p (org-mode-p))
(beg (make-marker))
(end (make-marker))
-   (preserve-indentation org-src-preserve-indentation)
(allow-write-back-p (null code))
block-nindent total-nindent ovl lang lang-f single lfmt buffer msg
-   begline markline markcol line col)
+   begline markline markcol line col transmitted-variables)
 (if (not info)
nil
   (setq beg (move-marker beg (nth 0 info))
@@ -236,10 +234,22 @@ buffer."
  (nth 2 info))
lang (if (symbolp lang) (symbol-name lang) lang)
single (nth 3 info)
-   lfmt (nth 4 info)
block-nindent (nth 5 info)
lang-f (intern (concat lang "-mode"))
-   begline (save-excursion (goto-char beg) (org-current-line)))
+   begline (save-excursion (goto-char beg) (org-current-line))
+   transmitted-variables
+   `((org-edit-src-content-indentation
+  ,org-edit-src-content-indentation)
+ (org-edit-src-force-single-line ,single)
+ (org-edit-src-from-org-mode ,org-mode-p)
+ (org-edit-src-allow-write-back-p ,allow-write-back-p)
+ (org-src-preserve-indentation ,org-src-preserve-indentation)
+ (org-src-babel-info ,(org-babel-get-src-block-info 'light))
+ (org-coderef-label-format
+  ,(or (nth 4 info) org-coderef-label-format))
+ (org-edit-src-beg-marker ,beg)
+ (org-edit-src-end-marker ,end)
+ (org-edit-src-block-indentation ,block-nindent)))
   (if (and mark (>= mark beg) (<= mark (1+ end)))
  (save-excursion (goto-char (min mark end))
  (setq markline (org-current-line)
@@ -279,27 +289,23 @@ buffer."
   (define-key map [mouse-1] 'org-edit-src-continue)
   map))
(overlay-put ovl :read-only "Leave me alone")
+   (setq transmitted-variables
+ (append transmitted-variables `((org-edit-src-overlay ,ovl
(org-src-switch-to-buffer buffer 'edit)
(if (eq single 'macro-definition)
(setq code (replace-regexp-in-string "n" "\n" code t t)))
(insert code)
(remove-text-properties (point-min) (point-max)
'(display nil invisible nil intangible nil))
-   (unless preserve-indentation
+   (unless (cadr (assq 'org-src-preserve-indentation 
transmitted-variables))
  (setq total-nindent (or (org-do-remove-indentation) 0)))
(let ((org-inhibit-startup t))
  (condition-case e
  (funcall lang-f)
(error
 (error "Language mode `%s' fails with: %S" lang-f (nth 1 e)
-   (set (make-local-variable 'org-edit-src-force-single-line) single)
-   (set (make-local-variable 'org-edit-src-from-org-mode) org-mode-p)
-   (set (make-local-variable 'org-edit-src-allow-write-back-p) 
allow-write-back-p)
-   (set (make-local-variable 'org-src-preserve-indentation) 
preserve-indentation)
-   (when babel-info
- (set (make-local-variable 'org-src-babel-info) babel-info))
-   (when lfmt
- (set (make-local-variable 'org-coderef-label-format) lfmt))
+   (dolist (pair transmitted-variables)
+ (org-set-local (car pair) (cadr pair)))
   

Re: [Orgmode] Org-mode Code Blocks Manuscript: Request For Comments

2010-12-03 Thread Thomas S. Dye

Hi Eric,

On Dec 3, 2010, at 2:26 AM, Eric S Fraga wrote:


"Thomas S. Dye"  writes:


Hi Eric,

On Dec 2, 2010, at 1:13 PM, Eric S Fraga wrote:


[...]


and each is nicely self-contained.  I am a little surprised at the
choice of journal, mind you...

[...]




Would you recommend publishing someplace else?  We hoped list members
would have opinions on this and welcome comments and suggestions.

All the best,
Tom


This is a little outside my field, even though I'm a computer  
scientist.
I work at the interface between computing and industrial  
engineering...


Yes, this is what makes the choice difficult.  Org-mode is tough to  
categorize.  It cuts across field boundaries in sometimes amazing ways.



I was surprised at your choice simply because there appears to be
nothing relevant to statistics about what you have written.  A more
broad computer science journal may make sense, such as "Programming  
and

Computer Software" from Springer or maybe the "IEEE Transactions on
Software Engineering?"  But I really don't know which are the best
journals for something like this.


Thanks for the helpful suggestions, which we'll follow up.

I think the idea of submitting to JSS came from the functional overlap  
with Sweave, which is widely used by the R community, and the ease  
with which compendia can be implemented in Org-mode.  The compendium  
idea seems to have developed largely within the statistical computing  
community, with strong ties to R in particular.  JSS is one place the  
R community congregates, so we thought the article would get some  
attention there.



Hopefully somebody else from the list will have a better idea!



As usual, you've provided good food for thought.

All the best,
Tom

--
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 23.2.1
: using Org-mode version 7.3 (release_7.3.164.gcfd7)


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: org-indent mode not indenting free text?

2010-12-03 Thread Achim Gratz
Antti Kaihola  writes:
> This is:
> GNU Emacs 23.1.50.1 (i486-pc-linux-gnu, GTK+ Version 2.18.0) of
> 2009-09-27 on palmer, modified by Debian

I see.  So the check needs to include the sub-sub-version also, just
like org-indent-mode does.  The documentation said that
with-silent-modifications was introduced with Emacs 23.2, but maybe it
got backported to 23.1.50 by Debian maintainers.

> Yes it does! I commented out:
>
> ;;(if (or (< emacs-major-version 23)
> ;;(and (<= emacs-major-version 23)
> ;; (< emacs-minor-version 2)))
> ;;(defmacro with-silent-modifications
> ;;  (org-unmodified)))
>
> and it now works correctly. Thanks a lot!

Can you please check whether with-silent-modifications is defined in
your Emacs version?  I can only assume it must be since I don't think
org-indent-mode would work correctly without... if so, I think patching
the patch would be straightforward.


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

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


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] [Babel] Using Noweb + some problems

2010-12-03 Thread Sébastien Vauban
#+TITLE: Make use of NoWeb with string replacement
#+DATE:  2010-12-03
#+LANGUAGE:  en_US

* Abstract

Difficult to sum up. Though, questions turn around the reuse of code for
tangle purpose (read: Noweb "calls") whose text must be replaced inside.

Two real problems are also identified -- see [[*Important%20remarks][Important 
remarks]].

* Somewhere in my local LOB

(I'm beginning to "play" with one such file. Though, I've never succeeded
copying a new snippet to it, using =C-c C-v i=, even when it's written it's
successfully added)

** Add a column into a table

#+srcname: add-column-in-table(table, column, type, nullability)
#+begin_src sql
-- add column `$column' (if column does not exist yet)
IF NOT EXISTS (SELECT *
   FROM INFORMATION_SCHEMA.COLUMNS
   WHERE TABLE_NAME = '$table'
   AND COLUMN_NAME = '$column')
BEGIN
ALTER TABLE $table
ADD $column $type $nullability
END
#+end_src

** Convert date to French format

#+srcname: convert-date-to-French-format
#+begin_src sql :var column :engine msosql
CONVERT(varchar(10), $column, 103) AS $column
#+end_src

<>

=103= is the code for the "French" format =dd/mm/=.

* Somewhere in my work file

** Add the following columns

Create 3 new columns:

#+results: sql-param
| table   | column  | type| nullability |
|-+-+-+-|
| prestations | prsNbr1 | tinyint | NULL|
| prestations | prsNbr2 | tinyint | NULL|
| prestations | prsNbr3 | tinyint | NULL|

*** Code snippet (to be tangled later on)

I want to apply the values onto the following chunk of code:

#+srcname: add-column-in-table(table, column, type, nullability)
#+begin_src sql :results output
-- add column `$column' (if column does not exist yet)
IF NOT EXISTS (SELECT *
   FROM INFORMATION_SCHEMA.COLUMNS
   WHERE TABLE_NAME = '$table'
   AND COLUMN_NAME = '$column')
BEGIN
ALTER TABLE $table
ADD $column $type $nullability
END
#+end_src

*** Expanded code block

Write out the result of the expansions:

#+call: add-column-in-table(table=sql-param[2,0], column=sql-param[2,1], 
type=sql-param[2,2], nullability=sql-param[2,3])

#+call: add-column-in-table(table=sql-param[3,0], column=sql-param[3,1], 
type=sql-param[3,2], nullability=sql-param[3,3])

#+call: add-column-in-table(table=sql-param[4,0], column=sql-param[4,1], 
type=sql-param[4,2], nullability=sql-param[4,3])

Pressing =C-c C-v C-e= on the above =#+call= lines shows me the following
stack trace:

#+begin_src emacs-lisp
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  intern(nil)
  (let ((--cl-var-- ...)) (cond (... ...) (... ...) (... ...) (t ...)))
  (case (intern engine) ((quote msosql) (format "osql %s -s \"  \" -i %s -o %s" 
... ... ...)) ((quote mysql) (format "mysql %s -e \"source %s\" > %s" ... ... 
...)) ((quote postgresql) (format "psql -A -P footer=off -F \"\"  -f %s -o 
%s %s" ... ... ...)) (t (error "no support for the %s sql engine" engine)))
  (let* ((result-params ...) (cmdline ...) (engine ...) (in-file ...) (out-file 
...) (command ...)) (with-temp-file in-file (insert ...)) (message command) 
(shell-command command) (search-forward "#+end_src") (forward-char 1) (insert 
"\n#+results:\n#+begin_example\n") (insert "#+end_example\n") 
(beginning-of-line) (previous-line) (insert-file-contents out-file))
  org-babel-execute:sql("-- add column `$column' (if column does not exist 
yet)\nIF NOT EXISTS (SELECT *\n   FROM INFORMATION_SCHEMA.COLUMNS\n 
  WHERE TABLE_NAME = '$table'\n   AND COLUMN_NAME = 
'$column')\nBEGIN\nALTER TABLE $table\nADD $column $type 
$nullability\nEND\n" ((:var type . "tinyint") (:var table . "prestations") 
(:var column . "prsNbr1") (:var nullability . "NULL") (:colname-names) 
(:rowname-names) (:result-params "silent" "replace") (:result-type . value) 
(:comments . "") (:shebang . "") (:cache . "no") (:noweb . "no") (:tangle . 
"no") (:exports . "code") (:results . "silent") (:hlines . "no") (:session . 
"none") (:result-type . value) (:result-params "replace") (:rowname-names) 
(:colname-names)))
  funcall(org-babel-execute:sql "-- add column `$column' (if column does not 
exist yet)\nIF NOT EXISTS (SELECT *\n   FROM 
INFORMATION_SCHEMA.COLUMNS\n   WHERE TABLE_NAME = '$table'\n
   AND COLUMN_NAME = '$column')\nBEGIN\nALTER TABLE $table\nADD 
$column $type $nullability\nEND\n" ((:var type . "tinyint") (:var table . 
"prestations") (:var column . "prsNbr1") (:var nullability . "NULL") 
(:colname-names) (:rowname-names) (:result-params "silent" "replace") 
(:result-type . value) (:comments . "") (:shebang . "") (:cache . "no") (:noweb 
. "no") (:tangle . "no") (:exports . "code") (:results . "silent") (:hlines . 
"no") (:session . "none") (:result-type . value) (:result-params "replace") 
(:rowname-names) (:colname-names)))
#+end_src

** Use da

Re: [Orgmode] Re: [Babel] R, multiple lines #+results, LaTeX-export

2010-12-03 Thread Bernd Weiss

Am 03.12.2010 10:05, schrieb Nick Dokos:

Bernd Weiss  wrote:


Am 03.12.2010 03:41, schrieb S=C3=A9bastien Vauban:

[...]


I am using Org-mode version 7.3 (release_7.01h.1081.gcfd7.dirty)


That sounds weird to me: version 7.3 and a 7.01 tag!?


Hi S=C3=A9bastien,

That's what I get when I run "Show Version":

release_7.01h-1081-gcfd7
Org-mode version 7.3 (release_7.01h.1081.gcfd7.dirty)




You are probably missing the 7.3 tag, so it has to go back all the
way to 7.01h to find a starting point: you are 1081 commits past 7.01h.
Mine says

Org-mode version 7.3 (release_7.3.148.gc3b7e.dirty)

so I'm 148 commits past 7.3, so I'd expect roughly 930 commits between
7.01h and 7.3 (roughly, because we probably don't have the same HEAD). I
get

$ git log --oneline release_7.01h..release_7.3 | wc -l
917

so it checks out.

Do ``git tag'' to make sure the relase_7.3 tag is missing. Then do ``git
fetch --tags'' and check with ``git tag'' again. If the tag shows up,
org-version should then show you 7.3 as the starting point.

Nick



Hi Nick,

Thanks! "git fetch --tags" was what I was missing. I simply (naively?) 
assumed that "git pull origin master" would be sufficient.


Bernd

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: org-indent mode not indenting free text?

2010-12-03 Thread Erik Iverson

Just a guess here: This may be some weirdness
because the check in org-indent *will* allow
people using GNU Emacs 23.1.50 to turn on
org-indent, as far as I can tell.

The message "org-indent-mode can crash Emacs 23.1"
does not fully explain if it can also crash 23.1.50.

If indeed you should be having to run Emacs 23.2 or
greater to get org-indent-mode, I don't believe that
is what is currently happening.

Perhaps that check should require 23.2 or
greater? I don't know the details here, but
it's a starting place to look.

Antti Kaihola wrote:

2010/12/2 Achim Gratz :

What version of Emacs are you running?


This is:
GNU Emacs 23.1.50.1 (i486-pc-linux-gnu, GTK+ Version 2.18.0) of
2009-09-27 on palmer, modified by Debian


 What does C-h f with-silent-modifications result in?


with-silent-modifications is a Lisp macro in `org-macs.el'.

(with-silent-modifications ORG-UNMODIFIED)

Not documented.


 Could you back out the change
(most likely the defmacro for with-silent-modifications in org-macs.el,
even though I have no clue why this would interact with org-indent-mode
as it should not be defined for versions >23.1) and tell us if that
solves your problem (which I can't test because org-indent-mode doesn't
even start on Emacs 23.1)?


Yes it does! I commented out:

;;(if (or (< emacs-major-version 23)
;;  (and (<= emacs-major-version 23)
;;   (< emacs-minor-version 2)))
;;(defmacro with-silent-modifications
;;  (org-unmodified)))

and it now works correctly. Thanks a lot!

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Column view and subtask overview interaction

2010-12-03 Thread Bernt Hansen
James Deaton  writes:

> I'm running a pull from yesterday and have noticed something a bit
> strange. I haven't been using column view with a subtask overview
> until today so I do not know if this particular usage had been
> working.
>
> I have a simple list of tasks:
>
> ** Application Discovery [0/5]
> *** STARTED Service Catalog Definition
> :Barbara:
> *** TODO Application Inventory
> :Brian:Chris:
> *** TODO Policies
> :Barbara:
> *** STARTED Projects In Flight
> :All:
> *** TODO Future Projects
> :All:
>
> Now, if I go into column view to do some updates such as change one
> keyword such as a TODO to DONE, when I exit column view, the parent
> heading is wiped out and replaced as below:
>
> ** [1/5[1/5[1/5[1/5[1/5[1/5]5]
> *** STARTED Service Catalog Definition
> :Barbara:
> *** DONE Application Inventory
> :Brian:Chris:
> - State "DONE"   from "TODO"   [2010-12-02 Thu 22:52]
> *** TODO Policies
> :Barbara:
> *** STARTED Projects In Flight
> :All:
> *** TODO Future Projects
> :All:
>
> When I first ran into this earlier today I had manipulated about 30
> subtasks clobbering 5 different parent tasks before I noticed when I
> exited column view. I think I'm more frustrated by not knowing enough
> to help find a fix.

I can confirm this behaviour and it existed all the way back to at least
release 4.76.  I didn't try anything older than that.

-Bernt

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Babel, Python and UTF-8

2010-12-03 Thread Vincent Beffara

Hi,

>> (and it would be excellent to allow for a code block as a preamble,
>> instead of a string in the header or as an alternative, because
>> preambles once they are allowed tend to grow uncontrollably ;->)
>
> This is currently possible using the `sbe' function.  Arbitrary emacs
> lisp can be placed inside of header arguments, and the `sbe' take the
> name of a code block and returns its result.

Very cool ! That does all I want, thanks for the info. For multi-line it
is a bit heavy to write, with lots of \n and preamble .= "lskjd", but I
can live with that. Unless there is a way already to write something
like this ?

--8<---cut here---start->8---
#+source: my-preamble
#+begin_src python :return preamble
  # -*- coding: utf-8 -*-"
  import os,sys,whatever
#+end_src

#+begin_src python :preamble (org-babel-get-and-expand-source-code-body 
my-preamble) :return s
  s = "é"
#+end_src
--8<---cut here---end--->8---

There is org-babel-get-src-block-info but it looks at the block around
(point), not by name ... so I guess it would not be too hard to write
the extraction method, but it might be somewhere in the code already.

>> One naive question : why is the code path different for tangling and
>> evaluation ? One would think that a natural way for evaluation would be
>> to tangle the current block (plus included noweb stuff etc) into a
>> temporary file and eval that file ... and that would enable shebang for
>> evaluation as well. There must be something I am missing here.
>
> Tangling works for *any* programming language, even those which have yet
> to be created and have no explicit Emacs or Org-mode support, this is
> because on tangling the code block is simply treated as text.

As far as I understood from testing, tangling does adapt to the language
(at least to implement :var in a suitable way), so I was under the
impression that evaluating could be implemented as some kind of wrapping
around the tangled output - and obviously the wrapping would have to be
language-specific even if for the most part the tanglong is not.

I am just discovering all of this, sorry if I have horrible
misconceptions about the thing ...

Regards,

/v


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] [bug] [babel] executing code block overwrites subsequent heading

2010-12-03 Thread Eric S Fraga
"Eric Schulte"  writes:

> Hi Eric,
>
> Thanks for pointing this out.  I broke this when changing the result
> insertion code recently to add support for the ":result wrap" header
> argument.  It should now be fixed (see my attached version of your
> example.org).  Please let me know if it persists.

Works perfectly now!  Many thanks.

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 23.2.1
: using Org-mode version 7.3 (release_7.3.172.g40812)

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] [Babel] Patch for adding Microsoft's osql command-line utility

2010-12-03 Thread Sébastien Vauban
Hi Eric,

Here a patch for osql from Microsoft.

diff --git a/lisp/ob-sql.el b/lisp/ob-sql.el
index 19c271d..9e6f06a 100644
--- a/lisp/ob-sql.el
+++ b/lisp/ob-sql.el
@@ -66,6 +66,10 @@ This function is called by `org-babel-execute-src-block'."
  (out-file (or (cdr (assoc :out-file params))
(org-babel-temp-file "sql-out-")))
  (command (case (intern engine)
+('msosql (format "osql %s -s \"\t\" -i %s -o %s"
+ (or cmdline "")
+ (org-babel-process-file-name in-file)
+ (org-babel-process-file-name out-file)))
 ('mysql (format "mysql %s -e \"source %s\" > %s"
 (or cmdline "")
 (org-babel-process-file-name in-file)

Best regards,
  Seb

-- 
Sébastien Vauban
___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Is it possible to do literate programming without org-babel?

2010-12-03 Thread Eric S Fraga
"Eric Schulte"  writes:

> If your collaborators don't mind the existence of some Org-mode specific
> comments in the .py file, you can tangle with comments on and then use
> the `org-babel-detangle' function to bring changes in the source file
> back into your Org-mode buffer.  In this way it should be possible for
> you to collaborate without leaving Org-mode.

Ah, very true; I'd forgotten about detangle...  I'll give it a shot
tonight when I get back to this particular project!
-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 23.2.1
: using Org-mode version 7.3 (release_7.3.169.g0d0e)

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: [babel] Enabling language mode for plantuml?

2010-12-03 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 12/03/2010 12:31 PM, zwz wrote:
> Rainer M Krug  writes:
> 
>> Hi
>>
>> I would like to be able to edit code blocks of plantuml via C-', but I
>> get the message
>> No such language mode: plantuml-mode
>>
>> Is there an easy way of defining this new language mode, so that I can
>> edit it via C-'?
>> I don't need syntax highlighting at the moment, although ' as the
>> comment character would be nice.
>>
>> Thanks,
>>
>> Rainer
> Hi, Rainer
> 
> I wrote a plantuml-mode, which is now not perfect but usable.
> It is available on:
> http://zhangweize.wordpress.com/2010/09/20/update-plantuml-mode/
> 
> Just copy the code and save it as "plantuml-mode.el" in a path where
> emacs finds its libraries.

Just a quick question: whenever I add the line

#+begin_src emacs-lisp
  (load-file "~/.emacs.d/site-lisp/plantuml-mode.el")
#+end_src

to load the plantuml-mode into my emacs.org file, the message window
opens when starting emacs --- when I comment it out, it doesn't.

Am I doing something wrong here?

Rainer

> 
> Best regards,
> zwz
> 
> 
> ___
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode


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

Centre of Excellence for Invasion Biology
Natural Sciences Building
Office Suite 2039
Stellenbosch University
Main Campus, Merriman Avenue
Stellenbosch
South Africa

Tel:+33 - (0)9 53 10 27 44
Cell:   +27 - (0)8 39 47 90 42
Fax (SA):   +27 - (0)8 65 16 27 82
Fax (D) :   +49 - (0)3 21 21 25 22 44
Fax (FR):   +33 - (0)9 58 10 27 44
email:  rai...@krugs.de

Skype:  RMkrug
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkz5CAEACgkQoYgNqgF2egqiWQCfYLNcIyxacLrf4JROLtTqE811
TOwAniWnZ/HIjswppuiKATa/4/ngzbRY
=P0Qv
-END PGP SIGNATURE-

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: [Babel] R, multiple lines #+results, LaTeX-export

2010-12-03 Thread Nick Dokos
Bernd Weiss  wrote:

> Am 03.12.2010 03:41, schrieb S=C3=A9bastien Vauban:
> 
> [...]
> 
> >> I am using Org-mode version 7.3 (release_7.01h.1081.gcfd7.dirty)
> >
> > That sounds weird to me: version 7.3 and a 7.01 tag!?
> 
> Hi S=C3=A9bastien,
> 
> That's what I get when I run "Show Version":
> 
> release_7.01h-1081-gcfd7
> Org-mode version 7.3 (release_7.01h.1081.gcfd7.dirty)
> 
> 

You are probably missing the 7.3 tag, so it has to go back all the
way to 7.01h to find a starting point: you are 1081 commits past 7.01h.
Mine says 

   Org-mode version 7.3 (release_7.3.148.gc3b7e.dirty)

so I'm 148 commits past 7.3, so I'd expect roughly 930 commits between
7.01h and 7.3 (roughly, because we probably don't have the same HEAD). I
get

   $ git log --oneline release_7.01h..release_7.3 | wc -l
   917

so it checks out.

Do ``git tag'' to make sure the relase_7.3 tag is missing. Then do ``git
fetch --tags'' and check with ``git tag'' again. If the tag shows up,
org-version should then show you 7.3 as the starting point.

Nick

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: Babel, Python and UTF-8

2010-12-03 Thread Christopher Allan Webber
(Also worth mentioning that python 3 allows you to use actual unicode
characters inside strings in the file, not \xff chars; not sure if
org-babel needs to change its habits between python2 and python3?)

Vincent Beffara  writes:

>>> #+begin_src python
>>> # -*- coding: utf-8 -*-
>>> s = "é"
>>> #+end_src
>>
>> I'm not sure to understand your problem. In fact, the problem is not
>> about "inserting a prefix to the block", it's about the coding system
>> itself, I guess.
>>
>> Your "é" in your Org buffer, how is it encoded?  Is your Org buffer an
>> UTF-8 one, or a Latin-1?
>
> Doesn't really matter, in fact ... Whenever a python file contains a
> non-ascii character (utf-8 or latin-1) it insists on finding an
> indication of the encoding within the file. If latin-1, it finds \xe9,
> if utf-8, it finds \xc3, but in both cases it raises this:
>
> # SyntaxError: Non-ASCII character '\xe9' in file /Users/vincent/toto.py
> # on line 1, but no encoding declared; see
> # http://www.python.org/peps/pep-0263.html for details
>
> That's even if the character in question lies within a string. That
> makes a lot of sense in terms of portability, but it makes on-the-fly
> evaluation a bit more complicated.
>
>> In the second, you want an ISO Latin 1 block of text to be tangled or
>> executed as UTF-8. Is this right?
>
> No, I want everything in utf-8, there is no converting to do anywhere,
> just telling python that it is utf-8.
>
>> Isn't such a prefix already available through the "shebang" option:
>> can't it be multiline?  Anyway, I don't think it's the problem here...
>
> Hmm, didn't know about :shebang, but it seems to be ignored (at least
> for python) because this works without a syntax error:
>
> #+begin_src python :shebang sldfkj
> return 1
> #+end_src
>
> Anyway, :prefix cannot hurt I guess ...
>
> /v
>
>
> ___
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: ob-sql error because of not specifying column-seperator

2010-12-03 Thread Sébastien Vauban
Hi Joost,

Joost Helberg wrote:
> when using babel SQL, the column's in the resultset are converted to
> org-tables using (org-table-import file sep).
>
> The command used to retrieve the information from the databaseserver
> gets the option to use the tab (\t) as columnseperator. 
>
> The call to org-table-import however doesn't specify this
> seperator. This leaves it to org-table-import to find out what the
> seperator is. org-table-import doesn't always succeed in this. Hence
> the diff below which sets the seperator to  (\t).
>
> regards,
>
> Joost Helberg
>
> diff --git a/lisp/ob-sql.el b/lisp/ob-sql.el
> index 19c271d..6bb9a96 100644
> --- a/lisp/ob-sql.el
> +++ b/lisp/ob-sql.el
> @@ -80,7 +80,7 @@ This function is called by `org-babel-execute-src-block'."
>  (message command)
>  (shell-command command)
>  (with-temp-buffer
> -  (org-table-import out-file nil)
> +  (org-table-import out-file '(16))
>(org-babel-reassemble-table
> (org-table-to-lisp)
> (org-babel-pick-name (cdr (assoc :colname-names params))

Nice catch!

This one should improve the associated doc.

--8<---cut here---start->8---
lisp/org-table.el
--- INDEX:/lisp/org-table.el
+++ WORKDIR:/lisp/org-table.el
@@ -486,8 +486,8 @@ nil  When nil, the command tries to be smart and figure 
out the
 (goto-char beg)
 (org-table-align)))
 
-(defun org-table-import (file arg)
-  "Import FILE as a table.
+(defun org-table-import (file separator)
+  "Import FILE as a table, using specified field SEPARATOR.
 The file is assumed to be tab-separated.  Such files can be produced by most
 spreadsheet and database applications.  If no tabs (at least one per line)
 are found, lines will be split on whitespace into fields."
@@ -496,7 +496,7 @@ are found, lines will be split on whitespace into fields."
   (let ((beg (point))
(pm (point-max)))
 (insert-file-contents file)
-(org-table-convert-region beg (+ (point) (- (point-max) pm)) arg)))
+(org-table-convert-region beg (+ (point) (- (point-max) pm)) separator)))
 
 
 (defvar org-table-last-alignment)
--8<---cut here---end--->8---

Best regards,
  Seb

-- 
Sébastien Vauban


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] [Babel] R, multiple lines #+results, LaTeX-export

2010-12-03 Thread Bernd Weiss

Am 03.12.2010 09:14, schrieb Eric Schulte:

Hi Bernd,

Bernd Weiss  writes:


[...]


(2) The results-block is complex insofar as it has multiple lines. If I
choose "export as LaTeX and process to PDF" (I corrected the wrong
#+end_example line manually), the resulting PDF file only shows the code
but not the results. However, this behaviour is only related to my
meta-analysis example. If I use, for example, summary(lm(rnorm(100)~1)),
the resulting PDF file shows code + results.


[...]


This is odd, could you send a self-contained org-mode file which
reproduces this error?


Hi Eric,

I just updated my org-mode repository and now everything works fine.

Thanks a lot,

Bernd

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Is it possible to do literate programming without org-babel?

2010-12-03 Thread Pierre de Buyl

Hello,

I have taken a reverse approach, even with no collaboration.
I write the source code in pure $LANGUAGE (fortran 90 for now) and  
add comments in org-mode syntax with a special header:

in prog.f90

!!subroutine compute
! This subroutine performs a task
subroutine compute(myarg)
integer, intent(in) :: myarg
write(*,*) myarg
end subroutine compute

get translated by a script to

** subroutine compute
This subroutine performs a task
#begin_src f90
subroutine compute(myarg)
integer, intent(in) :: myarg
write(*,*) myarg
end subroutine compute
#end_src

which can be exported with the language font locking of emacs in html  
via orgmode. It gives me a typeset documentation from my source code  
directly.


I think that a feature similar to C-' in org-mode would be wonderful:  
I could edit my "pure" f90 program and edit my comment blocks in org- 
mode.


Regards,

Pierre

Le 3 déc. 10 à 09:25, Eric S Fraga a écrit :


"I.S."  writes:


Dear Experts,

I think org-babel is great and use it when I can. But on larger
projects where some people are not emacs users, it may not be  
feasible

for the master file to be an org-mode file.

Do you have any suggestions on using literate programming techniques
when the source code must be in a .py file?

One thing I have tried is switching to org-mode when I want to write
comments, create links, etc. and do that in org-mode and then switch
back to python mode. This actually works reasonably well but it's
annoying to switch modess.

Any better ideas?


This probably is not going to help you but I have the same problem.

What I do, *when* the project is one in which I am the main lead,  
is to

keep using org mode, without switching modes, but when I need to share
something with my collaborator, I *tangle* all the code and send him
both the code and the org document.  This means that he can run the
code.  However, the code has no comments in it...

Of course, incorporating any changes my collaborator makes back  
into the

org document is annoying but manageable.
--
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 23.2.1
: using Org-mode version 7.3 (release_7.3.169.g0d0e)

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: Babel, Python and UTF-8

2010-12-03 Thread Eric Schulte
Hi,

Vincent Beffara  writes:

> Hi,
>
> "preamble" sounds fine

As this seems to be the general consensus I've replaced "prefix" with
"preamble" as the header argument name

> (and it would be excellent to allow for a code block as a preamble,
> instead of a string in the header or as an alternative, because
> preambles once they are allowed tend to grow uncontrollably ;->)
>

This is currently possible using the `sbe' function.  Arbitrary emacs
lisp can be placed inside of header arguments, and the `sbe' take the
name of a code block and returns its result. e.g.

** Python requires a utf-8 coding prefix
#+source: my-preamble
#+begin_src python :return preamble
  preamble = "# -*- coding: utf-8 -*-"
#+end_src

#+begin_src python :preamble (sbe my-preamble) :return s
s = "é"
#+end_src

#+results:
: é

#+begin_src python :preamble # -*- coding: utf-8 -*- :results output
s = "é"
print(s)
#+end_src

#+results:
: é

>
>>> The :shebang header argument is only used for tangling, not during
>>> evaluation, however if you ever needed to tangle python code blocks with
>>> non-ASCII encodings this would be the appropriate solution.
>>
>> Sorry, reading this after the other post...
>>
>> But, does it still make sense to make that distinction:
>>
>> - some sort of preamble only for tangling?
>> - a preamble for evaluation (and tangling)?
>
> One naive question : why is the code path different for tangling and
> evaluation ? One would think that a natural way for evaluation would be
> to tangle the current block (plus included noweb stuff etc) into a
> temporary file and eval that file ... and that would enable shebang for
> evaluation as well. There must be something I am missing here.
>

Tangling works for *any* programming language, even those which have yet
to be created and have no explicit Emacs or Org-mode support, this is
because on tangling the code block is simply treated as text.

Evaluation requires language specific support for both performing the
evaluation and collecting the result.  Evaluation can (for example) be
performed using an external file or using a persistent session.  Even
when using an external file the contents of the file are often very
different when tangling and exporting, e.g.

#+source: my-preamble
#+begin_src python :return preamble
  preamble = "# -*- coding: utf-8 -*-"
#+end_src

tangles to the following (possibly with comments)

--8<---cut here---start->8---
preamble = "# -*- coding: utf-8 -*-"
--8<---cut here---end--->8---

and is evaluated as the following

--8<---cut here---start->8---
def main():
  preamble = "# -*- coding: utf-8 -*-"
  return preamble

open('temporary-result-collection-file', 'w').write( pprint.pformat(main()) )
--8<---cut here---end--->8---

Best -- Eric

>
>/v
>
>
> ___
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Is it possible to do literate programming without org-babel?

2010-12-03 Thread Eric Schulte
If your collaborators don't mind the existence of some Org-mode specific
comments in the .py file, you can tangle with comments on and then use
the `org-babel-detangle' function to bring changes in the source file
back into your Org-mode buffer.  In this way it should be possible for
you to collaborate without leaving Org-mode.

Best -- Eric

Eric S Fraga  writes:

> "I.S."  writes:
>
>> Dear Experts,
>>
>> I think org-babel is great and use it when I can. But on larger
>> projects where some people are not emacs users, it may not be feasible
>> for the master file to be an org-mode file.
>>
>> Do you have any suggestions on using literate programming techniques
>> when the source code must be in a .py file?
>>
>> One thing I have tried is switching to org-mode when I want to write
>> comments, create links, etc. and do that in org-mode and then switch
>> back to python mode. This actually works reasonably well but it's
>> annoying to switch modess.
>>
>> Any better ideas?
>
> This probably is not going to help you but I have the same problem.
>
> What I do, *when* the project is one in which I am the main lead, is to
> keep using org mode, without switching modes, but when I need to share
> something with my collaborator, I *tangle* all the code and send him
> both the code and the org document.  This means that he can run the
> code.  However, the code has no comments in it...
>
> Of course, incorporating any changes my collaborator makes back into the
> org document is annoying but manageable.

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] [Babel] R, multiple lines #+results, LaTeX-export

2010-12-03 Thread Eric Schulte
Hi Bernd,

Bernd Weiss  writes:

> Dear all,
>
> While working on my presentation I came across the following two issues:
>
> (1) If I execute the following code block (see "Before codeblock 
> execution") which is followed by a headline or another codeblock, the 
> results-block (see "After codeblock execution") interferes with the 
> headline/codeblock/whatever.
>

I've just pushed up a fix for this issue.

>
> (2) The results-block is complex insofar as it has multiple lines. If I 
> choose "export as LaTeX and process to PDF" (I corrected the wrong 
> #+end_example line manually), the resulting PDF file only shows the code 
> but not the results. However, this behaviour is only related to my 
> meta-analysis example. If I use, for example, summary(lm(rnorm(100)~1)), 
> the resulting PDF file shows code + results.
>
> I am using Org-mode version 7.3 (release_7.01h.1081.gcfd7.dirty)
>
> Thanks for your help,
>

This is odd, could you send a self-contained org-mode file which
reproduces this error?

Thanks -- Eric

>
> Bernd
>
>
> --- Before codeblock execution -
>
> #+BEGIN_SRC R  :results output :exports both
> library(meta)
> data(Fleiss93)
> meta1 <- metabin(event.e, n.e, event.c, n.c, data=Fleiss93, sm="RR", 
> meth="I")
> summary(meta1)
> #+END_SRC
>
>
>
>
> * new headline
>
> --- Before codeblock execution -
>
>
>
> --- After codeblock execution -
>
> #+BEGIN_SRC R  :results output :exports both
> library(meta)
> data(Fleiss93)
> meta1 <- metabin(event.e, n.e, event.c, n.c, data=Fleiss93, sm="RR", 
> meth="I")
> summary(meta1)
> #+END_SRC
>
>
> #+results:
> #+begin_example
> load meta:  d:/programme/R/library ...
> Number of trials combined: 7
>
>   RR95%-CI   z  p.value
> Fixed effect model   0.9137  [0.8658; 0.9643] -3.2822   0.001
> Random effects model 0.8929  [0.8006; 0.9959] -2.0347   0.0419
>
> Quantifying heterogeneity:
> tau^2 = 0.0074; H = 1.29 [1; 1.98]; I^2 = 39.6% [0%; 74.6%]
>
> Test of heterogeneity:
>  Q d.f.  p.value
>   9.936   0.1277
>
> Method: Inverse variance method
>
>
>
> * new headlin#+end_example
> e
>
> --- After codeblock execution -
>
> ___
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] [bug] [babel] executing code block overwrites subsequent heading

2010-12-03 Thread Eric Schulte
Hi Eric,

Thanks for pointing this out.  I broke this when changing the result
insertion code recently to add support for the ":result wrap" header
argument.  It should now be fixed (see my attached version of your
example.org).  Please let me know if it persists.

Thanks -- Eric

#+TITLE: examplebug.org

* babel overwriting subsequent heading

#+srcname: case1
#+begin_src sh :results output
  for i in `seq 10`;do
  echo $i
  done
#+end_src

#+results: case1
#+begin_example
1
2
3
4
5
6
7
8
9
10
#+end_example



* a following heading

Eric S Fraga  writes:

> Hello,
>
> suddenly, there seems to be a rather strange bug in the insertion of
> babel code block results into the org file.  Attached are two files:
> =examplebug.org= which has a simple octave code block *before* the code
> block is executed and =examplebugafter.org= which is what the file looks
> like after executing the code block (C-c C-c).
>
> The =#+end_example= line is somehow placed in the middle of the
> following headline!  Very strange.
>
> I do not believe I have changed any org or babel specific configurations
> in a while...
>
> org itself is very recent (a couple of minutes ago), with version in my
> signature.
>
> Thanks,
> eric
>
> # -*- coding: utf-8; -*-
> #+TITLE: examplebug.org
> #+AUTHOR:Eric S Fraga
> #+EMAIL: e.fr...@ucl.ac.uk
> #+DESCRIPTION: 
> #+KEYWORDS: 
> #+LANGUAGE:  en
> #+OPTIONS:   H:3 num:t toc:nil \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
> #+OPTIONS:   TeX:t LaTeX:t skip:nil d:nil todo:t pri:nil tags:not-in-toc
> #+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 
> path:http://orgmode.org/org-info.js
> #+EXPORT_SELECT_TAGS: export
> #+EXPORT_EXCLUDE_TAGS: noexport
> #+LINK_UP:   
> #+LINK_HOME: 
> #+XSLT: 
>
> * babel overwriting subsequent heading
>
> #+srcname: case1
> #+begin_src octave :results output :exports results
> n = 20
> for i=1:n
>   disp([i,i^3]);
> endfor
> #+end_src
> * a following heading
> # -*- coding: utf-8; -*-
> #+TITLE: examplebug.org
> #+AUTHOR:Eric S Fraga
> #+EMAIL: e.fr...@ucl.ac.uk
> #+DESCRIPTION: 
> #+KEYWORDS: 
> #+LANGUAGE:  en
> #+OPTIONS:   H:3 num:t toc:nil \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
> #+OPTIONS:   TeX:t LaTeX:t skip:nil d:nil todo:t pri:nil tags:not-in-toc
> #+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 
> path:http://orgmode.org/org-info.js
> #+EXPORT_SELECT_TAGS: export
> #+EXPORT_EXCLUDE_TAGS: noexport
> #+LINK_UP:   
> #+LINK_HOME: 
> #+XSLT: 
>
> * babel overwriting subsequent heading
>
> #+srcname: case1
> #+begin_src octave :results output :exports results
> n = 20
> for i=1:n
>   disp([i,i^3]);
> endfor
> #+end_src
>
> #+results: case1
> #+begin_example
> n =  20
>1   1
>2   8
> 3   27
> 4   64
>  5   125
>  6   216
>  7   343
>  8   512
>  9   729
>  10   1000
>  11   1331
>  12   1728
>  13   2197
>  14   2744
>  15   3375
>  16   4096
>  17   4913
>  18   5832
>  19   6859
>  20   8000
>
> * a following h#+end_example
> eading
___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] ob-sql error because of not specifying column-seperator

2010-12-03 Thread Eric Schulte
Applied, Thanks for the patch -- Eric

Joost Helberg  writes:

> Hi,
>
> when using babel SQL, the column's in the resultset are converted to
> org-tables using (org-table-import file sep).
>
> The command used to retrieve the information from the databaseserver
> gets the option to use the tab (\t) as columnseperator. 
>
> The call to org-table-import however doesn't specify this
> seperator. This leaves it to org-table-import to find out what the
> seperator is. org-table-import doesn't always succeed in this. Hence
> the diff below which sets the seperator to  (\t).
>
> regards,
>
> Joost Helberg
>
> diff --git a/lisp/ob-sql.el b/lisp/ob-sql.el
> index 19c271d..6bb9a96 100644
> --- a/lisp/ob-sql.el
> +++ b/lisp/ob-sql.el
> @@ -80,7 +80,7 @@ This function is called by `org-babel-execute-src-block'."
>  (message command)
>  (shell-command command)
>  (with-temp-buffer
> -  (org-table-import out-file nil)
> +  (org-table-import out-file '(16))
>(org-babel-reassemble-table
> (org-table-to-lisp)
> (org-babel-pick-name (cdr (assoc :colname-names params))

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Is it possible to do literate programming without org-babel?

2010-12-03 Thread Eric S Fraga
"I.S."  writes:

> Dear Experts,
>
> I think org-babel is great and use it when I can. But on larger
> projects where some people are not emacs users, it may not be feasible
> for the master file to be an org-mode file.
>
> Do you have any suggestions on using literate programming techniques
> when the source code must be in a .py file?
>
> One thing I have tried is switching to org-mode when I want to write
> comments, create links, etc. and do that in org-mode and then switch
> back to python mode. This actually works reasonably well but it's
> annoying to switch modess.
>
> Any better ideas?

This probably is not going to help you but I have the same problem.

What I do, *when* the project is one in which I am the main lead, is to
keep using org mode, without switching modes, but when I need to share
something with my collaborator, I *tangle* all the code and send him
both the code and the org document.  This means that he can run the
code.  However, the code has no comments in it...

Of course, incorporating any changes my collaborator makes back into the
org document is annoying but manageable.
-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 23.2.1
: using Org-mode version 7.3 (release_7.3.169.g0d0e)

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] MobileOrg and Voice Capturing (Android)

2010-12-03 Thread Sven Bretfeld
Hi Matthew

Matthew Jones  writes:

> Alright guys, I've gotten this to work I've posted an early build of
> MobileOrg that supports this here:
>
> http://matburt.net/files/mobileorg-debug.apk

Thank you very much for your wonderful work. It works like a charm. I
have tested it over ten times now, and it seems to be completely stable.
I will do some further testing during the weekend and also try to create
some tasker profiles with it. My ten year old son sits next to me and
suggests some ideas for you to become a millionaire :-)

Thanks again and have a nice weekend

Sven

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: org-indent mode not indenting free text?

2010-12-03 Thread Antti Kaihola
2010/12/2 Achim Gratz :
> What version of Emacs are you running?

This is:
GNU Emacs 23.1.50.1 (i486-pc-linux-gnu, GTK+ Version 2.18.0) of
2009-09-27 on palmer, modified by Debian

> What does C-h f with-silent-modifications result in?

with-silent-modifications is a Lisp macro in `org-macs.el'.

(with-silent-modifications ORG-UNMODIFIED)

Not documented.

> Could you back out the change
> (most likely the defmacro for with-silent-modifications in org-macs.el,
> even though I have no clue why this would interact with org-indent-mode
> as it should not be defined for versions >23.1) and tell us if that
> solves your problem (which I can't test because org-indent-mode doesn't
> even start on Emacs 23.1)?

Yes it does! I commented out:

;;(if (or (< emacs-major-version 23)
;;  (and (<= emacs-major-version 23)
;;   (< emacs-minor-version 2)))
;;(defmacro with-silent-modifications
;;  (org-unmodified)))

and it now works correctly. Thanks a lot!

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] org-indent mode not indenting free text?

2010-12-03 Thread Antti Kaihola
2010/12/2 Erik Iverson :
> I also don't understand the following part of
> Antti's message:
>
> "Free text is still not indented and indents are only one space."
>
> That seems contradictory to me?

Sorry about vague language: task items (lines with asterisks) are
indented by only one space, and free text isn't indented at all.

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: spreadsheet sum a column

2010-12-03 Thread Antony

On 12/2/2010 2:29 AM, Antony wrote:

I need to be able sum those numbers and say 600 somewhere (I am ok if it
does in the same table or outside of it)


It seems all my issues were due to me trying to use
sum
instead of
vsum


Thanks for all the replies
-Antony


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Is it possible to do literate programming without org-babel?

2010-12-03 Thread I.S.

Dear Experts,

I think org-babel is great and use it when I can. But on larger projects 
where some people are not emacs users, it may not be feasible for the 
master file to be an org-mode file.


Do you have any suggestions on using literate programming techniques 
when the source code must be in a .py file?


One thing I have tried is switching to org-mode when I want to write 
comments, create links, etc. and do that in org-mode and then switch 
back to python mode. This actually works reasonably well but it's 
annoying to switch modess.


Any better ideas?

--
Thanks,
-I.S.


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] ob-sql error because of not specifying column-seperator

2010-12-03 Thread Joost Helberg
Hi,

when using babel SQL, the column's in the resultset are converted to
org-tables using (org-table-import file sep).

The command used to retrieve the information from the databaseserver
gets the option to use the tab (\t) as columnseperator. 

The call to org-table-import however doesn't specify this
seperator. This leaves it to org-table-import to find out what the
seperator is. org-table-import doesn't always succeed in this. Hence
the diff below which sets the seperator to  (\t).

regards,

Joost Helberg

diff --git a/lisp/ob-sql.el b/lisp/ob-sql.el
index 19c271d..6bb9a96 100644
--- a/lisp/ob-sql.el
+++ b/lisp/ob-sql.el
@@ -80,7 +80,7 @@ This function is called by `org-babel-execute-src-block'."
 (message command)
 (shell-command command)
 (with-temp-buffer
-  (org-table-import out-file nil)
+  (org-table-import out-file '(16))
   (org-babel-reassemble-table
(org-table-to-lisp)
(org-babel-pick-name (cdr (assoc :colname-names params))

-- 
Snow B.V.http://snow.nl

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Org-mode Code Blocks Manuscript: Request For Comments

2010-12-03 Thread Eric S Fraga
"Thomas S. Dye"  writes:

> Hi Eric,
>
> On Dec 2, 2010, at 1:13 PM, Eric S Fraga wrote:

[...]

>> and each is nicely self-contained.  I am a little surprised at the
>> choice of journal, mind you...  
[...]


>
> Would you recommend publishing someplace else?  We hoped list members
> would have opinions on this and welcome comments and suggestions.
>
> All the best,
> Tom

This is a little outside my field, even though I'm a computer scientist.
I work at the interface between computing and industrial engineering...

I was surprised at your choice simply because there appears to be
nothing relevant to statistics about what you have written.  A more
broad computer science journal may make sense, such as "Programming and
Computer Software" from Springer or maybe the "IEEE Transactions on
Software Engineering?"  But I really don't know which are the best
journals for something like this.

Hopefully somebody else from the list will have a better idea!

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 23.2.1
: using Org-mode version 7.3 (release_7.3.164.gcfd7)

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Accepted] [Orgmode] Re: [PATCH] org-agenda: rework ndays and span handling

2010-12-03 Thread Carsten Dominik
Patch 434 (http://patchwork.newartisans.com/patch/434/) is now "Accepted".

Maintainer comment: I still fixed the commit message to contain your original 
explanation, and the defcustom type of the new variable, here day, week etc 
must not be quoted. Thanks.

This relates to the following submission:

http://mid.gmane.org/%3Csa3vd3baxd1.fsf%40cigue.easter-eggs.fr%3E

Here is the original message containing the patch:

> Content-Type: text/plain; charset="utf-8"
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Subject: [Orgmode] Re: [PATCH] org-agenda: rework ndays and span handling
> Date: Fri, 03 Dec 2010 16:50:50 -
> From: Julien Danjou 
> X-Patchwork-Id: 434
> Message-Id: 
> To: Carsten Dominik 
> Cc: Bernt Hansen , Eric S Fraga ,
>   emacs-orgmode@gnu.org
> 
> On Fri, Dec 03 2010, Carsten Dominik wrote:
> 
> > please see comments below and resubmit.
> 
> Ok.
> 
> > Somewhere in the docs, there should be a reference to the older
> > variable, with an index entry and a mention that the other variable
> > should be used instead.  I believe that many people have
> > org-agenda-ndays in there config, in multiple places
> > (in custom commands...)
> 
> Done, I've added a paragraph about that.
> 
> > When you resubmit, please make sure that the extensive explanation you
> > had earlier is part of the commit message.
> 
> I think it's ok.
> 
> Here it is.
> 
> 
> >From decbd6fdab2211c435dd174b84c3945c6aaf6346 Mon Sep 17 00:00:00 2001
> From: Julien Danjou 
> Date: Fri, 26 Nov 2010 14:22:17 +0100
> Subject: [PATCH] org-agenda: rework ndays and span handling
> 
> * org-agenda.el (org-agenda-custom-commands-local-options):
> Allow org-agenda-span to be a symbol.
> (org-agenda-ndays): Make obsolete.
> (org-agenda-span): New variable superseding org-agenda-ndays.
> (org-agenda-menu): Use org-agenda-current-span.
> (org-agenda-current-span): New local variable storing current
> span.
> (org-agenda-list): Take a span instead of ndays as argument.
> This function is now responsible for computing the ndays based
> on span.
> (org-agenda-ndays-to-span): Return span only if number of days
> really matches.
> (org-agenda-span-to-ndays): New function.
> (org-agenda-manipulate-query): Use org-agenda-compute-starting-span.
> (org-agenda-goto-today): Use org-agenda-compute-starting-span.
> (org-agenda-later): Do not give compute a new span, use the
> current one.
> (org-agenda-day-view, org-agenda-week-view)
> (org-agenda-month-view, org-agenda-year-view): Stop touching
> org-agenda-ndays.
> (org-agenda-change-time-span): Only compute starting-span.
> (org-agenda-compute-starting-span): New function derived from
> the old org-agenda-compute-time-span.
> (org-agenda-set-mode-name): Compute mode based on
> org-agenda-current-span.
> (org-agenda-span-name): New function.
> 
> * org-mouse.el: Replace Replace org-agenda-ndays by
> org-agenda-current-span.
> 
> * org.texi, orgguide.texi: Replace org-agenda-ndays by
> org-agenda-span. Add a paragraph about org-agenda-span and say that
> org-agenda-ndays is now deprecated.
> 
> Signed-off-by: Julien Danjou 
> ---
>  doc/org.texi   |   21 +++--
>  doc/orgguide.texi  |6 +-
>  lisp/org-agenda.el |  243 
> +---
>  lisp/org-mouse.el  |4 +-
>  4 files changed, 152 insertions(+), 122 deletions(-)
> 
> diff --git a/doc/org.texi b/doc/org.texi
> index e2e9af5..159191f 100644
> --- a/doc/org.texi
> +++ b/doc/org.texi
> @@ -6966,16 +6966,22 @@ paper agenda, showing all the tasks for the current 
> week or day.
>  @table @kbd
>  @cindex org-agenda, command
>  @orgcmd{C-c a a,org-agenda-list}
> -...@vindex org-agenda-ndays
>  Compile an agenda for the current week from a list of Org files.  The agenda
>  shows the entries for each day.  With a numeric pre...@footnote{for backward
>  compatibility, the universal prefix @kbd{C-u} causes all TODO entries to be
>  listed before the agenda.  This feature is deprecated, use the dedicated TODO
>  list, or a block agenda instead (@pxref{Block agenda}).}  (like @kbd{C-u 2 1
> -C-c a a}) you may set the number of days to be displayed (see also the
> -variable @code{org-agenda-ndays})
> +C-c a a}) you may set the number of days to be displayed.
>  @end table
>  
> +...@vindex org-agenda-span
> +...@vindex org-agenda-ndays
> +The default number of days displayed in the agenda is set by the variable
> +...@code{org-agenda-span} (or the obsolete @code{org-agenda-ndays}).  This
> +variable can be set to any number of days you want to see by default in the
> +agenda, or to a span name, such a @code{day}, @code{week}, @code{month} or
> +...@code{year}.
> +
>  Remote editing from the agenda buffer means, for example, that you can
>  change the dates of deadlines and appointments from the agenda buffer.
>  The commands available in the Agenda buffer are listed in @ref{Agenda
> @@ -7621,10 +7627,9 @@ argument as well.  For example, @kbd{200712 w} will 
> jump to week 12 in
>  be mapped to th

Re: [Orgmode] Re: [babel] Enabling language mode for plantuml?

2010-12-03 Thread Rainer M Krug
Hi zwz

That looks great. Do you have a repository, where I could check for updates?

Rainer

On Fri, Dec 3, 2010 at 12:31 PM, zwz  wrote:

> Rainer M Krug  writes:
>
> > Hi
> >
> > I would like to be able to edit code blocks of plantuml via C-', but I
> > get the message
> > No such language mode: plantuml-mode
> >
> > Is there an easy way of defining this new language mode, so that I can
> > edit it via C-'?
> > I don't need syntax highlighting at the moment, although ' as the
> > comment character would be nice.
> >
> > Thanks,
> >
> > Rainer
> Hi, Rainer
>
> I wrote a plantuml-mode, which is now not perfect but usable.
> It is available on:
> http://zhangweize.wordpress.com/2010/09/20/update-plantuml-mode/
>
> Just copy the code and save it as "plantuml-mode.el" in a path where
> emacs finds its libraries.
>
> Best regards,
> zwz
>
>
> ___
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>



-- 
NEW GERMAN FAX NUMBER!!!

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

Centre of Excellence for Invasion Biology
Natural Sciences Building
Office Suite 2039
Stellenbosch University
Main Campus, Merriman Avenue
Stellenbosch
South Africa

Cell:   +27 - (0)83 9479 042
Fax:+27 - (0)86 516 2782
Fax:+49 - (0)321 2125 2244
email:  rai...@krugs.de

Skype:  RMkrug
Google: r.m.k...@gmail.com
___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: [PATCH] org-agenda: rework ndays and span handling

2010-12-03 Thread Julien Danjou
On Fri, Dec 03 2010, Carsten Dominik wrote:

> please see comments below and resubmit.

Ok.

> Somewhere in the docs, there should be a reference to the older
> variable, with an index entry and a mention that the other variable
> should be used instead.  I believe that many people have
> org-agenda-ndays in there config, in multiple places
> (in custom commands...)

Done, I've added a paragraph about that.

> When you resubmit, please make sure that the extensive explanation you
> had earlier is part of the commit message.

I think it's ok.

Here it is.

From decbd6fdab2211c435dd174b84c3945c6aaf6346 Mon Sep 17 00:00:00 2001
From: Julien Danjou 
Date: Fri, 26 Nov 2010 14:22:17 +0100
Subject: [PATCH] org-agenda: rework ndays and span handling

* org-agenda.el (org-agenda-custom-commands-local-options):
Allow org-agenda-span to be a symbol.
(org-agenda-ndays): Make obsolete.
(org-agenda-span): New variable superseding org-agenda-ndays.
(org-agenda-menu): Use org-agenda-current-span.
(org-agenda-current-span): New local variable storing current
span.
(org-agenda-list): Take a span instead of ndays as argument.
This function is now responsible for computing the ndays based
on span.
(org-agenda-ndays-to-span): Return span only if number of days
really matches.
(org-agenda-span-to-ndays): New function.
(org-agenda-manipulate-query): Use org-agenda-compute-starting-span.
(org-agenda-goto-today): Use org-agenda-compute-starting-span.
(org-agenda-later): Do not give compute a new span, use the
current one.
(org-agenda-day-view, org-agenda-week-view)
(org-agenda-month-view, org-agenda-year-view): Stop touching
org-agenda-ndays.
(org-agenda-change-time-span): Only compute starting-span.
(org-agenda-compute-starting-span): New function derived from
the old org-agenda-compute-time-span.
(org-agenda-set-mode-name): Compute mode based on
org-agenda-current-span.
(org-agenda-span-name): New function.

* org-mouse.el: Replace Replace org-agenda-ndays by
org-agenda-current-span.

* org.texi, orgguide.texi: Replace org-agenda-ndays by
org-agenda-span. Add a paragraph about org-agenda-span and say that
org-agenda-ndays is now deprecated.

Signed-off-by: Julien Danjou 
---
 doc/org.texi   |   21 +++--
 doc/orgguide.texi  |6 +-
 lisp/org-agenda.el |  243 +---
 lisp/org-mouse.el  |4 +-
 4 files changed, 152 insertions(+), 122 deletions(-)

diff --git a/doc/org.texi b/doc/org.texi
index e2e9af5..159191f 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -6966,16 +6966,22 @@ paper agenda, showing all the tasks for the current week or day.
 @table @kbd
 @cindex org-agenda, command
 @orgcmd{C-c a a,org-agenda-list}
-...@vindex org-agenda-ndays
 Compile an agenda for the current week from a list of Org files.  The agenda
 shows the entries for each day.  With a numeric pre...@footnote{for backward
 compatibility, the universal prefix @kbd{C-u} causes all TODO entries to be
 listed before the agenda.  This feature is deprecated, use the dedicated TODO
 list, or a block agenda instead (@pxref{Block agenda}).}  (like @kbd{C-u 2 1
-C-c a a}) you may set the number of days to be displayed (see also the
-variable @code{org-agenda-ndays})
+C-c a a}) you may set the number of days to be displayed.
 @end table
 
+...@vindex org-agenda-span
+...@vindex org-agenda-ndays
+The default number of days displayed in the agenda is set by the variable
+...@code{org-agenda-span} (or the obsolete @code{org-agenda-ndays}).  This
+variable can be set to any number of days you want to see by default in the
+agenda, or to a span name, such a @code{day}, @code{week}, @code{month} or
+...@code{year}.
+
 Remote editing from the agenda buffer means, for example, that you can
 change the dates of deadlines and appointments from the agenda buffer.
 The commands available in the Agenda buffer are listed in @ref{Agenda
@@ -7621,10 +7627,9 @@ argument as well.  For example, @kbd{200712 w} will jump to week 12 in
 be mapped to the interval 1938-2037.
 @c
 @orgcmd{f,org-agenda-later}
-...@vindex org-agenda-ndays
-Go forward in time to display the following @code{org-agenda-ndays} days.
+Go forward in time to display the following @code{org-agenda-current-span} days.
 For example, if the display covers a week, switch to the following week.
-With prefix arg, go forward that many times @code{org-agenda-ndays} days.
+With prefix arg, go forward that many times @code{org-agenda-current-span} days.
 @c
 @orgcmd{b,org-agenda-earlier}
 Go backward in time to display earlier dates.
@@ -8369,7 +8374,7 @@ or, if you need to modify some paramet...@footnote{quoting depends on the
 system you use, please check the FAQ for examples.}
 @example
 emacs -eval '(org-batch-store-agenda-views  \
-  org-agenda-ndays 30   \
+  org-agenda-span month \
   org-agenda-start-day "2007-11-01" \
   org-ag

[Orgmode] Re: [babel] Enabling language mode for plantuml?

2010-12-03 Thread zwz
Rainer M Krug  writes:

> Hi
>
> I would like to be able to edit code blocks of plantuml via C-', but I
> get the message
> No such language mode: plantuml-mode
>
> Is there an easy way of defining this new language mode, so that I can
> edit it via C-'?
> I don't need syntax highlighting at the moment, although ' as the
> comment character would be nice.
>
> Thanks,
>
> Rainer
Hi, Rainer

I wrote a plantuml-mode, which is now not perfect but usable.
It is available on:
http://zhangweize.wordpress.com/2010/09/20/update-plantuml-mode/

Just copy the code and save it as "plantuml-mode.el" in a path where
emacs finds its libraries.

Best regards,
zwz


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Babel, Python and UTF-8

2010-12-03 Thread Sébastien Vauban
Hi Vincent,

Vincent Beffara wrote:
> "preamble" sounds fine (and it would be excellent to allow for a code
> block as a preamble, instead of a string in the header or as an
> alternative, because preambles once they are allowed tend to grow
> uncontrollably ;->)

If you want a bigger preamble, just use noweb expansion:

#+begin_src python :noweb yes
<>
...
my code
...
#+end_src

and have somewhere:

#+srcname: preamble
#+begin_src python
-*- coding-system: utf-8 -*-
...
rest of my preamble
...
#+end_src

Best regards,
  Seb

-- 
Sébastien Vauban


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Excluding DONE todo items from the agenda

2010-12-03 Thread Robert Pluim
Robert Pluim  writes:

> Hi,
>
> is there a way to not show TODO items that are DONE in the agenda view
> ('C-aa') by default? It seems I have them showing up because they have a
> deadline, but when they're done, that doesn't matter anymore :)

And I've now found:
org-agenda-skip-deadline-if-done
which works perfectly.

It must be time for lunch, I didn't see that in my apropos search.

Regards

Robert


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Elisp code to insert a word in table

2010-12-03 Thread ishi soichi
Thanks for such a quick response!

soichi

2010/12/3 Carsten Dominik 

> Hi Ishi,
>
>
> On Dec 3, 2010, at 10:00 AM, ishi soichi wrote:
>
>  Hi. I'm trying to write an elisp code to enter words into a table of
>> org-mode.
>>
>> after designating a buffer, which already contains a table, I simply
>> wrote,
>>
>>'(insert "test!" @2$2)
>>
>> does not work obviously.
>>
>
> indeed.
>
>
>
>
>> Do I need to move the "point" to the particular cell before inserting?
>>
>
> You could to that, using the functions org-table-goto-line and then
> org-table-goto-column.
>
> However, it is easier to use, for programmatic access to fields, the
> functions
> `org-table-put' and `org-table-get'.
>
> - Carsten
>
___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] MobileOrg - why does mobileorg not show all nodes?

2010-12-03 Thread Carsten Dominik


On Dec 3, 2010, at 11:47 AM, Urs Rau (UK) wrote:


Richard,

I played some more with my files (which you should have a copy of)  
and found that because I have an initial "config" node starting with  
"**" in all of my org files, followed by the "main" node(s) all with  
a higher "*" level, the iPhone GUI only showed me the first "config"  
node and nothing else. No "Notes" , and no "subject 1" or "subject  
2" lower parts. Is this a bug or a feature of MobileOrg on the iPhone?


Having the "config" node in a lower heading level first, I can have  
that one, not important, node showing collapsed at beginning of file  
but have the rest of the org file showing in OVERVIEW.


notes.org:
** my org file config
* Notes
** subject 1
** subject 2

Do I have to move the file specific "config" section to the same  
level as the rest of the main nodes?


Yes.

- Carsten

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] MobileOrg - why does mobileorg not show all nodes?

2010-12-03 Thread Urs Rau (UK)
Richard,

I played some more with my files (which you should have a copy of) and found 
that because I have an initial "config" node starting with "**" in all of my 
org files, followed by the "main" node(s) all with a higher "*" level, the 
iPhone GUI only showed me the first "config" node and nothing else. No "Notes" 
, and no "subject 1" or "subject 2" lower parts. Is this a bug or a feature of 
MobileOrg on the iPhone?

Having the "config" node in a lower heading level first, I can have that one, 
not important, node showing collapsed at beginning of file but have the rest of 
the org file showing in OVERVIEW.  

notes.org:
** my org file config
* Notes
** subject 1
** subject 2

Do I have to move the file specific "config" section to the same level as the 
rest of the main nodes? 

Thanks.

Regards

-- 
Urs Rau

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Accepted] [Orgmode] Re: Excluding DONE todo items from the agenda

2010-12-03 Thread Carsten Dominik
Patch 433 (http://patchwork.newartisans.com/patch/433/) is now "Accepted".

Maintainer comment: none

This relates to the following submission:

http://mid.gmane.org/%3Cpknzksncf5y.fsf%40acmepacket.com%3E

Here is the original message containing the patch:

> Content-Type: text/plain; charset="utf-8"
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Subject: [Orgmode] Re: Excluding DONE todo items from the agenda
> Date: Fri, 03 Dec 2010 15:40:57 -
> From: Robert Pluim 
> X-Patchwork-Id: 433
> Message-Id: 
> To: emacs-orgmode@gnu.org
> 
> Robert Pluim  writes:
> 
> > Hi,
> >
> > is there a way to not show TODO items that are DONE in the agenda view
> > ('C-aa') by default? It seems I have them showing up because they have a
> > deadline, but when they're done, that doesn't matter anymore :)
> 
> Whilst investigating this, I noticed the following, which I suspect
> counts as obvious enough that I won't have to sign anything :)
> 
> 2010-12-03  Robert Pluim  
> 
>   * org-agenda.el (org-agenda-toggle-deadlines): Fix docstring
> 
> 
> diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
> index 48856c9..c63fa98 100644
> --- a/lisp/org-agenda.el
> +++ b/lisp/org-agenda.el
> @@ -6314,7 +6314,7 @@ When called with a prefix argument, include all archive 
> files as well."
>  (if org-agenda-include-diary "on" "off")))
>  
>  (defun org-agenda-toggle-deadlines ()
> -  "Toggle diary inclusion in an agenda buffer."
> +  "Toggle inclusion of entries with a deadline in an agenda buffer."
>(interactive)
>(org-agenda-check-type t 'agenda)
>(setq org-agenda-include-deadlines (not org-agenda-include-deadlines))
> 

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] MobileOrg - is line #+LAST_MOBILE_CHANGE: 2010-10-25 19:29:03 important?

2010-12-03 Thread Carsten Dominik


On Dec 3, 2010, at 11:37 AM, Urs Rau (UK) wrote:




I notice that one org file, and only one single one of them. Has a  
second line that says "#+LAST_MOBILE_CHANGE: 2010-10-25 19:29:03".
Is this line required? I am trying to clean up my files and don't  
know how this line came to be?


If you are using MobileOrg, this is information Org uses to make sure  
files are updated correctly when pulling from and pushing to MobileOrg.


If you are not using MobileOrg, you can remove the line.

- Carsten


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Excluding DONE todo items from the agenda

2010-12-03 Thread Robert Pluim
Robert Pluim  writes:

> Hi,
>
> is there a way to not show TODO items that are DONE in the agenda view
> ('C-aa') by default? It seems I have them showing up because they have a
> deadline, but when they're done, that doesn't matter anymore :)

Whilst investigating this, I noticed the following, which I suspect
counts as obvious enough that I won't have to sign anything :)

2010-12-03  Robert Pluim  

* org-agenda.el (org-agenda-toggle-deadlines): Fix docstring

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 48856c9..c63fa98 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -6314,7 +6314,7 @@ When called with a prefix argument, include all archive 
files as well."
   (if org-agenda-include-diary "on" "off")))
 
 (defun org-agenda-toggle-deadlines ()
-  "Toggle diary inclusion in an agenda buffer."
+  "Toggle inclusion of entries with a deadline in an agenda buffer."
   (interactive)
   (org-agenda-check-type t 'agenda)
   (setq org-agenda-include-deadlines (not org-agenda-include-deadlines))


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] MobileOrg - is line #+LAST_MOBILE_CHANGE: 2010-10-25 19:29:03 important?

2010-12-03 Thread Urs Rau (UK)


I notice that one org file, and only one single one of them. Has a second line 
that says "#+LAST_MOBILE_CHANGE: 2010-10-25 19:29:03". 
Is this line required? I am trying to clean up my files and don't know how this 
line came to be?

Regards, 

-- 
Urs Rau
___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] error in calculating percentages in clocktables

2010-12-03 Thread Carsten Dominik

Hi Joost,

thanks for your fast reaction and the testing.

- Carsten

On Dec 3, 2010, at 11:13 AM, Joost Helberg wrote:


Carsten,

your more general approach works fine for me. The pushed fix seems
allright.

many regards,

Joost


"Carsten" == Carsten Dominik  writes:
Subject: Re: [Orgmode] error in calculating percentages in  
clocktables

From: Carsten Dominik 
To: Joost Helberg 
Cc: emacs-orgmode@gnu.org
Date: Fri, 3 Dec 2010 09:52:57 +0100



Hi Joost,



thanks for this, but the new tables are complex and the patch was not
general enough.  I have just pushed a fix which I think is correct.
Please verify.



- Carsten



On Nov 29, 2010, at 11:56 AM, Joost Helberg wrote:



ls,

I'm using clocktables and encountered an issue in calculating the
percentage in the last column. Some columns have moved 1 left in the
head-revision, but the generated formula was not changed.
Hence the following patch. The percentages come out OK with this
patch.

Can someone using clocktables verify that this patch is correct and
doesn't break other stuff?

diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index eb859df..0c7c73b 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -2173,9 +2173,9 @@ from the dynamic block defintion."
(format
"\n#+TBLFM: $%d='(org-clock-time%% @%d$%d $%d..$%d);%%.1f"
pcol
- (+ 2 (if narrow 1 0))
- (+ 3 (if multifile 1 0))
- (+ (if multifile 1 0) 3)
+ (+ 1 (if narrow 1 0))
+ (+ 2 (if multifile 1 0))
+ (+ (if multifile 1 0) 2)
(1- pcol)))
(setq recalc t))
((stringp formula)

regards,

Joost Helberg

--
Snow B.V.http://snow.nl

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode



- Carsten





--
Snow B.V.http://snow.nl


- Carsten




___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Babel, Python and UTF-8

2010-12-03 Thread Vincent Beffara

Hi,

"preamble" sounds fine (and it would be excellent to allow for a code
block as a preamble, instead of a string in the header or as an
alternative, because preambles once they are allowed tend to grow
uncontrollably ;->)

>> The :shebang header argument is only used for tangling, not during
>> evaluation, however if you ever needed to tangle python code blocks with
>> non-ASCII encodings this would be the appropriate solution.
>
> Sorry, reading this after the other post...
>
> But, does it still make sense to make that distinction:
>
> - some sort of preamble only for tangling?
> - a preamble for evaluation (and tangling)?

One naive question : why is the code path different for tangling and
evaluation ? One would think that a natural way for evaluation would be
to tangle the current block (plus included noweb stuff etc) into a
temporary file and eval that file ... and that would enable shebang for
evaluation as well. There must be something I am missing here.

   /v


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Excluding DONE todo items from the agenda

2010-12-03 Thread Robert Pluim
Hi,

is there a way to not show TODO items that are DONE in the agenda view
('C-aa') by default? It seems I have them showing up because they have a
deadline, but when they're done, that doesn't matter anymore :)

Thanks

Robert


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] How to get htmlize.el work for project publishing in Emacs org-mode

2010-12-03 Thread dofine
Hello Emacsers,

 I'm an Emacs newbie , and I want to publish a project in Emacs
org-mode, which contains several .html files.
There are some python code examples in them that I wanna highlight.
 But htmlize.el won't do that for me. Strangely, when exporting single
.html file (using C-c C-e h), the code examples are highlighted .
 So how could I get htmlize.el work for project publishing?

Thank you all.

Best wishes,
dofine


--
I'm fine.

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] error in calculating percentages in clocktables

2010-12-03 Thread Joost Helberg
Carsten,

your more general approach works fine for me. The pushed fix seems
allright. 

many regards,

Joost

> "Carsten" == Carsten Dominik  writes:
 > Subject: Re: [Orgmode] error in calculating percentages in clocktables
 > From: Carsten Dominik 
 > To: Joost Helberg 
 > Cc: emacs-orgmode@gnu.org
 > Date: Fri, 3 Dec 2010 09:52:57 +0100

 > Hi Joost,

 > thanks for this, but the new tables are complex and the patch was not
 > general enough.  I have just pushed a fix which I think is correct.
 > Please verify.

 > - Carsten

 > On Nov 29, 2010, at 11:56 AM, Joost Helberg wrote:

 >> ls,
 >> 
 >> I'm using clocktables and encountered an issue in calculating the
 >> percentage in the last column. Some columns have moved 1 left in the
 >> head-revision, but the generated formula was not changed.
 >> Hence the following patch. The percentages come out OK with this
 >> patch.
 >> 
 >> Can someone using clocktables verify that this patch is correct and
 >> doesn't break other stuff?
 >> 
 >> diff --git a/lisp/org-clock.el b/lisp/org-clock.el
 >> index eb859df..0c7c73b 100644
 >> --- a/lisp/org-clock.el
 >> +++ b/lisp/org-clock.el
 >> @@ -2173,9 +2173,9 @@ from the dynamic block defintion."
 >> (format
 >> "\n#+TBLFM: $%d='(org-clock-time%% @%d$%d $%d..$%d);%%.1f"
 >> pcol
 >> - (+ 2 (if narrow 1 0))
 >> - (+ 3 (if multifile 1 0))
 >> - (+ (if multifile 1 0) 3)
 >> + (+ 1 (if narrow 1 0))
 >> + (+ 2 (if multifile 1 0))
 >> + (+ (if multifile 1 0) 2)
 >> (1- pcol)))
 >> (setq recalc t))
 >> ((stringp formula)
 >> 
 >> regards,
 >> 
 >> Joost Helberg
 >> 
 >> -- 
 >> Snow B.V.http://snow.nl
 >> 
 >> ___
 >> Emacs-orgmode mailing list
 >> Please use `Reply All' to send replies to the list.
 >> Emacs-orgmode@gnu.org
 >> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

 > - Carsten




-- 
Snow B.V.http://snow.nl

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: [Babel] R, multiple lines #+results, LaTeX-export

2010-12-03 Thread Bernd Weiss

Am 03.12.2010 03:41, schrieb Sébastien Vauban:

[...]


I am using Org-mode version 7.3 (release_7.01h.1081.gcfd7.dirty)


That sounds weird to me: version 7.3 and a 7.01 tag!?


Hi Sébastien,

That's what I get when I run "Show Version":

release_7.01h-1081-gcfd7
Org-mode version 7.3 (release_7.01h.1081.gcfd7.dirty)


Bernd

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: [PATCH] org-agenda: rework ndays and span handling

2010-12-03 Thread Carsten Dominik

Hi Julien,

please see comments below and resubmit.

- Carsten

On Dec 3, 2010, at 10:30 AM, Julien Danjou wrote:


On Fri, Dec 03 2010, Bernt Hansen wrote:

I tried your patch out tonight and I'm confused about org-agenda- 
ndays.

This is stated as obsolete (since 24.1 ? what's that?)


An Emacs version. make-obsolete-variable requires a version number  
to be
set, and that's usually the Emacs version number. The next Emacs  
release
including this code will be 24.1, therefore I've set this to 24.1,  
which

is the Good Practice AFAIK.


but the default
for org-agenda-span doesn't seem to be set based on the existing  
value

of org-agenda-ndays.  Is that on purpose?


Yes, but org-agenda-ndays is used instead of org-agenda-span if
org-agenda-ndays has been set.


I'm fine with customizing org-agenda-span as long as it's documented
that this needs to be done for the next version of org-mode that
includes your patch.


I've updated the texi file accordingly (s/ndays/span/).

I also noticed the display on the modeline says 'Day', 'Week',  
'Month',

or 'Year' when displaying the agenda with 'd', 'w', 'v m', and 'v y'
which is great.  However this data is lost and replaced with '1  
days' if
moving forwards or backwards in the agenda with 'f' and 'b' or  
jumping

to a date with 'j'.


Yep, that's a bug. I've fixed it, new version attached.

From 8c3bd1ca371bdb39ab1b64f323154a8135335da8 Mon Sep 17 00:00:00 2001
From: Julien Danjou 
Date: Fri, 26 Nov 2010 14:22:17 +0100
Subject: [PATCH] org-agenda: rework ndays and span handling

* org-agenda.el (org-agenda-custom-commands-local-options):
Allow org-agenda-span to be a symbol.
(org-agenda-ndays): Make obsolete.
(org-agenda-span): New variable superseding org-agenda-ndays.
(org-agenda-menu): Use org-agenda-current-span.
(org-agenda-current-span): New local variable storing current
span.
(org-agenda-list): Take a span instead of ndays as argument.
This function is now responsible for computing the ndays based
on span.
(org-agenda-ndays-to-span): Return span only if number of days
really matches.
(org-agenda-span-to-ndays): New function.
(org-agenda-manipulate-query): Use org-agenda-compute-starting-span.
(org-agenda-goto-today): Use org-agenda-compute-starting-span.
(org-agenda-later): Do not give compute a new span, use the
current one.
(org-agenda-day-view, org-agenda-week-view)
(org-agenda-month-view, org-agenda-year-view): Stop touching
org-agenda-ndays.
(org-agenda-change-time-span): Only compute starting-span.
(org-agenda-compute-starting-span): New function derived from
the old org-agenda-compute-time-span.
(org-agenda-set-mode-name): Compute mode based on
org-agenda-current-span.
(org-agenda-span-name): New function.

* org-mouse.el: Replace Replace org-agenda-ndays by
org-agenda-current-span.

* org.texi, orgguide.texi: Replace org-agenda-ndays by org-agenda- 
span.


Signed-off-by: Julien Danjou 
---
doc/org.texi   |   14 ++--
doc/orgguide.texi  |6 +-
lisp/org-agenda.el |  243  
+---

lisp/org-mouse.el  |4 +-
4 files changed, 146 insertions(+), 121 deletions(-)

diff --git a/doc/org.texi b/doc/org.texi


Somewhere in the docs, there should be a reference to the older
variable, with an index entry and a mention that the other variable
should be used instead.  I believe that many people have
org-agenda-ndays in there config, in multiple places
(in custom commands...)

Thanks.

I do like this change, because I agree with your sentiment
that it is totally wrong to change a defcustom variable.
I think that this variable is so old, maybe from even before
there was a defcustom :)

When you resubmit, please make sure that the extensive explanation you
had earlier is part of the commit message.

- Carsten

- Carsten


index e2e9af5..b5b70c9 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -6966,14 +6966,14 @@ paper agenda, showing all the tasks for the  
current week or day.

@table @kbd
@cindex org-agenda, command
@orgcmd{C-c a a,org-agenda-list}
-...@vindex org-agenda-ndays
+...@vindex org-agenda-span
Compile an agenda for the current week from a list of Org files.   
The agenda
shows the entries for each day.  With a numeric pre...@footnote{for  
backward
compatibility, the universal prefix @kbd{C-u} causes all TODO  
entries to be
listed before the agenda.  This feature is deprecated, use the  
dedicated TODO
list, or a block agenda instead (@pxref{Block agenda}).}  (like  
@kbd{C-u 2 1

C-c a a}) you may set the number of days to be displayed (see also the
-variable @code{org-agenda-ndays})
+variable @code{org-agenda-span})
@end table

Remote editing from the agenda buffer means, for example, that you can
@@ -7621,10 +7621,10 @@ argument as well.  For example, @kbd{200712  
w} will jump to week 12 in

be mapped to the interval 1938-2037.
@c
@orgcmd{f,org-agenda-later}
-...@vindex org-agenda-ndays
-Go forward in time to display the following @code{org-agenda-ndays}  
days.

+...@vindex org-agenda-

Re: [Orgmode] Elisp code to insert a word in table

2010-12-03 Thread Carsten Dominik

Hi Ishi,

On Dec 3, 2010, at 10:00 AM, ishi soichi wrote:

Hi. I'm trying to write an elisp code to enter words into a table of  
org-mode.


after designating a buffer, which already contains a table, I simply  
wrote,


'(insert "test!" @2$2)

does not work obviously.


indeed.




Do I need to move the "point" to the particular cell before inserting?


You could to that, using the functions org-table-goto-line and then  
org-table-goto-column.


However, it is easier to use, for programmatic access to fields, the  
functions

`org-table-put' and `org-table-get'.

- Carsten

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: [PATCH] org-agenda: rework ndays and span handling

2010-12-03 Thread Julien Danjou
On Fri, Dec 03 2010, Bernt Hansen wrote:

> I tried your patch out tonight and I'm confused about org-agenda-ndays.
> This is stated as obsolete (since 24.1 ? what's that?)

An Emacs version. make-obsolete-variable requires a version number to be
set, and that's usually the Emacs version number. The next Emacs release
including this code will be 24.1, therefore I've set this to 24.1, which
is the Good Practice AFAIK.

> but the default
> for org-agenda-span doesn't seem to be set based on the existing value
> of org-agenda-ndays.  Is that on purpose?

Yes, but org-agenda-ndays is used instead of org-agenda-span if
org-agenda-ndays has been set.

> I'm fine with customizing org-agenda-span as long as it's documented
> that this needs to be done for the next version of org-mode that
> includes your patch.

I've updated the texi file accordingly (s/ndays/span/).

> I also noticed the display on the modeline says 'Day', 'Week', 'Month',
> or 'Year' when displaying the agenda with 'd', 'w', 'v m', and 'v y'
> which is great.  However this data is lost and replaced with '1 days' if
> moving forwards or backwards in the agenda with 'f' and 'b' or jumping
> to a date with 'j'.

Yep, that's a bug. I've fixed it, new version attached.

From 8c3bd1ca371bdb39ab1b64f323154a8135335da8 Mon Sep 17 00:00:00 2001
From: Julien Danjou 
Date: Fri, 26 Nov 2010 14:22:17 +0100
Subject: [PATCH] org-agenda: rework ndays and span handling

* org-agenda.el (org-agenda-custom-commands-local-options):
Allow org-agenda-span to be a symbol.
(org-agenda-ndays): Make obsolete.
(org-agenda-span): New variable superseding org-agenda-ndays.
(org-agenda-menu): Use org-agenda-current-span.
(org-agenda-current-span): New local variable storing current
span.
(org-agenda-list): Take a span instead of ndays as argument.
This function is now responsible for computing the ndays based
on span.
(org-agenda-ndays-to-span): Return span only if number of days
really matches.
(org-agenda-span-to-ndays): New function.
(org-agenda-manipulate-query): Use org-agenda-compute-starting-span.
(org-agenda-goto-today): Use org-agenda-compute-starting-span.
(org-agenda-later): Do not give compute a new span, use the
current one.
(org-agenda-day-view, org-agenda-week-view)
(org-agenda-month-view, org-agenda-year-view): Stop touching
org-agenda-ndays.
(org-agenda-change-time-span): Only compute starting-span.
(org-agenda-compute-starting-span): New function derived from
the old org-agenda-compute-time-span.
(org-agenda-set-mode-name): Compute mode based on
org-agenda-current-span.
(org-agenda-span-name): New function.

* org-mouse.el: Replace Replace org-agenda-ndays by
org-agenda-current-span.

* org.texi, orgguide.texi: Replace org-agenda-ndays by org-agenda-span.

Signed-off-by: Julien Danjou 
---
 doc/org.texi   |   14 ++--
 doc/orgguide.texi  |6 +-
 lisp/org-agenda.el |  243 +---
 lisp/org-mouse.el  |4 +-
 4 files changed, 146 insertions(+), 121 deletions(-)

diff --git a/doc/org.texi b/doc/org.texi
index e2e9af5..b5b70c9 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -6966,14 +6966,14 @@ paper agenda, showing all the tasks for the current week or day.
 @table @kbd
 @cindex org-agenda, command
 @orgcmd{C-c a a,org-agenda-list}
-...@vindex org-agenda-ndays
+...@vindex org-agenda-span
 Compile an agenda for the current week from a list of Org files.  The agenda
 shows the entries for each day.  With a numeric pre...@footnote{for backward
 compatibility, the universal prefix @kbd{C-u} causes all TODO entries to be
 listed before the agenda.  This feature is deprecated, use the dedicated TODO
 list, or a block agenda instead (@pxref{Block agenda}).}  (like @kbd{C-u 2 1
 C-c a a}) you may set the number of days to be displayed (see also the
-variable @code{org-agenda-ndays})
+variable @code{org-agenda-span})
 @end table
 
 Remote editing from the agenda buffer means, for example, that you can
@@ -7621,10 +7621,10 @@ argument as well.  For example, @kbd{200712 w} will jump to week 12 in
 be mapped to the interval 1938-2037.
 @c
 @orgcmd{f,org-agenda-later}
-...@vindex org-agenda-ndays
-Go forward in time to display the following @code{org-agenda-ndays} days.
+...@vindex org-agenda-span
+Go forward in time to display the following @code{org-agenda-current-span} days.
 For example, if the display covers a week, switch to the following week.
-With prefix arg, go forward that many times @code{org-agenda-ndays} days.
+With prefix arg, go forward that many times @code{org-agenda-current-span} days.
 @c
 @orgcmd{b,org-agenda-earlier}
 Go backward in time to display earlier dates.
@@ -8369,7 +8369,7 @@ or, if you need to modify some paramet...@footnote{quoting depends on the
 system you use, please check the FAQ for examples.}
 @example
 emacs -eval '(org-batch-store-agenda-views  \
-  org-agenda-ndays 30   \
+  org-agenda-span month  

Re: [Orgmode] [babel] Enabling language mode for plantuml?

2010-12-03 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 12/02/2010 08:42 PM, Eric Schulte wrote:
> Hi Rainer,

Hi Eric,

> 
> Try something like the following

works nicely - thanks.

> 
> #+begin_src emacs-lisp
>   (add-to-list 'org-src-lang-modes '("plantuml" . fundamental))
> #+end_src
> 
> Perhaps the above code should be part of the ob-plantuml.el file.

Yes. That would be useful.
Is there an easy way of bringing some syntax highlighting and comments
character into the C' buffer?

Rainer
> 
> Best -- Eric
> 
> Rainer M Krug  writes:
> 
>> Hi
>>
>> I would like to be able to edit code blocks of plantuml via C-', but I
>> get the message
>> No such language mode: plantuml-mode
>>
>> Is there an easy way of defining this new language mode, so that I can
>> edit it via C-'?
>> I don't need syntax highlighting at the moment, although ' as the
>> comment character would be nice.
>>
>> Thanks,
>>
>> Rainer


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

Centre of Excellence for Invasion Biology
Natural Sciences Building
Office Suite 2039
Stellenbosch University
Main Campus, Merriman Avenue
Stellenbosch
South Africa

Tel:+33 - (0)9 53 10 27 44
Cell:   +27 - (0)8 39 47 90 42
Fax (SA):   +27 - (0)8 65 16 27 82
Fax (D) :   +49 - (0)3 21 21 25 22 44
Fax (FR):   +33 - (0)9 58 10 27 44
email:  rai...@krugs.de

Skype:  RMkrug
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkz4tK4ACgkQoYgNqgF2egpmEwCeL2LSCALKzyKQ8eIhkfzoeKSh
AYMAninhOQtKyecyKxZ1qapgBYJ5jCwy
=zoWi
-END PGP SIGNATURE-

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Elisp code to insert a word in table

2010-12-03 Thread ishi soichi
Hi. I'm trying to write an elisp code to enter words into a table of
org-mode.

after designating a buffer, which already contains a table, I simply wrote,

'(insert "test!" @2$2)

does not work obviously.

Do I need to move the "point" to the particular cell before inserting?

Thanks in advance.

soichi
___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] error in calculating percentages in clocktables

2010-12-03 Thread Carsten Dominik

Hi Joost,

thanks for this, but the new tables are complex and the patch was not  
general enough.  I have just pushed a fix which I think is correct.   
Please verify.


- Carsten

On Nov 29, 2010, at 11:56 AM, Joost Helberg wrote:


ls,

I'm using clocktables and encountered an issue in calculating the
percentage in the last column. Some columns have moved 1 left in the
head-revision, but the generated formula was not changed.
Hence the following patch. The percentages come out OK with this
patch.

Can someone using clocktables verify that this patch is correct and
doesn't break other stuff?

diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index eb859df..0c7c73b 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -2173,9 +2173,9 @@ from the dynamic block defintion."
 (format
  "\n#+TBLFM: $%d='(org-clock-time%% @%d$%d $%d..$%d);%%.1f"
  pcol
- (+ 2 (if narrow 1 0))
- (+ 3 (if multifile 1 0))
- (+ (if multifile 1 0) 3)
+ (+ 1 (if narrow 1 0))
+ (+ 2 (if multifile 1 0))
+ (+ (if multifile 1 0) 2)
  (1- pcol)))
(setq recalc t))
   ((stringp formula)

regards,

Joost Helberg

--
Snow B.V.http://snow.nl

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


- Carsten




___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: [Babel] R, multiple lines #+results, LaTeX-export

2010-12-03 Thread Sébastien Vauban
Hi Bernd,

Bernd Weiss wrote:
> (1) If I execute the following code block (see "Before codeblock 
> execution") which is followed by a headline or another codeblock, the
> results-block (see "After codeblock execution") interferes with the
> headline/codeblock/whatever.

Same thing just reported by Eric (12 min before you), and experienced by me as
well.


> (2) The results-block is complex insofar as it has multiple lines. If I 
> choose "export as LaTeX and process to PDF" (I corrected the wrong 
> #+end_example line manually), the resulting PDF file only shows the code
> but not the results. However, this behaviour is only related to my 
> meta-analysis example. If I use, for example, summary(lm(rnorm(100)~1)), 
> the resulting PDF file shows code + results.
>
> I am using Org-mode version 7.3 (release_7.01h.1081.gcfd7.dirty)

That sounds weird to me: version 7.3 and a 7.01 tag!?

Best regards,
  Seb

-- 
Sébastien Vauban


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: [bug] [babel] executing code block overwrites subsequent heading

2010-12-03 Thread Sébastien Vauban
Hi Eric,

Eric S Fraga wrote:
> suddenly, there seems to be a rather strange bug in the insertion of
> babel code block results into the org file.  Attached are two files:
> =examplebug.org= which has a simple octave code block *before* the code
> block is executed and =examplebugafter.org= which is what the file looks
> like after executing the code block (C-c C-c).
>
> The =#+end_example= line is somehow placed in the middle of the
> following headline!  Very strange.
>
> I do not believe I have changed any org or babel specific configurations
> in a while...
>
> org itself is very recent (a couple of minutes ago), with version in my
> signature.

I do experience the same type of problems with #+call lines, on an Org version
of 2 days ago (or so). This problem seems very new to me, certainly a commit
from somewhere this week.

Best regards,
  Seb

-- 
Sébastien Vauban


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Accepted] [Orgmode] org-agenda: Fix category string for agenda

2010-12-03 Thread Carsten Dominik
Patch 431 (http://patchwork.newartisans.com/patch/431/) is now "Accepted".

Maintainer comment: Thanks for the perfect commit message.  One less I need to 
tweak.

This relates to the following submission:

http://mid.gmane.org/%3C87d3pkvtz8.fsf%40fastmail.fm%3E

Here is the original message containing the patch:

> Content-Type: text/plain; charset="utf-8"
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Subject: [Orgmode] org-agenda: Fix category string for agenda
> Date: Fri, 03 Dec 2010 00:37:54 -
> From: Matt Lundin 
> X-Patchwork-Id: 431
> Message-Id: <87d3pkvtz8@fastmail.fm>
> To: Org Mode 
> 
> * lisp/org-agenda.el: (org-format-agenda-item) The value of
> org-category is not converted to a string unless it is defined.
> 
> This fixes commit 3061c7083d8caa849cf2d3f2f53b8b71d45dd6de, which
> resulted in org-format-agenda-item always returning the symbol-name for
> org-category even if it was not defined. I.e., in some instances,
> org-format-agenda-item returned the string "nil", thus bypassing the
> buffer-file-name method of deriving the category.
> 
> ---
> lisp/org-agenda.el |2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
> index 48856c9..c339f60 100644
> --- a/lisp/org-agenda.el
> +++ b/lisp/org-agenda.el
> @@ -5097,7 +5097,7 @@ Any match of REMOVE-RE will be removed from TXT."
>  (let* ((category (or category
>(if (stringp org-category)
>org-category
> -(symbol-name org-category))
> +(and org-category (symbol-name org-category)))
>(if buffer-file-name
>(file-name-sans-extension
> (file-name-nondirectory buffer-file-name))
> 

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: [PATCH] org-agenda: rework ndays and span handling

2010-12-03 Thread Carsten Dominik


On Dec 3, 2010, at 3:11 AM, Bernt Hansen wrote:


Julien Danjou  writes:


On Wed, Dec 01 2010, Eric S Fraga wrote:

Mostly works fine but there is one problem I have encountered.  If  
you

change your view (mine defaults to day so I sometimes switch to week
view), you can go forward and backward as expected.  However, if you
/jump/ (j in agenda view) to a given date, the view resets to the
default (well, to single day view in my case).  I prefer the view to
remain as I have specified it last until I change it myself.


Good catch. Patch updated fixing that.


Hi Julien,

I tried your patch out tonight and I'm confused about org-agenda- 
ndays.

This is stated as obsolete (since 24.1 ? what's that?) but the default
for org-agenda-span doesn't seem to be set based on the existing value
of org-agenda-ndays.  Is that on purpose?

I'm fine with customizing org-agenda-span as long as it's documented
that this needs to be done for the next version of org-mode that
includes your patch.



I guess making org-agenda-ndays should be made an alias for org-agenda- 
span.




I also noticed the display on the modeline says 'Day', 'Week',  
'Month',

or 'Year' when displaying the agenda with 'd', 'w', 'v m', and 'v y'
which is great.  However this data is lost and replaced with '1  
days' if

moving forwards or backwards in the agenda with 'f' and 'b' or jumping
to a date with 'j'.

Otherwise I think this looks good to me.

Regards,
Bernt




- Carsten




___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode