Cooner
March 25th, 2010, 06:21 PM
First, my apologies as I'm not sure if this is an emacs question, a gnome question, an ubuntu question, or just a linux question :D
I wanted to set a custom keyboard shortcut to launch an emacs editor (I've set a few of these using the "Super" key prefix... Super-F = firefox, Super-T = terminal, Super-E = emacs, etc. It's quite handy.)
It works great through the keyboard shortcuts, but I have a bit of an issue once emacs has started (one that is easily replicated with just a command line). Emacs has some knowledge of the current working directory when you start... to see this, if you open emacs in a terminal, hit C-x C-f to open a file, it starts searching for that file from the current working directory. When I use my launcher, PWD is set to /, which kind of sucks. Now, once I'm in emacs, it's easy to do a "M-x cd ~", which changes the PWD to my home, but I'd love to be able to set that somehow in the command line for the launcher.
Is it possible to fake the env in a one-liner for a launcher to make emacs think it's starting from ~?
Thanks, and my apologies if I've guessed incorrectly as to where this should go.
I wanted to set a custom keyboard shortcut to launch an emacs editor (I've set a few of these using the "Super" key prefix... Super-F = firefox, Super-T = terminal, Super-E = emacs, etc. It's quite handy.)
It works great through the keyboard shortcuts, but I have a bit of an issue once emacs has started (one that is easily replicated with just a command line). Emacs has some knowledge of the current working directory when you start... to see this, if you open emacs in a terminal, hit C-x C-f to open a file, it starts searching for that file from the current working directory. When I use my launcher, PWD is set to /, which kind of sucks. Now, once I'm in emacs, it's easy to do a "M-x cd ~", which changes the PWD to my home, but I'd love to be able to set that somehow in the command line for the launcher.
Is it possible to fake the env in a one-liner for a launcher to make emacs think it's starting from ~?
Thanks, and my apologies if I've guessed incorrectly as to where this should go.