From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: Re: [Babel] Marker does not point anywhere (when session buffer needs to be created) Date: Thu, 04 Nov 2010 07:47:45 -0600 Message-ID: <87iq0dhzns.fsf@gmail.com> References: <80r5fr79ay.fsf@mundaneum.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=33147 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PE1oV-0005nq-Gp for emacs-orgmode@gnu.org; Thu, 04 Nov 2010 11:33:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PE1oQ-0002U8-Q4 for emacs-orgmode@gnu.org; Thu, 04 Nov 2010 11:33:18 -0400 Received: from mail-pw0-f41.google.com ([209.85.160.41]:63847) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PE1oQ-0002Ty-KE for emacs-orgmode@gnu.org; Thu, 04 Nov 2010 11:33:14 -0400 Received: by pwi1 with SMTP id 1so825515pwi.0 for ; Thu, 04 Nov 2010 08:33:13 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: =?utf-8?Q?S=C3=A9bastien?= Vauban Cc: emacs-orgmode@gnu.org Hi Seb, This "mark doesn't point anywhere" error is common across a bunch of sessions (ruby and python as well as shell). It's simply a matter of Babel trying to use the session before it is ready. I haven't found these errors to be an issue as all subsequent use of the session works as expected. I suppose that we should try to be more careful on session creation explicitly waiting until the buffer is ready, however this would add some degree of complication to the code... Thanks -- Eric S=C3=A9bastien Vauban writes: > * Marker does not point anywhere > > Executing the following: > > #+begin_src sh :session NoSuchSessionYet > cd ~ > ls *.txt > #+end_src > > outputs this in *Messages*: > > : executing Sh code block... > : think it is Cygwin... > : ~=20 > : ansi-color-process-output: Marker does not point anywhere > > when executed for the *first* time. All subsequent executions don't exhib= it > this error (currently, they hang, but that's another story). > > My prompt is colored -- I need it, really! *None* of the =3Dls=3D result= s are > colored, though (in this above case: =3Dls ~/*.txt=3D). > > Can we fix this somehow? > > Test the following, and you'll see you need a colored prompt as well, if = not > yet convinced: > > #+begin_src sh :tangle .sva-bashrc > #*** Controlling the Prompt > > # define some colors > RED=3D'\e[1;31m' > GREEN=3D'\e[1;32m' > NO_COLOR=3D'\e[0m' > > # my format of the prompt > function my_prompt_command () > { > # colorful prompt, based on whether the previous command succeeded or= not > if [[ $? -eq 0 ]]; then > HILIT=3D${GREEN} > else > HILIT=3D${RED} > fi > > # replace the $HOME prefix by ~ in the current directory > if [[ $HOME =3D=3D ${PWD:0:${#HOME}} ]]; then > NEWPWD=3D"~${PWD:${#HOME}}" > else > NEWPWD=3D$PWD > fi > > # how many characters of the $PWD should be kept > local pwd_max_length=3D15 > > if [[ ${#NEWPWD} -gt $pwd_max_length ]]; then > local pwd_offset=3D$(( ${#NEWPWD} - $pwd_max_length )) > NEWPWD=3D"...${NEWPWD:$pwd_offset:$pwd_max_length}" > fi > > # prompt character > if [[ $(whoami) =3D "root" ]]; then > local PROMPTCHAR=3D"#" > else > local PROMPTCHAR=3D">" > fi > > case $TERM in > dumb) # for Tramp? > setenv PS1 "[\u@\h] ${NEWPWD}${PROMPTCHAR}" > ;; > *) > setenv PS1 "\n\[${HILIT}\][\u@\h] ${NEWPWD}${PROMPTCHAR}\[${N= O_COLOR}\]" > ;; > esac > } > > # shell prompt > setenv PROMPT_COMMAND my_prompt_command > echo "" > #+end_src > > Best regards, > Seb