[Orgmode] [babel] sreen : unable to run org-babel-screen-test

2009-11-30 Thread bluedian
Hi,

When running "org-babel-screen-test", a xterm appear with its prompt, but no
message appear. Emacs hangs and my cpu is à 100%.

When hitting c-G (whit debug mode activated), I get this message :
Debugger entered--Lisp error: (quit)
  (not (file-readable-p tmpfile))
  (while (not (file-readable-p tmpfile)) (format "org-babel-screen: File not
readable yet."))
  (let* ((session "org-babel-testing") (random-string ...) (tmpfile
"/tmp/org-babel-screen.test") (body ...) process tmp-string)
(org-babel-execute:screen body org-babel-default-header-args:screen) (while (not
...) (format "org-babel-screen: File not readable yet.")) (setq tmp-string
(with-temp-buffer ... ...)) (delete-file tmpfile) (message (concat
"org-babel-screen: Setup " ...)))
  org-babel-screen-test()
  call-interactively(org-babel-screen-test)
  (unwind-protect (call-interactively chosen) (smex-rank chosen)
(smex-show-key-advice chosen))
  (let ((chosen ...)) (unwind-protect (call-interactively chosen) (smex-rank
chosen) (smex-show-key-advice chosen)))
  smex()
  call-interactively(smex nil nil)

In the * message * buffer, I get this :
Sending source code block to interactive terminal session...
Warning: Tried to connect to session manager, None of the authentication
protocols specified are supported
Entering debugger...

the last sentence "None of the authentication protocols specified are supported"
is surely the key, but I didn't understand it as I have xterm, sh and screen
installed and correctly configurated.

I'm on Ubuntu 9.04 - Jaunty Jackalope, Emacs 23, the last (this morning)
org-mode version on the git repository (I use org-track-update).

Other parts of babel are correctly working (shell and emacs mode without the
screen part)









___
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: Collaborate with heretics

2009-11-30 Thread Sébastien Vauban
Hi Andrea,

andrea wrote:
> I try to be a prophet of emacs and org-mode but sometimes it's just a
> loss of time.
> Even very skilled informatics weren't convinced, sometimes they didn't
> like it sometimes they just didn't want to spend time on it.
>
> Once it happened that a friend of mine that was working with excel
> tables saw how the text was flowing nicely on my org-mode buffer.
> He was amazed and wanted to know everything and use it.
>
> I was very happy about and I installed all the necessary, but then it
> didn't work out.
> It's just too "alien" for people used to work with office (bleah).
>
> Emacs is not easy, org-mode also adds a lot of complexity (even if it's
> really elegant and clear), and if both are not used daily it could
> become more a pain than a pleasure.
>
> But I'm convinced there's nothing more powerful on earth than org-mode
> for working with plain text files.
>
> So my question is a bit egoistic in fact, I want it whenever possible
> also forcing other people to do it.
>
> The other way for serious work is anyway latex, which is not at all
> easier to manage.

I completely share your observations, and your convictions on this (Emacs,
Org-mode and LaTeX).

I must admit, as well, that I'd have been (and stayed there) in the category
of the guys that don't see the advantages of those (and are reluctant because
against Emacs and LaTeX because of their unattractive sides) if I hadn't had a
colleague in my office that convinced me, thanks to a small set of good chosen
points: things that helped me work less for an even better result (such as
LaTeX for automatic generation of contents with some bash scripting, or
pcl-csv integration into Emacs, with easy diff capabilities, etc.).


> Regarding the org-lite, I think it's quite difficult to create it, the
> text manipulation which is done is really dynamic, a normal grammar
> would not be enough.
>
> But I guess in org-mobile there's code that could be very useful for
> an org-lite, is there a plan to port that program to osx/windows/linux?

However, I don't how to get more people on board. It is true (and normal) that
it takes a bit more of effort in the beginning. Difficult to avoid that --
that dream is just too much. However, they still are potentialities with the
Wiki stuff I'm still assessing (waiting it to be "perfect" before being the
prophet in my company):

- Blorgit
- IkiWiki

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: sreen : unable to run org-babel-screen-test

2009-11-30 Thread Benjamin Andresen
Hey,

bluedian  writes:

> Hi,
>
> When running "org-babel-screen-test", a xterm appear with its prompt, but no
> message appear. Emacs hangs and my cpu is à 100%.

I just tried it myself, and apparently it's broken with the current git.

I will have a look and report back with my findings!

br,
benny


___
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: sreen : unable to run org-babel-screen-test

2009-11-30 Thread Benjamin Andresen
Hey,

Benjamin Andresen  writes:

> I will have a look and report back with my findings!

I was relying on a variable which used to contain the value it needed,
but doesn't do any more. It was a foolish shortcut and now it uses the
official route by processing the parameters that are passed to it.

As I don't have access to the official org-mode git repo, can someone
please apply this patch for me?

br,
benny

P.S. I'm not committing this patch to the org-babel repo, out of fear of
merge issues later on. I guess this route is better? Thanks!

