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: Re: Open multiple separate terminal buffers with multi-term in Emacs. Date: Wed, 2 Jun 2021 21:09:44 +0800 Message-ID: References: <87k0ncd9kd.fsf@fastmail.fm> 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="28140"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs To: Joost Kremers Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jun 02 15:10:41 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 1loQds-00075u-MV for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 02 Jun 2021 15:10:40 +0200 Original-Received: from localhost ([::1]:37618 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1loQdr-0006K6-Nd for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 02 Jun 2021 09:10:39 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:32910) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1loQdE-0006Ge-3L for help-gnu-emacs@gnu.org; Wed, 02 Jun 2021 09:10:00 -0400 Original-Received: from mail-lf1-x12c.google.com ([2a00:1450:4864:20::12c]:40634) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1loQdC-0001pG-7w for help-gnu-emacs@gnu.org; Wed, 02 Jun 2021 09:09:59 -0400 Original-Received: by mail-lf1-x12c.google.com with SMTP id w33so3301769lfu.7 for ; Wed, 02 Jun 2021 06:09:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=usYovXoqwxvG2SOOdvllfHefXP94EF8ah6nZ5B73yQA=; b=VOHQKOOtdxXuHNRTBpfB6Dz76/Mna6IiZ4rvBdMYX5jZC+9TZTiBHz0GHs47TBECZl 8zWaN5KXoe1wpM1AXgRF9syBBa4npRQ7q5wsEifhCX2GP2MsmAZHDQQ5ynhr3xpWIrIl P3Gi3V60cpHLIUEmo9qR8Q6JyxoZ0L/Rlu3oppHQihiJIkJ0fBqyIGvZXQgp9WU88gFy E+1gmA0mKwIAezHJtamu77b27WkolQH6eOKLXqwCKUOw/UF2ai+2KQQPZwAj4L+mKbSE VK+1R4YPN/45j3gZue4DD734i97MvWDWF3SOynR1vOtBnRPrNHRDIk3zp38vaYxE8uqe 31yQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=usYovXoqwxvG2SOOdvllfHefXP94EF8ah6nZ5B73yQA=; b=hiGcffWhPz3HQzGBx0NLPBFdbOLYfvb2n1v7hwJ2Fo1cNfnbEtOHhFVk+wCb3cvbQJ 7r/pb4ZHxvxBFftQmrNGxWdrENsJSb2sEvZX+QiPj/EF0nM+TEQ8GcZmFamQNt1bqG5R odeSI0/3HMofzigp6k4qQ3SxSkl1fSfTV7lFEXTJgQohCPCDkStupRtrFc9zDRLhx39Z NEhGPhWWK8bJtFE3u2aDRZy/+yeeZfgFGUKncMR9o7M7hGdL1jTEqw/uAzIpqMcUZstv BWBaqpou7B8MEf/wkl8R1tTGKTyu+vW6572GM8IhIOnKOAf1z90vZn3ndbRIzNEfgepW CUPQ== X-Gm-Message-State: AOAM5329X2+IO/8oTIbDmuzEcoglwiFAx9JUcmJi0Nv5FEBcSeqQYer1 uPsu4DgRsRW/RAgOMisIdqD7QJVyvR2tjxDYt4U= X-Google-Smtp-Source: ABdhPJwS3JkngdFnJam7pnAcjc8vT/ebk7itGE+jxLY6/GDtb7uAg1bbYyagQ78TlIA5Nijzu1HbM7hVlbupkusR2Z0= X-Received: by 2002:a05:6512:3993:: with SMTP id j19mr23716724lfu.231.1622639396582; Wed, 02 Jun 2021 06:09:56 -0700 (PDT) In-Reply-To: <87k0ncd9kd.fsf@fastmail.fm> Received-SPF: pass client-ip=2a00:1450:4864:20::12c; envelope-from=hongyi.zhao@gmail.com; helo=mail-lf1-x12c.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:130498 Archived-At: On Wed, Jun 2, 2021 at 3:12 PM Joost Kremers wrote: > > > On Wed, Jun 02 2021, Hongyi Zhao wrote: > > 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: > > If all you want is to use multiple terminals, you don't need all those packages. > Only multi-term is useful for your purpose. (It's possible to do what you want > without any extra packages, but multi-term makes it easier.) > > So before you install ace-jump-mode, key-chord and yasnippet, I strongly suggest > you read about what those packages do and consider whether you really want/need > them. > > Now, about your question: > > > Now, I can open two new terminals by pressing: > > > > C-c T > > C-x 2 > > This doesn't actually open two terminals. It opens one terminal and then splits > the window in two windows. Both windows show the *same* buffer, however. > > The description of the multi-term package (see ) > says that you can create a new term buffer with `M-x multi-term`, which you have > bound to `C-c T`. So press it once to create one terminal, press it again to > create a second one. If you want to see both terminals at once, open one > terminal, split the window (C-x 2 or C-x 3) and then open a new terminal in the > second window. I want to see all the opened terminals at once, i.e., tiling them in the Emacs window. How can I write a function that takes as an argument the number of buffers to open to automate this process? Regards -- Assoc. Prof. Hongyi Zhao Theory and Simulation of Materials Hebei Vocational University of Technology and Engineering NO. 552 North Gangtie Road, Xingtai, China