From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#9054: 24.0.50; show source in other window Date: Wed, 29 Sep 2021 20:47:48 +0300 Organization: LINKOV.NET Message-ID: <87bl4bff3v.fsf@mail.linkov.net> References: <87k4bovfd0.fsf@sophokles.streitblatt.de> <44514af3-09b8-8b6b-c436-cfc5f899142a@gmx.at> <87fsu8pdcp.fsf@mail.linkov.net> <87lf40nwol.fsf@mail.linkov.net> <875122a9-0ff9-4479-97dc-3860466a2b11@gmx.at> <871r5px383.fsf@mail.linkov.net> <87y27vk6pd.fsf@mail.linkov.net> <878rzv8obc.fsf@mail.linkov.net> <76b6ea1e-1256-2205-b6df-cde10330da53@gmx.at> <87czp4lg3p.fsf@mail.linkov.net> <23460cdb-c773-4e60-2770-8aa75e0d5693@gmx.at> <874kaftrgk.fsf@mail.linkov.net> <8bb2944d-29f7-d01b-cd6f-d2a8b1721b46@gmx.at> <87k0j9ixov.fsf@mail.linkov.net> <8803a606-8194-1727-1d79-634fe543d7ad@gmx.at> <87czp0vgw2.fsf@mail.linkov.net> <8c3c7826-5dad-db2e-382a-30894f1b43f9@gmx.at> <877df7p7z5.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36225"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) Cc: Lars Ingebrigtsen , 9054@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Sep 29 19:57:09 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mVdpM-0009H1-Gb for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 29 Sep 2021 19:57:08 +0200 Original-Received: from localhost ([::1]:59214 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mVdpL-0003eo-Ev for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 29 Sep 2021 13:57:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54356) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mVdpF-0003eQ-Tw for bug-gnu-emacs@gnu.org; Wed, 29 Sep 2021 13:57:01 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38604) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mVdpF-0002Bm-MM for bug-gnu-emacs@gnu.org; Wed, 29 Sep 2021 13:57:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mVdpF-0008L9-LL for bug-gnu-emacs@gnu.org; Wed, 29 Sep 2021 13:57:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 29 Sep 2021 17:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9054 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 9054-submit@debbugs.gnu.org id=B9054.163293822032051 (code B ref 9054); Wed, 29 Sep 2021 17:57:01 +0000 Original-Received: (at 9054) by debbugs.gnu.org; 29 Sep 2021 17:57:00 +0000 Original-Received: from localhost ([127.0.0.1]:50150 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mVdpD-0008Kt-VS for submit@debbugs.gnu.org; Wed, 29 Sep 2021 13:57:00 -0400 Original-Received: from relay5-d.mail.gandi.net ([217.70.183.197]:37301) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mVdpB-0008Kf-Pb for 9054@debbugs.gnu.org; Wed, 29 Sep 2021 13:56:58 -0400 Original-Received: (Authenticated sender: juri@linkov.net) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id EF98F1C0006; Wed, 29 Sep 2021 17:56:49 +0000 (UTC) In-Reply-To: (martin rudalics's message of "Sun, 26 Sep 2021 11:11:14 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:215887 Archived-At: >>> - In comments and strings it might be nice to advertise selecting the >>> entire comment or string. >> >> This is a great idea. I missed such ability for a long time >> to be able to select the entire string. Now this is implemented >> using a new thing-at-point target 'list-or-string'. > > And no such thing for comments? Instead of > > (nth 3 (save-excursion (syntax-ppss pos) > > I'd use something like > > (let ((state (save-excursion (syntax-ppss pos)))) > (cond > ((nth 3 state) > ... use (nth 8 state) and parse until end of string) > ((nth 4 state) > ... use (nth 8 state) and parse until end of comment))) > > and thus immediately get type, start and end of the syntactic entity at > pos. I tried to implement the 'thing' for comments, but can't find a function that moves to the end of the comment. In case of string, such function is simply '(forward-sexp)'. >>> - Choosing All, in particular, will practically always relocate point >>> and scroll the window. This might be confusing - many people might >>> not understand the combined effect of our "point is always visible" >>> and "point is at one end of the active region" paradigms - so we >>> should provide some way to retract that action and restore the window >>> point and start position afterwards. Maybe None could do that by >>> default but where should List followed by Defun followed by None >>> scroll to? >> >> Good idea, but not implementable. This supposes that selecting All >> should remember the old position of point, then None could restore it. >> But what if the user selected the entire buffer with the key 'C-x h', >> then selected None? > > What would be bad about that? Anyway, you could add some variable you'd > set via 'All' or whatever causes pos to move off-screen and have 'None' > inspect that flag to tell whether it should go back. Clearing the active > region would clear that variable too. But there are too many ways to clear the active region.