Subject: 24.4; serial-term always launches in char mode

From: Phil Hagelberg <[email-masked]>
Date: Fri, 11 Nov 2016 01:15:15 +0700

When you open a serial connection with M-x serial-term, there is no way
to set it to line mode without defadvice. If you use term-mode-hook to
activate term-line-mode, it is immediately overridden by a call to
term-char-mode on line 4297 of term.el in the serial-term defun.

It would be better if it were possible to change it to default to line
mode using a defvar or defcustom.

In GNU Emacs 24.4.1 (x86_64-pc-linux-gnu, GTK+ Version 3.14.5)
 of 2015-03-08 on trouble, modified by Debian
Windowing system distributor `The X.Org Foundation', version 11.0.11604000
System Description:	Debian GNU/Linux 8.6 (jessie)

Configured using:
 `configure --build x86_64-linux-gnu --prefix=/usr
 --sharedstatedir=/var/lib --libexecdir=/usr/lib
 --localstatedir=/var/lib --infodir=/usr/share/info
 --mandir=/usr/share/man --with-pop=yes
 --enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.4/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.4/site-lisp:/usr/share/emacs/site-lisp
 --build x86_64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib
 --libexecdir=/usr/lib --localstatedir=/var/lib
 --infodir=/usr/share/info --mandir=/usr/share/man --with-pop=yes
 --enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.4/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.4/site-lisp:/usr/share/emacs/site-lisp
 --with-x=yes --with-x-toolkit=gtk3 --with-toolkit-scroll-bars
 'CFLAGS=-g -O2 -fstack-protector-strong -Wformat
 -Werror=format-security -Wall' CPPFLAGS=-D_FORTIFY_SOURCE=2
 LDFLAGS=-Wl,-z,relro'

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

Major mode: C/l

Minor modes in effect:
  diff-auto-refine-mode: t
  recentf-mode: t
  hi-lock-mode: t
  whitespace-mode: t
  idle-highlight-mode: t
  hl-line-mode: t
  page-break-lines-mode: t
  winner-mode: t
  show-paren-mode: t
  tooltip-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  prettify-symbols-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t
  abbrev-mode: t

