all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#36679: 27.0.50; Add switches option to term (feature request)
@ 2019-07-15 21:07 Ergus
  2019-07-16 10:13 ` Phil Sainty
  0 siblings, 1 reply; 6+ messages in thread
From: Ergus @ 2019-07-15 21:07 UTC (permalink / raw)
  To: 36679


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))





^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-06-23 13:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-15 21:07 bug#36679: 27.0.50; Add switches option to term (feature request) Ergus
2019-07-16 10:13 ` Phil Sainty
2019-07-17 11:02   ` Lars Ingebrigtsen
2021-06-22 13:54     ` Lars Ingebrigtsen
2021-06-23 12:30       ` Phil Sainty
2021-06-23 13:08         ` Lars Ingebrigtsen

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.