all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: Shell-mode: File completion breaks editing previous commands
@ 2008-04-09  5:22 Devon Sean McCullough
  0 siblings, 0 replies; 18+ 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] 18+ messages in thread

end of thread, other threads:[~2011-10-17 16:34 UTC | newest]

Thread overview: 18+ 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
2011-09-11  5:23       ` bug#114: " Lars Magne Ingebrigtsen
2011-09-25 13:27         ` Lars Magne Ingebrigtsen
2011-09-26 15:04           ` richard
2011-09-26 19:40             ` Lars Magne Ingebrigtsen
2011-10-03 21:12               ` Glenn Morris
2011-10-04  0:57                 ` Stefan Monnier
2011-10-04  1:51                   ` Glenn Morris
2011-10-04  2:14                   ` Stefan Monnier
2011-10-04  2:21                     ` Glenn Morris
2011-10-12  4:30                       ` Stefan Monnier
2008-04-04 11:39                         ` richard
2011-10-12  5:27                           ` bug#114: " Glenn Morris
2011-10-12 12:39                             ` Stefan Monnier
2011-10-17 16:34                               ` Stefan Monnier
2008-04-09  5:22 Devon Sean McCullough

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.