From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?S=C3=A9bastien_Vauban?= Subject: [Babel] Marker does not point anywhere (when session buffer needs to be created) Date: Fri, 15 Oct 2010 17:41:25 +0200 Message-ID: <80r5fr79ay.fsf@mundaneum.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: 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-mXXj517/zsQ@public.gmane.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org * 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 exhibit this error (currently, they hang, but that's another story). My prompt is colored -- I need it, really! *None* of the =3Dls=3D results = 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 n= ot 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}\[${NO_= COLOR}\]" ;; esac } # shell prompt setenv PROMPT_COMMAND my_prompt_command echo "" #+end_src Best regards, Seb --=20 S=C3=A9bastien Vauban _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode-mXXj517/zsQ@public.gmane.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode