[Orgmode] Re: [babel] Give a name to the plot

2009-12-04 Thread Sébastien Vauban
Hi Dan,

Dan Davison wrote:
 Sébastien Vauban wxhgmqzgw...@spammotel.com writes:

 Just a quick question (before testing and answering properly, tomorrow, to
 your post): how do you give a name to an R plot?

 Just taking your example file:

 #+srcname: directory-pie-chart(dirs = directories)
#+begin_src R :session R-pie-example
pie(dirs[,1], labels = dirs[,2])
#+end_src
  [[file:../../images/babel/dirs.png]]

 I don't see how the `dirs.png' name is derivated from the above block?

 Hi Seb,

 Sorry, more documentation shortcomings. When that was written it did not
 happen automatically, but it does now.

You don't have to be sorry. *I am* more than grateful by all you already have
given to us... A documentation lack is something expected in such big
projects, still on the move. That's not a problem for me. Your responsiveness
on the mailing list does correct such little features.


 I've tried arguments such as `:file' or `filename:', but did not get any
 success...

 e.g.

 :file filename.png

 should do it. Here's the relevant commit note. I'll move this into the
 documentation now.

 [...]

 An example block is (although both bg and fg can be passed directly as
 header args)

 \#+begin_src R :file z.pdf :width 8 :height 8 :R-dev-args bg=olivedrab, 
 fg=hotpink
   plot(matrix(rnorm(100), ncol=2), type=l)
 \#+end_src

It does work, yes!

Though, it did not when I tested, as I surrounded the filename with double
quotes:

:file filename.png

No message. No file generated. That was the observation I could make.

Thanks for helping...


 Currently, all my R blocks produce an `Rplots.pdf' graph file... Don't see
 where that is coming from... Pay attention: I'm an R user for the last 3 days

 That is the default in R when you issue plot commands from a
 non-interactive R process. But if you use the :file header arg all
 graphical output will be diverted to the named file as outlined above.

OK.

A side question (now that I have more graphics appearing in my example
document): is there/would there/will there be a way to regenerate all the
graphics included in my document?

I would be nice, as input data is changing over time. Let's take the example
you took in your doc: the directory organization on your disk. Let's imagine
you have 3 such graphics for 3 different disks. How could you get all of these
external commands launched for getting new data and new plots?

I can imagine (that's how Carsten does see the things with the tables, if I
understand correctly) this never will or would be automatic upon opening of
file -- and I can share the motivation for such decision. But can we imagine a
command that does the update of all blocks -- so, when the user does decide it?

Currently, I have to go in every block and C-c C-c them all, right?

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: [babel] Tables to DB

2009-12-04 Thread andrea
Eric Schulte schulte.e...@gmail.com writes:

 Org-babel has support for SQL, so I presume that you could use that as a
 somewhat manual way to dump org-mode tables into sql tables.

 Also, if you have a python tool which you are using for interaction with
 sql tables, it may be easiest to use org-babel to convert your org-mode
 tables into python arrays, then let python handle the rest of the
 integration.

 Best -- Eric


Good thanks I'll try it out something and see how it works..
Sorry for the double posting by the way, gnus is still non deterministic
for me (configuration problem I guess), I always see different messages!



___
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: Differences html/pdf

2009-12-04 Thread andrea
Carsten Dominik carsten.domi...@gmail.com writes:

 On Nov 1, 2009, at 8:01 PM, andrea Crotti wrote:

 Yes, take a big complicated Org file, maybe something in WOrg, and
 export
 it with this option.  Then check if everything looks good.  In
 particular tables, list,
 verbatim examples, etc

 - Carsten

After a while I write again here, I've tried to export to pdf with \n:t
quite a few times, and I've only found one problem

I don't know how I can show you but in short lists inside a block get a
wrong indentation.
Instead of being more indented they are less indented and go toward the
left border.

It's definitely a problem of \obeylines because with \n:nil it works
fine.
I've pasted here some latex code, try to generate a pdf and see section
2.a to see what I mean.

http://gist.github.com/248980

In the meanwhile it would be maybe good to give a message to the user
who wants to convert to pdf using \n:t, check carefully the result for
example.

Thanks
Andrea



___
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] Org-babel vs NoWeb (and the like)

2009-12-04 Thread Sébastien Vauban
Hi Dan and Eric,

Please find here a document written with both NoWeb and Org-babel, to be able
to compare and explain the differences between both approaches.

What's *nice with Org-babel* is:

- code is easy to edit in the source buffer with =C-c '= (highlighted
  correctly in the indirect buffer)
- source (Org text + code) is much, much more readable (with nicely
  highlighted sections)
- all the source blocks are correctly colored in the PDF, according to the
  source language (via listings) -- even the ones that are not tangled

Org-babel source: http://www.mygooglest.com/sva/ecm-babel-org.org
Org-babel PDF: http://www.mygooglest.com/sva/ecm-babel-org.pdf

What's *not nice with Noweb* is:

- source (Org text + code) is even less readable than LaTeX, and not really
  correctly fontified by current Emacs modes (being extended LaTeX)
- code must be tangled through an external command
- source blocks are just verbatim (with yellow background in my case), but no
  language-sensitive highlighting
- only tangled outputs that are re-imported in the document through listings
  can be highlighted correctly in the PDF

Noweb source: http://www.mygooglest.com/sva/ecm-noweb.nw
Noweb PDF: http://www.mygooglest.com/sva/ecm-noweb.pdf

Though, what's *nice with Noweb* is:

- every code snippet is identified (left, in the PDF) by a counter, for easy
  reference (page + order position) from another block of code
- every code snippet lists where it's used (right, in the PDF), using the same
  counters
- tangled code is correctly indented

These last points are, for me, the only drawbacks (a big word -- dunno
which other word to use, not native speaker) of Org-babel for literate
programming.

Would they be fixed, Org-babel would clearly, clearly, clearly out-beats all
alternative I'm aware of (Nuweb and NoWeb)...

Would they never be fixed, I still prefer Org-babel (vs NoWeb)!

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] [MobileOrg] Plans for an android app ?

2009-12-04 Thread Bastien
Carsten Dominik carsten.domi...@gmail.com writes:

 And the Android app will be easier in a way, because the workflow hast
 been designed and all the support code is in place.

 So:  WHO???

 :-)

I just stumbled upon this Android application:

  http://niftyware.com/alex/

Maybe there are nice ways to make this interact with the futur Org
application for Android...   

-- 
 Bastien


___
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 version 6.32trans and 6.21b; Strange interaction between whitespace-mode and cust. org-ellipsis

2009-12-04 Thread Carsten Dominik


On Dec 3, 2009, at 10:34 PM, Martin Pohlack wrote:


Carsten Dominik wrote:

Hi Martin, this looks to me like a bug in whitespace.el, why does it
override the display table org-mode is using?


Hmm, my understanding is that each buffer can have its own display
table, buffer-display-table.  whitespace-mode has to modify this table
(or install an own one) if it wants to do buffer-local modifications.
So I think it modifies org-mode's table but doesn't override it.

My irritation is that by doing so, it does modifies some global state
that effects other buffers.

A short look into org.el shows that org-display-table is never made
buffer local, so this data structure is shared across all org-mode  
buffers?


Yes, this is the idea, and it seems only logical to me.  So why
do you want different settings in different Org buffers for
whitespace?  So far I am unconvinced that creating a new
table in each buffer with the right thing to do.

- Carsten




The following hack seems to solve this problem:

--- org.el.bak  2009-12-03 22:31:07.0 +0100
+++ org.el  2009-12-03 22:31:48.0 +0100
@@ -427,9 +427,6 @@
 (face :tag Face :value org-warning)
 (string :tag String :value ...#)))

-(defvar org-display-table nil
-  The display table for org-mode, in case `org-ellipsis' is non- 
nil.)

-
(defgroup org-keywords nil
  Keywords in Org-mode.
  :tag Org Keywords
@@ -4170,8 +4167,7 @@
  (when (and org-ellipsis
 (fboundp 'set-display-table-slot) (boundp
'buffer-display-table)
 (fboundp 'make-glyph-code))
-(unless org-display-table
-  (setq org-display-table (make-display-table)))
+(setq org-display-table (make-display-table))
(set-display-table-slot
 org-display-table 4
 (vconcat (mapcar


Cheers,
Martin


- 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] [Android] [MobileOrg] Plans for an android app ?

2009-12-04 Thread Friedrich Delgado Friedrichs
Hi.

Bastien schrieb:
 Carsten Dominik carsten.domi...@gmail.com writes:
 I just stumbled upon this Android application:
 
   http://niftyware.com/alex/
 Maybe there are nice ways to make this interact with the futur Org
 application for Android...   

Did you try out Locale? It looks like it does much of what alex is
supposed to do and there's a plugin api that many android applications
already support, e.g. it integrates well with Astrid.

That alex project looks quite ambitious, though. If it can detect my
current speed, that would be something I'd appreciate, since Locale is
not able to detect that (yet).

-- 
Friedrich Delgado Friedrichs frie...@nomaden.org
 TauPan on Ircnet and Freenode ;)


___
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] Executing sh-code

2009-12-04 Thread Sébastien Vauban
Hi Eric,

Eric Schulte wrote:
 Sébastien Vauban wxhgmqzgw...@spammotel.com writes:

 #+begin_src sh :session ecm
 ls *.org
 #+end_src

Nothing to do with the problem, but better to write `:session ecm' than
`:session ecm', no?


 I C-c C-c the first snippet. Nothing special, except it doesn't hang
 anymore. Second snippet. C-c C-c. There, it still hangs ;-((

 [...]

 So the fix here is to fix the value of the `comint-prompt-regexp'
 variable in your shell.  Org-babel uses this variable to digest output
 from the shell.  I have mine set with the following

 (defun schulte/set-shell-prompt-regexp ()
   (setq comint-prompt-regexp ^\(.+\)))
 (add-hook 'shell-mode-hook 'schulte/set-shell-prompt-regexp)

 I've put that in my .emacs file, as you can see (when asking for its value in
 the shell buffer):

 I'm sorry I wasn't clear in my earlier email.  You will need to craft
 your own regexp to replace ^\(.+\) in the above code.  This is because
 you will need to match your own prompt as it appears in your *shell*
 buffers locally.  This would be the product of your personal .bashrc or
 .zshrc prompt configuration.  The example I pasted above matches my own
 prompt which has a non-standard

 ( ~ )

 style.

 You'll have to change the regexp (^\(.+\) in my example) to match your
 prompt.

 Nope. Because I'm using your prompt, as you can see in the above shell
 session.

 Nope, I use a different prompt.  To match a prompt like what you have
 above you'd want to use something like closer to the default value of
 ^[^#$%\n]*[#$%] *.  Sorry for the confusion here.

Okaaayy. Did not look enough at the regexp... Sorry.


 [...] The following works for me without any hang.
 The only difference I can see between our setups is a matching prompt
 regexp.

That was it. Fixing my PS1 prompt to be like yours (temporarily keeping your
regexp from the comint-prompt) *did* solve the problem.

 #+begin_src sh :session eric
   cd ~/Desktop/clj/
   ls *.clj
 #+end_src

 #+results:
 | ants.clj |  | concurrent.clj |  | hello.clj |  | 
 spell-checker.clj |

Similar results for my directory.

Thanks a lot!!!

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: [babel] Executing sh-code

2009-12-04 Thread Sébastien Vauban
Hi Eric,

Sébastien Vauban wrote:
 Eric Schulte wrote:

 [...] The following works for me without any hang.
 The only difference I can see between our setups is a matching prompt
 regexp.

 That was it. Fixing my PS1 prompt to be like yours (temporarily keeping your
 regexp from the comint-prompt) *did* solve the problem.

Testing that a bit further, I notice that:

- my Bash prompt must be uncolored for the output to be catchable by
  Org-babel;

- ls can be colored, but control characters are then passed as is to
  Org-babel, so better not doing it.

Dunno about the multiline prompt. Stopped using this. Causes me too much
trouble anyway with other configs as well (such as Tramp).

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: [babel] Is this supported?

2009-12-04 Thread Sébastien Vauban
Hi Dan,

Dan Davison wrote:
 Sébastien Vauban wxhgmqzgw...@spammotel.com writes:

 Is there a way to tangle it with some string replacements being made, such 
 as:

 | pTable| dossier |
 | pColumn   | pfiNew  |
 | pDatatype | string  |
 | pAcceptnullvalues | NULL|

 I've tried the following, with no success:

 #+srcname: 
 add-column-in-table(pTable=dossier,pColumn=pfiNew,pDatatype=string,pAcceptnullvalues=NULL)

 Those function-arguments / variable assignments won't affect the
 *tangled* output.

In fact, what I'm asking for, here, is some sort of m4 preprocessing with
stupid string replacement.

This would certainly be a nice to have, for easing some tasks (be it
scripts, commands or functions) that look to each other... but for a tiny
detail.


 Afaik the only method for making substitutions in the tangled output is the
 source block name block references. So one way to achieve what you want
 would be to create a block for each string replacement (Example [1] below; I
 don't know if I've got the quoting right in the sql output). But perhaps
 Tom/Eric will have a better answer.

 #+begin_src sql :tangle dossier.sql
 -- add column `pfiDossierSentToSecteur' (if column does not exist 
 yet)
 IF NOT EXISTS (SELECT *
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME = 'pTable'
AND COLUMN_NAME = 'pColumn)
 BEGIN
 ALTER TABLE pTable
 ADD pColumn pDatatype pAcceptnullvalues
 END
 GO
 #+end_src

 Is such a feature supported, or another way to come down to the same result?

 [1] 
 
 #+srcname: pTable
 #+begin_src emacs-lisp
 dossier
 #+end_src

 #+srcname: pColumn
 #+begin_src emacs-lisp
 pfiNew
 #+end_src

 #+srcname: pDatatype
 #+begin_src emacs-lisp
 string
 #+end_src

 #+srcname: pAcceptnullvalues
 #+begin_src emacs-lisp
 NULL
 #+end_src

 #+begin_src sql :tangle dossier.sql :engine mysql
 -- add column `pfiDossierSentToSecteur' (if column does not exist yet)
 IF NOT EXISTS (SELECT *
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME = pTable
AND COLUMN_NAME = pColumn)
 BEGIN
 ALTER TABLE pTable
 ADD pColumn pDatatype pAcceptnullvalues
 END
 GO
 #+end_src
 

A bit verbose, but this is exactly the workaround I asked for.

Excellent!  Thanks...

The nice to have feature would then be a shorter notation for such tiny
string replacements.


 Incidentally, it seems that we do not currently support variables when
 *evaluating* an sql block. I.e. the function-arguments that you used:

 #+srcname: 
 add-column-in-table(pTable=dossier,pColumn=pfiNew,pDatatype=string,pAcceptnullvalues=NULL)

 will have no effect. The patch below[2] implements that. I'll let Eric
 decide whether it's appropriate as I don't know anything about sql.

I currently cannot test it, as I'm using a MS SQL database (with command-line
program called `isql' -- for interactive SQL) and play with databases in a
Windows VM (only used for that, what a pity!).

I'll let you know as soon as I can make such direct requests against a MySQL
DB (the one supported by your code).


 [2] 
 
 diff --git a/contrib/babel/lisp/langs/org-babel-sql.el 
 b/contrib/babel/lisp/langs/org-babel-sql.el
 index 837c5fd..7e37fee 100644
 --- a/contrib/babel/lisp/langs/org-babel-sql.el
 +++ b/contrib/babel/lisp/langs/org-babel-sql.el
 @@ -55,7 +55,8 @@
Execute a block of Sql code with org-babel.  This function is
  called by `org-babel-execute-src-block'.
(message executing Sql source code block)
 -  (let* ((result-params (split-string (or (cdr (assoc :results params)) )))
 +  (let* ((processed-params (org-babel-process-params params))
 +(vars (second processed-params))
   (cmdline (cdr (assoc :cmdline params)))
   (engine (cdr (assoc :engine params)))
   (in-file (make-temp-file org-babel-sql-in))
 @@ -66,6 +67,9 @@ called by `org-babel-execute-src-block'.
  (or cmdline ) in-file out-file))
 ('nil (error sql engine not specified))
  (t (error no support for the %s sql engine engine)
 +(mapc (lambda (pair)
 +   (setq body (replace-regexp-in-string (format %s (car pair)) 
 (cdr pair) body)))
 + vars)
  (with-temp-file in-file (insert body))
  (message command)
  (shell-command command)
 

Anyway, if you think it should behave better this way, then yes, commit it...


 Note that you would need to quote the strings in your srcname line (i.e.
 (pTable=dossier, ...))

I'm a bit 

Re: [Orgmode] Agenda not working or am I misunderstanding how it works?

2009-12-04 Thread U Avalos
Someone suggested I use the variable org-agenda-skip-deadline-if-done.
It works on standard org files using the default todo keywords -- if I give 
a TODO item a deadline and then set it to DONE, it doesn't show up in agenda. 
Yay!

HOWEVER, if I use custom todo keywords per file, it stops working for that 
file. I'm using these keywords:

#+SEQ_TODO: TODO WAITING | PUBLISHED REJECTED

Todo items set to PUBLISHED and REJECTED still show up in the agenda. Any 
ideas?

On Wednesday 25 November 2009 11:54:19 U Avalos wrote:
 I have the following completed todo item:

 ** DONE pay Yolanda
DEADLINE: 2009-11-24 Tue CLOSED: [2009-11-25 Wed 11:18]

 Yet it still appears in the weekly agenda. Is it not working right or is
 that how it's supposed to work?

 Also, when I hit C-c C-w (show deadlines in current buffer), I get ALL todo
 items, even completed items that are really old. Restricting it with a
 numeric prefix (ex: Esc 5 C-c C-w), doesn't work either. I just get all
 items plus or minus the number of days.


 ___
 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: Agenda not working or am I misunderstanding how it works?

2009-12-04 Thread Matt Lundin
U Avalos amscopub-m...@yahoo.com writes:

 Someone suggested I use the variable org-agenda-skip-deadline-if-done.
 It works on standard org files using the default todo keywords -- if I give 
 a TODO item a deadline and then set it to DONE, it doesn't show up in agenda. 
 Yay!

 HOWEVER, if I use custom todo keywords per file, it stops working for that 
 file. I'm using these keywords:

 #+SEQ_TODO: TODO WAITING | PUBLISHED REJECTED

 Todo items set to PUBLISHED and REJECTED still show up in the agenda. Any 
 ideas?

I cannot replicate this. With the above setting scheduled items marked
PUBLISHED and REJECTED do not show up in the agenda. 

- Matt


___
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 version 6.32trans and 6.21b; Strange interaction between whitespace-mode and cust. org-ellipsis

2009-12-04 Thread Martin Pohlack
Carsten Dominik wrote:
 On Dec 3, 2009, at 10:34 PM, Martin Pohlack wrote:
 
 Carsten Dominik wrote:
 Hi Martin, this looks to me like a bug in whitespace.el, why does it
 override the display table org-mode is using?
 Hmm, my understanding is that each buffer can have its own display
 table, buffer-display-table.  whitespace-mode has to modify this table
 (or install an own one) if it wants to do buffer-local modifications.
 So I think it modifies org-mode's table but doesn't override it.

 My irritation is that by doing so, it does modifies some global state
 that effects other buffers.

 A short look into org.el shows that org-display-table is never made
 buffer local, so this data structure is shared across all org-mode  
 buffers?
 
 Yes, this is the idea, and it seems only logical to me.  So why
 do you want different settings in different Org buffers for
 whitespace?  So far I am unconvinced that creating a new
 table in each buffer with the right thing to do.

Ok, I have three argument to support this.

1. Let me start by describing a helper and how I use it.  This is a
   snippet from my init.el:

8--8
;;;
;;; whitespace stuff
;;;
(when (require 'whitespace nil t)
  (require 'column-marker)

  (defvar cycle-whitespace-modes-state 0
whitespace mode states:
 0 - no whitespace stuff,
 1 - highlighting of stray whitespace, 72  80 column lines
 2 - ws highlighting and identification for tabs and spaces (», ·))
  (make-variable-buffer-local 'cycle-whitespace-modes-state)

  (defun my-cycle-whitespace-modes (optional state)
(interactive)
(if state
(setq cycle-whitespace-modes-state state)
  (setq cycle-whitespace-modes-state
(mod (1+ cycle-whitespace-modes-state) 3)))
(case cycle-whitespace-modes-state
  (0
   (whitespace-mode 0)
   (column-marker-1 -2)
   (column-marker-2 -2)
   (column-marker-3 -2))
  (1
   (whitespace-mode 0)
   (whitespace-mode 1)
   (column-marker-1 72)
   (column-marker-2 80))
  (otherwise
   (whitespace-mode 0)
   (whitespace-mode 1)
   (whitespace-toggle-options (list 'tab-mark 'space-mark))
   (column-marker-1 72)
   (column-marker-2 80

  (global-set-key [f10] 'my-cycle-whitespace-modes)

  (defun my-whitespace-modes-none () (my-cycle-whitespace-modes 0))
  (defun my-whitespace-modes-some () (my-cycle-whitespace-modes 1))
  (defun my-whitespace-modes-full () (my-cycle-whitespace-modes 2))

  (add-hook 'c-mode-common-hook 'my-whitespace-modes-some)
  ;…
  )
8--8

I usually have whitespace mode active in a medium warning level
(my-whitespace-modes-some), which show whitespace at end of line etc.

Sometimes, I want to see all spaces and tabs in a single buffer
explicitly, e.g. for aligning stuff manually or debugging things
(my-whitespace-modes-full).

At other times, I want to deactivate all whitespace highlighting
(my-whitespace-modes-none), e.g., when dealing with long lines or when
crafting some ASCII drawings.

I make, all of these decision per buffer.


2. Whitespace-mode is usually buffer local.  Having it modify other
   buffers is irritating.  If global effects are desired there is the
   variable whitespace-global-modes


3. (whitespace-toggle-options …) is documented to modify the local
   buffer only.


Org's global display table de-localizes all of whitespace-mode's local
functionality.

Cheers,
Martin


___
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] Lists for org-refile-targets

2009-12-04 Thread Nathan Neff
Hello,

I'm not a lisp programmer -- I would like to tell org-mode to
use two lists of files (org-agenda-files and notesmine-files) when I refile
my remember notes.

Currently, I'm getting an error when I try to refile my notes
and I think it's something very basic.

Here's the relevant code:

;; Use environment variable $ORGDIR to get dir for org-directory
(setq org-directory (getenv ORGDIR))
(setq notesmine-dir ~/Documents/notesmine-org)

(setq org-agenda-files (file-expand-wildcards (concat org-directory
/*.org)))
(setq notesmine-files (file-expand-wildcards (concat notesmine-dir
/*.org)))

; Targets include this file and any file contributing to the agenda - up to
5 levels deep
(setq org-refile-targets
  (quote
(
  (org-agenda-files :maxlevel . 5)
  (notesmine-files :maxlevel . 5)
  (nil :maxlevel . 5)
)
  )
)

I've tried concatenating org-agenda-files and notesmine-files, but I keep
getting errors
when trying to refile.  The error that I get is:
Wrong type argument, numberp (0.5)

I can provide a stack trace, but I don't think this is a bug -- I just think
that
I'm not concatenating the list of files that I want to use in
org-refile-targets
correctly.

Any suggestions?

Thanks,
--Nate
___
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] respect org-link-file-path-type when inserting docview: links

2009-12-04 Thread Jan Böcker
This patch is also in the docview branch at:
http://github.com/jboecker/org-docview

The function org-insert-link checks if it is inserting a file: link.
If this is the case, the path is manipulated according to the current
buffer file name and the variable 'org-link-file-path-type'.

I changed the regex to also match docview: links, and added a variable
to store the link type which is later re-attached to the path.

I do not know if there is a more elegant way, but this works.

Matthew: docview.el was missing from the Makefile because of my
inexperience with Org development, but I see that Carsten has already
fixed that one :)

---
 lisp/ChangeLog |5 +
 lisp/org.el|7 ---
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index f385b7c..a716042 100755
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2009-12-04  Jan Böcker  jan.boec...@jboecker.de
+
+   * org.el (org-insert-link): respect org-link-file-path-type for
+   docview: links in addition to file: links.
+
 2009-12-03  Carsten Dominik  carsten.domi...@gmail.com

* org-exp.el (org-export-format-source-code-or-example): Avoid
diff --git a/lisp/org.el b/lisp/org.el
index 664bafc..4f699c9 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -7976,8 +7976,9 @@ Use TAB to complete link prefixes, then RET for
type-specific completion support
  (setq link search)

 ;; Check if we can/should use a relative path.  If yes, simplify
the link
-(when (string-match ^file:\\(.*\\) link)
-  (let* ((path (match-string 1 link))
+(when (string-match ^\\(file:\\|docview:\\)\\(.*\\) link)
+  (let* ((type (match-string 1 link))
+(path (match-string 2 link))
 (origpath path)
 (case-fold-search nil))
(cond
@@ -7998,7 +7999,7 @@ Use TAB to complete link prefixes, then RET for
type-specific completion support
(setq path (substring (expand-file-name path)
  (match-end 0)))
  (setq path (abbreviate-file-name (expand-file-name path)))
-   (setq link (concat file: path))
+   (setq link (concat type path))
(if (equal desc origpath)
(setq desc path

-- 
1.6.5.2



___
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] Plans for an android app ?

2009-12-04 Thread Xavier Maillard

   Carsten Dominik carsten.domi...@gmail.com writes:

And the Android app will be easier in a way, because the workflow hast
been designed and all the support code is in place.
   
So:  WHO???
   
:-)

   I just stumbled upon this Android application:

 http://niftyware.com/alex/

   Maybe there are nice ways to make this interact with the futur Org
   application for Android...   

THat's look quite interesting ! Thank you.

Xavier
-- 
http://www.gnu.org
http://www.april.org
http://www.lolica.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


[Orgmode] Multiple agenda buffers

2009-12-04 Thread Desmond Rivet
Hi all,

A brief search through the mailing list did not reveal anything
obvious...

Is it possible to have multiple Org Agenda buffers open say, if you want
different search results side by side?  I know you can put different
search results in the *same* agenda buffer, but that wasn't quite what I
had in mind (though I will fall back on this if two agenda buffers is
unfeasible)

Thanks in advance,

-- 
Desmond Rivet

Pain is weakness leaving the body.


___
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] Lists for org-refile-targets

2009-12-04 Thread Nick Dokos
Nathan Neff nathan.n...@gmail.com wrote:

 Currently, I'm getting an error when I try to refile my notes
 and I think it's something very basic.
 
 Here's the relevant code:
 
 ;; Use environment variable $ORGDIR to get dir for org-directory
 (setq org-directory (getenv ORGDIR))
 (setq notesmine-dir ~/Documents/notesmine-org)
 
 (setq org-agenda-files (file-expand-wildcards (concat org-directory 
 /*.org)))
 (setq notesmine-files (file-expand-wildcards (concat notesmine-dir /*.org)))
 
 ; Targets include this file and any file contributing to the agenda - up to 5 
 levels deep
 (setq org-refile-targets
   (quote
     (
   (org-agenda-files :maxlevel . 5)
   (notesmine-files :maxlevel . 5)
   (nil :maxlevel . 5)
     )
   )
 )
 
 I've tried concatenating org-agenda-files and notesmine-files, but I keep 
 getting errors
 when trying to refile.  The error that I get is:
 Wrong type argument, numberp (0.5)
 
 I can provide a stack trace, but I don't think this is a bug -- I just think 
 that
 I'm not concatenating the list of files that I want to use in 
 org-refile-targets
 correctly.
 

[A stacktrace is always useful. It doesn't matter whether it's a bug in org or 
in
your code: it can help narrow down the problem]

I suspect that the last line is the problem:

   (nil :maxlevel . 5)

What happens if you delete it?

HTH,
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] Agenda not working or am I misunderstanding how it works?

2009-12-04 Thread Carsten Dominik

Hi U,

my guess is that you did type these keyword but that you did not
update the internal keyword lists by restarting Emacs, or by
pressing `C-c C-c' on the line.

- Carsten

On Dec 4, 2009, at 4:01 PM, U Avalos wrote:


Someone suggested I use the variable org-agenda-skip-deadline-if-done.
It works on standard org files using the default todo keywords --  
if I give
a TODO item a deadline and then set it to DONE, it doesn't show up  
in agenda.

Yay!

HOWEVER, if I use custom todo keywords per file, it stops working  
for that

file. I'm using these keywords:

#+SEQ_TODO: TODO WAITING | PUBLISHED REJECTED

Todo items set to PUBLISHED and REJECTED still show up in the  
agenda. Any

ideas?

On Wednesday 25 November 2009 11:54:19 U Avalos wrote:

I have the following completed todo item:

** DONE pay Yolanda
  DEADLINE: 2009-11-24 Tue CLOSED: [2009-11-25 Wed 11:18]

Yet it still appears in the weekly agenda. Is it not working right  
or is

that how it's supposed to work?

Also, when I hit C-c C-w (show deadlines in current buffer), I get  
ALL todo
items, even completed items that are really old. Restricting it  
with a
numeric prefix (ex: Esc 5 C-c C-w), doesn't work either. I just get  
all

items plus or minus the number of days.


___
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


- 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] Org-mode tricks for team management

2009-12-04 Thread Juan Reyero
On Fri, Dec 4, 2009 at 3:31 AM, Torsten Wagner torsten.wag...@gmail.com wrote:

 http://juanreyero.com/article/emacs/org-teams.html

 This solution is very nice. I would encourage you to pack it into an own
 contrib for org-mode. Maybe even trying to merge it into org-mode itself.

Thanks a lot.  I'd be happy to pack it into a contrib file, if Carsten
agrees.  Following your suggestion in a comment to the document it'd
be called org-secretary.

 Please also consider to check out how this could be worked together with org-
 mobile. As far as I understood you are going to have beside the normal agenda
 views a place and person sensitive agenda. This makes even more sens on mobile
 devices.

I actually tried it out as soon as org-mobile became available for the
iphone.  It almost worked, but not quite.  I could however check out
the tasks for everybody in the agenda view in the iphone, which was
nice.

 #+ dream-mode on
 All those smart-phones have GPS now. It would be incredible awesome if the GPS
 location could be used to define the place automatically :) Even send alarm
 messages... (This idea was discussed at the OpenMoko-Community (position-
 sensitive alarm)
 #+ dream-mode off

That'd be neat...

Best regards,

Juan
-- 
http://juanreyero.com/
http://unarueda.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: [babel] Give a name to the plot

2009-12-04 Thread Eric Schulte
Sébastien Vauban wxhgmqzgw...@spammotel.com writes:


 Currently, I have to go in every block and C-c C-c them all, right?


Hi Seb,

try `org-babel-execute-buffer', I haven't used it recently so it may
have succumb to bitt-rot, but it is supposed to do exactly that.

Best -- Eric

 Best regards,
   Seb


___
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] Executing sh-code

2009-12-04 Thread Eric Schulte
Sébastien Vauban wxhgmqzgw...@spammotel.com writes:

 Hi Eric,

 Eric Schulte wrote:
 Sébastien Vauban wxhgmqzgw...@spammotel.com writes:

 #+begin_src sh :session ecm
 ls *.org
 #+end_src

 Nothing to do with the problem, but better to write `:session ecm' than
 `:session ecm', no?


Correct, it will be interpreted as a string either way but :session
ecm will actually name your buffer 'emc' quotes included

[...]
 That was it. Fixing my PS1 prompt to be like yours (temporarily keeping your
 regexp from the comint-prompt) *did* solve the problem.

 #+begin_src sh :session eric
   cd ~/Desktop/clj/
   ls *.clj
 #+end_src

 #+results:
 | ants.clj |  | concurrent.clj |  | hello.clj |  | 
 spell-checker.clj |

 Similar results for my directory.

 Thanks a lot!!!


Excellent, happy this has been resolved -- Eric


 Best regards,
   Seb


___
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] Executing sh-code

2009-12-04 Thread Eric Schulte
Sébastien Vauban wxhgmqzgw...@spammotel.com writes:

 Hi Eric,

 Sébastien Vauban wrote:
 Eric Schulte wrote:

 [...] The following works for me without any hang.
 The only difference I can see between our setups is a matching prompt
 regexp.

 That was it. Fixing my PS1 prompt to be like yours (temporarily keeping your
 regexp from the comint-prompt) *did* solve the problem.

 Testing that a bit further, I notice that:

 - my Bash prompt must be uncolored for the output to be catchable by
   Org-babel;

 - ls can be colored, but control characters are then passed as is to
   Org-babel, so better not doing it.


Thanks for these notes.  I'll add a task related to this, as it
shouldn't be too difficult to strip out the ansi-color characters.

Thanks -- Eric


 Dunno about the multiline prompt. Stopped using this. Causes me too much
 trouble anyway with other configs as well (such as Tramp).

 Best regards,
   Seb


___
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] Tables to DB

2009-12-04 Thread Dan Davison
andrea andrea.crott...@gmail.com writes:

 Org tables are great but for visualization and querying maybe databases
 are better, for example sqlite for small amounts of data is very nice
 and powerful.

 I found this
 http://orgmode.org/worg/org-tutorials/multitarget-tables.php which I

When I read interesting and impressive stuff like that on Worg I always
wonder who the author is! Of course we can look at the org files (ans:
Jason Riedy) but what do people think about displaying the authors in
the HTML version of Worg? Unless it is a deliberate decision not to, I
tend to think it would be helpful.

Dan


___
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] Lists for org-refile-targets

2009-12-04 Thread Nathan Neff
I still get the Wrong type argument: numberp, (0.5) error.

Here's the stacktrace for the error that I get when I set org-refile-targets
with the following code:


  ;; Use environment variable $ORGDIR to get dir for org-directory
  (setq org-directory (getenv ORGDIR))
  (setq notesmine-dir ~/Documents/notesmine-org)

  (setq org-agenda-files (file-expand-wildcards (concat org-directory
/*.org)))
  (setq notesmine-files (file-expand-wildcards (concat notesmine-dir
/*.org)))

  ; Targets include this file and any file contributing to the agenda - up
to 5 levels deep
  (setq org-refile-targets
   (quote
 (
   (org-agenda-files :maxlevel . 5)
   (notesmine-files :maxlevel . 5)
   (nil :maxlevel . 5)
 )
   )
  )

Debugger entered--Lisp error: (wrong-type-argument numberp (0.5))
  number-to-string((0.5))
  (concat ^\\*\\{1, (number-to-string (if org-odd-levels-only ... ...))
\\}[ ])
  (setq descre (concat ^\\*\\{1, (number-to-string ...) \\}[ ]))
  (cond ((eq ... :tag) (setq descre ...)) ((eq ... :todo) (setq descre ...))
((eq ... :regexp) (setq descre ...)) ((eq ... :level) (setq descre ...))
((eq ... :maxlevel) (setq fast-path-p t) (setq descre ...)) (t (error Bad
refiling target description %s desc)))
  (while (setq entry (pop entries)) (setq files (car entry) desc (cdr
entry)) (setq fast-path-p nil) (cond (... ...) (... ...) (... ...) (...
...)) (if (stringp files) (setq files ...)) (cond (... ...) (... ...) (...
...) (... ...) (... ... ...) (t ...)) (while (setq f ...)
(with-current-buffer ... ... ... ... ...)))
  (save-current-buffer (set-buffer (or default-buffer ...)) (while (setq
entry ...) (setq files ... desc ...) (setq fast-path-p nil) (cond ... ...
... ...) (if ... ...) (cond ... ... ... ... ... ...) (while ... ...)))
  (with-current-buffer (or default-buffer (current-buffer)) (while (setq
entry ...) (setq files ... desc ...) (setq fast-path-p nil) (cond ... ...
... ...) (if ... ...) (cond ... ... ... ... ... ...) (while ... ...)))
  (let ((case-fold-search nil) (entries ...) targets txt re files f desc
descre fast-path-p level pos0) (message Getting targets...)
(with-current-buffer (or default-buffer ...) (while ... ... ... ... ... ...
...)) (message Getting targets...done) (nreverse targets))
  org-get-refile-targets(#buffer notes.org)
  (setq org-refile-target-table (org-get-refile-targets default-buffer))
  (let ((org-refile-targets org-refile-targets) (org-refile-use-outline-path
org-refile-use-outline-path)) (setq org-refile-target-table
(org-get-refile-targets default-buffer)))
  org-refile-get-location(Refile to:  #buffer notes.org nil)
  (or rfloc (org-refile-get-location (if goto Goto:  Refile to: ) buffer
org-refile-allow-creating-parent-nodes))
  (let* ((marker ...) (buffer ...) (pos ...) (rfloc ...))
(with-current-buffer buffer (save-excursion ...)))
  (if (equal goto (quote ...)) (org-refile-goto-last-stored) (let* (... ...
... ...) (with-current-buffer buffer ...)))
  org-agenda-refile(nil)
  call-interactively(org-agenda-refile nil nil)
___
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] Beamer support - 2nd round

2009-12-04 Thread Eric S Fraga
At Thu, 3 Dec 2009 17:10:44 +0100,
Carsten Dominik wrote:

 after carefully listening to all your comments and thinking
 things through more thoroughly, here is now my second attempt
 to define beamer support in Org-mode.

Carsten,

Thanks for this!  After learning a bit about git branches (more than I
probably wanted to know ;-) and a bit more about org mode columns
view, I can say that I like what you have done.  I've been playing
with your sample file for a short while and it looks a good design
which seems to support everything /I/ would want and does so in an
easy way (especially the combination of the new C-c C-b special
org-beamer command and columns view).

I've run into a few niggles but I need to play some more (probably
over the weekend) to see whether some of them are my fault or due to
bugs in the code.  However, some immediate niggles or suggestions are:

- I need to be able to specify arguments for columns (i.e. the
  environment, not specific columns), specifically
  often [t] to make two columns align vertically

- I don't understand what the difference between opt and envargs is.
  In fact, I see no reference to BEAMER_opt in the document you wrote
  yet your example has opt as one of the column view specifications.

- it would be nice if when a column heading is also a block heading,
  that the tags generated (which, by the way, is a really nice
  feature) include both block and column tags to make it easy to spot
  the column aspect.

You'll probably be hearing from me soon again!

Oh, and thanks for the separate email showing me how to do my page 100
with the new setup.  How to do it was actually quite clear from the
example you gave in the other message.  Very straightforward and does
work nicely.

Thanks again,
eric


___
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


Nick Dokos: Re: [Orgmode] Lists for org-refile-targets

2009-12-04 Thread Nick Dokos
Noch ein mal: I forgot to cc: the list. Apologies.

--- Forwarded Message

Date:Fri, 04 Dec 2009 14:03:39 -0500
From:Nick Dokos nicholas.do...@hp.com
To:  Nathan Neff nathan.n...@gmail.com
cc:  nicholas.do...@hp.com
Subject: Re: [Orgmode] Lists for org-refile-targets 

Nathan Neff nathan.n...@gmail.com wrote:

 On Fri, Dec 4, 2009 at 10:45 AM, Nick Dokos nicholas.do...@hp.com wrote:
=20
 Nathan Neff nathan.n...@gmail.com wrote:
=20=20=20=20
  Currently, I'm getting an error when I try to refile my notes
  and I think it's something very basic.
 
  Here's the relevant code:
 
  ;; Use environment variable $ORGDIR to get dir for org-directory
  (setq org-directory (getenv ORGDIR))
  (setq notesmine-dir ~/Documents/notesmine-org)
 
  (setq org-agenda-files (file-expand-wildcards (concat org-directory=
 /*.org)))
  (setq notesmine-files (file-expand-wildcards (concat notesmine-dir =
/*.org)))
 
  ; Targets include this file and any file contributing to the agenda=
 - up to 5 levels deep
  (setq org-refile-targets
  =C2=A0 (quote
  =C2=A0=C2=A0=C2=A0 (
  =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (org-agenda-files :maxlevel . 5)
  =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (notesmine-files :maxlevel . 5)
  =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (nil :maxlevel . 5)
  =C2=A0=C2=A0=C2=A0 )
  =C2=A0 )
  )
 
  I've tried concatenating org-agenda-files and notesmine-files, but =
I keep getting errors
  when trying to refile.=C2=A0 The error that I get is:
  Wrong type argument, numberp (0.5)
 
  I can provide a stack trace, but I don't think this is a bug -- I j=
ust think that
  I'm not concatenating the list of files that I want to use in org-r=
efile-targets
  correctly.
 
=20=20=20=20
 [A stacktrace is always useful. It doesn't matter whether it's a bug =
in org or in
 your code: it can help narrow down the problem]
=20=20=20=20
 I suspect that the last line is the problem:
=20=20=20=20
  =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (nil :maxlevel . 5)
=20=20=20=20
 What happens if you delete it?
=20=20=20=20
 HTH,
 Nick
=20
 I still get the Wrong type argument: numberp, (0.5) error.
=20
 Here's the stacktrace:
=20
 Debugger entered--Lisp error: (wrong-type-argument numberp (0.5))
 =C2=A0 number-to-string((0.5))
 =C2=A0 (concat ^\\*\\{1, (number-to-string (if org-odd-levels-only ... =
...)) \\}[ =C2=A0=C2=A0=C2=A0 ])
 =C2=A0 (setq descre (concat ^\\*\\{1, (number-to-string ...) \\}[ =C2=
=A0=C2=A0=C2=A0 ]))
 =C2=A0 (cond ((eq ... :tag) (setq descre ...)) ((eq ... :todo) (setq desc=
re ...)) ((eq ... :regexp) (setq descre ...)) ((eq ... :level) (setq descre=
 ...))
 ((eq ... :maxlevel) (setq fast-path-p t) (setq descre ...)) (t (error Ba=
d refiling target description %s desc)))
 =C2=A0 (while (setq entry (pop entries)) (setq files (car entry) desc (cd=
r entry)) (setq fast-path-p nil) (cond (... ...) (... ...) (... ...) (... .=
..)) (if
 (stringp files) (setq files ...)) (cond (... ...) (... ...) (... ...) (..=
. ...) (... ... ...) (t ...)) (while (setq f ...) (with-current-buffer ... =
...
 ... ... ...)))
 =C2=A0 (save-current-buffer (set-buffer (or default-buffer ...)) (while (=
setq entry ...) (setq files ... desc ...) (setq fast-path-p nil) (cond ... =
... ...
 ...) (if ... ...) (cond ... ... ... ... ... ...) (while ... ...)))
 =C2=A0 (with-current-buffer (or default-buffer (current-buffer)) (while (=
setq entry ...) (setq files ... desc ...) (setq fast-path-p nil) (cond ... =
... ...
 ...) (if ... ...) (cond ... ... ... ... ... ...) (while ... ...)))
 =C2=A0 (let ((case-fold-search nil) (entries ...) targets txt re files f =
desc descre fast-path-p level pos0) (message Getting targets...)
 (with-current-buffer (or default-buffer ...) (while ... ... ... ... ... .=
.. ...)) (message Getting targets...done) (nreverse targets))
 =C2=A0 org-get-refile-targets(#buffer notes.org)
 =C2=A0 (setq org-refile-target-table (org-get-refile-targets default-buff=
er))
 =C2=A0 (let ((org-refile-targets org-refile-targets) (org-refile-use-outl=
ine-path org-refile-use-outline-path)) (setq org-refile-target-table
 (org-get-refile-targets default-buffer)))
 =C2=A0 org-refile-get-location(Refile to:  #buffer notes.org nil)
 =C2=A0 (or rfloc (org-refile-get-location (if goto Goto:  Refile to: =
) buffer org-refile-allow-creating-parent-nodes))
 =C2=A0 (let* ((marker ...) (buffer ...) (pos ...) (rfloc ...)) (with-curr=
ent-buffer buffer (save-excursion ...)))
 =C2=A0 (if (equal goto (quote ...)) (org-refile-goto-last-stored) (let* (=
... ... ... ...) (with-current-buffer buffer ...)))
 =C2=A0 org-agenda-refile(nil)
 =C2=A0 call-interactively(org-agenda-refile nil nil)
=20

Are you sure you have not omitted a space after a period somewhere?
(nil :maxfile . 5) is very different from (nil :maxfile .5).
What is the value of org-refile-targets?

Other than that, I can't see anything wrong in the code (and I 

[Orgmode] [Feature request] CSS tag classes for headlines

2009-12-04 Thread Peter Westlake
Would it be possible to give exported headlines a class based on their
tag or TODO?

For instance, instead of just labelling the tag, like this:

h2 id=sec-10Windows builds fail with Error 66span
class=tagspan class=CLOSEDCLOSED/span/span/h2

I would like to change the appearance of the whole headline:

h2 id=sec-10 class=headline-tag-CLOSEDWindows builds fail with
Error 66span class=tagspan
class=CLOSEDCLOSED/span/span/h2

The use case is that I need to put a list of bugs up on the wall, and it
would be nice if closed ones could be greyed out. In fact, the whole div
containing the headline and text could be given a class, and child
elements could be identified using CSS selecters.

div id=outline-container-10 class=outline-2 outline-2-CLOSED

Peter.


___
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] Lists for org-refile-targets

2009-12-04 Thread Nathan Neff
On Fri, Dec 4, 2009 at 1:03 PM, Nick Dokos nicholas.do...@hp.com wrote:

 Nathan Neff nathan.n...@gmail.com wrote:

  On Fri, Dec 4, 2009 at 10:45 AM, Nick Dokos nicholas.do...@hp.com
 wrote:
 
  Nathan Neff nathan.n...@gmail.com wrote:
 
   Currently, I'm getting an error when I try to refile my notes
   and I think it's something very basic.
  
   Here's the relevant code:
  
   ;; Use environment variable $ORGDIR to get dir for org-directory
   (setq org-directory (getenv ORGDIR))
   (setq notesmine-dir ~/Documents/notesmine-org)
  
   (setq org-agenda-files (file-expand-wildcards (concat org-directory
 /*.org)))
   (setq notesmine-files (file-expand-wildcards (concat notesmine-dir
 /*.org)))
  
   ; Targets include this file and any file contributing to the agenda
 - up to 5 levels deep
   (setq org-refile-targets
 (quote
   (
 (org-agenda-files :maxlevel . 5)
 (notesmine-files :maxlevel . 5)
 (nil :maxlevel . 5)
   )
 )
   )
  
   I've tried concatenating org-agenda-files and notesmine-files, but
 I keep getting errors
   when trying to refile.  The error that I get is:
   Wrong type argument, numberp (0.5)
  
   I can provide a stack trace, but I don't think this is a bug -- I
 just think that
   I'm not concatenating the list of files that I want to use in
 org-refile-targets
   correctly.
  
 
  [A stacktrace is always useful. It doesn't matter whether it's a bug
 in org or in
  your code: it can help narrow down the problem]
 
  I suspect that the last line is the problem:
 
 (nil :maxlevel . 5)
 
  What happens if you delete it?
 
  HTH,
  Nick
 
  I still get the Wrong type argument: numberp, (0.5) error.
 
  Here's the stacktrace:
 
  Debugger entered--Lisp error: (wrong-type-argument numberp (0.5))
number-to-string((0.5))
(concat ^\\*\\{1, (number-to-string (if org-odd-levels-only ... ...))
 \\}[ ])
(setq descre (concat ^\\*\\{1, (number-to-string ...) \\}[ ]))
(cond ((eq ... :tag) (setq descre ...)) ((eq ... :todo) (setq descre
 ...)) ((eq ... :regexp) (setq descre ...)) ((eq ... :level) (setq descre
 ...))
  ((eq ... :maxlevel) (setq fast-path-p t) (setq descre ...)) (t (error
 Bad refiling target description %s desc)))
(while (setq entry (pop entries)) (setq files (car entry) desc (cdr
 entry)) (setq fast-path-p nil) (cond (... ...) (... ...) (... ...) (...
 ...)) (if
  (stringp files) (setq files ...)) (cond (... ...) (... ...) (... ...)
 (... ...) (... ... ...) (t ...)) (while (setq f ...) (with-current-buffer
 ... ...
  ... ... ...)))
(save-current-buffer (set-buffer (or default-buffer ...)) (while (setq
 entry ...) (setq files ... desc ...) (setq fast-path-p nil) (cond ... ...
 ...
  ...) (if ... ...) (cond ... ... ... ... ... ...) (while ... ...)))
(with-current-buffer (or default-buffer (current-buffer)) (while (setq
 entry ...) (setq files ... desc ...) (setq fast-path-p nil) (cond ... ...
 ...
  ...) (if ... ...) (cond ... ... ... ... ... ...) (while ... ...)))
(let ((case-fold-search nil) (entries ...) targets txt re files f desc
 descre fast-path-p level pos0) (message Getting targets...)
  (with-current-buffer (or default-buffer ...) (while ... ... ... ... ...
 ... ...)) (message Getting targets...done) (nreverse targets))
org-get-refile-targets(#buffer notes.org)
(setq org-refile-target-table (org-get-refile-targets default-buffer))
(let ((org-refile-targets org-refile-targets)
 (org-refile-use-outline-path org-refile-use-outline-path)) (setq
 org-refile-target-table
  (org-get-refile-targets default-buffer)))
org-refile-get-location(Refile to:  #buffer notes.org nil)
(or rfloc (org-refile-get-location (if goto Goto:  Refile to: )
 buffer org-refile-allow-creating-parent-nodes))
(let* ((marker ...) (buffer ...) (pos ...) (rfloc ...))
 (with-current-buffer buffer (save-excursion ...)))
(if (equal goto (quote ...)) (org-refile-goto-last-stored) (let* (...
 ... ... ...) (with-current-buffer buffer ...)))
org-agenda-refile(nil)
call-interactively(org-agenda-refile nil nil)
 

 Are you sure you have not omitted a space after a period somewhere?
 (nil :maxfile . 5) is very different from (nil :maxfile .5).
 What is the value of org-refile-targets?

 Other than that, I can't see anything wrong in the code (and I think the
 (nil :maxlevel 5) part is legal), so I think you'll need to do some
 debugging.  The code in questions is around line 8973 in org.el and
 looks like this:

 ((eq (car desc) :maxlevel)
   (setq fast-path-p t)
   (setq descre (concat ^\\*\\{1, (number-to-string
 (if org-odd-levels-only
 (1- (* 2 (cdr desc)))
  (cdr desc)))
  

Re: [Orgmode] Tables to DB

2009-12-04 Thread Sebastian Rose
andrea andrea.crott...@gmail.com writes:
 Org tables are great but for visualization and querying maybe databases
 are better, for example sqlite for small amounts of data is very nice
 and powerful.

 I found this
 http://orgmode.org/worg/org-tutorials/multitarget-tables.php which I
 haven't tried yet but looks nice.

 I would like to have an automatic way to automatically fill some
 database tables from orgmode tables, done maybe automatically when the
 file is saved.
 So the hook should:
 - check for tables with #+ORGTBL line above
 - store the data on the right sqlite table

 Rewrite completely the table every time is not a big problem since the
 amount of data is really not big.

 Given that I will be able to do nice things with python-sqlite and also
 finally replace this
 http://alexandria.rubyforge.org/
 for book management

 Anyone is already doing something like that?


In SQL-mode, one can turn on the `electric semilcolon' to send queries
to a database.

Since this is part of emacs, why not try to use it? Maybe this could be
used from Org-mode, too?


  Sebastian


___
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] R questions

2009-12-04 Thread Sébastien Vauban
Hello,

One of this questions is a bit border-line, but I'm still trying ;-)

I have this table generated by a script:

--8---cut here---start-8---
#+results: abc2008
| 2008/1  | -78.59 |   1627.24 |
| 2008/2  | -80.17 |700.33 |
| 2008/3  | -80.17 | 879.8 |
| 2008/4  | -80.17 | -25823.17 |
| 2008/5  | -80.17 |   3570.75 |
| 2008/6  | -81.77 |2377.8 |
| 2008/7  | -81.77 |2889.4 |
| 2008/8  | -81.77 |   2612.92 |
| 2008/9  | -81.77 |   1585.21 |
| 2008/10 |  -83.4 |   1561.42 |
| 2008/11 |  -83.4 |   2189.17 |
| 2008/12 |  | |
--8---cut here---end---8---

I want to draw the 12 months with the values side by side.

Problem #1: the  in the last line hinder the generation of the graph. Format
error.

--8---cut here---start-8---
#+srcname: expenses-bar-plot(abc = abc2008)
#+begin_src R :results file :file abc2008.pdf
barplot(abc[,3], col = red, main = Profit and Loss 2008, las = 1, xlab
= Months, ylab = EUR)
#+end_src
--8---cut here---end---8---

Problem #2: I don't know how to ask for drawing the 2 columns. I've tried
putting the arguments in a list, I've tried `cbind' (as read in one of the Org
papers), nothing made it. This is the border-line question.

The first one (at least) merits an answer, as it's a generic problem on
handling empty results. Is there some spec to consider empty result equivalent
to empty strings or to 0. How can we set it to be 0, here, instead of ?  I
guess it's that the problem for R.

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] Error when push fils in MobileOrg

2009-12-04 Thread Xin Shi
Hi Nick,

Thanks for your info.

I did what that page suggested and here is the debug info: (Emacs 23.1 and
Orgmode 6.33b)


Debugger entered--Lisp error: (wrong-type-argument listp TODO)
  cdr(TODO)
  (mapcar (lambda (x) (if ... ... x)) (cdr entry))
  (setq kwds (mapcar (lambda ... ...) (cdr entry)))
  (while (setq entry (pop def-todo)) (insert #+READONLY\n) (setq kwds
(mapcar ... ...)) (insert #+TODO:  (mapconcat ... kwds  ) \n) (setq
dwds (member | kwds) twds (org-delete-all dwds kwds) todo-kwds
(org-delete-all twds todo-kwds) done-kwds (org-delete-all dwds done-kwds)))
  (save-current-buffer (set-buffer temp-buffer) (while (setq entry ...)
(insert #+READONLY\n) (setq kwds ...) (insert #+TODO:  ... \n) (setq
dwds ... twds ... todo-kwds ... done-kwds ...)) (when (or todo-kwds
done-kwds) (insert #+TODO:  ...  |  ... \n)) (setq def-tags (mapcar
... def-tags)) (setq def-tags (delq nil def-tags)) (setq tags
(org-delete-all def-tags tags)) (setq tags (sort tags ...)) (setq tags
(append def-tags tags nil)) (insert #+TAGS:  (mapconcat ... tags  )
\n) (insert #+DRAWERS:  (mapconcat ... drawers  ) \n) (insert
#+ALLPRIORITIES: A B C \n) (when (file-exists-p ...) (insert * [[file:
agendas.org][Agenda Views]]\n)) (while (setq entry ...) (setq file ...
link-name ...) (insert ...)) (push (cons org-mobile-index-file ...)
org-mobile-checksum-files))
  (with-current-buffer temp-buffer (while (setq entry ...) (insert
#+READONLY\n) (setq kwds ...) (insert #+TODO:  ... \n) (setq dwds ...
twds ... todo-kwds ... done-kwds ...)) (when (or todo-kwds done-kwds)
(insert #+TODO:  ...  |  ... \n)) (setq def-tags (mapcar ...
def-tags)) (setq def-tags (delq nil def-tags)) (setq tags (org-delete-all
def-tags tags)) (setq tags (sort tags ...)) (setq tags (append def-tags tags
nil)) (insert #+TAGS:  (mapconcat ... tags  ) \n) (insert #+DRAWERS:
 (mapconcat ... drawers  ) \n) (insert #+ALLPRIORITIES: A B C \n)
(when (file-exists-p ...) (insert * [[file:agendas.org][Agenda Views]]\n))
(while (setq entry ...) (setq file ... link-name ...) (insert ...)) (push
(cons org-mobile-index-file ...) org-mobile-checksum-files))
  (prog1 (with-current-buffer temp-buffer (while ... ... ... ... ...) (when
... ...) (setq def-tags ...) (setq def-tags ...) (setq tags ...) (setq tags
...) (setq tags ...) (insert #+TAGS:  ... \n) (insert #+DRAWERS:  ...
\n) (insert #+ALLPRIORITIES: A B C \n) (when ... ...) (while ... ...
...) (push ... org-mobile-checksum-files)) (with-current-buffer temp-buffer
(write-region nil nil temp-file nil 0)))
  (unwind-protect (prog1 (with-current-buffer temp-buffer ... ... ... ...
... ... ... ... ... ... ... ... ...) (with-current-buffer temp-buffer ...))
(and (buffer-name temp-buffer) (kill-buffer temp-buffer)))
  (let ((temp-file ...) (temp-buffer ...)) (unwind-protect (prog1 ... ...)
(and ... ...)))
  (with-temp-file (expand-file-name org-mobile-index-file
org-mobile-directory) (while (setq entry ...) (insert #+READONLY\n) (setq
kwds ...) (insert #+TODO:  ... \n) (setq dwds ... twds ... todo-kwds ...
done-kwds ...)) (when (or todo-kwds done-kwds) (insert #+TODO:  ...  | 
... \n)) (setq def-tags (mapcar ... def-tags)) (setq def-tags (delq nil
def-tags)) (setq tags (org-delete-all def-tags tags)) (setq tags (sort tags
...)) (setq tags (append def-tags tags nil)) (insert #+TAGS:  (mapconcat
... tags  ) \n) (insert #+DRAWERS:  (mapconcat ... drawers  ) \n)
(insert #+ALLPRIORITIES: A B C \n) (when (file-exists-p ...) (insert *
[[file:agendas.org][Agenda Views]]\n)) (while (setq entry ...) (setq file
... link-name ...) (insert ...)) (push (cons org-mobile-index-file ...)
org-mobile-checksum-files))
  (let ((files-alist ...) (def-todo ...) (def-tags ...) file link-name
todo-kwds done-kwds tags drawers entry kwds dwds twds)
(org-prepare-agenda-buffers (mapcar ... files-alist)) (setq done-kwds
(org-uniquify org-done-keywords-for-agenda)) (setq todo-kwds (org-delete-all
done-kwds ...)) (setq drawers (org-uniquify org-drawers-for-agenda)) (setq
tags (org-uniquify ...)) (with-temp-file (expand-file-name
org-mobile-index-file org-mobile-directory) (while ... ... ... ... ...)
(when ... ...) (setq def-tags ...) (setq def-tags ...) (setq tags ...) (setq
tags ...) (setq tags ...) (insert #+TAGS:  ... \n) (insert #+DRAWERS: 
... \n) (insert #+ALLPRIORITIES: A B C \n) (when ... ...) (while ...
... ...) (push ... org-mobile-checksum-files)))
  org-mobile-create-index-file()
  (save-window-excursion (org-mobile-check-setup)
(org-mobile-prepare-file-lists) (run-hooks (quote org-mobile-pre-push-hook))
(message Creating agendas...) (let (...) (org-mobile-create-sumo-agenda))
(message Creating agendas...done) (org-save-all-org-buffers) (message
Copying files...) (org-mobile-copy-agenda-files) (message Writing index
file...) (org-mobile-create-index-file) (message Writing checksums...)
(org-mobile-write-checksums) (run-hooks (quote org-mobile-post-push-hook)))
  (save-excursion (save-window-excursion (org-mobile-check-setup)

Re: [Orgmode] Error when push fils in MobileOrg

2009-12-04 Thread Nick Dokos
Xin Shi shixin...@gmail.com wrote:


 Debugger entered--Lisp error: (wrong-type-argument listp TODO)
   cdr(TODO)
   (mapcar (lambda (x) (if ... ... x)) (cdr entry))
   (setq kwds (mapcar (lambda ... ...) (cdr entry)))
   (while (setq entry (pop def-todo)) (insert #+READONLY\n) (setq kwds
 (mapcar ... ...)) (insert #+TODO:  (mapconcat ... kwds  ) \n) (setq
 dwds (member | kwds) twds (org-delete-all dwds kwds) todo-kwds
 (org-delete-all twds todo-kwds) done-kwds (org-delete-all dwds done-kwds)))
   (save-current-buffer (set-buffer temp-buffer) (while (setq entry ...)
 (insert #+READONLY\n) (setq kwds ...) (insert #+TODO:  ... \n) (setq
 dwds ... twds ... todo-kwds ... done-kwds ...)) (when (or todo-kwds
 done-kwds) (insert #+TODO:  ...  |  ... \n)) (setq def-tags (mapcar
 ... def-tags)) (setq def-tags (delq nil def-tags)) (setq tags
 (org-delete-all def-tags tags)) (setq tags (sort tags ...)) (setq tags
 (append def-tags tags nil)) (insert #+TAGS:  (mapconcat ... tags  )
 \n) (insert #+DRAWERS:  (mapconcat ... drawers  ) \n) (insert
 #+ALLPRIORITIES: A B C \n) (when (file-exists-p ...) (insert * [[file:
 agendas.org][Agenda Views]]\n)) (while (setq entry ...) (setq file ...
 link-name ...) (insert ...)) (push (cons org-mobile-index-file ...)
 org-mobile-checksum-files))
   (with-current-buffer temp-buffer (while (setq entry ...) (insert
 #+READONLY\n) (setq kwds ...) (insert #+TODO:  ... \n) (setq dwds ...
 twds ... todo-kwds ... done-kwds ...)) (when (or todo-kwds done-kwds)
 (insert #+TODO:  ...  |  ... \n)) (setq def-tags (mapcar ...
 def-tags)) (setq def-tags (delq nil def-tags)) (setq tags (org-delete-all
 def-tags tags)) (setq tags (sort tags ...)) (setq tags (append def-tags tags
 nil)) (insert #+TAGS:  (mapconcat ... tags  ) \n) (insert #+DRAWERS:
  (mapconcat ... drawers  ) \n) (insert #+ALLPRIORITIES: A B C \n)
 (when (file-exists-p ...) (insert * [[file:agendas.org][Agenda Views]]\n))
 (while (setq entry ...) (setq file ... link-name ...) (insert ...)) (push
 (cons org-mobile-index-file ...) org-mobile-checksum-files))
   (prog1 (with-current-buffer temp-buffer (while ... ... ... ... ...) (when
 ... ...) (setq def-tags ...) (setq def-tags ...) (setq tags ...) (setq tags
 ...) (setq tags ...) (insert #+TAGS:  ... \n) (insert #+DRAWERS:  ...
 \n) (insert #+ALLPRIORITIES: A B C \n) (when ... ...) (while ... ...
 ...) (push ... org-mobile-checksum-files)) (with-current-buffer temp-buffer
 (write-region nil nil temp-file nil 0)))
   (unwind-protect (prog1 (with-current-buffer temp-buffer ... ... ... ...
 ... ... ... ... ... ... ... ... ...) (with-current-buffer temp-buffer ...))
 (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))
   (let ((temp-file ...) (temp-buffer ...)) (unwind-protect (prog1 ... ...)
 (and ... ...)))
   (with-temp-file (expand-file-name org-mobile-index-file
 org-mobile-directory) (while (setq entry ...) (insert #+READONLY\n) (setq
 kwds ...) (insert #+TODO:  ... \n) (setq dwds ... twds ... todo-kwds ...
 done-kwds ...)) (when (or todo-kwds done-kwds) (insert #+TODO:  ...  | 
 ... \n)) (setq def-tags (mapcar ... def-tags)) (setq def-tags (delq nil
 def-tags)) (setq tags (org-delete-all def-tags tags)) (setq tags (sort tags
 ...)) (setq tags (append def-tags tags nil)) (insert #+TAGS:  (mapconcat
 ... tags  ) \n) (insert #+DRAWERS:  (mapconcat ... drawers  ) \n)
 (insert #+ALLPRIORITIES: A B C \n) (when (file-exists-p ...) (insert *
 [[file:agendas.org][Agenda Views]]\n)) (while (setq entry ...) (setq file
 ... link-name ...) (insert ...)) (push (cons org-mobile-index-file ...)
 org-mobile-checksum-files))
   (let ((files-alist ...) (def-todo ...) (def-tags ...) file link-name
 todo-kwds done-kwds tags drawers entry kwds dwds twds)
 (org-prepare-agenda-buffers (mapcar ... files-alist)) (setq done-kwds
 (org-uniquify org-done-keywords-for-agenda)) (setq todo-kwds (org-delete-all
 done-kwds ...)) (setq drawers (org-uniquify org-drawers-for-agenda)) (setq
 tags (org-uniquify ...)) (with-temp-file (expand-file-name
 org-mobile-index-file org-mobile-directory) (while ... ... ... ... ...)
 (when ... ...) (setq def-tags ...) (setq def-tags ...) (setq tags ...) (setq
 tags ...) (setq tags ...) (insert #+TAGS:  ... \n) (insert #+DRAWERS: 
 ... \n) (insert #+ALLPRIORITIES: A B C \n) (when ... ...) (while ...
 ... ...) (push ... org-mobile-checksum-files)))
   org-mobile-create-index-file()
   (save-window-excursion (org-mobile-check-setup)
 (org-mobile-prepare-file-lists) (run-hooks (quote org-mobile-pre-push-hook))
 (message Creating agendas...) (let (...) (org-mobile-create-sumo-agenda))
 (message Creating agendas...done) (org-save-all-org-buffers) (message
 Copying files...) (org-mobile-copy-agenda-files) (message Writing index
 file...) (org-mobile-create-index-file) (message Writing checksums...)
 (org-mobile-write-checksums) (run-hooks (quote org-mobile-post-push-hook)))
   (save-excursion (save-window-excursion (org-mobile-check-setup)
 (org-mobile-prepare-file-lists) 

Re: [Orgmode] Beamer support - 2nd round

2009-12-04 Thread Daniel Martins
Stupid question 9but I could not answer it)


I have to set up

(add-to-list 'org-export-latex-classes
 '(beamer
   \\documentclass[11pt]{beamer}
...)

???


Or I have to imput another .el which sets org-export-latex-classes correctly?

I sue the latest git version of org-mode 6.33trans and
I tried to use the example but I couldn't


Daniel

2009/12/4 Eric S Fraga ucec...@ucl.ac.uk:
 At Thu, 3 Dec 2009 17:10:44 +0100,
 Carsten Dominik wrote:

 after carefully listening to all your comments and thinking
 things through more thoroughly, here is now my second attempt
 to define beamer support in Org-mode.

 Carsten,

 Thanks for this!  After learning a bit about git branches (more than I
 probably wanted to know ;-) and a bit more about org mode columns
 view, I can say that I like what you have done.  I've been playing
 with your sample file for a short while and it looks a good design
 which seems to support everything /I/ would want and does so in an
 easy way (especially the combination of the new C-c C-b special
 org-beamer command and columns view).

 I've run into a few niggles but I need to play some more (probably
 over the weekend) to see whether some of them are my fault or due to
 bugs in the code.  However, some immediate niggles or suggestions are:

 - I need to be able to specify arguments for columns (i.e. the
  environment, not specific columns), specifically
  often [t] to make two columns align vertically

 - I don't understand what the difference between opt and envargs is.
  In fact, I see no reference to BEAMER_opt in the document you wrote
  yet your example has opt as one of the column view specifications.

 - it would be nice if when a column heading is also a block heading,
  that the tags generated (which, by the way, is a really nice
  feature) include both block and column tags to make it easy to spot
  the column aspect.

 You'll probably be hearing from me soon again!

 Oh, and thanks for the separate email showing me how to do my page 100
 with the new setup.  How to do it was actually quite clear from the
 example you gave in the other message.  Very straightforward and does
 work nicely.

 Thanks again,
 eric


 ___
 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] Org-mode tricks for team management