diff --git a/contrib/babel/lisp/langs/org-babel-screen.el b/contrib/babel/lisp/langs/org-babel-screen.el
index efeab23..1529ac0 100644
--- a/contrib/babel/lisp/langs/org-babel-screen.el
+++ b/contrib/babel/lisp/langs/org-babel-screen.el
@@ -55,7 +55,9 @@ In case you want to use a different screen than one selected by your $PATH")
 \"default\" session is be used when none is specified."
   (message "Sending source code block to interactive terminal session...")
   (save-window-excursion
-(let ((socket (org-babel-screen-session-socketname session)))
+(let* ((processed-params (org-babel-process-params params))
+   (session (first processed-params))
+   (socket (org-babel-screen-session-socketname session)))
   (unless socket (org-babel-prep-session:screen session params))
   (org-babel-screen-session-execute-string session 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] beamer columns

2009-11-30 Thread Carsten Dominik


On Nov 29, 2009, at 11:17 PM, Thomas S. Dye wrote:



On Nov 29, 2009, at 11:23 AM, Carsten Dominik wrote:



On Nov 29, 2009, at 7:31 PM, Thomas S. Dye wrote:


Aloha all,

Would it make sense to implement Beamer columns with Org-mode  
tables?


Hi Thomas,

I cannot see how this would make sense.

Maybe you'd like to elaborate?

- Carsten


Hi Carsten and Sebastian,

This idea might be nonsense or technically infeasible.  The  
advantage, if it is one, is that the same org file might export to  
LaTeX and Beamer with roughly similar results.  If headlines are  
used below the level of the Beamer frame, then export to LaTeX  
becomes problematic, or so it seems to me (and perhaps some others,  
if I've read their posts correctly).   A column-like arrangement in  
a portion of a LaTeX file is sometimes faked by using  
\begin{tabular} \end{tabular}, and this naturally brought to mind  
Org-mode tables.


Apologies if the signal/noise ratio is distressingly low here.



Hi Thomas, thanks for the extra explanations - however, I still don't  
think that this is the way to go.


- Carsten



All the best,
Tom

Thomas S. Dye, Ph.D.
T. S. Dye & Colleagues, Archaeologists, Inc.
Phone: (808) 529-0866 Fax: (808) 529-0884
http://www.tsdye.com




- 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] Re: scheduling: skip weekends

2009-11-30 Thread Carsten Dominik

Hi Patrick,

this sounds reasonable, but I don't currently have time to implement  
it.  Would be interested in a patch, though.


- Carsten

On Nov 28, 2009, at 7:10 PM, Patrick Drechsler wrote:


Hi Carsten et al,

Carsten Dominik wrote:

On Nov 28, 2009, at 4:51 PM, Patrick Drechsler wrote:
is it possible to skip weekends when rescheduling a task using the  
"++1d" operator?


Example:

* TODO work task (not on weekends)
SCHEDULED: <2009-11-27 Fr ++1d>

When changing the state to the DONE state, it will be rescheduled  
to the next day, no matter what day of the week that is. So  
changing the example above to DONE on a Friday will reschedule the  
task for Saturday.  Is it possible to reschedule it for Monday?



no, this is not possible currently.


OK, thanks for the quick feedback.

Does this seem like a reasonable feature request?

Regards,

Patrick




___
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] Re: Collaborate with heretics

2009-11-30 Thread Raffi R
Is it possible to introduce Emacs to people using CUA mode? That may
make the learning curve gentler.

That said, I've found people either take to it or do not, and have not
yet been able to lure those who do not over to our side, even when
they see how nicely my documents are formatted and how easy it is.

2009/11/30 Sébastien Vauban :
> Hi Andrea,
>
> andrea wrote:
>> I try to be a prophet of emacs and org-mode but sometimes it's just a
>> loss of time.
>> Even very skilled informatics weren't convinced, sometimes they didn't
>> like it sometimes they just didn't want to spend time on it.
>>
>> Once it happened that a friend of mine that was working with excel
>> tables saw how the text was flowing nicely on my org-mode buffer.
>> He was amazed and wanted to know everything and use it.
>>
>> I was very happy about and I installed all the necessary, but then it
>> didn't work out.
>> It's just too "alien" for people used to work with office (bleah).
>>
>> Emacs is not easy, org-mode also adds a lot of complexity (even if it's
>> really elegant and clear), and if both are not used daily it could
>> become more a pain than a pleasure.
>>
>> But I'm convinced there's nothing more powerful on earth than org-mode
>> for working with plain text files.
>>
>> So my question is a bit egoistic in fact, I want it whenever possible
>> also forcing other people to do it.
>>
>> The other way for serious work is anyway latex, which is not at all
>> easier to manage.
>
> I completely share your observations, and your convictions on this (Emacs,
> Org-mode and LaTeX).
>
> I must admit, as well, that I'd have been (and stayed there) in the category
> of the guys that don't see the advantages of those (and are reluctant because
> against Emacs and LaTeX because of their unattractive sides) if I hadn't had a
> colleague in my office that convinced me, thanks to a small set of good chosen
> points: things that helped me work less for an even better result (such as
> LaTeX for automatic generation of contents with some bash scripting, or
> pcl-csv integration into Emacs, with easy diff capabilities, etc.).
>
>
>> Regarding the org-lite, I think it's quite difficult to create it, the
>> text manipulation which is done is really dynamic, a normal grammar
>> would not be enough.
>>
>> But I guess in org-mobile there's code that could be very useful for
>> an org-lite, is there a plan to port that program to osx/windows/linux?
>
> However, I don't how to get more people on board. It is true (and normal) that
> it takes a bit more of effort in the beginning. Difficult to avoid that --
> that dream is just too much. However, they still are potentialities with the
> Wiki stuff I'm still assessing (waiting it to be "perfect" before being the
> prophet in my company):
>
> - Blorgit
> - IkiWiki
>
> 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
>


