GNU logs - #26654, boring messages


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#26654: 26.0.50; Request to add an option to make emacs not care if input is not coming from tty
Resent-From: Kaushal Modi <kaushal.modi@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Tue, 25 Apr 2017 14:24:01 +0000
Resent-Message-ID: <handler.26654.B.149313020430318 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 26654
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: 26654 <at> debbugs.gnu.org
X-Debbugs-Original-To: "bug-gnu-emacs@HIDDEN" <bug-gnu-emacs@HIDDEN>
Received: via spool by submit <at> debbugs.gnu.org id=B.149313020430318
          (code B ref -1); Tue, 25 Apr 2017 14:24:01 +0000
Received: (at submit) by debbugs.gnu.org; 25 Apr 2017 14:23:24 +0000
Received: from localhost ([127.0.0.1]:39892 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1d31NE-0007sw-G4
	for submit <at> debbugs.gnu.org; Tue, 25 Apr 2017 10:23:24 -0400
Received: from eggs.gnu.org ([208.118.235.92]:39233)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <kaushal.modi@HIDDEN>) id 1d31NC-0007se-Et
 for submit <at> debbugs.gnu.org; Tue, 25 Apr 2017 10:23:22 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <kaushal.modi@HIDDEN>) id 1d31N6-0001HG-AV
 for submit <at> debbugs.gnu.org; Tue, 25 Apr 2017 10:23:17 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM,
 HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:59369)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <kaushal.modi@HIDDEN>)
 id 1d31N6-0001HA-6E
 for submit <at> debbugs.gnu.org; Tue, 25 Apr 2017 10:23:16 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:58402)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <kaushal.modi@HIDDEN>) id 1d31N0-0005MK-Se
 for bug-gnu-emacs@HIDDEN; Tue, 25 Apr 2017 10:23:15 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <kaushal.modi@HIDDEN>) id 1d31My-0001Fn-VM
 for bug-gnu-emacs@HIDDEN; Tue, 25 Apr 2017 10:23:09 -0400
Received: from mail-lf0-x230.google.com ([2a00:1450:4010:c07::230]:36359)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.71) (envelope-from <kaushal.modi@HIDDEN>)
 id 1d31My-0001FU-Mt
 for bug-gnu-emacs@HIDDEN; Tue, 25 Apr 2017 10:23:08 -0400
Received: by mail-lf0-x230.google.com with SMTP id c80so91574728lfh.3
 for <bug-gnu-emacs@HIDDEN>; Tue, 25 Apr 2017 07:23:08 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:from:date:message-id:subject:to;
 bh=eoeLyPzD8OvT94T4Uycu8k0OOYwj3gJ8OPdhXYW4HI4=;
 b=XtI/zBvGaWpKiEpnURIVN99fmLA0gfhjQ+nNPbuOsgc45HyhOLEE4GKmMR78wWwqRa
 eXQIXscOyD1ilGp0PPRjYF4XnGU+GYdvO7/xgI0yR2wjLVkx+uR0IEnbPqeFUd5+r/U/
 TIQdcCHiGVBtdROyacp88u8slOpkaDaJiJ32onIOc4rfK84EuwPzZ8dH+MN9BGfWr1se
 FDZlzSoBgEho0MLjvhpGCeN7yADHekgEDs+/t/79P0OKhFSLYE8mC3CcRsCM9Q9Aju93
 jvnjoGEYpGYS+TcQzBt1n+sFwzVqfm5VqGx2AWXTUKEQ0VgH5bOgRxWgF7tL6adO3QHP
 cQgw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:from:date:message-id:subject:to;
 bh=eoeLyPzD8OvT94T4Uycu8k0OOYwj3gJ8OPdhXYW4HI4=;
 b=C6ripKZ4Yqu5waI1E55oTWlYkmI0UTbjzgUKg0kstkOAycb7Ba+rGBUXfoqkVjMjsf
 Ie2oPct/k0Gi723/MoDSYk17P3fIEnMQ/AuUuLU0Jg4CQGgz9QkUX0q5zzlJF1kge4Tx
 OnJ3e0P8uMaNffRKi8FcXiq66wpbHhBr+IUWk5kHdeppu5CIZtb6I2WZ8nFyaGTIvUPT
 eamTWUiYc6gXz3HZhhyIVV0H3IsJJzwEUh8pRtRNLzFqbwlzXRXjIuAi6XHGJ9Ta6WSo
 vktWJGJsYTFKNguU1RN1aAZ04CHRQobj+kI7Wj2xig+xIzAJZLE1GvepU1MfIKM3i5K0
 ZcnQ==
