GNU bug report logs - #36679
27.0.50; Add switches option to term (feature request)

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: wishlist; Reported by: Ergus <spacibba@HIDDEN>; dated Mon, 15 Jul 2019 21:09:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 36679 <at> debbugs.gnu.org:


Received: (at 36679) by debbugs.gnu.org; 17 Jul 2019 11:02:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jul 17 07:02:26 2019
Received: from localhost ([127.0.0.1]:51609 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1hnhha-0001ct-Dj
	for submit <at> debbugs.gnu.org; Wed, 17 Jul 2019 07:02:26 -0400
Received: from quimby.gnus.org ([80.91.231.51]:46654)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1hnhhY-0001ch-Mt
 for 36679 <at> debbugs.gnu.org; Wed, 17 Jul 2019 07:02:25 -0400
Received: from [80.169.244.84] (helo=sandy)
 by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.89) (envelope-from <larsi@HIDDEN>)
 id 1hnhhT-0002GO-Vx; Wed, 17 Jul 2019 13:02:22 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Phil Sainty <psainty@HIDDEN>
Subject: Re: bug#36679: 27.0.50; Add switches option to term (feature request)
References: <20190715210743.iq2oz35olul2uzpt@Ergus>
 <d59b45cf-231b-2373-9cac-b11a0c2af5da@HIDDEN>
Date: Wed, 17 Jul 2019 13:02:19 +0200
In-Reply-To: <d59b45cf-231b-2373-9cac-b11a0c2af5da@HIDDEN> (Phil
 Sainty's message of "Tue, 16 Jul 2019 22:13:50 +1200")
Message-ID: <87a7dcapqc.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview: Phil Sainty <psainty@HIDDEN> writes: > On 16/07/19 9:07
 AM, Ergus wrote: >> Is it possible to add a variable like term-switches (or
 equivalents) >> in order to add options to initialize the shells when calling
 term? > > Shall we implemen [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 36679
Cc: Ergus <spacibba@HIDDEN>, 36679 <at> debbugs.gnu.org
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: -1.0 (-)

Phil Sainty <psainty@HIDDEN> writes:

> On 16/07/19 9:07 AM, Ergus wrote:
>> Is it possible to add a variable like term-switches (or equivalents)
>> in order to add options to initialize the shells when calling term?
>
> Shall we implement this in the same manner as bug 33037 which addressed
> the same issue for `comint-run' ?

I think that makes sense.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#36679; Package emacs. Full text available.

Message received at 36679 <at> debbugs.gnu.org:


Received: (at 36679) by debbugs.gnu.org; 16 Jul 2019 10:14:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jul 16 06:14:09 2019
Received: from localhost ([127.0.0.1]:49640 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1hnKTD-0008AS-Lx
	for submit <at> debbugs.gnu.org; Tue, 16 Jul 2019 06:14:05 -0400
Received: from smtp-3.orcon.net.nz ([60.234.4.44]:44693)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <psainty@HIDDEN>) id 1hnKT4-00089o-Q3
 for 36679 <at> debbugs.gnu.org; Tue, 16 Jul 2019 06:13:55 -0400
Received: from [116.251.203.142] (port=20130 helo=[192.168.20.103])
 by smtp-3.orcon.net.nz with esmtpa (Exim 4.86_2)
 (envelope-from <psainty@HIDDEN>)
 id 1hnKT0-0002zC-Fm; Tue, 16 Jul 2019 22:13:51 +1200
Subject: Re: bug#36679: 27.0.50; Add switches option to term (feature request)
To: Ergus <spacibba@HIDDEN>, 36679 <at> debbugs.gnu.org
References: <20190715210743.iq2oz35olul2uzpt@Ergus>
From: Phil Sainty <psainty@HIDDEN>
Message-ID: <d59b45cf-231b-2373-9cac-b11a0c2af5da@HIDDEN>
Date: Tue, 16 Jul 2019 22:13:50 +1200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101
 Thunderbird/60.7.2
MIME-Version: 1.0
In-Reply-To: <20190715210743.iq2oz35olul2uzpt@Ergus>
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-GeoIP: NZ
X-Spam_score: -2.9
X-Spam_score_int: -28
X-Spam_bar: --
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 36679
Cc: Lars Ingebrigtsen <larsi@HIDDEN>
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: -1.7 (-)

On 16/07/19 9:07 AM, Ergus wrote:
> Is it possible to add a variable like term-switches (or equivalents)
> in order to add options to initialize the shells when calling term?

Shall we implement this in the same manner as bug 33037 which addressed
the same issue for `comint-run' ?

https://debbugs.gnu.org/cgi/bugreport.cgi?bug=33037

In which I wrote:

> ...all of which reminds me that I've been meaning to write a similar
> patch to allow switches to be specified for the `term' and `ansi-term'
> commands, and a consistent approach in all cases would seem sensible;
> so that's something else to keep in mind.

(but then failed to follow up.)


CCing to Lars, who recently reviewed and committed the comint patch.


-Phil





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#36679; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 15 Jul 2019 21:08:07 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jul 15 17:08:07 2019
Received: from localhost ([127.0.0.1]:49281 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1hn8Cc-0004Zm-LD
	for submit <at> debbugs.gnu.org; Mon, 15 Jul 2019 17:08:07 -0400
Received: from lists.gnu.org ([209.51.188.17]:57579)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <spacibba@HIDDEN>) id 1hn8CV-0004ZG-Lc
 for submit <at> debbugs.gnu.org; Mon, 15 Jul 2019 17:08:04 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:42116)
 by lists.gnu.org with esmtp (Exim 4.86_2)
 (envelope-from <spacibba@HIDDEN>) id 1hn8CU-0007xV-H0
 for bug-gnu-emacs@HIDDEN; Mon, 15 Jul 2019 17:07:59 -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,
 RCVD_IN_DNSWL_NONE autolearn=disabled version=3.3.2
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <spacibba@HIDDEN>) id 1hn8CT-0004VS-8D
 for bug-gnu-emacs@HIDDEN; Mon, 15 Jul 2019 17:07:58 -0400
