From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Jean-Christophe Helary Newsgroups: gmane.emacs.devel Subject: Re: Tabs (on macos) Date: Sun, 1 Sep 2019 17:59:47 +0900 Message-ID: <8B5D5445-8D19-4D80-8EC0-9AE3A7669F33@traduction-libre.org> References: <87a7bpysm8.fsf@mail.linkov.net> Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="18977"; mail-complaints-to="usenet@blaine.gmane.org" To: Emacs developers Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Sep 01 11:00:16 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1i4LiY-0004iC-F5 for ged-emacs-devel@m.gmane.org; Sun, 01 Sep 2019 11:00:14 +0200 Original-Received: from localhost ([::1]:48678 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i4LiW-0006Eu-L3 for ged-emacs-devel@m.gmane.org; Sun, 01 Sep 2019 05:00:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58694) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i4LiJ-0006Dv-FL for emacs-devel@gnu.org; Sun, 01 Sep 2019 05:00:00 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i4LiH-0001sh-Gq for emacs-devel@gnu.org; Sun, 01 Sep 2019 04:59:59 -0400 Original-Received: from relay12.mail.gandi.net ([217.70.178.232]:33141) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i4LiH-0001on-7J for emacs-devel@gnu.org; Sun, 01 Sep 2019 04:59:57 -0400 Original-Received: from [192.168.1.12] (pl24769.ag0304.nttpc.ne.jp [133.232.151.193]) (Authenticated sender: jean.christophe.helary@traduction-libre.org) by relay12.mail.gandi.net (Postfix) with ESMTPSA id 9F6BE200004 for ; Sun, 1 Sep 2019 08:59:51 +0000 (UTC) In-Reply-To: <87a7bpysm8.fsf@mail.linkov.net> X-Mailer: Apple Mail (2.3445.104.11) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 217.70.178.232 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:239745 Archived-At: When building on macos 10.14: cc nsterm.o outputs these error messages and the build fails: nsterm.m:2771:26: warning: 'scrollRect:by:' is deprecated: first = deprecated in macOS 10.14 - Use NSScrollView to achieve scrolling views. [-Wdeprecated-declarations] [FRAME_NS_VIEW (f) scrollRect: src by: delta]; ^ /System/Library/Frameworks/AppKit.framework/Headers/NSView.h:260:1: = note: 'scrollRect:by:' has been explicitly marked deprecated here - (void)scrollRect:(NSRect)rect by:(NSSize)delta NS_DEPRECATED_MAC(10_0, = 10_14, "Use NSScrollView to achieve scrolling views."); ^ nsterm.m:5442:29: warning: 'NSFilenamesPboardType' is deprecated: first = deprecated in macOS 10.14 - Create multiple pasteboard items with NSPasteboardTypeFileURL or kUTTypeFileURL instead = [-Wdeprecated-declarations] NSFilenamesPboardType, ^ = /System/Library/Frameworks/AppKit.framework/Headers/NSPasteboard.h:323:32:= note: 'NSFilenamesPboardType' has been explicitly marked deprecated = here APPKIT_EXTERN NSPasteboardType NSFilenamesPboardType = NS_DEPRECATED_MAC(10_0, 10_14, "Create multiple pasteboard items with = NSPasteboardTypeFileURL or ... ^ nsterm.m:6862:57: error: too few arguments to function call, expected 6, = have 5 =3D window_from_coordinates (emacsframe, pt.x, pt.y, 0, 0); ~~~~~~~~~~~~~~~~~~~~~~~ ^ ./window.h:1091:1: note: 'window_from_coordinates' declared here extern Lisp_Object window_from_coordinates (struct frame *, int, int, ^ nsterm.m:8256:35: warning: 'NSFilenamesPboardType' is deprecated: first = deprecated in macOS 10.14 - Create multiple pasteboard items with NSPasteboardTypeFileURL or kUTTypeFileURL instead = [-Wdeprecated-declarations] else if ([type isEqualToString: NSFilenamesPboardType]) ^ = /System/Library/Frameworks/AppKit.framework/Headers/NSPasteboard.h:323:32:= note: 'NSFilenamesPboardType' has been explicitly marked deprecated = here APPKIT_EXTERN NSPasteboardType NSFilenamesPboardType = NS_DEPRECATED_MAC(10_0, 10_14, "Create multiple pasteboard items with = NSPasteboardTypeFileURL or ... ^ nsterm.m:8271:35: warning: 'NSURLPboardType' is deprecated: first = deprecated in macOS 10.14 [-Wdeprecated-declarations] else if ([type isEqualToString: NSURLPboardType]) ^~~~~~~~~~~~~~~ NSPasteboardTypeURL = /System/Library/Frameworks/AppKit.framework/Headers/NSPasteboard.h:332:32:= note: 'NSURLPboardType' has been explicitly marked deprecated here APPKIT_EXTERN NSPasteboardType NSURLPboardType = NS_DEPRECATED_WITH_REPLACEMENT_MAC("NSPasteboardTypeURL", 10_0, 10_14); ^ nsterm.m:8280:35: warning: 'NSStringPboardType' is deprecated: first = deprecated in macOS 10.14 [-Wdeprecated-declarations] else if ([type isEqualToString: NSStringPboardType] ^~~~~~~~~~~~~~~~~~ NSPasteboardTypeString = /System/Library/Frameworks/AppKit.framework/Headers/NSPasteboard.h:322:32:= note: 'NSStringPboardType' has been explicitly marked deprecated here APPKIT_EXTERN NSPasteboardType NSStringPboardType = NS_DEPRECATED_WITH_REPLACEMENT_MAC("NSPasteboardTypeString", 10_0, = 10_14); ^ nsterm.m:8281:38: warning: 'NSTabularTextPboardType' is deprecated: = first deprecated in macOS 10.14 [-Wdeprecated-declarations] || [type isEqualToString: NSTabularTextPboardType]) ^~~~~~~~~~~~~~~~~~~~~~~ NSPasteboardTypeTabularText = /System/Library/Frameworks/AppKit.framework/Headers/NSPasteboard.h:326:32:= note: 'NSTabularTextPboardType' has been explicitly marked deprecated = here APPKIT_EXTERN NSPasteboardType NSTabularTextPboardType = NS_DEPRECATED_WITH_REPLACEMENT_MAC("NSPasteboardTypeTabularText", 10_0, = 10_14); ^ 6 warnings and 1 error generated. make[1]: *** [nsterm.o] Error 1 make: *** [src] Error 2 Jean-Christophe Helary ----------------------------------------------- http://mac4translators.blogspot.com @brandelune > On Sep 1, 2019, at 5:45, Juri Linkov wrote: >=20 > There is a long story of several attempts to implement tabs in Emacs. > Finally now a complete implementation is available for these > etc/TODO tasks: >=20 > ** "Perspectives" are named persistent window configurations. We = have > had the window configuration mechanism in GNU Emacs since the > beginning but we have never developed a good user interface to take > advantage of them. Eclipse's user interface seems to be good. > Perspectives also need to interact with the tabs. >=20 > ** Having tabs above a window to switch buffers in it. >=20 > Frame-local tabs represent window configurations. > Window-local tabs represent window buffers. >=20 > Using such data structures means there is no need in special handling > of saving tabs in the desktop file - both persistence of frame tabs > and persistence of window tabs is already supported by the existing > code in master, because frame tabs are implemented as presentation of > window configurations in the frame parameter saved by frameset as > window states, and window tabs are implemented as presentation of > window buffers already saved by frameset. >=20 > Also both implementation of frame tabs and implementation of > window tabs doesn't require using hooks - frame-local tabs for > window-configuration switching doesn't rely on hooks and > window-local tabs for switching window-buffers doesn't use hooks: > window-configuration-change-hook is not used, no hook > window-size-change-functions, no buffer-list-update-hook, no > post-command-hook is used, none of the hooks. >=20 > All this makes the implementation as simple as possible, > providing only code for displaying and manipulating the already > existing data structures of window configurations and window buffers > represented in the new display elements tab-bar and tab-line > based on the existing elements tool-bar and header-line. >=20 > The prefix '-bar' in tab-bar is by analogy with frame tool-bar, = menu-bar. > The prefix '-line' in tab-line is by analogy with window header-line, = mode-line. >=20 > The tab-bar is located above the tool-bar like in web browsers. > The tab-line is located above the header-line > that is more related to the current buffer. >=20 > Frame-local horizontal interface elements are in this order: > --- menu-bar --- > --- tab-bar --- > --- tool-bar --- >=20 > Window-local horizontal interface elements are in this order: > --- tab-line --- > --- header-line --- > --- mode-line --- >=20 > The implementation of the tab-bar replicates the existing tool-bar. > The implementation of the tab-line replicates the existing = header-line. >=20 > Tabs on the frame tab-bar represent window configurations. > Tabs on the window tab-line represent window buffers: previous on the > left side from the current tab (current-buffer) and next on the right. >=20 > Clicking on the tab in the tab-bar selects its window configuration. > Clicking on the tab in the tab-line selects its window buffer. > Clicking on the close button closes the clicked tab. >=20 > Keybindings for the tab-bar: > C-TAB - switches to the next frame tab; > S-C-TAB - switches to the previous frame tab. > Clicking on the plus sign adds a new window configuration tab to the = tab-bar. >=20 > Keybindings for the tab-line: > C-x - switches to the previous window tab; > C-x - switches to the next window tab. > Clicking on the plus sign adds a new buffer tab to the tab-line. >=20 > 'C-x 6 2' creates a new frame-local tab; > 'C-x 6 b' switches to buffer in another frame-local tab; > 'C-x 6 f' and 'C-x 6 C-f' edit file in another frame-local tab. >=20 > I invite everyone to try the new branch named 'feature/tabs' > and to report all found problems. >=20 > Authors of all packages that currently had no choice other than to > misuse the header-line for displaying window tabs are welcome now to > adapt their packages for displaying window tabs on the new dedicated > tab-line that doesn't conflict with the header-line anymore. > For example, I tried just to replace header-line-format with > tab-line-format in the package awesome-tabs and the result > shows two separate rows - tab-line and header-line of Info buffer: >=20 >