X-Gm-Message-State: AN3rC/7QaVPBOo1LdoBAqpfeHmjgwMOow5k+a3xfiRPUwHGB6nBkgUVv
 9uU9DQ2ql5AkVwsfCcEokHIh7fTg9w==
X-Received: by 10.25.150.144 with SMTP id y138mr2822180lfd.167.1493130186833; 
 Tue, 25 Apr 2017 07:23:06 -0700 (PDT)
MIME-Version: 1.0
From: Kaushal Modi <kaushal.modi@HIDDEN>
Date: Tue, 25 Apr 2017 14:22:55 +0000
Message-ID: <CAFyQvY3O2y_2gS0N5AxLkwTafiYp_KnOO8-Nk7KVgaijuwqrVA@HIDDEN>
Content-Type: multipart/alternative; boundary=001a11401a1a63c5b5054dfe766e
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
 recognized.
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.0 (----)

--001a11401a1a63c5b5054dfe766e
Content-Type: text/plain; charset=UTF-8

Hello,

I have a bash script eless ( https://github.com/kaushalmodi/eless ) that I
would like to use to replace 'less' use cases.

I would like to do something like:

    echo "foo" | emacs -Q -nw

If I try to do that at the moment, I get

    emacs: standard input is not a tty

So this is a feature request to make emacs ignore if standard input is
coming in through another process and not tty. The eless script saves the
input from pipe to a temp file and opens that in "emacs -Q -nw" by default.
So emacs does not need addition of a feature to read directly from STDIN
(as the bash wrapper does it for me).

I have noticed that emacsclient does not care if input is not coming from
tty. So this bug report is to request emacs to behave the same way.

I am calling this a feature request because I see this behavior at least
from emacs 24.3 onwards.
-- 

Kaushal Modi

--001a11401a1a63c5b5054dfe766e
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>Hello,</div><div><br></div><div>I have a bash script =
eless ( <a href=3D"https://github.com/kaushalmodi/eless">https://github.com=
/kaushalmodi/eless</a> ) that I would like to use to replace &#39;less&#39;=
 use cases.</div><div><br></div><div>I would like to do something like:</di=
v><div><br></div><div>=C2=A0 =C2=A0 echo &quot;foo&quot; | emacs -Q -nw</di=
v><div><br></div><div>If I try to do that at the moment, I get</div><div><b=
r></div><div>=C2=A0 =C2=A0 emacs: standard input is not a tty</div><div><br=
></div><div>So this is a feature request to make emacs ignore if standard i=
nput is coming in through another process and not tty. The eless script sav=
es the input from pipe to a temp file and opens that in &quot;emacs -Q -nw&=
quot; by default. So emacs does not need addition of a feature to read dire=
ctly from STDIN (as the bash wrapper does it for me).</div><div><br></div><=
div>I have noticed that emacsclient does not care if input is not coming fr=
om tty. So this bug report is to request emacs to behave the same way.</div=
><div><br></div><div>I am calling this a feature request because I see this=
 behavior at least from emacs 24.3 onwards.</div></div><div dir=3D"ltr">-- =
<br></div><div data-smartmail=3D"gmail_signature"><p dir=3D"ltr">Kaushal Mo=
di</p>
</div>

--001a11401a1a63c5b5054dfe766e--




Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.505 (Entity 5.505)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: Kaushal Modi <kaushal.modi@HIDDEN>
Subject: bug#26654: Acknowledgement (26.0.50; Request to add an option to
 make emacs not care if input is not coming from tty)
Message-ID: <handler.26654.B.149313020430318.ack <at> debbugs.gnu.org>
References: <CAFyQvY3O2y_2gS0N5AxLkwTafiYp_KnOO8-Nk7KVgaijuwqrVA@HIDDEN>
X-Gnu-PR-Message: ack 26654
X-Gnu-PR-Package: emacs
Reply-To: 26654 <at> debbugs.gnu.org
Date: Tue, 25 Apr 2017 14:24:01 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 bug-gnu-emacs@HIDDEN

If you wish to submit further information on this problem, please
send it to 26654 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
26654: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D26654
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#26654: 26.0.50; Request to add an option to make emacs not care if input is not coming from tty
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Wed, 26 Apr 2017 10:14:02 +0000
Resent-Message-ID: <handler.26654.B26654.149320162121416 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 26654
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Kaushal Modi <kaushal.modi@HIDDEN>
Cc: 26654 <at> debbugs.gnu.org
Reply-To: Eli Zaretskii <eliz@HIDDEN>
Received: via spool by 26654-submit <at> debbugs.gnu.org id=B26654.149320162121416
          (code B ref 26654); Wed, 26 Apr 2017 10:14:02 +0000