Received: from sonic308-18.consmr.mail.ir2.yahoo.com ([77.238.178.146]:41268)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.71) (envelope-from <spacibba@HIDDEN>) id 1hn8CS-0004Rk-9A
 for bug-gnu-emacs@HIDDEN; Mon, 15 Jul 2019 17:07:57 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048;
 t=1563224872; bh=PU3sAQnHcwjqRe2jz+J/Ajij+e5gIl1RDlCoQpQsbQU=;
 h=Date:From:To:Subject:From:Subject;
 b=trzu+YrUnQMox5QS2+lLkjWYnJIdoslmfV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yXc3lmDVAKJK.04lly
 aBT6a8Yszz3FuYEf0KpXHbxW.KrgG72Sonv3SDeQnPGiBuYB9.Kr6T.zY8cdw1ax4U7IIIEn9qVK
 teJqlOYgnIQdRYVi5Wp0yFLPRcCI1OcmCRCDMTRwiFIAZ6U1HbxMJzismxAcjd48pTXPn0VfWA2E
 nquGAYFUZB88w9UhaMQ_SM9LvEHPFKckV0qJmB0VElm0DvgQ.HIojcarxbSdHIxCRIe0X2H4Bxlf
 4n8uzMyIsWzRMQzQWaMgtmIjBK3qvQP0qs4EGHanzE0k1zoPH_BVPLFyFu8N6v3sliwSzr0Esj4N
 tHOJ7DHoNOx_ChYvuwBVOl6rJ2GmrbOWTyztph3wnUFWKeX4OXuBsTL5fSvYEa6vx_l6EL9lXdGu
 yWwDfe1byYrcLu1HQtqjk2PIi.cLoB77o7Pr3G1bmswQeP8E_lcqEWSa8M5f6J_oMWyZtMHBzSCx
 wlDsat8eWfaWEcZnW9G.ViqYU9b.lblby69g-
