* Problem with 'M-x shell' with (setq process-connection-type nil)
@ 2018-09-24 3:33 Alain.Cochard
2018-09-24 12:42 ` Stefan Monnier
2018-09-24 14:50 ` Alain.Cochard
0 siblings, 2 replies; 5+ messages in thread
From: Alain.Cochard @ 2018-09-24 3:33 UTC (permalink / raw)
To: help-gnu-emacs; +Cc: Alain Cochard
Hello. With 'emacs -Q', 'M-x shell' gives the bash prompt
[cochard@frac ~]$
With 'emacs -Q -l .emacs.debug', where the .emacs.debug file contains
only:
(setq process-connection-type nil)
I get:
bash: cannot set terminal process group (-1): Inappropriate ioctl
for device
bash: no job control in this shell
[cochard@frac ~]$
and the shell is not working properly. I don't really understand the
docstring of 'process-connection-type', so I don't know if this is to
be expected, or if this could be a bug. If not a bug, is there
something to do in order for the shell to behave properly while
retaining the value of process-connection-type?
Thank you.
Regards
Tested with:
GNU Emacs 23.1.1 (i386-redhat-linux-gnu, GTK+ Version 2.24.23) of
2015-02-19 on c6b8.bsys.dev.centos.org
GNU Emacs 24.5.1 (x86_64-redhat-linux-gnu, GTK+ Version 3.18.9) of
2016-04-11 on buildvm-25.phx2.fedoraproject.org Windowing system
distributor `Fedora Project', version 11.0.11803000 System
Description: Fedora release 23 (Twenty Three)
GNU Emacs 25.3.1 (x86_64-redhat-linux-gnu, GTK+ Version 3.22.19) of
2017-09-15 built on buildvm-29.phx2.fedoraproject.org
GNU Emacs 26.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.18.9) of
2018-05-30 built on frac.u-strasbg.fr Windowing system distributor
'Fedora Project', version 11.0.11803000 System Description: Fedora
release 23 (Twenty Three)
--
EOST (École et Observatoire des Sciences de la Terre)
IPG (Institut de Physique du Globe) | alain.cochard@unistra.fr
5 rue René Descartes [bureau 106] | Phone: +33 (0)3 68 85 50 44
F-67084 Strasbourg Cedex, France | Fax: +33 (0)3 68 85 01 25
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Problem with 'M-x shell' with (setq process-connection-type nil)
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
1 sibling, 0 replies; 5+ messages in thread
From: Stefan Monnier @ 2018-09-24 12:42 UTC (permalink / raw)
To: help-gnu-emacs
> With 'emacs -Q -l .emacs.debug', where the .emacs.debug file contains
> only:
>
> (setq process-connection-type nil)
I think the "de" in your file name is misleading. Why would you do such
a `setq`?
Stefan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Problem with 'M-x shell' with (setq process-connection-type nil)
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
1 sibling, 1 reply; 5+ messages in thread
From: Alain.Cochard @ 2018-09-24 14:50 UTC (permalink / raw)
To: help-gnu-emacs; +Cc: alain.cochard, monnier
Stefan Monnier writes:
> > 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'...
Should I understand from your answer that 'M-x shell' is expected
/not/ to work with such a setq?
Regards
--
EOST (École et Observatoire des Sciences de la Terre)
IPG (Institut de Physique du Globe) | alain.cochard@unistra.fr
5 rue René Descartes [bureau 106] | Phone: +33 (0)3 68 85 50 44
F-67084 Strasbourg Cedex, France | Fax: +33 (0)3 68 85 01 25
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Problem with 'M-x shell' with (setq process-connection-type nil)
2018-09-24 14:50 ` Alain.Cochard
@ 2018-09-24 18:28 ` Stefan Monnier
2018-09-24 21:47 ` Alain.Cochard
0 siblings, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2018-09-24 18:28 UTC (permalink / raw)
To: Alain.Cochard; +Cc: help-gnu-emacs
> > > 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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Problem with 'M-x shell' with (setq process-connection-type nil)
2018-09-24 18:28 ` Stefan Monnier
@ 2018-09-24 21:47 ` Alain.Cochard
0 siblings, 0 replies; 5+ messages in thread
From: Alain.Cochard @ 2018-09-24 21:47 UTC (permalink / raw)
To: Stefan Monnier; +Cc: help-gnu-emacs, Alain.Cochard
Stefan Monnier writes on Mon 24 Sep 2018 14:28:
> > 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).
Thanks for the explanations. So I guess I should post to
bug-gnu-emacs.
> 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))))
I get the message
eval-buffer: Symbol's function definition is void: add-advice
but it does solve the Org LaTeX export problem without problem with
'M-x shell'.
So many thanks again!
a.
--
EOST (École et Observatoire des Sciences de la Terre)
IPG (Institut de Physique du Globe) | alain.cochard@unistra.fr
5 rue René Descartes [bureau 106] | Phone: +33 (0)3 68 85 50 44
F-67084 Strasbourg Cedex, France | Fax: +33 (0)3 68 85 01 25
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-09-24 21:47 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2018-09-24 21:47 ` Alain.Cochard
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.