___
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] Bug when exporting to LaTeX

2009-11-30 Thread Sébastien Vauban
Hi,

Just found that:

--8<---cut here---start->8---
*** ECM

   - faire un script Bash (et =isql=) envoyant un /listing/ de stagiaires;

#+srcname: envoi-stg
   #+begin_src sql
   DECLARE @dateFmtStyleIn int; SET @dateFmtStyleIn = 120 -- ODBC canonical
   DECLARE @dateFmtStyleOut int; SET @dateFmtStyleOut = 103 -- French 
dd/mm/

   DECLARE @firstDayOfThisMonth smalldatetime
   SET @firstDayOfThisMonth = CONVERT(smalldatetime,
  CAST(YEAR(GETDATE()) AS char(4)) + '-'
  + CAST(MONTH(GETDATE()) AS char(2)) + 
'-'
  + '01' + ' 00:00:00',
  @dateFmtStyleIn)

   DECLARE @now smalldatetime
   SET @now = CONVERT(smalldatetime,
  CAST(YEAR(GETDATE()) AS char(4)) + '-'
  + CAST(MONTH(GETDATE()) AS char(2)) + '-'
  + CAST(DAY(GETDATE()) AS char(2)) + ' '
  + CAST(DATEPART(hh, GETDATE()) AS char(2)) + ':'
  + CAST(DATEPART(mi, GETDATE()) AS char(2)) + ':'
  + '00',
  @dateFmtStyleIn)

   SELECT pfiID
   FROM dossier
#+end_src
--8<---cut here---end--->8---

gets converted to:

--8<---cut here---start->8---
\subsubsection{ECM}
\label{sec-3.1.7}


\begin{itemize}
\item faire un script Bash (et \texttt{isql}) envoyant un \emph{listing} de 
stagiaires;


\lstset{language=SQL}
\begin{lstlisting}
DECLARE @dateFmtStyleIn int; SET @dateFmtStyleIn = 120 -- ODBC canonical
DECLARE @dateFmtStyleOut int; SET @dateFmtStyleOut = 103 -- French dd/mm/

DECLARE @firstDayOfThisMonth smalldatetime
SET @firstDayOfThisMonth = CONVERT(smalldatetime,
   CAST(YEAR(GETDATE()) AS char(4)) + '-'

\begin{itemize}
\item CAST(MONTH(GETDATE()) AS char(2)) + '-'
\item '01' + ' 00:00:00',
\end{itemize}

\item CAST(MONTH(GETDATE()) AS char(2)) + '-'
\item CAST(DAY(GETDATE()) AS char(2)) + ' '
\item CAST(DATEPART(hh, GETDATE()) AS char(2)) + ':'
\item CAST(DATEPART(mi, GETDATE()) AS char(2)) + ':'
\item '00',
   @dateFmtStyleIn)

SELECT pfiID
FROM dossier
\end{lstlisting}
--8<---cut here---end--->8---

when exporting to LaTeX.

Note the \items in the code...

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] Re: sreen : unable to run org-babel-screen-test

2009-11-30 Thread Eric Schulte
Hi Benny,

We should have caught this usage when we changed the variable passing
behavior in org-babel.  Thanks for the patch, it is now applied.

Best -- Eric

Benjamin Andresen  writes:

