* ns-popup-color-panel @ 2018-04-16 22:40 Konrad Podczeck 2018-04-21 13:11 ` ns-popup-color-panel Alan Third 0 siblings, 1 reply; 11+ messages in thread From: Konrad Podczeck @ 2018-04-16 22:40 UTC (permalink / raw) To: emacs-devel The Emacs manual that comes with the recent 26.1 pretest promises: "You can bring up a color panel with ‘M-x ns-popup-color-panel’ and drag the color you want over the Emacs face you want to change. Normal dragging will alter the foreground color. Shift dragging will alter the background color“ However, while ns-popup-color-panel works, dragging a color to an Emacs frame fails to give the promised result. (NB, it works, as promised, in the Aquamacs version of Emacs) Konrad Podczeck ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: ns-popup-color-panel 2018-04-16 22:40 ns-popup-color-panel Konrad Podczeck @ 2018-04-21 13:11 ` Alan Third 2018-04-21 13:39 ` ns-popup-color-panel Alan Third 2018-04-21 21:59 ` ns-popup-color-panel Nick Helm 0 siblings, 2 replies; 11+ messages in thread From: Alan Third @ 2018-04-21 13:11 UTC (permalink / raw) To: Konrad Podczeck; +Cc: emacs-devel On Tue, Apr 17, 2018 at 12:40:53AM +0200, Konrad Podczeck wrote: > The Emacs manual that comes with the recent 26.1 pretest promises: > > "You can bring up a color panel with ‘M-x ns-popup-color-panel’ and > drag the color you want over the Emacs face you want to change. Normal > dragging will alter the foreground color. Shift dragging will alter the > background color“ > > > However, while ns-popup-color-panel works, dragging a color to an > Emacs frame fails to give the promised result. I can confirm it doesn’t do anything. I turned on NSTrace and it doesn’t even seem to be causing the drag/drop functions to be called. It doesn’t work in Emacs 25 either. Out of interest, what is the use case for this functionality? Can you use it to modify a face then save it? > (NB, it works, as promised, in the Aquamacs version of Emacs) They must be applying a patch to fix it. I was going to submit a documentation fix for Emacs 26, but I’ve just noticed the macos.texi file is full of nonsense. There must have been some big changes to drag and drop functionality (at least) since this was written. I’ll try and sort it out. -- Alan Third ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: ns-popup-color-panel 2018-04-21 13:11 ` ns-popup-color-panel Alan Third @ 2018-04-21 13:39 ` Alan Third 2018-04-21 13:45 ` ns-popup-color-panel Eli Zaretskii 2018-04-22 7:19 ` ns-popup-color-panel martin rudalics 2018-04-21 21:59 ` ns-popup-color-panel Nick Helm 1 sibling, 2 replies; 11+ messages in thread From: Alan Third @ 2018-04-21 13:39 UTC (permalink / raw) To: Konrad Podczeck; +Cc: emacs-devel [-- Attachment #1: Type: text/plain, Size: 402 bytes --] On Sat, Apr 21, 2018 at 02:11:08PM +0100, Alan Third wrote: > > I was going to submit a documentation fix for Emacs 26, but I’ve just > noticed the macos.texi file is full of nonsense. There must have been > some big changes to drag and drop functionality (at least) since this > was written. > > I’ll try and sort it out. Patch attached. Is this OK to go straight into emacs-26? -- Alan Third [-- Attachment #2: 0001-Fix-macOS-drag-n-drop-event-documentation.patch --] [-- Type: text/plain, Size: 3481 bytes --] From 88d178ce9411c2c50498ef131e4a3f374a0618fc Mon Sep 17 00:00:00 2001 From: Alan Third <alan@idiocy.org> Date: Sat, 21 Apr 2018 14:32:50 +0100 Subject: [PATCH] Fix macOS drag n drop event documentation * doc/emacs/macos.texi (Mac / GNUstep Customization): Remove references to color panel. (Mac / GNUstep Events): Remove ns-drag-file, and add ns-drag-n-drop. --- doc/emacs/macos.texi | 41 +++++++++-------------------------------- 1 file changed, 9 insertions(+), 32 deletions(-) diff --git a/doc/emacs/macos.texi b/doc/emacs/macos.texi index ef2e944890..6a713271ab 100644 --- a/doc/emacs/macos.texi +++ b/doc/emacs/macos.texi @@ -107,30 +107,16 @@ Mac / GNUstep Customization keys and the fullscreen behavior. To see all such options, use @kbd{M-x customize-group @key{RET} ns @key{RET}}. -@subsection Font and Color Panels +@subsection Font Panel @findex ns-popup-font-panel -The standard Mac / GNUstep font and color panels are accessible via -Lisp commands. The Font Panel may be accessed with @kbd{M-x -ns-popup-font-panel}. It will set the default font in the frame most +The standard Mac / GNUstep font panel is accessible with @kbd{M-x +ns-popup-font-panel} and will set the default font in the frame most recently used or clicked on. @c To make the setting permanent, use @samp{Save Options} in the @c Options menu, or run @code{menu-bar-options-save}. -@findex ns-popup-color-panel -You can bring up a color panel with @kbd{M-x ns-popup-color-panel} and -drag the color you want over the Emacs face you want to change. Normal -dragging will alter the foreground color. Shift dragging will alter the -background color. To discard the settings, create a new frame and -close the altered one. - -@c To make the changes permanent select the "Save Options" -@c item in the "Options" menu, or run @code{menu-bar-options-save}. - -Useful in this context is the listing of all faces obtained by -@kbd{M-x list-faces-display}. - @cindex Core Text, on macOS @cindex font backend, on macOS In macOS, Emacs uses a Core Text based font backend @@ -180,21 +166,12 @@ Mac / GNUstep Events the file. Emacs handles this by visiting that file and highlighting the requested line (@code{ns-open-file-select-line}). -@item ns-drag-file -This event occurs when a user drags files from another application -into an Emacs frame. The default behavior is to insert the contents -of all the dragged files into the current buffer -(@code{ns-insert-files}). The list of dragged files is stored in the -variable @code{ns-input-file}. - -@item ns-drag-color -This event occurs when a user drags a color from the color well (or -some other source) into an Emacs frame. The default behavior is to -alter the foreground color of the area the color was dragged onto -(@code{ns-set-foreground-at-mouse}). If this event is issued with a -@key{Shift} modifier, Emacs changes the background color instead -(@code{ns-set-background-at-mouse}). The name of the dragged color is -stored in the variable @code{ns-input-color}. +@item ns-drag-n-drop +This event occurs when a user drags an object from another application +into an Emacs frame. The default behavior is to open a file in the +current window, or to insert text in the buffer it is dropped into. +It may sometimes be necessary to use the @key{META} key in conjunction +with dragging to force text insertion. @item ns-change-font This event occurs when the user selects a font in a Nextstep font -- 2.16.1 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: ns-popup-color-panel 2018-04-21 13:39 ` ns-popup-color-panel Alan Third @ 2018-04-21 13:45 ` Eli Zaretskii 2018-04-22 7:19 ` ns-popup-color-panel martin rudalics 1 sibling, 0 replies; 11+ messages in thread From: Eli Zaretskii @ 2018-04-21 13:45 UTC (permalink / raw) To: Alan Third; +Cc: konrad.podczeck, emacs-devel > Date: Sat, 21 Apr 2018 14:39:05 +0100 > From: Alan Third <alan@idiocy.org> > Cc: emacs-devel@gnu.org > > > I was going to submit a documentation fix for Emacs 26, but I’ve just > > noticed the macos.texi file is full of nonsense. There must have been > > some big changes to drag and drop functionality (at least) since this > > was written. > > > > I’ll try and sort it out. > > Patch attached. Is this OK to go straight into emacs-26? Yes, thanks. ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: ns-popup-color-panel 2018-04-21 13:39 ` ns-popup-color-panel Alan Third 2018-04-21 13:45 ` ns-popup-color-panel Eli Zaretskii @ 2018-04-22 7:19 ` martin rudalics 2018-04-22 10:08 ` ns-popup-color-panel Alan Third 1 sibling, 1 reply; 11+ messages in thread From: martin rudalics @ 2018-04-22 7:19 UTC (permalink / raw) To: Alan Third, Konrad Podczeck; +Cc: emacs-devel > The default behavior is to open a file in the > current window, or to insert text in the buffer it is dropped into. Please verify both statements: Is it really the "current" (better "selected") window or the window under the mouse? And what is "the buffer it is dropped into"? The buffer displayed at the position of the mouse? Thanks, martin ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: ns-popup-color-panel 2018-04-22 7:19 ` ns-popup-color-panel martin rudalics @ 2018-04-22 10:08 ` Alan Third 2018-04-22 10:21 ` ns-popup-color-panel martin rudalics 0 siblings, 1 reply; 11+ messages in thread From: Alan Third @ 2018-04-22 10:08 UTC (permalink / raw) To: martin rudalics; +Cc: Konrad Podczeck, emacs-devel On Sun, Apr 22, 2018 at 09:19:02AM +0200, martin rudalics wrote: > > The default behavior is to open a file in the > > current window, or to insert text in the buffer it is dropped into. > > Please verify both statements: Is it really the "current" (better > "selected") window or the window under the mouse? And what is "the > buffer it is dropped into"? The buffer displayed at the position of > the mouse? Turns out in both cases it’s whatever is under the mouse. Insert text into the buffer under the mouse, and open the file in the window under the mouse. Is this better? modified doc/emacs/macos.texi @@ -169,9 +169,9 @@ Mac / GNUstep Events @item ns-drag-n-drop This event occurs when a user drags an object from another application into an Emacs frame. The default behavior is to open a file in the -current window, or to insert text in the buffer it is dropped into. -It may sometimes be necessary to use the @key{META} key in conjunction -with dragging to force text insertion. +window under the mouse, or to insert text at point in the buffer under +the mouse. It may sometimes be necessary to use the @key{META} key in +conjunction with dragging to force text insertion. @item ns-change-font This event occurs when the user selects a font in a Nextstep font -- Alan Third ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: ns-popup-color-panel 2018-04-22 10:08 ` ns-popup-color-panel Alan Third @ 2018-04-22 10:21 ` martin rudalics 2018-04-24 18:39 ` ns-popup-color-panel Alan Third 0 siblings, 1 reply; 11+ messages in thread From: martin rudalics @ 2018-04-22 10:21 UTC (permalink / raw) To: Alan Third; +Cc: Konrad Podczeck, emacs-devel > insert text at point in the buffer under Is it 'point' or 'window-point'? That is, if you have windows 1 and 2 both show the same buffer with different window points, window 1 is selected and window 2 is the one where you drop the text does it go to point or window 2's window point? martin ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: ns-popup-color-panel 2018-04-22 10:21 ` ns-popup-color-panel martin rudalics @ 2018-04-24 18:39 ` Alan Third 2018-04-26 7:04 ` ns-popup-color-panel martin rudalics 0 siblings, 1 reply; 11+ messages in thread From: Alan Third @ 2018-04-24 18:39 UTC (permalink / raw) To: martin rudalics; +Cc: Konrad Podczeck, emacs-devel On Sun, Apr 22, 2018 at 12:21:00PM +0200, martin rudalics wrote: > > insert text at point in the buffer under > > Is it 'point' or 'window-point'? That is, if you have windows 1 and 2 > both show the same buffer with different window points, window 1 is > selected and window 2 is the one where you drop the text does it go to > point or window 2's window point? It’s point in the window under the mouse. Should that read ‘insert text at point in the window under’ instead, or something else? -- Alan Third ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: ns-popup-color-panel 2018-04-24 18:39 ` ns-popup-color-panel Alan Third @ 2018-04-26 7:04 ` martin rudalics 2018-04-26 19:56 ` ns-popup-color-panel Alan Third 0 siblings, 1 reply; 11+ messages in thread From: martin rudalics @ 2018-04-26 7:04 UTC (permalink / raw) To: Alan Third; +Cc: Konrad Podczeck, emacs-devel > It’s point in the window under the mouse. Should that read ‘insert > text at point in the window under’ instead, Yes. > or something else? "at point of the window" might be even less ambiguous but we have no strict nomenclature for that. Thanks, martin ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: ns-popup-color-panel 2018-04-26 7:04 ` ns-popup-color-panel martin rudalics @ 2018-04-26 19:56 ` Alan Third 0 siblings, 0 replies; 11+ messages in thread From: Alan Third @ 2018-04-26 19:56 UTC (permalink / raw) To: martin rudalics; +Cc: Konrad Podczeck, emacs-devel On Thu, Apr 26, 2018 at 09:04:48AM +0200, martin rudalics wrote: > > It’s point in the window under the mouse. Should that read ‘insert > > text at point in the window under’ instead, > > Yes. > > > or something else? > > "at point of the window" might be even less ambiguous but we have no > strict nomenclature for that. Thanks. I’ve fixed and pushed it. -- Alan Third ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: ns-popup-color-panel 2018-04-21 13:11 ` ns-popup-color-panel Alan Third 2018-04-21 13:39 ` ns-popup-color-panel Alan Third @ 2018-04-21 21:59 ` Nick Helm 1 sibling, 0 replies; 11+ messages in thread From: Nick Helm @ 2018-04-21 21:59 UTC (permalink / raw) To: Alan Third; +Cc: Konrad Podczeck, emacs-devel On Sun, 22 Apr 2018 at 01:11:08 +1200, Alan Third wrote: > On Tue, Apr 17, 2018 at 12:40:53AM +0200, Konrad Podczeck wrote: >> >> However, while ns-popup-color-panel works, dragging a color to an >> Emacs frame fails to give the promised result. > > I can confirm it doesn’t do anything. I turned on NSTrace and it > doesn’t even seem to be causing the drag/drop functions to be called. > It doesn’t work in Emacs 25 either. I think dnd using the system pickers was removed from NS with commit 1269a680862a9bc6cd65e3d26ef05f68c7521632 back in 2013. The reason in the changelog was it doesn't work on newer versions of macOS and the feature isn't available on other platforms. Is this still true? If people want it perhaps it should be added back in? ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2018-04-26 19:56 UTC | newest] Thread overview: 11+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2018-04-16 22:40 ns-popup-color-panel Konrad Podczeck 2018-04-21 13:11 ` ns-popup-color-panel Alan Third 2018-04-21 13:39 ` ns-popup-color-panel Alan Third 2018-04-21 13:45 ` ns-popup-color-panel Eli Zaretskii 2018-04-22 7:19 ` ns-popup-color-panel martin rudalics 2018-04-22 10:08 ` ns-popup-color-panel Alan Third 2018-04-22 10:21 ` ns-popup-color-panel martin rudalics 2018-04-24 18:39 ` ns-popup-color-panel Alan Third 2018-04-26 7:04 ` ns-popup-color-panel martin rudalics 2018-04-26 19:56 ` ns-popup-color-panel Alan Third 2018-04-21 21:59 ` ns-popup-color-panel Nick Helm
Code repositories for project(s) associated with this public inbox https://git.savannah.gnu.org/cgit/emacs.git This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).