Received: (at 26654) by debbugs.gnu.org; 26 Apr 2017 10:13:41 +0000
Received: from localhost ([127.0.0.1]:40587 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1d3Jx7-0005ZL-4V
	for submit <at> debbugs.gnu.org; Wed, 26 Apr 2017 06:13:41 -0400
Received: from eggs.gnu.org ([208.118.235.92]:57080)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1d3Jx5-0005Z8-1Q
 for 26654 <at> debbugs.gnu.org; Wed, 26 Apr 2017 06:13:39 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1d3Jww-0005IB-MJ
 for 26654 <at> debbugs.gnu.org; Wed, 26 Apr 2017 06:13:33 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_40,RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:52515)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1d3Jww-0005I4-IZ; Wed, 26 Apr 2017 06:13:30 -0400
Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3558
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1d3Jwv-0002eG-Od; Wed, 26 Apr 2017 06:13:30 -0400
Date: Wed, 26 Apr 2017 13:12:52 +0300
Message-Id: <837f27pjdn.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-reply-to: <CAFyQvY3O2y_2gS0N5AxLkwTafiYp_KnOO8-Nk7KVgaijuwqrVA@HIDDEN>
 (message from Kaushal Modi on Tue, 25 Apr 2017 14:22:55 +0000)
References: <CAFyQvY3O2y_2gS0N5AxLkwTafiYp_KnOO8-Nk7KVgaijuwqrVA@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.0 (-----)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