> Hey,
>
> Benjamin Andresen  writes:
>
>> I will have a look and report back with my findings!
>
> I was relying on a variable which used to contain the value it needed,
> but doesn't do any more. It was a foolish shortcut and now it uses the
> official route by processing the parameters that are passed to it.
>
> As I don't have access to the official org-mode git repo, can someone
> please apply this patch for me?
>
> br,
> benny
>
> P.S. I'm not committing this patch to the org-babel repo, out of fear of
> merge issues later on. I guess this route is better? Thanks!
>
> diff --git a/contrib/babel/lisp/langs/org-babel-screen.el 
> b/contrib/babel/lisp/langs/org-babel-screen.el
> index efeab23..1529ac0 100644
> --- a/contrib/babel/lisp/langs/org-babel-screen.el
> +++ b/contrib/babel/lisp/langs/org-babel-screen.el
> @@ -55,7 +55,9 @@ In case you want to use a different screen than one 
> selected by your $PATH")
>  \"default\" session is be used when none is specified."
>(message "Sending source code block to interactive terminal session...")
>(save-window-excursion
> -(let ((socket (org-babel-screen-session-socketname session)))
> +(let* ((processed-params (org-babel-process-params params))
> +   (session (first processed-params))
> +   (socket (org-babel-screen-session-socketname session)))
>(unless socket (org-babel-prep-session:screen session params))
>(org-babel-screen-session-execute-string session 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


___
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-remember: How to unambiguously store notes to level-2 and deeper headlines?

2009-11-30 Thread Carsten Dominik

No, currently there is now way to do this.

- Carsten

On Nov 28, 2009, at 2:16 AM, Ryan C. Thompson wrote:


Hi,

Is there a way to unambiguously specify non-top-level headers as org- 
remember targets in templates? My specific use case is that I want  
to split my "Tasks" entries list into sublists, and I want to store  
new tasks in Tasks/Unsorted by default. I know I could just specify  
"Unsorted" as the target, but that seems really easy to break, for  
example, if I also had Events/Unsorted in the same file. So, is  
there a good way to specify a level-2 headline as a target in org- 
remember-templates?


-Ryan


___
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] Bug Report: org-blocker-hook and org-trigger-hook are named incorrectly

2009-11-30 Thread Carsten Dominik

Hi Ryan,

yes, we have some non-standard names here, but often these standards  
cam after the names were used for quite some time, so I am not going  
to change them.


- Carsten

On Nov 27, 2009, at 9:28 PM, Ryan C. Thompson wrote:

I believe it is the emacs convention to distinguish between hooks  
that take no arguments and hooks that do. Since org-blocker-hook and  
org-trigger-hook pass an argument to their functions, they should  
actually be called org-blocker-functions and org-trigger-functions.


From the elisp info, 23.1 Hooks:

  If the hook variable's name does not end with `-hook', that
indicates it is probably an "abnormal hook".  That means the hook
functions are called with arguments, or their return values are used  
in

some way.  The hook's documentation says how the functions are called.
You can use `add-hook' to add a function to an abnormal hook, but you
must write the function to follow the hook's calling convention.
  By convention, abnormal hook names end in `-functions' or `-hooks'.
If the variable's name ends in `-function', then its value is just a
single function, not a list of functions.

-Ryan


___
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] Radio targets: identification

2009-11-30 Thread Carsten Dominik

Hi Samium,

radio links are not strong enough to support massive matching, and I  
don't want to implement a parser like this.


But I think this would be a nice add-on, to make a more powerful radio- 
link module.  It could include across-file linking, derivatives like  
you suggest and more.

Nice Xmas project, anyone??? :-)

However, I don't think it is feasible to do this like I currently do,  
with font-lock.  Font-lock is applied after every key stroke, and when  
matching very many words, this will not work.  Probably a system using  
hooks and/or idle timers could be appropriate...


- Carsten


On Nov 27, 2009, at 7:19 PM, Samium Gromoff wrote:


Good day folks,

I'd like to be able to specify possible conjugations for non-strict
matching of radio targets, so that:

#+RADIO_CONJUGATION_SET foo fooish
#+RADIO_CONJUGATION_SET bar barry

<<>>

gets targeted by all of:

  - foo bar,
  - fooish bar,
  - foo barry, and
  - fooish barry

Alternatively, as a more predictable, but also less automated way:

#+RADIO_EQUIV "foo bar" "fooish bar" "foo barry" "fooish barry"

I feel that this might make org-generated dictionaries much more  
useful.



Oh, and by the way -- thanks for an excellent tool!


regards,
 Samium Gromoff
--
_deepfire-at-feelingofgreen.ru
O< ascii ribbon campaign - stop html mail - www.asciiribbon.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


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

2009-11-30 Thread Eric Schulte
Hi Sébastien,

Sébastien Vauban  writes:

[...]
>
> Just for my information (maybe being able to be more accurate next time, or
> even finding a solution myself), how do you debug such a problem?
>
> With which debugger, with tracing/stepping?  With stack trace?
>

I'm almost embarrassed to admit that I do most of my elisp debugging
with the `message' function.  I embed `message' debug statements to
print the values of key variables at key points, and I run through
problems looking at the output.

I'd be interested to hear if anyone can recommend a better elisp
debugging solution.

>
> Let's assume the following Org file:
>
> #+begin_src sh :session "ecm"
> cd ~/Personal
> #+end_src
>
> #+begin_src sh :session "ecm"
> ls *.org
> #+end_src
>
> I C-c C-c the first snippet. Nothing special, except it doesn't hang anymore.
> So, it already looks much better.
>
> Second snippet. C-c C-c. There, it still hangs ;-((
>
> Though, C-x C-b shows me the contents of the "ecm" buffer:
>
> cd ~/Personal
>
> ~ % ~/Personal % ls *.org
> echo 'org_babel_sh_eoe'
> Bookmarks.org  Scorpios.orgTickler.org  
> Voice-over-IP.org*
> Home.org*  Succession.org  Using-startx-for-Remote-Display.org  refile.org
> ~/Personal % org_babel_sh_eoe
> ~/Personal % 
>
> Looks closer to what it should...
>
> Still a little problem, though, as explained above.
>

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

--8<---cut here---start->8---
(defun schulte/set-shell-prompt-regexp ()
  (setq comint-prompt-regexp "^\(.+\)"))
(add-hook 'shell-mode-hook 'schulte/set-shell-prompt-regexp)
--8<---cut here---end--->8---

You'll have to change the regexp ("^\(.+\)" in my example) to match your
prompt.  I was unable to create your prompt locally.  I find the
`regexp-builder' function to be very handy for these situations.  If you
are unable to build a working regexp please send me a string of your
prompt and I'd be happy to return an appropriate regexp.

on a related topic:

I've also noticed that org-babel has difficulty digesting shell output
when it is ansi-colorized.  I'm not sure what the best fix here would
be.  We could probably start piping all org-babel session results
through something like `ansi-color-filter-region' but that feels a
little bit too heavy.  I'd be interested to hear other peoples
thoughts/suggestions.

>
> BTW, what's the impact of specifying "sh" or "bash" for the snippet?
>

While "sh" blocks should work "bash" blocks will not be recognized.  In
org-babel "sh" doesn't explicitly mean the "sh" command, but rather
means 'run shell' which will default to whatever shell you have
configured.

Thanks -- 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] [babel] Bug when exporting to LaTeX

2009-11-30 Thread Eric Schulte
Hi Sébastien,

Sébastien Vauban  writes:

[...]
> when exporting to LaTeX.
>
> Note the \items in the code...
>

I think you may need to update your version of Org-mode (and make sure
that you are loading Org from your git directory and not from the base
of your instillation see [1]).  The above snippet exports correctly to
the following for me.

--8<---cut here---start->8---
\subsection*{ECM}
\label{sec-1.1}


\begin{itemize}
\item faire un script Bash (et \texttt{isql}) envoyant un \emph{listing} de 
stagiaires;
\end{itemize}
\lstset{language=SQL}
\begin{lstlisting}
DECLARE @dateFmtStyleIn int; SET @dateFmtStyleIn = 120 -- ODBC canonical
DECLARE @dateFmtStyleOut int; SET @dateFmtStyleOut = 103 -- French dd/mm/

DECLARE @firstDayOfThisMonth smalldatetime
SET @firstDayOfThisMonth = CONVERT(smalldatetime,
   CAST(YEAR(GETDATE()) AS char(4)) + '-'
   + CAST(MONTH(GETDATE()) AS char(2)) + '-'
   + '01' + ' 00:00:00',
   @dateFmtStyleIn)

DECLARE @now smalldatetime
SET @now = CONVERT(smalldatetime,
   CAST(YEAR(GETDATE()) AS char(4)) + '-'
   + CAST(MONTH(GETDATE()) AS char(2)) + '-'
   + CAST(DAY(GETDATE()) AS char(2)) + ' '
   + CAST(DATEPART(hh, GETDATE()) AS char(2)) + ':'
   + CAST(DATEPART(mi, GETDATE()) AS char(2)) + ':'
   + '00',
   @dateFmtStyleIn)

SELECT pfiID
FROM dossier
\end{lstlisting}
--8<---cut here---end--->8---

Best -- Eric

>
> Best regards,
>   Seb

Footnotes: 
[1]  http://article.gmane.org/gmane.emacs.orgmode/19662/



___
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] Make org-babel-tangle work when target-file is nil

2009-11-30 Thread Eric Schulte
Nicolas Girard  writes:

> 2009/11/29, Dan Davison :
>> "Eric Schulte"  writes:
>
> Hi guys,
>
> indeed, thanks to your explanations, org-babel tangling code's
> behaviour makes much more sense to me.
>
> I've just discovered Eric's Literate Programming fork of
> emacs-starter-kit [1] and find it pretty darn good ! I'm currently
> using it along with org-babel to rework my Org setup from scratch and
> it's working very well !
>

Thanks!  If you happen to have any suggestions/improvements please feel
free to fork and make changes and I'll be happy to fold them into the
main version.

>
> Btw Eric, why not activating
> (if window-system (require 'org-mouse))
> by deault in starter-kit-org.org ? Within emacs-starter-kit it makes
> perfect sense to me.
>

To be honest I'm not sure why this is commented out.  It must have been
raising errors at some point.  I'll try uncommenting it and see if the
errors return.

Thanks -- Eric

>
> Cheers,
> Nicolas
>
> [1] http://github.com/eschulte/emacs-starter-kit
>
>
> ___
> 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] Executing sh-code

2009-11-30 Thread Nick Dokos
Eric Schulte  wrote:

> Hi S=C3=A9bastien,
> 
> S=C3=A9bastien Vauban  writes:
> 
> [...]
> >
> > Just for my information (maybe being able to be more accurate next time, =
> or
> > even finding a solution myself), how do you debug such a problem?
> >
> > With which debugger, with tracing/stepping?  With stack trace?
> >
> 
> I'm almost embarrassed to admit that I do most of my elisp debugging
> with the `message' function.  I embed `message' debug statements to
> print the values of key variables at key points, and I run through
> problems looking at the output.
> 
> I'd be interested to hear if anyone can recommend a better elisp
> debugging solution.
> 

There are two methods that I use that I think are much more effective
than sprinkling message calls all over the place:

 o edebug-defun: (in emacs-lisp mode, C-u C-M-x) will mark the
 function so that when it is called, the interpreter stops and you can then
 single-step through it with . At each point, you can
 press "e" and evaluate variables (actually arbitrary expressions).

 o Insert a strategically placed (debug) call and then call the function.
 If/when the debug call is executed, you are dropped into the debugger
 and you can then evaluate arbitrary expressions.

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

2009-11-30 Thread Eric Schulte
Nick Dokos  writes:

>
> There are two methods that I use that I think are much more effective
> than sprinkling message calls all over the place:
>
>  o edebug-defun: (in emacs-lisp mode, C-u C-M-x) will mark the
>  function so that when it is called, the interpreter stops and you can 
> then
>  single-step through it with . At each point, you can
>  press "e" and evaluate variables (actually arbitrary expressions).
>
>  o Insert a strategically placed (debug) call and then call the function.
>  If/when the debug call is executed, you are dropped into the debugger
>  and you can then evaluate arbitrary expressions.
>

Excellent.  Thanks Nick, I look forward to the next bug so I can try
these out. -- Eric

>
> 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] Bug Report: TAB on empty headline cycles through the wrong levels

2009-11-30 Thread Carsten Dominik

Hi Ryan,

here I do not agree with your assessment.
Putting the cursor at the beginning of a headline and pressing M-RET  
is a specific exception of the normal workings of the command, and it  
create a sibling above the entry.


If you want to make use of the indentation cycling, I think you should  
go to the end of the subtree above by pressing LEFT, and then use M- 
RET annd then TAB to get your level right.


- Carsten

On Nov 27, 2009, at 11:36 PM, Ryan C. Thompson wrote:

I have discovered a possible bug with the new 6.33 feature of  
cycling empty headline levels with TAB. IT seems that org will  
always assume that the initial level of the headline is the "base"  
level. Pressing TAB once will always go one level deeper than that,  
to the "child" level, TAB a second time will go one level shallower  
than the base level, and so on.


the problem is that I expect the "base" level to be based on the  
previous headline's level, not on the initial level of the empty  
headline itself. The problem would not usually show itself, because  
if you press meta+RET  at the end of a headline, you get a new empty  
one at the same level as the previous headline. However, if you  
press meta+RET at the *beginning* of a headline (before the stars),  
you get a new empty headline at the same level as the *next*  
headline, which might not be the same level as the previous headline.

Here's a simple test case:

* Head1
** Head2


Put the point at the very beginning of the second heading, and press  
meta+RET, then TAB. You should get this:



* Head1
*** [point is here]
** Head2

The following is what I would *expect* to get:

* Head1
* [point is here]
** Head2


So basically, the base level for depth cycling should be determined  
from the previous headline, not the new blank headline. At least,  
that's what I expected, and I can't think of any reason you would  
want to put a level-3 headline under a level-1 headline.


-Ryan


___
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 version 6.30c; plain list termination

2009-11-30 Thread Carsten Dominik

Hi Duane,

On Nov 27, 2009, at 4:07 PM, Duane Farnsworth wrote:


I enjoy using org mode, but I have found a bug that is very
frustrating.  It appears to be platform independent--I have  
experienced

it on both windows and ubuntu.

Expected behavior: Setting org-empty-line-terminates-plain-lists to t
means that leaving a blank line terminates all open lists and org  
mode's

indenting/folding behavior respects this.

Actual behavior:  Leaving a blank line does not terminate the list.
Indentation still occurs at the lowest list level that was opened.  If
plain list folding is enabled, all subsequent text (until the next  
plain
list or headline) is folded.  Setting this variable has no apparent  
effect.


Unfortunately, this behavior only works for *export* - not for
identation, and certainly not for outline folding.  In fact,
outline folding for plain list items always goes to the next
sibling item or to the next full headline.  Text "after" an
item does not exist for folding, and it would be complex to fix this.

I would like to fix indentation for this case - but this is also complex
and I have not gotten around to it.  So currently I don't recommend
this setting at all.  For now I will update the documentation of this
variable to make this clearer.

- Carsten








Emacs  : GNU Emacs 23.1.50.1 (i486-pc-linux-gnu, GTK+ Version 2.18.0)
of 2009-09-27 on palmer, modified by Debian
Package: Org-mode version 6.30c

current state:
==
(setq
org-empty-line-terminates-plain-lists t
org-log-done 'time
org-file-apps '((auto-mode . emacs) ("\\.x?html?\\'" . "firefox %s")
   ("\\.pdf\\'" . default))
org-todo-keyword-faces '(("REMINDER" :foreground "purple" :weight  
bold)

