From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: `pop-up-frames' and binding/setting user options [was: Documenting buffer display] Date: Mon, 22 Oct 2018 21:15:09 +0200 Message-ID: <5BCE21BD.80008@gmx.at> References: <5BCD9331.6020203@gmx.at> <3c7bc9d6-2841-4f67-96ef-511af5237475@default> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1540235683 10446 195.159.176.226 (22 Oct 2018 19:14:43 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 22 Oct 2018 19:14:43 +0000 (UTC) To: Drew Adams , emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 22 21:14:39 2018 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 1gEfew-0002bx-Aa for ged-emacs-devel@m.gmane.org; Mon, 22 Oct 2018 21:14:38 +0200 Original-Received: from localhost ([::1]:36788 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gEfh2-0001uK-J0 for ged-emacs-devel@m.gmane.org; Mon, 22 Oct 2018 15:16:48 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48386) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gEffe-0001E5-9o for emacs-devel@gnu.org; Mon, 22 Oct 2018 15:15:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gEffd-0005SQ-CY for emacs-devel@gnu.org; Mon, 22 Oct 2018 15:15:22 -0400 Original-Received: from mout.gmx.net ([212.227.15.15]:45035) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gEffd-0005Qs-2m for emacs-devel@gnu.org; Mon, 22 Oct 2018 15:15:21 -0400 Original-Received: from [192.168.1.101] ([213.162.73.113]) by mail.gmx.com (mrgmx002 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MfVU3-1fz5nV2sVH-00P2RA; Mon, 22 Oct 2018 21:15:14 +0200 Original-Received: from [192.168.1.101] ([213.162.73.113]) by mail.gmx.com (mrgmx002 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MfVU3-1fz5nV2sVH-00P2RA; Mon, 22 Oct 2018 21:15:14 +0200 In-Reply-To: <3c7bc9d6-2841-4f67-96ef-511af5237475@default> X-Provags-ID: V03:K1:ubil1cOplJ2yRRHwVrgrYv6wonI9qFhHaYSYGfxg2+o3c/EmSwi H11dDIM5u8qh1P6/oNkrefP9ma+9Txy06rl9TWe990ICS8maajUTaBmLTh2p57WqUqgfjSH PjNv9vMkx4sEOSvqTHtwy9Qhoc8MLzDfIT+yLS2HcdN4gHakyCKSXO+5MykTHL7k/Wj0EwW WurT72JE69RGzCBx1qzLg== X-UI-Out-Filterresults: notjunk:1;V01:K0:dM7mhh3SBko=:lo5WXaV3jSljZ9bhjHhJ/E lQcr2qbfje7L75wzXptn7dnq9W7PKI16HHV9iH/rFa0cqeLi6Xoyt9k4VZdIZGbr067jRbsT2 nfiJkrkgjyO3zrkJ6QwTjmn3A004qGgsjt5EMxqEMWnSUh8GMtP7GVl+4ZL7fsB0KjWfbZlF0 iATMM5+Tt64F7Hjr3Uc7JOrVLLURmHZeUg8ROSiTjnlOUztY40x3q/WNgHcDftVAOX/LwbcBL n+1ukPipTJWiscrzaYKYGGJsvcxInDR0VYVlAzfIdxHgN4fmqpmJfJqbeoYnclEJmj3x37RzF eQ5Dwqi276K5vn9UyyvjiN9ZLZNTeIbiDuwUArwy0ALtkuBsUj+9R2Y/jW83uf+VY43OWD2bp H3md18hwfZfOKEU3RkapvDVax3FypUyfvLh8kAolyKr8zHmpa/cUTQTImv0vFUlGHuMVUJ4vi iGCjUdJq5Y0e5SdddLjqmgvu4F+H/lpYCU9luRHlTWFgSf0Aud/GlL3BGKanyCeveizr9Gt2F Aqs16ND6vD+z7OzzazGfwTmIB7xPi2e/BFvzb7dCY1FPLWnSYRbu27RAaD1WsxwcaNlc3PNJb wpM0ToX/+7S3VRK3IG8f3CT6AhDewnATAt8mYhfZ/1ySJ8NN72M5IL2U/uPYW3ILUQchQZO/U tQsY02JWVvpj4kigXwlEC/2SuG4hJPOcJYYH3div7Iv1jg4/1dwpDtyP+uyPTw4wBJHLR9uj8 TrSivAcvKyEjz9bOfTg183dRSee0LEKbFLJUrVLKkLW6mmNRv3Zj1nI1Ftyx6c+dsrCzl3gq X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.15.15 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:230572 Archived-At: > Not to mention that you cannot "always pass an argument" > instead. The canonical way for a program to affect the behavior of 'display-buffer' is to pass an argument. Everything else is discouraged. 'display-buffer-overriding-action' is the only construct to override the user and should be used with care. > Not without recoding the world, at least. See > RMS's article for good, simple examples. > > Emacs Lisp is for Emacs - an interactive program. Sure, > all of the advantages of lexical scoping are nice, but > performance, for example, is in many instances not as > important for Emacs as for other programming contexts. > Optimization is, for Emacs, a nice-to-have, in general. > > Likewise, the better ability to reason about program > behavior that lexical scoping brings. Likewise, the > reduced funarg problems. > > But (1) we have lexical scoping now (and I, for one, > am in favor of it being on by default, as in Common > Lisp), and (2) if we really want solid semantic > behavior (no funarg problems at all) then we should > move to a purely functional, fully lazy language. > I don't see #2 happening, and it need not. Emacs > Lisp is a good language for Emacs. What do all these have to do with the subject at hand? >> Unless it's a specific bookmark the user wants to handle specifically. > > Maybe you meant "buffer" instead of "bookmark". I meant bookmark - a position in a buffer stored for later perusal. Why else would we be discussing 'display-buffer' in this context? > (I often make that typo, in both directions.) > > But maybe you did mean bookmark. And the bookmark > code gives you the possibility of treating specific > bookmarks differently. And this code is for a > _command_ whose job is specifically to pop to the > bookmark in another frame. If you don't want that > behavior for a particular bookmark then you won't > use that command - you'll use a different command. This command would be for usually popping up the bookmark in another frame and the user would know that. However, for certain, specified bookmarks the user might want to use the selected frame instead and still use the same command. If this command forces the use of the selected frame by binding some global variable instead of passing an appropriate action argument, it inhibits the user to customize its behavior. Just like calling 'switch-to-buffer' inhibits the user to pop to a buffer in another window or frame. > So there are multiple ways around your problem. > Two of them are: (1) specify specific behavior for > a specific bookmark and (2) use a different command. > > If you do want specific _buffers_ to be handled > specially then you can of course have recourse to > the general toolkit that is `display-buffer-alist'. > No problem. Unless the application overrides it. martin