From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Hongyi Zhao Newsgroups: gmane.emacs.help Subject: Open multiple separate terminal buffers with multi-term in Emacs. Date: Wed, 2 Jun 2021 09:38:42 +0800 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9543"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jun 02 03:39:19 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1loFqp-0002FZ-5y for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 02 Jun 2021 03:39:19 +0200 Original-Received: from localhost ([::1]:55992 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1loFqn-0005Q9-O3 for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 01 Jun 2021 21:39:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54988) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1loFqU-0005PZ-FP for help-gnu-emacs@gnu.org; Tue, 01 Jun 2021 21:38:58 -0400 Original-Received: from mail-lf1-x12f.google.com ([2a00:1450:4864:20::12f]:39561) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1loFqS-0001Cg-Mc for help-gnu-emacs@gnu.org; Tue, 01 Jun 2021 21:38:58 -0400 Original-Received: by mail-lf1-x12f.google.com with SMTP id q7so751562lfr.6 for ; Tue, 01 Jun 2021 18:38:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=6duf57idfPJE/EKN1veufYEppNEu9xhXidgNWir+oJs=; b=EUZcCvRTevWI5fA6LAXKekUNMrt8aFtZe5zdcqpfV0VsE5IJz+u117IortzoRHkWR/ EQxvvoy68NpfO0lzitsni18iqj920qjCEWXGKWt4wDEqyOCiHwkDcPx2QOiwDdVrSdZl frsYDg7DGkjFZxgl8xhGs3xsDV0GKdmzIoV6KMDj6WKpW6jcvH11ImktqPTk8tGex2Xw jGnLmU4tK/SGFPwhv6rrTmoDoX/s7f6x7rW4LBGOPY5YMtZBdT2Q7Iuuj0b8qRS3qVsS BJOJVFZtqe34Z/X02OhBWvJ/0pMlo2B6xnAOiAFwZgbUwvF4PzVSzjfoO+QfXt3Q9xbK HJuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=6duf57idfPJE/EKN1veufYEppNEu9xhXidgNWir+oJs=; b=nxxBZLVKSVxzKPaR5lzlx/Wb0HTmL+biB0gQf6dudSIkq0fXgSdi8moI+edVJSb3E4 CgNYpkS1pAxYjDJLI0oBfG4f3VQlWIOun4mcyAKdItkybSgxdEzy47I9ruiairzO2JBg eH7fqOm9opJFB7u1ikTHalAtbQ6/JbiNxrWgBIj/u1sxn3jNR09ZBzTcglfIfCcBCA/j +U3slLS9EWEvoht5norytwHov9Lm1vpAWZSfx8VfRV+0mdA+q96KHcilR0PAy5tpsok8 LxihzQjzxwqu7u2iX4nJJTgROdJxhU/es5DsJMA/p7chnrP/9y7g/wlpsKDIHFqkfXN5 2TiA== X-Gm-Message-State: AOAM53164MAG3z0RwjxKIfUUz1ol1VEAvWUYZ95jEPXNFtgPdhXQC6eF sFo45gRuakkdyW7oI8jCEcVsOJJcpe0leLvb2O7nraEK62LSj0DYiwI= X-Google-Smtp-Source: ABdhPJwTiMM9FS2nIH748V+WKAHREeREI8TVQOqVPFA5HO89nGFrLveRiGrflf+TAniLxoYyaMX9xzmtSlLoVARo5p4= X-Received: by 2002:a05:6512:1144:: with SMTP id m4mr8800771lfg.390.1622597933854; Tue, 01 Jun 2021 18:38:53 -0700 (PDT) Received-SPF: pass client-ip=2a00:1450:4864:20::12f; envelope-from=hongyi.zhao@gmail.com; helo=mail-lf1-x12f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:130483 Archived-At: According to the tricks mentioned here, , I installed the following packages from melpa: multi-term, ace-jump-mode, key-chord, and yasnippet. Then I add the following configuration into my ~/.emacs.d/init.el: (require 'multi-term) (require 'ace-jump-mode) (require 'key-chord) (require 'yasnippet) (key-chord-mode 1) (setq key-chord-one-key-delay 0.15) (key-chord-define-global "jj" 'ace-jump-mode) (add-hook 'term-mode-hook (lambda () (setq yas/dont-activate nil) (yas/minor-mode-on) (add-to-list 'term-bind-key-alist '("C-c C-n" . multi-term-next)) (add-to-list 'term-bind-key-alist '("C-c C-p" . multi-term-prev)) (add-to-list 'term-bind-key-alist '("C-c C-j" . term-line-mode)) (add-to-list 'term-bind-key-alist '("C-c C-k" . term-char-mode)) )) (global-set-key (kbd "C-c t") 'multi-term-next) (global-set-key (kbd "C-c T") 'multi-term) Now, I can open two new terminals by pressing: C-c T C-x 2 But I noticed that the shell commands issued in one terminal will also be shown in the other, i.e., they are the identical one. And I want to open multiple separate terminal buffers, with which I can issue different shell commands in them respectively and observe the corresponding executions of them. Any hints for this problem will be highly appreciated. Regards -- Assoc. Prof. Hongyi Zhao Theory and Simulation of Materials Hebei Vocational University of Technology and Engineering NO. 552 North Gangtie Road, Xingtai, China