I just discovered that in order to run a sequence of shell commands under the same scope (same shell session) I have to add a hash at the end of the line.


When I try to run the following two lines I get the wrong list of files. I get the files located in the directory of the org file from where this code block is executed.

cd /cygdrive/c/Users/path

However, everything works fine if I pack a hash symbol at the end of the first line.

cd /cygdrive/c/Users/path #

I find this really annoying since this could be very dangerous in case a writing operation is performed and the hash is forgotten.


1- Am I overinterpreting the effect of the (lack of the) hash?

2- Is there something I can do to avoid the necessity of putting the hash at the end of each line of code?


I am using Emacs 25.3.1 (x86_64-w64-mingw32) with built-in org (v 8.2.10). on windows 8.1. PathToUser/libexec/emacs/25.3/x86_64-w64-mingw32/cmdproxy.exe

I am almost new to emacs in windows since I have been mainly working with linux before and never encounter such a problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.