From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: Alain.Cochard@unistra.fr
Cc: help-gnu-emacs@gnu.org
Subject: Re: Problem with 'M-x shell' with (setq process-connection-type nil)
Date: Mon, 24 Sep 2018 14:28:42 -0400 [thread overview]
Message-ID: <jwvpnx2ycwk.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <23464.63915.722393.412272@frac.u-strasbg.fr> (Alain Cochard's message of "Mon, 24 Sep 2018 16:50:19 +0200")
> > > With 'emacs -Q -l .emacs.debug', where the .emacs.debug file contains
> > > only:
> > >
> > > (setq process-connection-type nil)
> > >
> > > I get [a problem with 'M-x shell']
>
> > Why would you do such a `setq`?
>
> This was to solve a problem with org-mode, for which 'C-c C-e l o' is
> supposed to "Export as LaTeX file and convert it to PDF, then open the
> PDF using the default viewer."
>
> For me it didn't (although the correct pdf file was indeed created).
> Help from the Org mailing list and further googling suggested that the
> problem might be related to 'xdg-open' and that such a setq could
> solve it. Which it did, for me, but with the aforementioned side
> effect with 'M-x shell'...
OK, so it looks like a problem between Org and xdg-open which can be
circumvented with this setting.
> Should I understand from your answer that 'M-x shell' is expected
> /not/ to work with such a setq?
No, indeed not (i.e. I consider it a bug in `shell`):
process-connection-type affects start-process and make-process, but IMO
all uses of start/make-process should either *really* not care what it's
set to, or they should explicitly override locally the default setting.
IOW, setting process-connection-type globally like you did should never
have any visible effect (barring bugs).
Maybe the following will workaround the Org problem without triggering the
shell problem:
(add-advice 'org-export-dispatch :around
(lambda (orig-fun &rest args)
;; Work around a weird problem with xdg-open.
(let ((process-connection-type nil))
(apply orig-fun args))))
-- Stefan
next prev parent reply other threads:[~2018-09-24 18:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-24 3:33 Problem with 'M-x shell' with (setq process-connection-type nil) Alain.Cochard
2018-09-24 12:42 ` Stefan Monnier
2018-09-24 14:50 ` Alain.Cochard
2018-09-24 18:28 ` Stefan Monnier [this message]
2018-09-24 21:47 ` Alain.Cochard
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=jwvpnx2ycwk.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=Alain.Cochard@unistra.fr \
--cc=help-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.