emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tabs (on macos)


From: Jean-Christophe Helary
Subject: Re: Tabs (on macos)
Date: Sun, 1 Sep 2019 17:59:47 +0900

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
        = 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 <address@hidden> wrote:
> 
> 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:
> 
>  ** "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.
> 
>  ** Having tabs above a window to switch buffers in it.
> 
> Frame-local tabs represent window configurations.
> Window-local tabs represent window buffers.
> 
> 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.
> 
> 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.
> 
> 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.
> 
> 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.
> 
> 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.
> 
> Frame-local horizontal interface elements are in this order:
> --- menu-bar ---
> --- tab-bar ---
> --- tool-bar ---
> 
> Window-local horizontal interface elements are in this order:
> --- tab-line ---
> --- header-line ---
> --- mode-line ---
> 
> The implementation of the tab-bar replicates the existing tool-bar.
> The implementation of the tab-line replicates the existing header-line.
> 
> 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.
> 
> 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.
> 
> 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.
> 
> Keybindings for the tab-line:
> C-x <left>  - switches to the previous window tab;
> C-x <right> - switches to the next window tab.
> Clicking on the plus sign adds a new buffer tab to the tab-line.
> 
> '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.
> 
> I invite everyone to try the new branch named 'feature/tabs'
> and to report all found problems.
> 
> 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:
> 
> <tabs.png>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]