("APPOINT" :foreground "blue" :weight bold))
org-startup-align-all-tables t
org-agenda-custom-commands '(("x" "Basic TODO list" todo "TODO" nil)
("za" "Show all TODOs as a Block List"
 ((tags-todo
   "+CATEGORY=\"blah\"+TODO=\"TODO\"" nil)
  (tags-todo
   "+CATEGORY=\"Personal\"+TODO=\"TODO\"" nil)
  (tags-todo "+CATEGORY=\"Math\"+TODO=\"TODO\""
   nil)
  (tags-todo
   "+CATEGORY=\"foo\" +TODO=\"TODO\"" nil)
  )
 nil)
("zm" "Show blah TODOs" tags
 "+CATEGORY=\"blah"+TODO=\"TODO\"" nil)
("zw" "Show Math TODOs" tags
 "+CATEGORY=\"Math\"+TODO=\"TODO\"" nil)
("zp" "Show Personal TODOs" tags
 "+CATEGORY=\"Personal\"+TODO=\"TODO\"" nil)
("z" .
 "Show Todos of type a=all, p=personal, m=blah,  
w=math ")

)
org-agenda-files '("~/Computing/job.org" "~/Computing/home.org"
  "~/Computing/math.org" "~/Computing/foo.org"
  "~/Computing/personal.org")
