unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: michael@cadilhac.name (Michaël Cadilhac)
Subject: Location of init files for M-x shell.
Date: Sun, 03 Dec 2006 18:02:53 +0100	[thread overview]
Message-ID: <87wt58yksi.fsf@lrde.org> (raw)


[-- Attachment #1.1.1: Type: text/plain, Size: 215 bytes --]

It has been decided, a while ago, that the not-in-~ .emacs will be
~/.emacs/init.el, and this is Great Thing for many reasons.

Init files for M-x shell didn't have that chance. Why not ?

I propose the following:


[-- Attachment #1.1.2: shell.patch --]
[-- Type: text/x-patch, Size: 2840 bytes --]

Index: lisp/shell.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/shell.el,v
retrieving revision 1.143
diff -c -r1.143 shell.el
*** lisp/shell.el	15 Oct 2006 20:42:10 -0000	1.143
--- lisp/shell.el	3 Dec 2006 17:01:24 -0000
***************
*** 521,529 ****
  Program used comes from variable `explicit-shell-file-name',
   or (if that is nil) from the ESHELL environment variable,
   or else from SHELL if there is no ESHELL.
! If a file `~/.emacs_SHELLNAME' exists, it is given as initial input
!  (Note that this may lose due to a timing error if the shell
!   discards input when it starts up.)
  The buffer is put in Shell mode, giving commands for sending input
  and controlling the subjobs of the shell.  See `shell-mode'.
  See also the variable `shell-prompt-pattern'.
--- 521,529 ----
  Program used comes from variable `explicit-shell-file-name',
   or (if that is nil) from the ESHELL environment variable,
   or else from SHELL if there is no ESHELL.
! If a file `~/.emacs_SHELLNAME' exists, or `~/.emacs.d/init_SHELLNAME.sh',
! it is given as initial input (Note that this may lose due to a timing
! error if the shell discards input when it starts up).
  The buffer is put in Shell mode, giving commands for sending input
  and controlling the subjobs of the shell.  See `shell-mode'.
  See also the variable `shell-prompt-pattern'.
***************
*** 556,563 ****
  	   (name (file-name-nondirectory prog))
  	   (startfile (concat "~/.emacs_" name))
  	   (xargs-name (intern-soft (concat "explicit-" name "-args"))))
!       (if (not (file-exists-p startfile))
! 	  (setq startfile (concat "~/.emacs.d/.emacs_" name)))
        (apply 'make-comint-in-buffer "shell" buffer prog
  	     (if (file-exists-p startfile) startfile)
  	     (if (and xargs-name (boundp xargs-name))
--- 556,563 ----
  	   (name (file-name-nondirectory prog))
  	   (startfile (concat "~/.emacs_" name))
  	   (xargs-name (intern-soft (concat "explicit-" name "-args"))))
!       (unless (file-exists-p startfile)
! 	(setq startfile (concat "~/.emacs.d/init_" name ".sh")))
        (apply 'make-comint-in-buffer "shell" buffer prog
  	     (if (file-exists-p startfile) startfile)
  	     (if (and xargs-name (boundp xargs-name))
Index: lisp/ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.10370
diff -c -0 -r1.10370 ChangeLog
*** lisp/ChangeLog	29 Nov 2006 16:10:13 -0000	1.10370
--- lisp/ChangeLog	3 Dec 2006 17:01:27 -0000
***************
*** 0 ****
--- 1,5 ----
+ 2006-12-03  Michaël Cadilhac  <michael.cadilhac@lrde.org>
+ 
+ 	* shell.el (shell): Search the start file in ~/.emacs.d as
+ 	`init_SHELLNAME.sh' instead.
+ 

[-- Attachment #1.1.3: Type: text/plain, Size: 403 bytes --]


-- 
/!\ My mail address has changed, please update your files accordingly.
 |      Michaël `Micha' Cadilhac     |  «Tu aimeras ton prochain.»            |
 |         Epita/LRDE Promo 2007     |    D'abord, Dieu ou pas,               |
 |  http://michael.cadilhac.name     |       j'ai horreur qu'on me tutoie.    |
 `--JID: michael.cadilhac@gmail.com--'           -- P. Desproges         -  --'

[-- Attachment #1.2: Type: application/pgp-signature, Size: 188 bytes --]

[-- Attachment #2: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

             reply	other threads:[~2006-12-03 17:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-03 17:02 Michaël Cadilhac [this message]
2006-12-04  5:15 ` Location of init files for M-x shell Richard Stallman
2006-12-04 13:16   ` Michaël Cadilhac
2006-12-05  1:45     ` Richard Stallman
2006-12-05 14:06       ` Michaël Cadilhac
2006-12-05 14:38         ` Juanma Barranquero

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wt58yksi.fsf@lrde.org \
    --to=michael@cadilhac.name \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).