2009-12-04 Thread Daniel Martins
Amazing work


Keep us up-to-date

I have intention to use a similar approach in my University

Daniel

2009/12/3 Juan Reyero joa...@gmail.com:
 Greetings,

 I have been using org-mode as a key support for my work as a manager
 for quite a while now.  I thought some of the tricks and processes for
 keeping up-to-date with the work of each person in my team might be of
 interest to other people, so I wrote them up at:

 http://juanreyero.com/article/emacs/org-teams.html

 In summary, it is a simple way to keep track of TODO items associated
 to other people, query them, and add context to your notes (who is
 with you, where your are, and the time).  The key idea is to ask emacs
 to remember these things, and use the extra state to automate agenda
 queries and quick tagging.

 I am very grateful to Carsten and all the people contributing to
 org-mode and this list.  It's made a great positive impact in my work.

 Best,

 Juan
 ---
 http://juanreyero.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



___
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] Beamer support - 2nd round

2009-12-04 Thread Nick Dokos
Daniel Martins daniel...@gmail.com wrote:

 Stupid question 9but I could not answer it)
 
 
 I have to set up
 
 (add-to-list 'org-export-latex-classes
  '(beamer
\\documentclass[11pt]{beamer}
 ...)
 
 ???
 

No.

 
 Or I have to imput another .el which sets org-export-latex-classes correctl=
 y?
 
 I sue the latest git version of org-mode 6.33trans and
 I tried to use the example but I couldn't

