all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Sebastian Tennant <sebyte@smolny.plus.com>
To: bug-gnu-emacs@gnu.org
Subject: bug#1973: Bug in simple.el (Emacs version 22.2.1)
Date: Wed, 04 Feb 2009 09:47:02 +0000	[thread overview]
Message-ID: <d4dyedpl.fsf@vps203.linuxvps.org> (raw)
In-Reply-To: jwveiyg67nd.fsf@iro.umontreal.ca

Quoth Stefan Monnier <monnier@iro.umontreal.ca>:
>> > I guess it's using shell-mode, but somehow fails to setup the process's
>> > output filter?
>> Now you're making it sound like a bug, just as I'm starting to accept
>> that it's a misfeature :)
>
> One part is whether it should use shell-mode or not.

I dare say it should, given that the command use to create the
asynchronous command is called 'shell-command'.

> Another is whether, when using shell-mode, it should behave like
> M-x shell.
>
> The second part is clearly a bug.  If we decide it shouldn't use
> shell-mode, then the bug needn't be fixed.  But given that it currently
> uses shell-mode, it seems that (contrary to what I thought) the current
> intention is for it to behave like shell-mode, in which case it should
> be fixed.

Agreed.

> I think that all that's needed is a good (set-process-filter
> (get-buffer-process <buf>) 'comint-output-filter) at the right place.
> Tho, maybe a better option is to change the way the process is started
> along the lines of what you originally proposed.

Indeed, why use start-process and then set the process filter when both
can be achieved using make-comint-in-buffer?

>> Even replacing the call to shell-mode with a call to comint-mode makes
>> no difference to the way ^M characters are handled.  In either case the
>> process filter must be explicitly set to 'comint-ouput-filter.  I'd
>> expect something as visually arresting as mangled output to be handled
>> by a mode setting, but hey ho.
>
> This is a more difficult decision: should calling a major-mode affect
> the filter of a process that happens to be running in this buffer?

I see your point.

> Usually, the expectation is that shell-mode (or comint-mode) is not
> called directly, so the process filter is set by the calling code.

Fair enough.  Let's leave it as it is then, and make sure we set it in
the calling code.

>> If it were up to me, I'd rewrite the asynchronous part of shell-command
>> so that make-comint-in-buffer is used to create a Comint mode buffer
>> called *Async Shell Command Output* and leave it at that.
>
> I'm beginning to agree.

Cool.  Using make-comint-in-buffer definitely seems the way to go but
I've changed my mind about in which mode *Async Shell Command* should
be.  I now think Shell mode (rather than leaving it in Comint mode) is
better, simply for the sake of consistency with it's synchronous
counterpart.

Sebastian
-- 
Emacs' AlsaPlayer - Music Without Jolts
Lightweight, full-featured and mindful of your idyllic happiness.
http://home.gna.org/eap








  reply	other threads:[~2009-02-04  9:47 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-24 21:14 bug#1973: Bug in simple.el (Emacs version 22.2.1) Stefan Monnier
2009-02-04  9:47 ` Sebastian Tennant [this message]
  -- strict thread matches above, loose matches on Subject: below --
2009-01-20 20:10 Sebastian Tennant
2009-01-21  4:59 ` Kevin Rodgers
2009-01-21 10:34   ` Sebastian Tennant
2009-01-21 22:04 ` Stefan Monnier
2009-01-22  8:45   ` Sebastian Tennant
2009-01-22 15:09     ` Stefan Monnier
2009-01-22 18:07       ` Sebastian Tennant
2009-01-22 21:30         ` Stefan Monnier
2009-01-22 23:15           ` Sebastian Tennant
2009-01-23  7:53             ` Stefan Monnier
2009-01-23 10:46               ` Sebastian Tennant
2009-01-23 18:01                 ` Sebastian Tennant
2009-01-25 17:58                   ` Sebastian Tennant
2009-01-22 14:00 ` Sebastian Tennant
2009-01-22 18:27   ` Sebastian Tennant

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

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

  git send-email \
    --in-reply-to=d4dyedpl.fsf@vps203.linuxvps.org \
    --to=sebyte@smolny.plus.com \
    --cc=1973@emacsbugs.donarmstrong.com \
    --cc=bug-gnu-emacs@gnu.org \
    /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 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.