From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.help Subject: RE: "grouping" buffers Date: Sun, 31 May 2020 09:39:10 -0700 (PDT) Message-ID: <70f92c1a-baaf-4270-ae0c-e3dd40820c37@default> References: <20200528005856.6bc0869e@jcubic> <38d5c557-715d-43b2-ae02-d0f73c3f3600@default> <5C48EC33-AB2C-4131-AF5F-2BF6D376EC2D@traduction-libre.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="98125"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Help Gnu Emacs mailing list To: Jean-Christophe Helary Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun May 31 18:46:24 2020 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 1jfR6N-000PPn-Om for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 31 May 2020 18:46:23 +0200 Original-Received: from localhost ([::1]:43112 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jfR6M-0003Mq-FV for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 31 May 2020 12:46:22 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55224) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jfQzc-0001DJ-Iz for help-gnu-emacs@gnu.org; Sun, 31 May 2020 12:39:24 -0400 Original-Received: from aserp2120.oracle.com ([141.146.126.78]:47680) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jfQza-0006hG-GU for help-gnu-emacs@gnu.org; Sun, 31 May 2020 12:39:23 -0400 Original-Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 04VGcZtK077922; Sun, 31 May 2020 16:39:15 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=JKUKsl2F9vIKvZCgWIxX90K1BV27DTzS6vEP1pTpfL4=; b=lAbuR3C8igvfAdEjJWBLIHdWsH8JCMtyppX7Ze5/qyc0J1+hSAaAbuHIb/bnlQl/vtFz fxxzpBp2A3u9Uz72zdjQsCf1PiW85WV1yu4JlEVlrxBK38NDh+gS7l//KUX605rAkol4 vXjeD8XtR8xzQdsfsTYHXnzqcHlD2JuYguDlZ0FcFhgagV3mMLPIcBu5/IT9lJ4seCvq ae1oYO9i8zGmEDtfe7/YzSzFLmW2cVLo0vS/byyOLq8jto0JKDIAyNhJ+noJiNXDlTY9 E5Xcln6ORtSqFv5TkbjY28FOER0HCLME2a+pkJRJpzXm9phHgBXboSiJDtslE3q95gJl bA== Original-Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by aserp2120.oracle.com with ESMTP id 31bfekumf6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Sun, 31 May 2020 16:39:15 +0000 Original-Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 04VGbqvC022832; Sun, 31 May 2020 16:39:15 GMT Original-Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserp3020.oracle.com with ESMTP id 31c25g4hy2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 31 May 2020 16:39:15 +0000 Original-Received: from abhmp0013.oracle.com (abhmp0013.oracle.com [141.146.116.19]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 04VGdEhS011108; Sun, 31 May 2020 16:39:14 GMT In-Reply-To: <5C48EC33-AB2C-4131-AF5F-2BF6D376EC2D@traduction-libre.org> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.5005.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9638 signatures=668686 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 suspectscore=0 spamscore=0 malwarescore=0 bulkscore=0 mlxscore=0 phishscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2005310131 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9638 signatures=668686 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 suspectscore=0 mlxlogscore=999 priorityscore=1501 bulkscore=0 phishscore=0 clxscore=1015 impostorscore=0 adultscore=0 spamscore=0 mlxscore=0 lowpriorityscore=0 cotscore=-2147483648 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2005310130 Received-SPF: pass client-ip=141.146.126.78; envelope-from=drew.adams@oracle.com; helo=aserp2120.oracle.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/31 12:39:18 X-ACL-Warn: Detected OS = Linux 3.1-3.10 [fuzzy] X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN 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:123215 Archived-At: > > Frame Titles >=20 > > Every frame has a name parameter; this serves as the default for the > frame title which window systems typically display at the top of the > frame. You can specify a name explicitly by setting the name frame > property. >=20 > I don't know how to "set the name frame property". But there is > probably a place in the elisp manual that says how to do that. The general way to change frame parameters is to use function `modify-frame-parameters'. There are also functions `set-frame-parameter' and `set-frame-position'. And I pointed you to code (in `frame-cmds.el') that defines a command to rename a frame. You're free to use or adapt that. =20 > I think there should be a command that does that in frame.el. Maybe so, but it's simple to define your own. Even if you don't want to use a 3rd-party library such as `frame-cmds.el', you can reuse or adapt some of its code, if you like. > >> or to call a frame to the front for example, like I'd call > >> a buffer to the front. > > > > By "call to the front", do you mean select the frame, > > giving it focus? That's standard command `select-frame' or > > `select-frame-by-name' (or function `select-frame-set-focus'). >=20 > When I call select-frame I get "command-execute: select-frame must be > bound to an event with parameters" I don't know what that means. Yes, that's not covered well in the manuals, IMO. You might consider filing a bug report. The doc should probably say that that command should be bound to a mouse event. Or perhaps that error message could be made more clear. Bind such a command to a menu item or some other mouse event, and Bob's your uncle. Googling for exactly that error message shows you some info about this, but not much. Here's one search hit: https://stackoverflow.com/questions/4013079/mouse-buffer-menu-with-keyboard > Thanks to autocompletion I found about select-frame-by-name, and well, > that worked fine, but as far as I can tell it's documented neither in > the elisp manual nor in the emacs manual. Most commands are not documented in the manuals. It's not the purpose of the manuals to exhaustively document each function, variable, etc. (But if you feel that some specific function or variable merits mention in a manual, you can suggest that using `M-x report-emacs-bug'.) The place to start, for info, is the doc string. Then go to the source code. `select-frame-by-name' is defined in `frame.el'. (But yeah, `select-frame' is defined in C source code.) > >> I can call it to the front or to the back, I can modify its > >> contents, I can rearrange the size and placement of each frame, etc. > > > > Dunno what you mean by modify its contents. >=20 > Since in macos 1 frame =3D 1 window =3D 1 buffer, I can write something > like "set contents of document (read "buffer") of front window (read > "frame") to [whatever]" In Emacs I guess you're talking about changing the content of a buffer. You know how to do that. And to do it with code, the buffer doesn't even need to be displayed.=20 > > Most frame changes are done ultimately with > > `modify-frame-parameters'. >=20 > I see. Maybe the section I quoted above could have an explicit link to > that section. I mean, *all* sections in the Emacs manual should have a > link to the relevant part of the Elisp manual... If you want such suggestions to have an effect on the Emacs developers, consider filing an enhancement request: `M-x report-emacs-bug'. > Now it occurs to me that the tab feature that has been recently > included in Emacs is easier to use out of the box than frames. For ex, > by default I can call a menu where all the tabs are listed and I can > select any one of them. >=20 > Although it is a different "menu", I just checked and F10 menu does > have a frame item but it's buried inside the Buffer item. Yes. Library `menu-bar+.el' gives you a top-level `Frames' menu, with these items (the `Frames' under `Buffers' continues to just list frames for selection). Hide Frames / Show Buffers (C-M-Z) Iconify All Frames ______________ Maximize Frame Maximize Frame Horizontally Maximize Frame Vertically Toggle Max Frame Toggle Max Frame Horizontally Toggle Max Frame Vertically ______________ Tile Frames Horizontally... Tile Frames Vertically... ______________ Set Frame Parameter from Frame... Set All Frame Parameters from Frame... Fit This Frame C-x C-_ Delete Frame C-x 5 0 New Frame C-x 5 2 New Frame on Display... And if you also use Icicles then there is an `Icicles' submenu, with these multicommand items: + Change Background of Frame... + Change Foreground of Frame... + Change Font of Frame... > In conclusion, I think there could be the following modifications to > the system to improve usability: >=20 > Short term: > 1) Assign a C-x 5 default keybinding to "select-frame-by-name" > 2) Add a C-x 5 bound command for renaming a frame > 3) Document select-frame-by-name in the 2 manuals > 4) Move the F10 "Frames" menu item to the menu root >=20 > Medium term: > 4) Systematically add links to the Elisp manual in the Emacs manual. To > make sure that new users get a habit to checking the two. See above. `M-x report-emacs-bug'. That's for enhancement requests, as well as bug reports. FWIW, I agree with your general assessment that Emacs has relatively poor support for frames, or put differently, frames are the poor cousins of Emacs windows. One reason for this is no doubt that Emacs has much less control over frames - behavior and appearance. Window managers have ultimate control, and different window mgrs behave differently. All Emacs can do is to request or suggest something of a window mgr. Another reason (my guess) is that (partly because Emacs has relatively poor support for frames) Emacs users and developers use frames less. So they don't tend to develop new features taking frames into account much, and they might not test things much taking frames into account. See this page for more about this issue/problem: https://www.emacswiki.org/emacs/OneOnOneEmacs > I also need to understand why "select-frame" spits that error > message... See above.