Received: from sonic.gate.mail.ne1.yahoo.com by
 sonic308.consmr.mail.ir2.yahoo.com with HTTP; Mon, 15 Jul 2019 21:07:52 +0000
Received: by smtp428.mail.ir2.yahoo.com (Oath Hermes SMTP Server) with ESMTPA
 ID 0ae011c9485f42e0803cc12cd6752a6b; 
 Mon, 15 Jul 2019 21:07:49 +0000 (UTC)
Date: Mon, 15 Jul 2019 23:07:43 +0200
From: Ergus <spacibba@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 27.0.50; Add switches option to term (feature request)
Message-ID: <20190715210743.iq2oz35olul2uzpt@Ergus>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Disposition: inline
User-Agent: NeoMutt/20180716
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x
X-Received-From: 77.238.178.146
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
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: -2.3 (--)


Is it possible to add a variable like term-switches (or equivalents) in
order to add options to initialize the shells when calling term? 

Because some users (like me) need to use term as a login shell so I need
to pass the --login options. make-term already brings this option, so
this is a very small change more or less like:

(defvar term-program-switches nil)

(defun term (program)
  "Start a terminal-emulator in a new buffer.
The buffer is in Term mode; see `term-mode' for the
commands to use in that buffer.

\\<term-raw-map>Type \\[switch-to-buffer] to switch to another buffer."
  (interactive (list (read-from-minibuffer "Run program: "
        (or explicit-shell-file-name
            (getenv "ESHELL")
            shell-file-name))))
  (set-buffer (make-term "terminal" program nil term-program-switches)

)
  (term-mode)
  (term-char-mode)
  (switch-to-buffer "*terminal*"))



In GNU Emacs 27.0.50 (build 5, x86_64-pc-linux-gnu, GTK+ Version 3.24.10)
 of 2019-07-14 built on Ergus
Repository revision: 783eca57159065ea575622b74e1446853f31621a
Repository branch: master
System Description: Arch Linux

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
delete-backward-char: Text is read-only
user-error: Beginning of history; no preceding item [3 times]
Making completion list...
delete-backward-char: Text is read-only
Making completion list...
delete-backward-char: Text is read-only [5 times]
Making completion list...
funcall-interactively: End of buffer [4 times]

Configured using:
 'configure --prefix=/home/ergo/PhD/emacs/emacs.install_arch
 --with-mailutils --with-x-toolkit=gtk3 --with-xft --with-modules'

Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND GPM DBUS GSETTINGS GLIB NOTIFY INOTIFY
ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS LIBSYSTEMD JSON
PDUMPER LCMS2 GMP

Important settings:
  value of $LC_CTYPE: en_US.UTF-8
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
format-spec subr-x rfc822 mml easymenu mml-sec password-cache epa
derived epg epg-config gnus-util rmail rmail-loaddefs
text-property-search time-date seq byte-opt gv bytecomp byte-compile
cconv mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader cl-loaddefs cl-lib sendmail rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mail-utils term/tmux term/xterm xterm
elec-pair tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar
dnd fontset image regexp-opt fringe tabulated-list replace newcomment
text-mode elisp-mode lisp-mode prog-mode register page menu-bar
rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core term/tty-colors frame cl-generic cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese composite charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer
cl-preloaded nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote threads dbusbind
inotify lcms2 dynamic-setting system-font-setting font-render-setting
move-toolbar gtk x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 49625 8462)
 (symbols 48 6081 1)
 (strings 32 15732 1783)
 (string-bytes 1 517639)
 (vectors 16 7924)
 (vector-slots 8 80943 6506)
 (floats 8 24 545)
 (intervals 56 197 6)
 (buffers 992 12))




Acknowledgement sent to Ergus <spacibba@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#36679; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
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.