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: Sun, 03 Oct 2021 20:36:25 +0300 Organization: LINKOV.NET Message-ID: <874k9y6mee.fsf@mail.linkov.net> References: <87k4bovfd0.fsf@sophokles.streitblatt.de> <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> <87bl4bff3v.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="37177"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.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 Sun Oct 03 19:38:42 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 1mX5Ri-0009UY-0P for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 03 Oct 2021 19:38:42 +0200 Original-Received: from localhost ([::1]:48084 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mX5Rf-0005kl-JI for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 03 Oct 2021 13:38:39 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53080) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mX5R4-0005iD-6x for bug-gnu-emacs@gnu.org; Sun, 03 Oct 2021 13:38:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51558) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mX5R3-0000Zx-UE for bug-gnu-emacs@gnu.org; Sun, 03 Oct 2021 13:38:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mX5R3-0005w5-NK for bug-gnu-emacs@gnu.org; Sun, 03 Oct 2021 13:38: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: Sun, 03 Oct 2021 17:38: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.163328266422791 (code B ref 9054); Sun, 03 Oct 2021 17:38:01 +0000 Original-Received: (at 9054) by debbugs.gnu.org; 3 Oct 2021 17:37:44 +0000 Original-Received: from localhost ([127.0.0.1]:34871 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mX5Qm-0005vX-Eb for submit@debbugs.gnu.org; Sun, 03 Oct 2021 13:37:44 -0400 Original-Received: from relay2-d.mail.gandi.net ([217.70.183.194]:64987) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mX5Qj-0005vH-1v for 9054@debbugs.gnu.org; Sun, 03 Oct 2021 13:37:43 -0400 Original-Received: (Authenticated sender: juri@linkov.net) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id B21FC40003; Sun, 3 Oct 2021 17:37:33 +0000 (UTC) In-Reply-To: (martin rudalics's message of "Thu, 30 Sep 2021 18:18:44 +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:216286 Archived-At: >> 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)'. > > It's 'parse-partial-sexp' with OLDSTATE the state just produced by > 'syntax-ppss' and COMMENTSTOP set to 'syntax-table'. Same for the > string case. I'd do it lazily since the context menu is modal and it's > unlikely that some timer-based function changes the buffer under its > feet. Thus save the old state while the menu is active and do the call > when the user wants to mark the comment or string. I tried to add a new 'thing-at-point' target 'comment', but then discovered that it's already supported by (thing-at-point 'comment) because it automatically calls '(forward-comment 1)' and '(forward-comment -1)'. However, it seems currently 'forward-comment' is broken - it does nothing inside comments. Maybe there is a bug? Meanwhile, I moved Defun/List/Symbol selection items to prog-mode, and added Paragraph/Sentence/Word selection items to text-mode as well as to strings/comments in prog-mode. Please check if everything is correct.