all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Don't change default-directory in gud.el?
@ 2004-11-03  0:49 Nick Roberts
  2004-11-03  3:37 ` Stefan
  0 siblings, 1 reply; 3+ messages in thread
From: Nick Roberts @ 2004-11-03  0:49 UTC (permalink / raw)



Currently, in gud.el, the default-directory of the GUD buffer gets set from
the pathname (if any) of the program to be debugged. This is not consistent
what happens if gdb is invoked from the command line, where the working
directory remains unchanged. As a general rule, I find it more annoying if
Emacs does something that I don't want than if it doesn't do something I do
want (Another example is Jan Nieuwenhuizen's grumble about M-x gdb guessing
the name of the executable).

As an example of where setting the default-directory doesn't really work. If
I have:

Run gdb (like this): gdb --annotate=3 ~/emacs/src/emacs core.1825

As Emacs sets default-directory to ~/emacs/src/, gdb sets the breakpoints in
~/emacs/src/.gdbinit that I don't want and can't find the core file.

So I'd like to remove the following from gud.el:

    (and file-word
	 ;; Don't set default-directory if no directory was specified.
	 ;; In that case, either the file is found in the current directory,
	 ;; in which case this setq is a no-op,
	 ;; or it is found by searching PATH,
	 ;; in which case we don't know what directory it was found in.
	 (file-name-directory file)
	 (setq default-directory (file-name-directory file)))

Any objections?

Nick

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-11-03  7:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-03  0:49 Don't change default-directory in gud.el? Nick Roberts
2004-11-03  3:37 ` Stefan
2004-11-03  7:29   ` Klaus Zeitler

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.