unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: Shell-mode: File completion breaks editing previous commands
       [not found] ` <18424.40053.181304.491320@lusitania.rswheeldon.com>
@ 2008-04-07  5:10   ` Chong Yidong
  2008-04-07  9:18     ` Andreas Röhler
  2008-04-09 11:29     ` Bob Rogers
  0 siblings, 2 replies; 4+ messages in thread
From: Chong Yidong @ 2008-04-07  5:10 UTC (permalink / raw)
  To: emacs-devel; +Cc: richard, 114

richard@rswheeldon.com writes:

>>> Emacs shell mode allows editing of previous commands. These can then
>>> be executed by pressing return. Shell mode also allows tab completion
>>> to expand filenames. These do not work together. If we try to modify
>>> a previously executed command (to re-execute it with different params)
>>> and attempt to use filename completion, the beginning of the command
>>> is lost.
>>>
>>> touch foo bar
>>> echo bar
>>> Edit the echo command to "touch foo bar" and press return.
>>>
>>> produces the following output:
>>>
>>> % touch foo bar
>>> % echo bar foo 
>>> foo
>>> % foo 
>>> bash: ./foo: Permission denied
>>> % 
>>
>> I can't reproduce this on either Emacs 22 or Emacs 23.  Please provide a
>> more precise recipe, include all keystrokes beginning from emacs -Q.
>
> Recent input:
> <escape> x s h e l l <return> c d SPC / t m p <return> 
> t o u c h SPC f o o <return> e <backspace> t o u c 
> h SPC b a r <return> e <backspace> l s SPC f o <tab> 
> <return> <up> <up> <right> <right> <right> b <tab> 
> a <tab> <return> <escape> x r e p <tab> r <backspace> 
> o r <tab> <return>
>
> Sorry, I can't see how I can make this much simpler.

I still can't reproduce this problem.  Does anyone on emacs-devel see
the bug?




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

* Re: Shell-mode: File completion breaks editing previous commands
  2008-04-07  5:10   ` Shell-mode: File completion breaks editing previous commands Chong Yidong
@ 2008-04-07  9:18     ` Andreas Röhler
  2008-04-09 11:29     ` Bob Rogers
  1 sibling, 0 replies; 4+ messages in thread
From: Andreas Röhler @ 2008-04-07  9:18 UTC (permalink / raw)
  To: emacs-devel; +Cc: Chong Yidong

Am Montag, 7. April 2008 07:10 schrieb Chong Yidong:
> richard@rswheeldon.com writes:
> 
> >>> Emacs shell mode allows editing of previous commands. These can then
> >>> be executed by pressing return. Shell mode also allows tab completion
> >>> to expand filenames. These do not work together. If we try to modify
> >>> a previously executed command (to re-execute it with different params)
> >>> and attempt to use filename completion, the beginning of the command
> >>> is lost.
> >>>
> >>> touch foo bar
> >>> echo bar
> >>> Edit the echo command to "touch foo bar" and press return.
> >>>
> >>> produces the following output:
> >>>
> >>> % touch foo bar
> >>> % echo bar foo 
> >>> foo
> >>> % foo 
> >>> bash: ./foo: Permission denied
> >>> % 
> >>
> >> I can't reproduce this on either Emacs 22 or Emacs 23.  Please provide a
> >> more precise recipe, include all keystrokes beginning from emacs -Q.
> >
> > Recent input:
> > <escape> x s h e l l <return> c d SPC / t m p <return> 
> > t o u c h SPC f o o <return> e <backspace> t o u c 
> > h SPC b a r <return> e <backspace> l s SPC f o <tab> 
> > <return> <up> <up> <right> <right> <right> b <tab> 
> > a <tab> <return> <escape> x r e p <tab> r <backspace> 
> > o r <tab> <return>
> >
> > Sorry, I can't see how I can make this much simpler.
> 
> I still can't reproduce this problem.  Does anyone on emacs-devel see
> the bug?
> 
> 
> 

AFAIU that has nothing to do with emacs, but with
file-permissions: `foo' isn't executable, "x" it wasn't set.

Andreas Röhler





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

* Re: Shell-mode: File completion breaks editing previous commands
@ 2008-04-09  5:22 Devon Sean McCullough
  0 siblings, 0 replies; 4+ messages in thread
From: Devon Sean McCullough @ 2008-04-09  5:22 UTC (permalink / raw)
  To: Chong Yidong; +Cc: Emacs-Devel