Are you using git to keep up to date with org-mode? If not, then afaict,
you cannot get it yet. If you are using git, you can do something like this:

$ git branch -r
  origin/HEAD
  origin/add-recursion-to-org-publish
  origin/beamer
  origin/emacs23
  origin/experimental
  origin/experimental-code-for-the-new-export-engine
  origin/master
  origin/mobile-support
  origin/org-plot-doc
  origin/support-for-mobile-sync

you can see there is a remote branch called origin/beamer. You can create
a local tracking branch with

$ git branch beamer origin/beamer

and check it out:

$ git checkout beamer

If you then look in lisp/org-latex.el, you should see the beamer stuff.

HTH,
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] Beamer support - 2nd round

2009-12-04 Thread Daniel Martins
Thank you very much

I did everything you suggested and everything worked nicely


But even using load-libray

org-latex

and

org-beamer

I received


Loading /home/daniel/emacs-lisp/org-mode/lisp/org-beamer.el (source)...done
Loading /home/daniel/emacs-lisp/org-mode/lisp/org-latex.el (source)...done
Select command:
Exporting to LaTeX...
or: No definition for class `beamer' in `org-export-latex-classes'

2009/12/4 Nick Dokos nicholas.do...@hp.com:
 Daniel Martins daniel...@gmail.com wrote:

 Stupid question 9but I could not answer it)


 I have to set up

 (add-to-list 'org-export-latex-classes
              '(beamer
                \\documentclass[11pt]{beamer}
 ...)

 ???


 No.


 Or I have to imput another .el which sets org-export-latex-classes correctl=
 y?

 I sue the latest git version of org-mode 6.33trans and
 I tried to use the example but I couldn't

 Are you using git to keep up to date with org-mode? If not, then afaict,
 you cannot get it yet. If you are using git, you can do something like this:

 $ git branch -r
  origin/HEAD
  origin/add-recursion-to-org-publish
  origin/beamer
  origin/emacs23
  origin/experimental
  origin/experimental-code-for-the-new-export-engine
  origin/master
  origin/mobile-support
  origin/org-plot-doc
  origin/support-for-mobile-sync

 you can see there is a remote branch called origin/beamer. You can create
 a local tracking branch with

 $ git branch beamer origin/beamer

 and check it out:

 $ git checkout beamer

 If you then look in lisp/org-latex.el, you should see the beamer stuff.

 HTH,
 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] Beamer support - 2nd round

