From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#9054: 24.0.50; show source in other window Date: Thu, 30 Sep 2021 18:18:44 +0200 Message-ID: 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> <87bl4bff3v.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33978"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Lars Ingebrigtsen , 9054@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Sep 30 18:30:22 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 1mVywv-0008fW-Pb for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 30 Sep 2021 18:30:21 +0200 Original-Received: from localhost ([::1]:35856 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mVywu-0006q9-99 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 30 Sep 2021 12:30:20 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48526) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mVyly-0004AA-Jm for bug-gnu-emacs@gnu.org; Thu, 30 Sep 2021 12:19:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42242) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mVyly-0007ww-B5 for bug-gnu-emacs@gnu.org; Thu, 30 Sep 2021 12:19:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mVyly-00052B-5W for bug-gnu-emacs@gnu.org; Thu, 30 Sep 2021 12:19:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 30 Sep 2021 16:19:02 +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.163301873419324 (code B ref 9054); Thu, 30 Sep 2021 16:19:02 +0000 Original-Received: (at 9054) by debbugs.gnu.org; 30 Sep 2021 16:18:54 +0000 Original-Received: from localhost ([127.0.0.1]:53787 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mVylp-00051c-Uo for submit@debbugs.gnu.org; Thu, 30 Sep 2021 12:18:54 -0400 Original-Received: from mout.gmx.net ([212.227.15.18]:50859) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mVylo-00051K-6E for 9054@debbugs.gnu.org; Thu, 30 Sep 2021 12:18:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1633018726; bh=OyZ6UexbkSJKKr+fqYCBgkvaxbFSJgVztBuSHvsVqv4=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=c1saNCqIq+X51StnJ3W4rCLnlDKfAg/MtDTaeR9piTMgmfH3mf9ebeL9SnCHWsnIk R1vxsIEqH3ZPL9uE9idCvhmoqSTXTWJroXuFnRGQgDVese85PgpXyESmev0dveoitO 8pn+m2SBrLTxDYhqbMTSvg1SydoHrMi8J51DXhJ4= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [192.168.1.101] ([46.125.249.119]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MzyuS-1miRRz3ZUU-00x3gC; Thu, 30 Sep 2021 18:18:46 +0200 In-Reply-To: <87bl4bff3v.fsf@mail.linkov.net> Content-Language: en-US X-Provags-ID: V03:K1:6AN9xEEq2kKTq0eVWNG1w6zqFj7mzKjplMuJUmJWasYRFw/vsW9 2IAmvKpJewAQfSCyM7EKOe+KW3SHJUCxoKLINwQQjjtruD65XwN18Ld6LCHGWW0e1/xsrZ0 qFDPQ/jQBKySDLLr2x6LDSTpErCKotNbVyv8FsGCzXT3XaCilfLS7a/7YcYZ7VWa4J/GxIv 6Rhet9aA7gYQHUt/Xkxpw== X-UI-Out-Filterresults: notjunk:1;V03:K0:yqenVdFSsDA=:NfWuFtgYjl1+gj7oz9C3w6 M6Isq3AuBBUyspI+jVUdzHlGr1VTrwmiCSupfJKfm4YgdNdZ23zsI5gQHx7DUbQXmwFACpNIX YdGqQa5Y8vkLsi52ui4MIm7rkh/OcGKTZbLK278z+yXHjjgrncI7MyMJay7DEd1UvvrZ+pzd2 o1W9TdsOjUebSULqC32LsQY/mzL9NhR9dN4hlbHOADa0OsWuxFDi2ayijNAEgiA7lcw9aQkkJ c9gA4mzaeSR7z6S3hX/LHjz9twyvgKdFlvxpwIbQy3F4+9ZiGRwamwBJDZHhCI4YMeBUOA/r2 UxopOxpN27VwaXUg9gibiqAbvjkR6CzPOMGk2Zc0fxgKNPP5NYs65DiOQVfxfBfsBOVDkd/Iy 6v82O87So0eKfkHWgbmKU6po9rG9Y5EoAp09nCDOsOUm5rxH46qoB6C5xQv/PYz/F213XZvoU VMejAnLt3k4BY1RRlCWrUvSEsah4CmW3xLKWsUnJiqszUYjkc/S2Xp2IjuTShwVdi3+yxDRNq C+sdJ92BNWPclr27yPzOqG42sP+RDIiHIcuD4v6sg/yk3Q4oG7Yczx+dRxzyMzKwE8i4lEv7V 4hkhrgrpyzhyYh0PtFnHki06jSuNCFiBBJpM+qEalE4SyfbudI623zyM8m34vUn1V7YCguqLx xSykXwbGiEOuWPyp2CD8cJ2ip3nNYeaBMLIH3SIYgaORRIyPd6TbMtcbxu9wfsZvdqAswOak4 yVoWdPV6KK5yrz9iGOrygrMe/cFS1MZLGL0Sb/Go37rl++OYQt6ZIIdLOuhAq+RHQt2f4sAm 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:215985 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. >> 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. Hmm... The original position would be the one before the region was made active. Then you may expand the active region in various ways. When it's deactivated without deleting the text it contains, go back to the original position. But maybe I'm missing some detail. martin