Text properties break shell mode by making motion commands erratic
and unpredictable, so all comint modes are now worse than useless.

BOLD rendered as upper case for illustration ...

$ LS BAr FOO
foo
$ FOO
bash: ./foo: Permission denied
$ HISTORY
...  ls foo
...  foo
...  history
$

... your command got left-truncated, a variation on the usual lossage
where return sends only command characters up to the next font change,
then sends a newline, the remaining characters up to end of line are
not sent, a potentially catastrophic failure.

		Peace
			--Devon
	 /~\
	 \ /	Health Care
	  X 	not warfare
	 / \

	Dubya slime won the digital vote
	Kerry slime won the popular vote

PS: Easier to show than tell so here's a movie,
use EXTREME CAUTION and read before you run,
it types commands at your shell!

(require 'cl)

(defun unread-string (string)
  (dolist (c (reverse (string-to-list string)))
    (push c unread-command-events)))

(defun demo (&rest args)
  (let ((delay 0))
    (dolist (keys args)
      (run-at-time delay nil 'unread-string keys)
      (incf delay 2))))

(demo "\exshell\r"
      "\e>\^C\^C"
      "\^Q\^C\r"
      "PS1='\\$ '\r"
      "mkdir /tmp/junk\r"
      "cd /tmp/junk\r"
      "touch foo bar\r"
      "echo bar\r"
      "\^P\^P" "\^F\^F" "\^F\^F"
      " f\t"
      "\r"
      "\^Roo  "
      "\r"
      "\r"
      "history 9\r"
      "# That's all folks!")




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

* Re: Shell-mode: File completion breaks editing previous commands
  2008-04-07  5:10   ` Shell-mode: File completion breaks editing previous commands Chong Yidong
  2008-04-07  9:18     ` Andreas Röhler
@ 2008-04-09 11:29     ` Bob Rogers
  1 sibling, 0 replies; 4+ messages in thread
From: Bob Rogers @ 2008-04-09 11:29 UTC (permalink / raw)
  To: Chong Yidong; +Cc: richard, 114, emacs-devel

   From: Chong Yidong <cyd@stupidchicken.com>
   Date: Mon, 07 Apr 2008 01:10:04 -0400

   richard@rswheeldon.com writes:

   >>> Emacs shell mode allows editing of previous commands. These can then
   >>> be executed by pressing return. Shell mode also allows tab completion
   >>> to expand filenames. These do not work together. If we try to modify
   >>> a previously executed command (to re-execute it with different params)
   >>> and attempt to use filename completion, the beginning of the command
   >>> is lost.
   >>>
   >>> touch foo bar
   >>> echo bar
   >>> Edit the echo command to "touch foo bar" and press return.
   >>>
   >>> produces the following output:
   >>>
   >>> % touch foo bar
   >>> % echo bar foo 
   >>> foo
   >>> % foo 
   >>> bash: ./foo: Permission denied
   >>> % 
   >>
   >> I can't reproduce this on either Emacs 22 or Emacs 23.  Please provide a
   >> more precise recipe, include all keystrokes beginning from emacs -Q.
   >
   > Recent input:
   > <escape> x s h e l l <return> c d SPC / t m p <return> 
   > t o u c h SPC f o o <return> e <backspace> t o u c 
   > h SPC b a r <return> e <backspace> l s SPC f o <tab> 
   > <return> <up> <up> <right> <right> <right> b <tab> 
   > a <tab> <return> <escape> x r e p <tab> r <backspace> 
   > o r <tab> <return>
   >
   > Sorry, I can't see how I can make this much simpler.

   I still can't reproduce this problem.  Does anyone on emacs-devel see
   the bug?

I have seen this intermittently for a long time now, but still haven't
been able to reproduce it reliably.

					-- Bob Rogers
					   http://rgrjr.dyndns.org/




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

end of thread, other threads:[~2008-04-09 11:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <87tzig9es5.fsf@stupidchicken.com>
     [not found] ` <18424.40053.181304.491320@lusitania.rswheeldon.com>
2008-04-07  5:10   ` Shell-mode: File completion breaks editing previous commands Chong Yidong
2008-04-07  9:18     ` Andreas Röhler
2008-04-09 11:29     ` Bob Rogers
2008-04-09  5:22 Devon Sean McCullough

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