From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Ihor Radchenko Newsgroups: gmane.emacs.devel Subject: RE: Request for pointers and advice: displaying several buffers inside a single window Date: Sat, 11 Apr 2020 16:11:34 +0800 Message-ID: <87eesuxwzt.fsf@localhost> References: <83a73swwd7.fsf@gnu.org> <87wo6nxsjz.fsf@localhost> <83d08fmgul.fsf@gnu.org> <87tv1rxmgc.fsf@localhost> <83a73jmcyo.fsf@gnu.org> <87pncfxk4m.fsf@localhost> <87mu7jxi64.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="30088"; mail-complaints-to="usenet@ciao.gmane.io" Cc: dim1212k@gmail.com, adam@alphapapa.net, casouri@gmail.com, emacs-devel@gnu.org To: Drew Adams , Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Apr 11 10:16:06 2020 Return-path: Envelope-to: ged-emacs-devel@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 1jNBJ8-0007i4-0U for ged-emacs-devel@m.gmane-mx.org; Sat, 11 Apr 2020 10:16:06 +0200 Original-Received: from localhost ([::1]:49802 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jNBJ7-00082i-2m for ged-emacs-devel@m.gmane-mx.org; Sat, 11 Apr 2020 04:16:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34607) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jNBIR-0007U3-9t for emacs-devel@gnu.org; Sat, 11 Apr 2020 04:15:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jNBIP-0001X3-Tn for emacs-devel@gnu.org; Sat, 11 Apr 2020 04:15:23 -0400 Original-Received: from mail-pg1-x52e.google.com ([2607:f8b0:4864:20::52e]:34446) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jNBIO-0001WL-4o; Sat, 11 Apr 2020 04:15:20 -0400 Original-Received: by mail-pg1-x52e.google.com with SMTP id l19so25239pgk.1; Sat, 11 Apr 2020 01:15:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=4H6ORGoYtMCjIgptXhihDHGlR9yM+v1IgfTIG6WdK0A=; b=PUAVeQ3wBnQ6nbHIXk6WuDw+1Qw4X9e7+XiBWPoLSFhjGl1rmaBh5PLc3nGRt2OasO 1KVfp0bZgNrKwTu05BtaIgeEdsx954YLTRU5Ucxk5GfFjnjwoKeNFkK5kCJihXfNf33M l/EIbSwikdGmdIPnIbBbFpz0PYJLpd2DDcQ4eyhBb5ZPEvcVCjsQ27XK82xUccHFZ2fr WOSeA2AfQ61zXu7H8HwOSnJX0qEK72LXpj3aZdoKJLpc6HO0vUM0znKsY3ejbr8rnlLD /M/ulo9VqQx0rX4FYraVfpAfh1lwVAV5HHJz6I3F4mFExp0q+emG9KYKpvGI2RfDrEhZ 7G8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=4H6ORGoYtMCjIgptXhihDHGlR9yM+v1IgfTIG6WdK0A=; b=Z3BGQkVIs68DfZXSzVs5YabmhNMehsFIwQuJrNr6USHEClHNIY/agXGS+2qy21UVpG SC5n0BEXtHiTWQ/ujgDVXgRt/Jvcum2/x0CYzqGfNuDW1FGc/YcJG6up3cOE2a4KhH4D 9ogFKYHmIf8ILD0WJAsCYxV5drKIb8gk6Ek2ucxXnty7voOEFHQU6c9IokXK1MMB/ops LOiUPpVx9Z+aTAaGA6xqvmL5oeGdo30BVLD2GF9K3UJgsvPUaUhozmyCpX6XBDCp2kQl sQl+42ZyXvxVMtWHNehCxtT6xTsxJhBzazAzkpwy5LaJDICZpHZtmGVdQoBO6kynoJdL CDOw== X-Gm-Message-State: AGi0PuZEAHUa8wufU9fm+llEK869Oohl0eCoeiJ+ZrV3enTNFR6OIMeH K++0C/F+zlDyjuR2VgL6nMc= X-Google-Smtp-Source: APiQypI6Yd4985EcgzbEWRv7HY1V08+crxYVzcx4xeiSq61UvETke3WLp49KlQbSsqOf/WSslYjIiQ== X-Received: by 2002:a63:8249:: with SMTP id w70mr8476930pgd.52.1586592918937; Sat, 11 Apr 2020 01:15:18 -0700 (PDT) Original-Received: from localhost ([101.99.64.65]) by smtp.gmail.com with ESMTPSA id a13sm3660358pjq.0.2020.04.11.01.15.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Apr 2020 01:15:18 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::52e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:246824 Archived-At: > To be clear, there's no need to cycle among zones. > No need to see only one at a time. You can see all > of them all of the time, as well as see the other, > non-zone text, of any and all buffers. > > What zones.el does not offer is showing the text > of more than one buffer in the same Emacs window. I was not able to achieve this. Do you mean that zones located more than one screen away in the same buffer can be shown all together resulting in a narrowing with multiple zones shown one after other without text between them? > Maybe consider this feedback as just letting you > know that I, at least, don't quite understand > what you're trying to do (or why). > > Emacs doesn't let you use the same window for > multiple buffers, as far as I know. I am trying to suggest something for displaying text from multiple buffers in a single window. My idea is to modify Emacs buffer internals to achieve this. > Emacs doesn't let you use the same window for > multiple buffers, as far as I know. > > You can finagle ways to show text from multiple > buffers in the same window, e.g. by copying it. > And if you do that, and you then want to edit > the copies, then, yes, you'll need to then sync > up the original buffers with your edits. > > Maybe there's a library that does that for you. I am not aware of such library, except the one I am working on. However, any lisp level implementation is likely to slow Emacs more than if it is done on C level. > I wonder what your reason is for wanting that? > That "why" might help explain your request. I think the reasons were discussed in https://debbugs.gnu.org/cgi/bugreport.cgi?bug=35419 and popped up several times in internet: - https://github.com/alphapapa/transclusion-in-emacs/ - https://lists.gnu.org/archive/html/emacs-devel/2018-07/msg00863.html - https://www.reddit.com/r/orgmode/comments/fimdf7/nesting_many_org_source_files_into_the_same_window/ For me, the reasons are mostly related to org mode. For example, it would be cool to have the same org heading in multiple places (and be able to edit the heading from any of those places). Drew Adams writes: >> I tried zones once, but abandoned exactly >> because I was looking for showing all zones at once (not cycling >> through them). > > To be clear, there's no need to cycle among zones. > No need to see only one at a time. You can see all > of them all of the time, as well as see the other, > non-zone text, of any and all buffers. > > What zones.el does not offer is showing the text > of more than one buffer in the same Emacs window. > >> > But if your question/request is about displaying text from different >> buffers in the same Emacs window then zones.el won't help you. >> >> Yep. Displaying and editing (with synchronised changes in those >> buffers). > > See above. You can display and edit all zones at > the same time. And there's no synchronization > needed. What you can't do with zones is show and > edit the text of more than one buffer in the same > Emacs window. > > I say all of this only in case it helps somehow. > My intention is not to have you use zones.el. > > Maybe consider this feedback as just letting you > know that I, at least, don't quite understand > what you're trying to do (or why). > > Emacs doesn't let you use the same window for > multiple buffers, as far as I know. > > You can finagle ways to show text from multiple > buffers in the same window, e.g. by copying it. > And if you do that, and you then want to edit > the copies, then, yes, you'll need to then sync > up the original buffers with your edits. > > Maybe there's a library that does that for you. > > There are libraries that let you put different > parts of the same buffer in different major > modes (in effect). But that too is different > from having multiple buffers in the same window. > > I wonder what your reason is for wanting that? > That "why" might help explain your request. -- Ihor Radchenko, PhD, Center for Advancing Materials Performance from the Nanoscale (CAMP-nano) State Key Laboratory for Mechanical Behavior of Materials, Xi'an Jiaotong University, Xi'an, China Email: yantar92@gmail.com, ihor_radchenko@alumni.sutd.edu.sg