bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#19957: automaticaly rename new buffer in term-mode


From: Timothée Flutre
Subject: bug#19957: automaticaly rename new buffer in term-mode
Date: Thu, 26 Feb 2015 21:21:59 +0100

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]