org-blocker-hook '(org-block-todo-from-checkboxes
  org-block-todo-from-children-or-siblings-or-parent)
org-sort-agenda-notime-is-late nil
org-hide-leading-stars t
org-after-todo-state-change-hook '(org-clock-out-if-current)
org-agenda-remove-tags t
org-agenda-todo-ignore-scheduled t
org-archive-location "archive.org::From %s"
org-deadline-warning-days 7
org-agenda-time-grid '((daily today require-timed remove-match)
  "" (800 1000 1200 1400 1600 1800 2000))
org-hide-emphasis-markers t
org-export-preprocess-hook '(org-export-blocks-preprocess)
org-tab-first-hook '(org-hide-block-toggle-maybe)
org-src-mode-hook '(org-src-mode-configure-edit-buffer)
org-confirm-shell-link-function 'yes-or-no-p
org-todo-keywords '((sequence "TODO" "DONE")
   (type "REMINDER" "APPOINT" "DONE"))
org-agenda-before-write-hook '(org-agenda-add-entry-text)
org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide- 
drawers

org-cycle-show-empty-lines
org-optimize-window-after-visibility-change)
org-mode-hook '((lambda nil
(setq org-mouse-context-menu-function
 (quote org-mouse-context-menu))
(when (memq (quote context-menu) org-mouse-features)
 (define-key org-mouse-map
  (if (featurep (quote xemacs)) [button3] [mouse-3]) nil)
 (define-key org-mode-map [mouse-3]
  (quote org-mouse-show-context-menu))
 )
