From: "Timothée Flutre" <timflutre@gmail.com>
To: 19957@debbugs.gnu.org
Subject: bug#19957: automaticaly rename new buffer in term-mode
Date: Thu, 26 Feb 2015 21:21:59 +0100 [thread overview]
Message-ID: <CAGJVmuL7h1Vejji5mfVSNTy3cwQNVsgjO5zVbBqh0CjrYBMiZg@mail.gmail.com> (raw)
Hello,
I recently asked this question: http://unix.stackexchange.com/q/182211/34919
and someone kindly answered: http://unix.stackexchange.com/a/186565/34919
I slightly modified his answer into the following function:
(defun term-new ()
(interactive)
(command-execute 'term)
(setq-default truncate-lines nil)
(if (not (boundp 'term-number))
(defvar term-number 1 "term index in the current emacs session") )
(rename-buffer (concat "*terminal*<" (int-to-string term-number) ">"))
(setq term-number (+ 1 term-number))
)
I think it can be useful to other users (at least I know several of
them). By any chance, could this be added to a future release of
Emacs?
If yes, as it is a very small contributions, do you still want me to
retrieve the full distribution from
http://savannah.gnu.org/projects/emacs/ and submit an official patch?
Timothée Flutre
next reply other threads:[~2015-02-26 20:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-26 20:21 Timothée Flutre [this message]
2015-02-28 20:32 ` bug#19957: automaticaly rename new buffer in term-mode Glenn Morris
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAGJVmuL7h1Vejji5mfVSNTy3cwQNVsgjO5zVbBqh0CjrYBMiZg@mail.gmail.com \
--to=timflutre@gmail.com \
--cc=19957@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).