unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* no pangs of guilt that can't turn off M-x shell's ^ ! ?
@ 2003-03-15 18:55 Dan Jacobson
  0 siblings, 0 replies; 5+ messages in thread
From: Dan Jacobson @ 2003-03-15 18:55 UTC (permalink / raw)


Come on guys, why so mum about the fact that one cannot turn off the
special effects of ! and ^ when running M-x shell?

It is quite disturbing for one who has turned them off years ago in
bash (set +o histexpand) to suddenly have them play tricks on one in
M-x shell.
-- 
http://jidanni.org/ Taiwan(04)25854780

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

* Re: no pangs of guilt that can't turn off M-x shell's ^ ! ?
       [not found] <mailman.3247.1047784613.21513.bug-gnu-emacs@gnu.org>
@ 2003-03-17 16:39 ` Kevin Rodgers
  2003-03-18  0:09   ` Dan Jacobson
       [not found]   ` <mailman.3309.1047964346.21513.bug-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 5+ messages in thread
From: Kevin Rodgers @ 2003-03-17 16:39 UTC (permalink / raw)


Dan Jacobson wrote:

> Come on guys, why so mum about the fact that one cannot turn off the
> special effects of ! and ^ when running M-x shell?


Because I have no idea what you're talking about.  You should know how to submit
a proper bug report by now.


> It is quite disturbing for one who has turned them off years ago in
> bash (set +o histexpand) to suddenly have them play tricks on one in
> M-x shell.

Isn't your shell initialization file read, even under `M-x shell'?

If not, is this the effect you want:

(add-hook 'shell-mode-hook
	  (lambda ()
	    (local-set-key "!" 'keyboard-quit)
	    (local-set-key "^" 'keyboard-quit)))

-- 
<a href="mailto:&lt;kevin.rodgers&#64;ihs.com&gt;">Kevin Rodgers</a>

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

* Re: no pangs of guilt that can't turn off M-x shell's ^ ! ?
  2003-03-17 16:39 ` no pangs of guilt that can't turn off M-x shell's ^ ! ? Kevin Rodgers
@ 2003-03-18  0:09   ` Dan Jacobson
       [not found]   ` <mailman.3309.1047964346.21513.bug-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 5+ messages in thread
From: Dan Jacobson @ 2003-03-18  0:09 UTC (permalink / raw)


>> Come on guys, why so mum about the fact that one cannot turn off the
>> special effects of ! and ^ when running M-x shell?

K> Because I have no idea what you're talking about.  You should know
K> how to submit a proper bug report by now.

Only proper bugs deserve proper bug reports. <--original witty phrase debuting here

I'm talking about [*info* (emacs) History References]

$ emacs --no-site-file -q -nw -f shell
c a t RET ! ^ ! ^ ! ^ ! RET ESC p
One sees
$ cat
!^!^!^!
!^!^!^!
!
It has mangled my last line. I want the three lines to look the same.

>> It is quite disturbing for one who has turned them off years ago in
>> bash (set +o histexpand) to suddenly have them play tricks on one in
>> M-x shell.

K> Isn't your shell initialization file read, even under `M-x shell'?

To be clear, in my above example, I am not talking to the shell
anymore, but to cat. So don't bash bash. shell-mode is to blame.

K> If not, is this the effect you want:

K> 	    (local-set-key "!" 'keyboard-quit)
K> 	    (local-set-key "^" 'keyboard-quit)))

no, you're barfing up the wrong tree.  The shell-mode author thought
csh-style ! and ^ history substitutions were so great, he forgot to
leave a way to turn them off.  Yes, not being able to type them would
indeed fix the problem, as would snipping my keyboard cable. "rm -r
dangerous??, just local-set-key "r"...

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

* Re: no pangs of guilt that can't turn off M-x shell's ^ ! ?
       [not found]   ` <mailman.3309.1047964346.21513.bug-gnu-emacs@gnu.org>
@ 2003-03-18 16:58     ` Kevin Rodgers
  2003-03-19  6:52       ` Dan Jacobson
  0 siblings, 1 reply; 5+ messages in thread
From: Kevin Rodgers @ 2003-03-18 16:58 UTC (permalink / raw)


Dan Jacobson wrote:

> K> If not, is this the effect you want:
> 
> K> 	    (local-set-key "!" 'keyboard-quit)
> K> 	    (local-set-key "^" 'keyboard-quit)))
> 
> no, you're barfing up the wrong tree.  The shell-mode author thought
> csh-style ! and ^ history substitutions were so great, he forgot to
> leave a way to turn them off.  Yes, not being able to type them would
> indeed fix the problem, as would snipping my keyboard cable. "rm -r
> dangerous??, just local-set-key "r"...

C-h v comint-input-autoexpand


Does setting that variable to nil in a shell-mod-hook function fix your problem?

-- 
<a href="mailto:&lt;kevin.rodgers&#64;ihs.com&gt;">Kevin Rodgers</a>

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

* Re: no pangs of guilt that can't turn off M-x shell's ^ ! ?
  2003-03-18 16:58     ` Kevin Rodgers
@ 2003-03-19  6:52       ` Dan Jacobson
  0 siblings, 0 replies; 5+ messages in thread
From: Dan Jacobson @ 2003-03-19  6:52 UTC (permalink / raw)


>> The shell-mode author thought csh-style ! and ^ history
>> substitutions were so great, he forgot to leave a way to turn them off.

K> C-h v comint-input-autoexpand

K> Does setting that variable to nil in a shell-mod-hook function fix your problem?

Hmm, I already had
(add-hook 'comint-mode-hook
  (function (lambda ()(setq comint-input-autoexpand nil)))) ;no more "!" surprizes
OK, now I will add
(add-hook 'shell-mode-hook
  (function (lambda ()(setq comint-input-autoexpand nil)))) ;no more "!" surprizes
for double protection. Thanks.

Blame
-----
Blame for my troubles can be conveniently shifted onto the Info page for saying

      Shell mode can optionally expand history references in the buffer
   when you send them to the shell.  To request this, set the variable
   `comint-input-autoexpand' to `input'.  You can make <SPC> perform
   history expansion by binding <SPC> to the command `comint-magic-space'.

It said 'optionally' when indeed it is doing it somewhat already by default.

Odd, in the source it says
(defcustom comint-input-autoexpand nil
But when I do
$ LC_ALL=C emacs --no-site-file -q -nw -f shell
and check its value, it is 'history.
Yes, I wish it was history, as in out of here :-)

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

end of thread, other threads:[~2003-03-19  6:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.3247.1047784613.21513.bug-gnu-emacs@gnu.org>
2003-03-17 16:39 ` no pangs of guilt that can't turn off M-x shell's ^ ! ? Kevin Rodgers
2003-03-18  0:09   ` Dan Jacobson
     [not found]   ` <mailman.3309.1047964346.21513.bug-gnu-emacs@gnu.org>
2003-03-18 16:58     ` Kevin Rodgers
2003-03-19  6:52       ` Dan Jacobson
2003-03-15 18:55 Dan Jacobson

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).