2009-12-04 Thread Nick Dokos
Daniel Martins daniel...@gmail.com wrote:

 
 Loading /home/daniel/emacs-lisp/org-mode/lisp/org-beamer.el (source)...done
 Loading /home/daniel/emacs-lisp/org-mode/lisp/org-latex.el (source)...done
 Select command:
 Exporting to LaTeX...
 or: No definition for class `beamer' in `org-export-latex-classes'
 

Did you rebuild org-mode? Did you reload it?

Do 

   C-h v org-export-latex-classes RET

If it does not mention beamer, then the old definition is in
effect. Restart your emacs, or visit org-latex.el and evaluate the
defvar again with C-M-x.

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] [babel] R questions

2009-12-04 Thread Dan Davison
Sébastien Vauban wxhgmqzgw...@spammotel.com writes:

 Hello,

 One of this questions is a bit border-line, but I'm still trying ;-)

 I have this table generated by a script:

 #+results: abc2008
 | 2008/1  | -78.59 |   1627.24 |
 | 2008/2  | -80.17 |700.33 |
 | 2008/3  | -80.17 | 879.8 |
 | 2008/4  | -80.17 | -25823.17 |
 | 2008/5  | -80.17 |   3570.75 |
 | 2008/6  | -81.77 |2377.8 |
 | 2008/7  | -81.77 |2889.4 |
 | 2008/8  | -81.77 |   2612.92 |
 | 2008/9  | -81.77 |   1585.21 |
 | 2008/10 |  -83.4 |   1561.42 |
 | 2008/11 |  -83.4 |   2189.17 |
 | 2008/12 |  | |

 I want to draw the 12 months with the values side by side.

 Problem #1: the  in the last line hinder the generation of the graph. Format
 error.