(define-key org-mode-map [down-mouse-1]
 (quote org-mouse-down-mouse))
(when (memq (quote context-menu) org-mouse-features)
 (define-key org-mouse-map [C-drag-mouse-1]
  (quote org-mouse-move-tree))
 (define-key org-mouse-map [C-down-mouse-1]
  (quote org-mouse-move-tree-start))
 )
(when (memq (quote yank-link) org-mouse-features)
 (define-key org-mode-map [S-mouse-2]
  (quote org-mouse-yank-link))
 (define-key org-mode-map [drag-mouse-3]
  (quote org-mouse-yank-link))
 )
(when (memq (quote move-tr

Re: [Orgmode] Beamer support in Org-mode

2009-11-30 Thread Gray Calhoun

An optional setting sounds great.  I can't wait to see how it turns out.
--Gray

Carsten Dominik wrote:

Hi Gray,

thanks for chiming in, this was a very important piece of the puzzle.  
I had already realized that I should give up having fixed levels for 
columns, but I had still panned fixed levels for frames.  Now after 
your post I realize that this can be useful, but is not required, 
which means it should be optional.


Thanks!

- Carsten

On Nov 29, 2009, at 7:03 PM, Gray Calhoun wrote:


Hi Carsten and all,

Beamer export sounds fantastic.  I've been using org mode for this 
sort of thing a lot over the last year--all of my lecture notes are 
typed up as an org file, and I used org mode to draft slides for a 
presentation over the summer, so an automated process would be helpful.


But, I'm not sure that it makes sense to hardcode the frames as a 
level 2 headline (or any level headline); I find it easier to define 
a slide to be any headline that has no subheadings, regardless of its 
depth---the ability to outline the structure of a presentation as 
appropriate and then fill in the details (ie the slides) later is 
(imho) the reason to use org-mode for this sort of task in the first 
place. Columns, etc., could then be handled by using properties of 
the last headline, or as a special list.


This approach might also make it easier to export the same file to 
other formats (i.e. the existing html format).  I imagine that this 
would be a little harder to program, though, and is just my two cents.


--Gray

Carsten Dominik wrote:
(snipped)

1.2 Frames
===
Level 2 headline (or the level configured in
org-beamer-frame-level) become frames.  The headline text become
the frame title, but if no headline text is given, the frame gets
no title.  If the frame title contains the string "\\", the line
will be split at that location, and the second half become the
frame /subtitle/.

(snipped)

--
Gray Calhoun

Assistant Professor of Economics, Iowa State University
http://www.econ.iastate.edu/~gcalhoun/

467 Heady Hall
Ames, IA 50011
Phone: (515) 294-6271
Fax:   (515) 294-0221


- 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] URLs are not always linked properly

2009-11-30 Thread PT
For example, for this URL the bracketed part is not handled as part of the URL, 
though it should be:

http://en.wikipedia.org/wiki/Lost_(TV_series)




___
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] URLs are not always linked properly

2009-11-30 Thread Carsten Dominik

Hi PT,

could you please repeat your subject in the mail when it is part of  
the running text of the report.  If you don't, the text in the mail  
does not make sense.


On Nov 30, 2009, at 8:10 PM, PT wrote:

For example, for this URL the bracketed part is not handled as part  
of the URL,

though it should be:

http://en.wikipedia.org/wiki/Lost_(TV_series)


More often than not parenthesis are around a link, not part of it -  
this is why the plain link heuristics does not allow them.   Please  
surround such links with <..> or [[..]]



- 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] beamer columns