> From: Kaushal Modi <kaushal.modi@HIDDEN>
> Date: Tue, 25 Apr 2017 14:22:55 +0000
> 
> I have a bash script eless ( https://github.com/kaushalmodi/eless ) that I would like to use to replace 'less' use
> cases.
> 
> I would like to do something like:
> 
> echo "foo" | emacs -Q -nw
> 
> If I try to do that at the moment, I get
> 
> emacs: standard input is not a tty
> 
> So this is a feature request to make emacs ignore if standard input is coming in through another process and
> not tty. The eless script saves the input from pipe to a temp file and opens that in "emacs -Q -nw" by default.
> So emacs does not need addition of a feature to read directly from STDIN (as the bash wrapper does it for
> me).

Then why not do something like below instead?

  echo "foo" && emacs -Q -nw

IOW, I don't understand what is the significance of the pipe in this
command.

> I have noticed that emacsclient does not care if input is not coming from tty.

The client doesn't interact with the user, it only instructs the
server to visit the file.  Emacs, OTOH, does need to interact.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#26654: 26.0.50; Request to add an option to make emacs not care if input is not coming from tty
Resent-From: Kaushal Modi <kaushal.modi@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Wed, 26 Apr 2017 17:09:02 +0000
Resent-Message-ID: <handler.26654.B26654.14932265264579 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 26654
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 26654 <at> debbugs.gnu.org
Received: via spool by 26654-submit <at> debbugs.gnu.org id=B26654.14932265264579
          (code B ref 26654); Wed, 26 Apr 2017 17:09:02 +0000
Received: (at 26654) by debbugs.gnu.org; 26 Apr 2017 17:08:46 +0000
Received: from localhost ([127.0.0.1]:41924 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1d3QQn-0001Bm-Q0
	for submit <at> debbugs.gnu.org; Wed, 26 Apr 2017 13:08:46 -0400
Received: from mail-lf0-f45.google.com ([209.85.215.45]:35092)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <kaushal.modi@HIDDEN>) id 1d3QQk-0001BW-4B
 for 26654 <at> debbugs.gnu.org; Wed, 26 Apr 2017 13:08:44 -0400
Received: by mail-lf0-f45.google.com with SMTP id 75so3882117lfs.2
 for <26654 <at> debbugs.gnu.org>; Wed, 26 Apr 2017 10:08:42 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=+lI37klDHzz/cWB+6gDNhlFALmYdcY9TJHGm4P4sYkA=;
 b=mkcAyYU+YhWmR8xEfu+U6e++y3j2I/PETIFNheLTrCNZ9eKH53D/73nVfF/BISlwqs
 pNg+gl8DsY/LcvAoKqGmVMTY4ZTTN7LA1SghPZTSte+kz1CkZ+66d4ngcA/LcohMY4kr
 kLWJFhwEaYwZTSpJXXrzhJMYD50q6qq72/5jtT6X5oJNZ/whs7nQeGosDhZ/cxC5GFtx
 cILW0lKTlto7S9NTRT+OuM7ivb9APHOUmpOfAxt5rZhIW+ErSEh9ydQrfvNPeLiMijWD
 jlSzxw951P9pZzJbeNb1I0/S/kR8F9J/b+YQQKF/gz+5mvx2HBnJrg+JIIDv5csvJWAY
 mGkA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=+lI37klDHzz/cWB+6gDNhlFALmYdcY9TJHGm4P4sYkA=;
 b=EaqhAHM/3Oyv2I7qJdjfvvjnzwLrDWSI1L1C8stwZsoh69UMyJk/ubjv9DOBcfeZqd
 M+VlGhDIQeoj8EWElLc9tXVKKNG6RXcFbxvJYvoypzWEK7iRbQKFc4ucxyQf762nonVJ
 KejHdORFW2CFQDR5TTtMHB3z1VZHRgDCuvRTK8H+ToEV7lo+fL9BAKugl5bmY6t2LqOF
 Dq2Z3pZU7rByp7Jaa1+v66dfanXZ2KgRmWLIcaiGcnhuFFKlfYLgENNz4rYpEfUBfA3N
 5SDp1pu2hnUyVoOhaWUxV9VwFYVLQVvIMKQ3M3L6iXOgEYvcfuxd5uh163xjGZpj1iUM
 kBSg==
X-Gm-Message-State: AN3rC/7/PiqGePzksed2Svt0I0N7jxSL10xxEgtH1njWpAWbxdlwNZfS
 9d+HD7mOpxT0zURJABJkZnxOZSGmHA==
X-Received: by 10.25.16.29 with SMTP id f29mr332469lfi.134.1493226515972; Wed,
 26 Apr 2017 10:08:35 -0700 (PDT)
MIME-Version: 1.0
References: <CAFyQvY3O2y_2gS0N5AxLkwTafiYp_KnOO8-Nk7KVgaijuwqrVA@HIDDEN>
 <837f27pjdn.fsf@HIDDEN>
In-Reply-To: <837f27pjdn.fsf@HIDDEN>
From: Kaushal Modi <kaushal.modi@HIDDEN>
Date: Wed, 26 Apr 2017 17:08:24 +0000
Message-ID: <CAFyQvY0=Tdham+JwTeXx7GnXcQsHQqaiu+7nRE__ZYFDDW4-Jg@HIDDEN>
Content-Type: multipart/alternative; boundary=001a11401da40dcce7054e14e43b
X-Spam-Score: 0.5 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.5 (/)

--001a11401da40dcce7054e14e43b
Content-Type: text/plain; charset=UTF-8

On Wed, Apr 26, 2017 at 6:13 AM Eli Zaretskii <eliz@HIDDEN> wrote:

>
> Then why not do something like below instead?
>
>   echo "foo" && emacs -Q -nw
>

Well, my example was too simplified; I do care that "foo" gets into the
emacs buffer, just not "how". At the moment emacs does not accept input
from STDIN in non-batch mode. So I use a wrapper script (
https://raw.githubusercontent.com/kaushalmodi/eless/master/eless ) to save
the STDIN into a temp file and then open that temp file in emacs.


> IOW, I don't understand what is the significance of the pipe in this
> command.
>

The "man grep" is the best example.. I cannot control how man calls the
$PAGER. If I set $PAGER as eless, man eventually does something like "blah
blah | $PAGER".

The common use cases for eless are as follows:

    eless foo.txt                  # Open foo.txt in eless in terminal
(-nw) mode by default.
    eless foo.txt -gui             # Open foo.txt in eless in GUI mode.
    echo 'foo' | eless             #
    echo 'foo' | eless -           # Same as above. The hyphen after eless
does not matter; is anyways discarded.
    grep 'bar' foo.txt | eless     #
    PAGER=eless man grep           # Launches man pages in eless (terminal
mode), if the environment variable PAGER is set to eless.
    PAGER=eless man grep -gui      # Launches man pages in eless (GUI
mode), if the environment variable PAGER is set to eless.
    diff foo bar | eless           # Colored diff!
    eless .                        # Open dired in the current directory
(enhanced 'ls')
    eless -h | eless               # See eless help ;-)

> I have noticed that emacsclient does not care if input is not coming from
> tty.
>
> The client doesn't interact with the user, it only instructs the
> server to visit the file.  Emacs, OTOH, does need to interact.
>

That's alright, at the minimum it would be nice to have emacs not error out
if it detects input coming from STDIN.. it does not have to worry, the bash
script will take care of that (The best case if ofcourse if emacs can read
in STDIN in non-batch mode too).