Recent input:
C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n 
C-n C-x m C-x o C-n C-n M-b M-b M-b M-b C-M-h C-x C-s 
C-x o C-x C-f <backspace> <backspace> e s p C-n <return> 
C-x o C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-e <backspace> 
2 C-x C-s C-x o C-x m M-p C-x o C-n C-n C-n C-n C-n 
C-n C-n C-n C-n C-n M-b M-b M-b M-f C-M-h C-M-h g p 
i o s SPC t o SPC a v o i d C-x C-s C-x o <return> 
C-x o M-< C-x o C-x o C-p C-n C-n C-n C-n C-n C-n C-n 
C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n 
C-n C-e <backspace> 4 C-x C-s C-x o M-p <return> C-x 
o M-> C-p C-p C-p C-p C-p C-p C-p C-p M-f M-f M-b M-b 
C-b <backspace> C-n C-a M-m C-d C-d C-x C-s / / C-n 
C-n C-f <backspace> <backspace> <backspace> C-x C-s 
M-< C-s p r e s s e d . c o u n t C-s C-s C-s C-s C-s 
C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-a C-x o M-p 
<return> <return> M-x s e r <return> <return> <return> 
C-c C-j <down> <return> C-x o M-f M-f M-f M-f M-f \ 
n C-x C-s C-x o C-x k <return> M-p <return> <return> 
M-x <return> <return> <return> C-c C-j C-x o M-< C-s 
f l a s h C-s C-s C-a C-k C-k C-x C-s C-s f l a s h 
C-s C-a C-a C-k C-k C-n C-n C-n C-k C-k C-x C-s C-p 
C-p C-p C-p <return> f l a s h ( " <backspace> 2 ) 
; C-x C-s M-x r e p o r <return>

Recent messages:
History item: 128
Mark set
Mark saved where search started
Saving file /home/phil/src/elektra/main/main.c...
Wrote /home/phil/src/elektra/main/main.c
Mark saved where search started
Saving file /home/phil/src/elektra/main/main.c...
Wrote /home/phil/src/elektra/main/main.c
Saving file /home/phil/src/elektra/main/main.c...
Wrote /home/phil/src/elektra/main/main.c

Load-path shadows:
/home/phil/.emacs.d/elpa/elisp-slime-nav-0.7/elisp-slime-nav hides /home/phil/.emacs.d/el-get/elisp-slime-nav/elisp-slime-nav
/home/phil/.emacs.d/elpa/page-break-lines-0.9/page-break-lines hides /home/phil/.emacs.d/el-get/page-break-lines/page-break-lines
/home/phil/.emacs.d/elpa/idle-highlight-mode-1.1.2/idle-highlight-mode hides /home/phil/.emacs.d/el-get/idle-highlight-mode/idle-highlight-mode
/home/phil/.emacs.d/elpa/ido-ubiquitous-2.10/ido-ubiquitous hides /home/phil/.emacs.d/el-get/ido-ubiquitous/ido-ubiquitous
/home/phil/.emacs.d/elpa/smex-3.0/smex hides /home/phil/.emacs.d/el-get/smex/smex
/home/phil/.emacs.d/elpa/htmlize-1.39/htmlize hides /home/phil/.emacs.d/el-get/htmlize/htmlize
/home/phil/.emacs.d/elpa/paredit-22/paredit hides /home/phil/.emacs.d/el-get/paredit/paredit
/home/phil/.emacs.d/elpa/markdown-mode-2.0/markdown-mode hides /home/phil/.emacs.d/el-get/markdown-mode/markdown-mode
/home/phil/.emacs.d/elpa/better-defaults-0.1.2/better-defaults hides /home/phil/.emacs.d/el-get/better-defaults/better-defaults
/home/phil/.emacs.d/elpa/scpaste-0.6.4/scpaste hides /home/phil/.emacs.d/el-get/scpaste/scpaste
/usr/share/emacs/site-lisp/mu4e/mu4e-contrib hides /usr/share/emacs24/site-lisp/mu4e/mu4e-contrib
/usr/share/emacs/site-lisp/mu4e/mu4e-proc hides /usr/share/emacs24/site-lisp/mu4e/mu4e-proc
/usr/share/emacs/site-lisp/mu4e/mu4e-mark hides /usr/share/emacs24/site-lisp/mu4e/mu4e-mark
/usr/share/emacs/site-lisp/mu4e/mu4e-headers hides /usr/share/emacs24/site-lisp/mu4e/mu4e-headers
/usr/share/emacs/site-lisp/mu4e/mu4e-draft hides /usr/share/emacs24/site-lisp/mu4e/mu4e-draft
/usr/share/emacs/site-lisp/mu4e/mu4e-main hides /usr/share/emacs24/site-lisp/mu4e/mu4e-main
/usr/share/emacs/site-lisp/mu4e/mu4e-actions hides /usr/share/emacs24/site-lisp/mu4e/mu4e-actions
/usr/share/emacs/site-lisp/mu4e/mu4e hides /usr/share/emacs24/site-lisp/mu4e/mu4e
/usr/share/emacs/site-lisp/mu4e/mu4e-meta hides /usr/share/emacs24/site-lisp/mu4e/mu4e-meta
/usr/share/emacs/site-lisp/mu4e/mu4e-speedbar hides /usr/share/emacs24/site-lisp/mu4e/mu4e-speedbar
/usr/share/emacs/site-lisp/mu4e/mu4e-compose hides /usr/share/emacs24/site-lisp/mu4e/mu4e-compose
/usr/share/emacs/site-lisp/mu4e/mu4e-about hides /usr/share/emacs24/site-lisp/mu4e/mu4e-about
/usr/share/emacs/site-lisp/mu4e/org-mu4e hides /usr/share/emacs24/site-lisp/mu4e/org-mu4e
/usr/share/emacs/site-lisp/mu4e/mu4e-view hides /usr/share/emacs24/site-lisp/mu4e/mu4e-view
/usr/share/emacs/site-lisp/mu4e/mu4e-utils hides /usr/share/emacs24/site-lisp/mu4e/mu4e-utils
/usr/share/emacs/site-lisp/mu4e/mu4e-vars hides /usr/share/emacs24/site-lisp/mu4e/mu4e-vars
/usr/share/emacs/site-lisp/mu4e/mu4e-message hides /usr/share/emacs24/site-lisp/mu4e/mu4e-message
/usr/share/emacs/site-lisp/mu4e/mu4e-lists hides /usr/share/emacs24/site-lisp/mu4e/mu4e-lists
/usr/share/emacs24/site-lisp/cmake-data/cmake-mode hides /usr/share/emacs/site-lisp/cmake-mode
/usr/share/emacs/24.4/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup
/usr/share/emacs24/site-lisp/dictionaries-common/ispell hides /usr/share/emacs/24.4/lisp/textmodes/ispell
/usr/share/emacs24/site-lisp/dictionaries-common/flyspell hides /usr/share/emacs/24.4/lisp/textmodes/flyspell
/usr/share/emacs/site-lisp/rst hides /usr/share/emacs/24.4/lisp/textmodes/rst

Features:
(shadow sort gnus-util mail-extr emacsbug sendmail two-column hippie-exp
image-mode magit-bisect magit-key-mode magit server dired-x ediff-merg
ediff-wind ediff-diff ediff-mult ediff-help ediff-init ediff-util ediff
iswitchb view log-edit message format-spec rfc822 mml mml-sec mm-decode
mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums
mm-util mail-prsvr mailabbrev mail-utils gmm-utils mailheader pcvs-util
add-log tabify markdown-mode noutline outline grep make-mode diff-mode
vc vc-dispatcher ido-completing-read+ flyspell ispell rst compile
easy-mmode derived pcmpl-unix recentf tree-widget wid-edit misearch
multi-isearch hi-lock vc-git cc-langs cc-mode cc-fonts cc-guess cc-menus
cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs inform-mode
elisp-slime-nav etags paredit whitespace idle-highlight-mode hl-line
page-break-lines info package epg-config em-unix em-term term disp-table
ehelp em-script em-prompt em-ls em-hist em-pred em-glob em-dirs em-cmpl
em-basic em-banner em-alias pcomplete comint ansi-color esh-var esh-io
esh-cmd esh-opt esh-ext esh-proc esh-arg eldoc esh-groups eshell
esh-module esh-mode esh-util winner ring edmacro kmacro
find-file-in-project smex .loaddefs byte-opt advice paren saveplace ido
el-get el-get-autoloading el-get-list-packages el-get-notify help-mode
easymenu el-get-dependencies thingatpt el-get-build el-get-status pp
el-get-methods el-get-github-zip el-get-http-zip el-get-github-tar
el-get-http-tar el-get-http el-get-emacsmirror el-get-github el-get-git
el-get-recipes el-get-byte-compile el-get-builtin el-get-custom
el-get-core cl-macs autoload help-fns lisp-mnt bytecomp byte-compile
cconv dired cl gv cl-loaddefs cl-lib time-date tooltip electric uniquify
ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd
fontset image regexp-opt fringe tabulated-list newcomment lisp-mode
prog-mode register page menu-bar rfn-eshadow timer select scroll-bar
mouse jit-lock font-lock syntax facemenu font-core frame cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev
minibuffer 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 make-network-process
dbusbind gfilenotify dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)

Memory information:
((conses 16 340871 133634)
 (symbols 48 33646 0)
 (miscs 40 1665 2804)
 (strings 32 61299 9040)
 (string-bytes 1 1912210)
 (vectors 16 25876)
 (vector-slots 8 581941 15541)
 (floats 8 153 409)
 (intervals 56 10849 176)
 (buffers 960 46)
 (heap 1024 35099 2342))