[MERGE] Shelf 5 / 5
Vincent Ladeuil
v.ladeuil+lp at free.fr
Fri Oct 31 09:27:55 GMT 2008
>>>>> "Stephen" == Stephen J Turnbull <stephen at xemacs.org> writes:
Stephen> Vincent Ladeuil writes:
>> >>>>> "Stephen" == Stephen J Turnbull <stephen at xemacs.org> writes:
Stephen> Surely that's not true; both XEmacs and GNU Emacs
Stephen> support full-screen terminal emulators, as well as the
Stephen> line-oriented shell modes.
>>
Stephen> I'm pretty sure you can just use comint as the basis
Stephen> of such modes (but I haven't written one myself).
>>
>> I'd be so delighted...
>>
>> Care to send more precise pointers ?
Stephen> Per Bothner's term.el comes to mind. See function
Stephen> `term-send-raw' in particular. I thought there
Stephen> might be better ones by now (John Weigley's eshell,
Stephen> in particular) but I don't use them and it's not
Stephen> immediately obvious to me whether it has a "raw"
Stephen> mode.
Wow, what a gold mine... I tested eshell a long long time ago,
thought the idea was interesting but... stopped there.
Re-trying with a more recent version changed the game.
Finally, after all this years, I will be able to use a *working*
shell on windows (when I need to go there).
Thanks a lot for that.
By the way, eshell delegate to term for that particular problem
so you were perfectly right for the directions.
Stephen> In principle, it's conceptually easy: just bind the
Stephen> keys that you want to be sent "raw" to something
Stephen> like
Stephen> (defun kludge-o-matic ()
Stephen> (interactive)
Stephen> (save-excursion
Stephen> (goto-char (process-mark))
Stephen> (insert last-command-char)
Stephen> (let ((comint-process-echoes t))
Stephen> (comint-send-input))))
Stephen> and you're done.
I went an even simpler route:
(require 'eshell)
(global-set-key "\C-z" 'eshell)
(setq eshell-visual-commands (cons "bzr-shelve" eshell-visual-commands))
bzr-shelve being:
#!/bin/sh
./bzr shelve
And that works perfectly fine.
So let's forget about my fears for emacs support.
I now think that this new shelf should be plugged directly into
diff-mode anyway which is a totally different approach (where all
the chunks are already displayed in an emacs buffer and some
key bindings should be added there to drive the shelves).
The actual implementation of bzr shelve is perfectly fine with
eshell and eshell being included in emacs batteries and needing
only the small tweaks described above sounds adequate to begin
with.
That's one more incentive to look at some emacs + pymacs + bzr
combo... that itches me more and more...
Vincent
More information about the bazaar
mailing list