Missing values in R are represented by the value NA. If you change the
last line of your table to

| 2008/12 | NA |NA |

then it works [1], [2], [3].


 #+srcname: expenses-bar-plot(abc = abc2008)
 #+begin_src R :results file :file abc2008.pdf
 barplot(abc[,3], col = red, main = Profit and Loss 2008, las = 1, xlab
 = Months, ylab = EUR)
 #+end_src

 Problem #2: I don't know how to ask for drawing the 2 columns. I've tried

OK, so one point that is arguably relevant to this mailing list is that
when org tables are read into R, the object that is created in R is a
*data frame*. Not a matrix. (A data frame can have columns of
different types; matrices are all one type). [4]

So to solve your problem, you'd need to read the description of the
height argument in the help page for barplot (?barplot), noting that it
says either a vector or matrix, and also noting that it says that bars
correspond to columns (not rows), thus realising that you need to
explicitly convert the relevant columns of the data frame to a matrix
and then transpose.

However, your two columns have rather different magnitude values and so
are not very well suited for plotting on the same scale. Below I
rescaled the first column by a factor of 20 so you can at least see the
bars.

#+srcname: expenses-bar-plot-two-columns(abc = abc2008)
#+begin_src R :file abc2008.png
  ## select the two columns, convert to matrix, transpose and rescale top row.
  x - t(as.matrix(abc[,2:3])) * c(20,1)
  barplot(x, col = rep(c(red,blue), ncol(x)), main = Profit and Loss 
2008, las = 1, xlab= Months, ylab = EUR, beside=TRUE)
#+end_src

