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

Previous Next

Package: emacs;

Reported by: Ergus <spacibba <at> aol.com>

Date: Mon, 15 Jul 2019 21:09:02 UTC

Severity: wishlist

Found in version 27.0.50

To reply to this bug, email your comments to 36679 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#36679; Package emacs. (Mon, 15 Jul 2019 21:09:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ergus <spacibba <at> aol.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 15 Jul 2019 21:09:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ergus <spacibba <at> aol.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 27.0.50; Add switches option to term (feature request)
Date: Mon, 15 Jul 2019 23:07:43 +0200
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))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36679; Package emacs. (Tue, 16 Jul 2019 10:15:02 GMT) Full text and rfc822 format available.

Message #8 received at 36679 <at> debbugs.gnu.org (full text, mbox):

From: Phil Sainty <psainty <at> orcon.net.nz>
To: Ergus <spacibba <at> aol.com>, 36679 <at> debbugs.gnu.org
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>
Subject: Re: bug#36679: 27.0.50; Add switches option to term (feature request)
Date: Tue, 16 Jul 2019 22:13:50 +1200
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 <at> gnu.org:
bug#36679; Package emacs. (Wed, 17 Jul 2019 11:03:02 GMT) Full text and rfc822 format available.

Message #11 received at 36679 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Phil Sainty <psainty <at> orcon.net.nz>
Cc: Ergus <spacibba <at> aol.com>, 36679 <at> debbugs.gnu.org
Subject: Re: bug#36679: 27.0.50; Add switches option to term (feature request)
Date: Wed, 17 Jul 2019 13:02:19 +0200
Phil Sainty <psainty <at> orcon.net.nz> 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 <at> gnu.org:
bug#36679; Package emacs. (Tue, 22 Jun 2021 13:55:01 GMT) Full text and rfc822 format available.

Message #14 received at 36679 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Phil Sainty <psainty <at> orcon.net.nz>
Cc: Ergus <spacibba <at> aol.com>, 36679 <at> debbugs.gnu.org
Subject: Re: bug#36679: 27.0.50; Add switches option to term (feature request)
Date: Tue, 22 Jun 2021 15:54:14 +0200
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Phil Sainty <psainty <at> orcon.net.nz> 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.

Phil, did you get any further here?  (I wasn't quite sure whether your
response meant that you offered to implement this or not.  :-))

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36679; Package emacs. (Wed, 23 Jun 2021 12:31:01 GMT) Full text and rfc822 format available.

Message #17 received at 36679 <at> debbugs.gnu.org (full text, mbox):

From: Phil Sainty <psainty <at> orcon.net.nz>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Ergus <spacibba <at> aol.com>, 36679 <at> debbugs.gnu.org
Subject: Re: bug#36679: 27.0.50; Add switches option to term (feature request)
Date: Thu, 24 Jun 2021 00:30:47 +1200
On 2021-06-23 01:54, Lars Ingebrigtsen wrote:
> Phil, did you get any further here?  (I wasn't quite sure whether
> your response meant that you offered to implement this or not. :-))

It absolutely did, and I've done nothing about it.

If you're feeling keen, feel free to go ahead; but otherwise leave
it with me (again) and hopefully I'll do something about it this
time!

-Phil





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36679; Package emacs. (Wed, 23 Jun 2021 13:09:01 GMT) Full text and rfc822 format available.

Message #20 received at 36679 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Phil Sainty <psainty <at> orcon.net.nz>
Cc: Ergus <spacibba <at> aol.com>, 36679 <at> debbugs.gnu.org
Subject: Re: bug#36679: 27.0.50; Add switches option to term (feature request)
Date: Wed, 23 Jun 2021 15:08:39 +0200
Phil Sainty <psainty <at> orcon.net.nz> writes:

> If you're feeling keen, feel free to go ahead; but otherwise leave
> it with me (again) and hopefully I'll do something about it this
> time!

No, it's all yours.  :-)

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




This bug report was last modified 3 years and 358 days ago.

Previous Next


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