From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Robert Weiner Newsgroups: gmane.emacs.devel Subject: Re: Suggestion: Add discussion of input focus handling to select-window; add select-frame-window Date: Tue, 12 Dec 2017 16:29:23 -0500 Message-ID: References: Reply-To: rswgnu@gmail.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="001a113e1ea80640fa05602b5a8d" X-Trace: blaine.gmane.org 1513114208 31099 195.159.176.226 (12 Dec 2017 21:30:08 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 12 Dec 2017 21:30:08 +0000 (UTC) Cc: emacs-devel To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Dec 12 22:30:03 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eOs7l-0007kP-Re for ged-emacs-devel@m.gmane.org; Tue, 12 Dec 2017 22:30:02 +0100 Original-Received: from localhost ([::1]:60605 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eOs7s-0000qf-VP for ged-emacs-devel@m.gmane.org; Tue, 12 Dec 2017 16:30:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58774) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eOs7i-0000qY-PJ for emacs-devel@gnu.org; Tue, 12 Dec 2017 16:29:59 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eOs7e-0006to-Km for emacs-devel@gnu.org; Tue, 12 Dec 2017 16:29:58 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:54843) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eOs7e-0006tY-Gn for emacs-devel@gnu.org; Tue, 12 Dec 2017 16:29:54 -0500 Original-Received: from mail-qt0-f173.google.com ([209.85.216.173]:39482) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1eOs7e-0004n6-96 for emacs-devel@gnu.org; Tue, 12 Dec 2017 16:29:54 -0500 Original-Received: by mail-qt0-f173.google.com with SMTP id k19so786901qtj.6 for ; Tue, 12 Dec 2017 13:29:54 -0800 (PST) X-Gm-Message-State: AKGB3mK+87WGFYy0DUe3qq2sUb3dLEfCEdRHWq98QFtta0YnzpihiwWu +nXqcDfe36uV9xw3JgEgfemYLH71g+riWjeQwRo= X-Google-Smtp-Source: ACJfBosh1n3Jyk6idU5SpYj6fF704zldAfABu2KY43QlUUBdr9G7ug4T0dugo84Y5LqFtAJeXFqNvdO8l/KheBdRynQ= X-Received: by 10.237.37.162 with SMTP id x31mr7971162qtc.58.1513114193770; Tue, 12 Dec 2017 13:29:53 -0800 (PST) Original-Received: by 10.200.55.124 with HTTP; Tue, 12 Dec 2017 13:29:23 -0800 (PST) In-Reply-To: X-Gmail-Original-Message-ID: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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:220965 Archived-At: --001a113e1ea80640fa05602b5a8d Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Dec 12, 2017 at 3:40 PM, Stefan Monnier wrote: > > =E2=80=8BThe same issue exists with save-selected-window except that it= applies > to > > the start selected window rather than a new one. Another macro, > > save-selected-frame-window, would keep input from switching to another > > frame within its scope since this is not part of save-selected-window's > > behavior. > > You mean some kind of `save-frame-focus` macro (tho that name itself > can be confusing since it seems to refer to `frame-focus` which is yet > another kettle of fish)? > =E2=80=8BYes, save-input-focus or save-frame-input-focus for consistency wi= th other naming.=E2=80=8B =E2=80=8B=E2=80=8B > > =E2=80=8B=E2=80=8B > "Manually" changing focus should be something done very rarely in Elisp, > =E2=80=8B=E2=80=8B > so why/when would you need to use something like `save-frame-focus`? > =E2=80=8BHyperbole has a feature that lets you either drag a dired item (or= other item type) to another frame (input switches to that frame) or throw the dired item to another frame (input stays in the same frame). The throw command calls the drag command to reuse its logic, since it is fairly involved and doesn't make sense to duplicate, but then needs to restore the focus to original frame. Bob --001a113e1ea80640fa05602b5a8d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Tue, Dec 12, 2= 017 at 3:40 PM, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>= ; =E2=80=8BThe same issue exists with save-selected-window except that it a= pplies to
> the start selected window rather than a new one.=C2=A0 Another macro,<= br> > save-selected-frame-window, would keep input from switching to another=
> frame within its scope since this is not part of save-selected-window&= #39;s
> behavior.

You mean some kind of `save-frame-focus` macro (tho that name itself=
can be confusing since it seems to refer to `frame-focus` which is yet
another kettle of fish)?

=E2=80=8BYes, save-inpu= t-focus or save-frame-input-focus for consistency with other naming.=E2=80= =8B

=E2=80=8B=E2=80=8B

=E2=80=8B=E2=80=8B
"Manually" changing focus shou= ld be something done very rarely in Elisp,
=E2=80=8B=E2=80=8B
so why/when would you need to use someth= ing like `save-frame-focus`?

=E2=80=8BHyper= bole has a feature that lets you either drag a dired item (or other item ty= pe)
to another frame (input switches to that frame) or throw the dired ite= m to another
frame (input stays in the same frame).=C2=A0 The throw comman= d calls the drag command
to reuse its logic, since it is fairly involved a= nd doesn't make sense to duplicate,
but then needs to restore the focu= s to original frame.

Bob

--001a113e1ea80640fa05602b5a8d--