Dan



Footnotes:

[1] Note no quotes around NA here. You asked a good question about
quoting in org-babel; it will be answered.

[2] I guess one could potentially think about dealing with missing
values more explicitly in org-babel. E.g. there could be a header arg
specifying what values are to be treatyed as missing. Nothing like that
exists currently.

[3] You might think that an alternative would be to
do something like this in R

abc[abc == \\] - NA

but the trouble is that with those double quotes present, R will
interpret the column as containing character data rather than numeric,
and things will not be pretty.

[4] org-babel uses orgtbl-to-tsv followed by read.table() to convert the
org table into a data.frame in R. A source of much confusion with
R-beginners is that by default, read.table converts character columns
into the *factor* data type. Note that org-babel currently uses
'as.is=TRUE' when calling read.table and therefore does *not* convert to
factor. This may avoid some confusion among users but is
memory-inefficient and misses out on other advantages of factors.


___
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] Blorgit SVN integration

2009-12-04 Thread Eric Schulte
Hi Francesco,

Thanks for the patch.

I got it working and pushed up the change to the blorgit git repository.

Now all we need is an interface for reviewing/reverting previous
commits, and individual username/passwords and blorgit will be a full
fledged wiki! :)

Thanks -- Eric

Francesco Pizzolante f...@missioncriticalit.com writes:

 Hi Eric,

 One little question: is it possible to add a comment field when editing a 
 file
 through the web interface and use that comment as the log when checking in 
 the
 file in the repository?

 That behavior is not currently part of blorgit, but it shouldn't be hard
 to add.  See lines 241 through 247 of blorgit.rb which are responsible
 for rendering the edit page.  It shouldn't be hard to add a comment
 field, and then later access that field when committing to SVN/GIT.

 I've added a text input in the UI:

 diff --git a/blorgit.rb b/blorgit.rb
 index 93bea47..c7e4a92 100644
 --- a/blorgit.rb
 +++ b/blorgit.rb
 @@ -245,6 +245,8 @@ __END__
  %form{ :action = path_for(@blog), :method = :post, :id = :comment_form }
%textarea{ :id = :body, :name = :body, :rows = 28, :cols = 82 }= 
 @blog.body
%br
 +  Change log:
 +  %input{ :id = :change_log, :name = :change_log, :type = :text }
%input{ :id = :submit, :name = :edit, :value = :update, :type = 
 :submit }
%a{ :href = path_for(@blog) } Cancel

 But then, I have absolutely no idea on how to access that value when
 committing. It should be something like this:

 diff --git a/backend/blog.rb b/backend/blog.rb
 index 827ec05..555f12c 100644
 --- a/backend/blog.rb
 +++ b/backend/blog.rb
 @@ -26,7 +26,7 @@ class Blog  ActiveFile::Base
index: index
  def after_savee
Dir.chdir(Blog.base_directory) do
 -%x{svn add #{self.path}  svn ci -m #{self.path} updated through 
 the web interface #{self.path}}
 +%x{svn add #{self.path}  svn ci -m #{self.path} updated through 
 the web interface: #{self.change_log} #{sel
endt: true
  end
end

 I tried adding an instance method in base.rb but didn't manage to make it
 work.

 A little help would be welcome.

 Thanks a lot,
 Francesco


___
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 when push fils in MobileOrg

2009-12-04 Thread Xin Shi
Hi Nick,

Thanks for your detailed explanation! After deleting the set todo in my
.emacs file, it's working now!

Now, the remaining question for me is that the generated agenda.org file
is empty even when there is agenda there. And I don't know if there is a way
to display the agenda in the MobileOrg in the iphone/ipod touch.

Xin



On Fri, Dec 4, 2009 at 6:25 PM, Nick Dokos nicholas.do...@hp.com wrote:

 Xin Shi shixin...@gmail.com wrote:


  Debugger entered--Lisp error: (wrong-type-argument listp TODO)
cdr(TODO)
(mapcar (lambda (x) (if ... ... x)) (cdr entry))
(setq kwds (mapcar (lambda ... ...) (cdr entry)))
(while (setq entry (pop def-todo)) (insert #+READONLY\n) (setq kwds
  (mapcar ... ...)) (insert #+TODO:  (mapconcat ... kwds  ) \n) (setq
  dwds (member | kwds) twds (org-delete-all dwds kwds) todo-kwds
  (org-delete-all twds todo-kwds) done-kwds (org-delete-all dwds
 done-kwds)))
(save-current-buffer (set-buffer temp-buffer) (while (setq entry ...)
  (insert #+READONLY\n) (setq kwds ...) (insert #+TODO:  ... \n)
 (setq
  dwds ... twds ... todo-kwds ... done-kwds ...)) (when (or todo-kwds
  done-kwds) (insert #+TODO:  ...  |  ... \n)) (setq def-tags (mapcar
  ... def-tags)) (setq def-tags (delq nil def-tags)) (setq tags
  (org-delete-all def-tags tags)) (setq tags (sort tags ...)) (setq tags
  (append def-tags tags nil)) (insert #+TAGS:  (mapconcat ... tags  )
  \n) (insert #+DRAWERS:  (mapconcat ... drawers  ) \n) (insert
  #+ALLPRIORITIES: A B C \n) (when (file-exists-p ...) (insert *
 [[file:
  agendas.org][Agenda Views]]\n)) (while (setq entry ...) (setq file ...
  link-name ...) (insert ...)) (push (cons org-mobile-index-file ...)
  org-mobile-checksum-files))
(with-current-buffer temp-buffer (while (setq entry ...) (insert
  #+READONLY\n) (setq kwds ...) (insert #+TODO:  ... \n) (setq dwds
 ...
  twds ... todo-kwds ... done-kwds ...)) (when (or todo-kwds done-kwds)
  (insert #+TODO:  ...  |  ... \n)) (setq def-tags (mapcar ...
  def-tags)) (setq def-tags (delq nil def-tags)) (setq tags (org-delete-all
  def-tags tags)) (setq tags (sort tags ...)) (setq tags (append def-tags
 tags
  nil)) (insert #+TAGS:  (mapconcat ... tags  ) \n) (insert
 #+DRAWERS:
   (mapconcat ... drawers  ) \n) (insert #+ALLPRIORITIES: A B C
 \n)
  (when (file-exists-p ...) (insert * [[file:agendas.org][Agenda
 Views]]\n))
  (while (setq entry ...) (setq file ... link-name ...) (insert ...)) (push
  (cons org-mobile-index-file ...) org-mobile-checksum-files))
(prog1 (with-current-buffer temp-buffer (while ... ... ... ... ...)
 (when
  ... ...) (setq def-tags ...) (setq def-tags ...) (setq tags ...) (setq
 tags
  ...) (setq tags ...) (insert #+TAGS:  ... \n) (insert #+DRAWERS: 
 ...
  \n) (insert #+ALLPRIORITIES: A B C \n) (when ... ...) (while ...
 ...
  ...) (push ... org-mobile-checksum-files)) (with-current-buffer
 temp-buffer
  (write-region nil nil temp-file nil 0)))
(unwind-protect (prog1 (with-current-buffer temp-buffer ... ... ... ...
  ... ... ... ... ... ... ... ... ...) (with-current-buffer temp-buffer
 ...))
  (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))
(let ((temp-file ...) (temp-buffer ...)) (unwind-protect (prog1 ...
 ...)
  (and ... ...)))
(with-temp-file (expand-file-name org-mobile-index-file
  org-mobile-directory) (while (setq entry ...) (insert #+READONLY\n)
 (setq
  kwds ...) (insert #+TODO:  ... \n) (setq dwds ... twds ... todo-kwds
 ...
  done-kwds ...)) (when (or todo-kwds done-kwds) (insert #+TODO:  ...  |
 
  ... \n)) (setq def-tags (mapcar ... def-tags)) (setq def-tags (delq nil
  def-tags)) (setq tags (org-delete-all def-tags tags)) (setq tags (sort
 tags
  ...)) (setq tags (append def-tags tags nil)) (insert #+TAGS: 
 (mapconcat
  ... tags  ) \n) (insert #+DRAWERS:  (mapconcat ... drawers  )
 \n)
  (insert #+ALLPRIORITIES: A B C \n) (when (file-exists-p ...) (insert
 *
  [[file:agendas.org][Agenda Views]]\n)) (while (setq entry ...) (setq
 file
  ... link-name ...) (insert ...)) (push (cons org-mobile-index-file ...)
  org-mobile-checksum-files))
(let ((files-alist ...) (def-todo ...) (def-tags ...) file link-name
  todo-kwds done-kwds tags drawers entry kwds dwds twds)
  (org-prepare-agenda-buffers (mapcar ... files-alist)) (setq done-kwds
  (org-uniquify org-done-keywords-for-agenda)) (setq todo-kwds
 (org-delete-all
  done-kwds ...)) (setq drawers (org-uniquify org-drawers-for-agenda))
 (setq
  tags (org-uniquify ...)) (with-temp-file (expand-file-name
  org-mobile-index-file org-mobile-directory) (while ... ... ... ... ...)
  (when ... ...) (setq def-tags ...) (setq def-tags ...) (setq tags ...)
 (setq
  tags ...) (setq tags ...) (insert #+TAGS:  ... \n) (insert
 #+DRAWERS: 
  ... \n) (insert #+ALLPRIORITIES: A B C \n) (when ... ...) (while
 ...
  ... ...) (push ... org-mobile-checksum-files)))
org-mobile-create-index-file()
(save-window-excursion (org-mobile-check-setup)
  (org-mobile-prepare-file-lists) (run-hooks 

Re: [Orgmode] [babel] Tiny problems

2009-12-04 Thread Eric Schulte
Hi Sébastien,

Sébastien Vauban wxhgmqzgw...@spammotel.com writes:

[...]

 Here the problems (details, though) I've observed:

 - srcname must be in column 0 for the highlighting to be correct.


The syntax highlighting is really just org-mode comment highlighting,
and I don't know that it would be desirable to start highlighting
comments which don't start at the beginning of a line.

Maybe once babel is able to recognize #+source: and #+results: lines
which don't start at column 0 -- currently it doesn't -- then it would
make sense from a babel perspective to put some pressure on the syntax
coloring.


 - *after* =C-c '= forth and back, all the blank lines in my source block (in
   my example, the one between SET NOCOUNT ON and SELECT TOP 10) are filled
   with an amount of whitespaces (and, in my Emacs config, highlighted as
   useless spaces).

 - the condition block is not indented properly in the tangled output file;
   only the first line is:


Maybe the above two issues could be fixed by setting the
`org-src-preserve-indentation' variable's value to t.  Since I only need
this in some org-mode buffers I set it as a buffer local variable by
placing a line like the following at the top of these buffers.

# -*- org-src-preserve-indentation: t -*-

again this should/will be in the documentation somewhere...

Best -- Eric


 -- generated by org-babel-tangle
 -- [[id:d7557df2-6921-428f-8433-68fad551abec][CP111.sql]]
 -- no longer display the count message
 SET NOCOUNT ON

 SELECT TOP 10
etpNom,
etpID,
 FROM etp
 WHERE etpID
 IN (SELECT actID
 FROM actions
 WHERE actID = 338)
 AND
 -- extra conditionOK
 pfiAuth = 1   not
 AND SUBSTRING(etpCPNum, 1, 3) = 111 not
 ORDER BY pfiID
 -- CP111.sql ends here

 Best regards,
   Seb


___
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] features request for Emacs Initialization

2009-12-04 Thread Eric Schulte
bluedian blued...@gmail.com writes:

 Hi,

 Thanks for org-babel, my configuration file are now in org form and it's 
 pretty
 easy to manage and document them. I was looking for that kind of things since 
 a
 long time !

 I will find interesting to have two more things (perhaps it's already there) :

 1) When the org configuration file aren't changed, a way to automatically load
 their tangled version (bytecompiled ?) in order to improve the initialization
 time of Emacs.


Hmm, maybe we should byte-compile elisp files by default when they are
tangled out of org-babel documents.  Although I can't think of any off
the top of my head I image there are going to be cases when it would not
be appropriate to byte-compile tangled elisp files.

I'll add this feature as a task in our development list.


 2) When in debugging mode (a variable, like stater-kit-org-babel-debug-lisp 
 put
 to t), could a trace be generated by the tangling process in order to trace 
 the
 execution of the configuration file (simple trace like the generation of a
 message at the start and end of each emacs lisp block). That could be a good
 help for rapidly finding an error.


Hmm, I feel like this would require too much code in org-babel for too
limited a set of functionality.  Maybe there is a more general feature
lying behind this request that would be more widely applicable?

Thanks for the suggestions -- Eric


___
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