For now, we use a workaround in eless that always starts emacs in a new
sub-shell and that way the sub-shelled emacs always "thinks" that it not
receiving anything from the stdin. But would like to get away from this
limitation.

-- 

Kaushal Modi

--001a11401da40dcce7054e14e43b
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_quote"><div dir=3D"ltr">On Wed, Apr 26=
, 2017 at 6:13 AM Eli Zaretskii &lt;<a href=3D"mailto:eliz@HIDDEN">eliz@gn=
u.org</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"ma=
rgin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Then why not do something like below instead?<br>
<br>
=C2=A0 echo &quot;foo&quot; &amp;&amp; emacs -Q -nw<br></blockquote><div><b=
r></div><div>Well, my example was too simplified; I do care that &quot;foo&=
quot; gets into the emacs buffer, just not &quot;how&quot;. At the moment e=
macs does not accept input from STDIN in non-batch mode. So I use a wrapper=
 script ( <a href=3D"https://raw.githubusercontent.com/kaushalmodi/eless/ma=
ster/eless">https://raw.githubusercontent.com/kaushalmodi/eless/master/eles=
s</a>=C2=A0) to save the STDIN into a temp file and then open that temp fil=
e in emacs.=C2=A0</div><div>=C2=A0</div><blockquote class=3D"gmail_quote" s=
tyle=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
IOW, I don&#39;t understand what is the significance of the pipe in this<br=
>
command.<br></blockquote><div><br></div><div>The &quot;man grep&quot; is th=
e best example.. I cannot control how man calls the $PAGER. If I set $PAGER=
 as eless, man eventually does something like &quot;blah blah | $PAGER&quot=
;.</div><div><br></div><div>The common use cases for eless are as follows:<=
/div><div><br></div><div>=C2=A0 =C2=A0 eless foo.txt =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0# Open foo.txt in eless in termina=
l (-nw) mode by default.</div><div>=C2=A0 =C2=A0 eless foo.txt -gui =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 # Open foo.txt in eless in GUI mode.</di=
v><div>=C2=A0 =C2=A0 echo &#39;foo&#39; | eless =C2=A0 =C2=A0 =C2=A0 =C2=A0=
 =C2=A0 =C2=A0 #</div><div>=C2=A0 =C2=A0 echo &#39;foo&#39; | eless - =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 # Same as above. The hyphen after eless doe=
s not matter; is anyways discarded.</div><div>=C2=A0 =C2=A0 grep &#39;bar&#=
39; foo.txt | eless =C2=A0 =C2=A0 #</div><div>=C2=A0 =C2=A0 PAGER=3Deless m=
an grep =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 # Launches man pages in eless (t=
erminal mode), if the environment variable PAGER is set to eless.</div><div=
>=C2=A0 =C2=A0 PAGER=3Deless man grep -gui =C2=A0 =C2=A0 =C2=A0# Launches m=
an pages in eless (GUI mode), if the environment variable PAGER is set to e=
less.</div><div>=C2=A0 =C2=A0 diff foo bar | eless =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 # Colored diff!</div><div>=C2=A0 =C2=A0 eless . =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0# Open=
 dired in the current directory (enhanced &#39;ls&#39;)</div><div>=C2=A0 =
=C2=A0 eless -h | eless =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 # =
See eless help ;-)=C2=A0</div><div><br></div><blockquote class=3D"gmail_quo=
te" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"=
>&gt; I have noticed that emacsclient does not care if input is not coming =
from tty.<br>
<br>
The client doesn&#39;t interact with the user, it only instructs the<br>
server to visit the file.=C2=A0 Emacs, OTOH, does need to interact.<br></bl=
ockquote><div><br></div><div>That&#39;s alright, at the minimum it would be=
 nice to have emacs not error out if it detects input coming from STDIN.. i=
t does not have to worry, the bash script will take care of that (The best =
case if ofcourse if emacs can read in STDIN in non-batch mode too).=C2=A0<b=
r></div><div><br></div><div><div>For now, we use a workaround in eless that=
 always starts emacs in a new sub-shell and that way the sub-shelled emacs =
always &quot;thinks&quot; that it not receiving anything from the stdin. Bu=
t would like to get away from this limitation.</div><br class=3D"inbox-inbo=
x-Apple-interchange-newline"></div></div></div><div dir=3D"ltr">-- <br></di=
v><div data-smartmail=3D"gmail_signature"><p dir=3D"ltr">Kaushal Modi</p>
</div>

--001a11401da40dcce7054e14e43b--





Last modified: Mon, 25 Nov 2019 12:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.