Closed mjrodgers closed 9 years ago
Hello,
Which path do you mean? Magma's working directory (where load
will look
for files), or emacs' working directory (where C-x C-f
would start, for
example)? Or something else entirely?
C-c C-a
should be nothing more than what you describe, kill and relaunch,
so if there is inconsistent behavior between the two methods, it's most
likely a bug.
The working directory for using 'load'. It seems like a bug where the cwd is not set properly when using C-c C-a.
Thanks for bringing this to my attention. The magma mode was not attempting to change this cwd at all, so unspecified behavior were to be expected.
I have pushed a new version which should try to maintain a consistent value for the directory:
magma-default-directory
if non nilThe new version should reach melpa in a couple hours.
It has been tested for basic functionality (i.e. it shouldn't break anything, though you can't ever be sure), but I probably have skipped some situations in terms of the new feature. If you see some cases where it does not work as described above, or where what's described above does not make any sense, please let me know.
Hmm, it's still not working as expected. When I launch with C-c C-o, the current directory from magma GetCurrentDirectory() is the directory of the file active when launching magma. But when I reset with C-c C-a, it changes to my home directory.
Where is the cursor when you reset with C-c C-a
?
It is in the active file with the code.
So what you do is:
C-c C-o
GetCurrentDirectory();
, it shows the directory containing the fileC-c C-a
GetCurrentDirectory();
, it shows your home directoryIs that correct?
Could you check that the installed version (in melpa) is 20150923? And have you restarted emacs after updating?
Ahh! You are right, I had not restarted emacs maybe. It is working as expected now. Cheers!
I have noticed that when I restart magma using C-c C-a, the current path is lost. I have to quit magma and relaunch with C-c C-o to have the proper path.