2009-11-30 Thread Darlan Cavalcante Moreira


Hello Carsten and all,

I have sent a suggestion in the beamer thread about using comments for columns,
but I didn't receive my own message from the mailing list (as usual). Therefore
I'm assuming no one else has received it and I'm going to repeat it here (sorry
if this is a duplicate).


The idea is using special comments to represent columns when exporting to beamer
(and maybe other formats). For instance, considering the frames are in the
third-level headings, a presentation could be like

,
| * This is a Section
| *** This is a Subsection
| * This is the frame title
|   Frame content
| 
| * This is the frame title of another frame
| #+\{0.4
|   - This is an item
|   - This is an item too
| #+\\0.6
|   - Another item
|   - Another one
|   - One more item
| #+\}
`

The comment "#+\{" indicates the beginning of a columns environment (maybe only
"#+{" is better) in addition to the first column. The number "0.4" indicates the
width of the first column (0.4\textwidth). The comment "#+\\0.6" creates another
column and the comment "#+\}" closes the columns environment.

I'm not saying this is the best way, but it has the advantage of being similar
to what we do in beamer (but simpler IMHO) and it would export without errors
for other formats. Maybe it is better to also implement it for standard latex
using minipages or something similar and to HTML, but if this is not desired
then the closing comment could be optional (the columns environment would then
end when the current slide ends).

With some org functions to mark, swap, etc., columns it could be easy to
reorganize the columns if desired.

Also, It would be nice if the width could be optional, i.e., if there are
columns whose widths were not specified then org could sum the widths that were
specified and distribute the remaining among the columns whose widths were not
specified. For instance, in a frame with 3 columns one could specify the width
of the first column as 0.4 and leave the others unspecified. Org should then
choose a width of 0.3 for each of the remaining two columns.


At last, thank you for the effort to implement native beamer support in org.
- Darlan Cavalcante
  

At Mon, 30 Nov 2009 13:44:27 +0100,
Carsten Dominik  wrote:
> 
> 
> On Nov 29, 2009, at 11:17 PM, Thomas S. Dye wrote:
> 
> >
> > On Nov 29, 2009, at 11:23 AM, Carsten Dominik wrote:
> >
> >>
> >> On Nov 29, 2009, at 7:31 PM, Thomas S. Dye wrote:
> >>
> >>> Aloha all,
> >>>
> >>> Would it make sense to implement Beamer columns with Org-mode  
> >>> tables?
> >>
> >> Hi Thomas,
> >>
> >> I cannot see how this would make sense.
> >>
> >> Maybe you'd like to elaborate?
> >>
> >> - Carsten
> >
> > Hi Carsten and Sebastian,
> >
> > This idea might be nonsense or technically infeasible.  The  
> > advantage, if it is one, is that the same org file might export to  
> > LaTeX and Beamer with roughly similar results.  If headlines are  
> > used below the level of the Beamer frame, then export to LaTeX  
> > becomes problematic, or so it seems to me (and perhaps some others,  
> > if I've read their posts correctly).   A column-like arrangement in  
> > a portion of a LaTeX file is sometimes faked by using  
> > \begin{tabular} \end{tabular}, and this naturally brought to mind  
> > Org-mode tables.
> >
> > Apologies if the signal/noise ratio is distressingly low here.
> 
> 
> Hi Thomas, thanks for the extra explanations - however, I still don't  
> think that this is the way to go.
> 
> - Carsten
> 
> >
> > All the best,
> > Tom
> >
> > Thomas S. Dye, Ph.D.
> > T. S. Dye & Colleagues, Archaeologists, Inc.
> > Phone: (808) 529-0866 Fax: (808) 529-0884
> > http://www.tsdye.com
> >
> >
> 
> - 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


Re: [Orgmode] Bug: Footnotes in combination with LaTeX fragments is broken in latest trunk

2009-11-30 Thread Scot Becker
It appears so! No errors on my sample file.

Muchas gracias,

Scot
___
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: sreen : unable to run org-babel-screen-test

2009-11-30 Thread bluedian
Hi,

With the last git version (updated by org-track 5 five minutes ago), I have
still the same problem and the same error message.

Regards,
BlueDian





___
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