From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tak Kunihiro Newsgroups: gmane.emacs.bugs Subject: bug#27530: patch to cut and copy secondary Date: Tue, 05 Sep 2017 18:25:37 +0900 (JST) Message-ID: <20170905.182537.2023575934474224469.tkk@misasa.okayama-u.ac.jp> References: <20170629.214304.1822535652145654069.tkk@misasa.okayama-u.ac.jp> <20170905.121104.688310267504171014.tkk@misasa.okayama-u.ac.jp> <87pob5bn1t.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1504604475 25417 195.159.176.226 (5 Sep 2017 09:41:15 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 5 Sep 2017 09:41:15 +0000 (UTC) Cc: tkk@misasa.okayama-u.ac.jp, 27530@debbugs.gnu.org To: rpluim@gmail.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Sep 05 11:41:00 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1dpALd-0005Lu-Fk for geb-bug-gnu-emacs@m.gmane.org; Tue, 05 Sep 2017 11:40:45 +0200 Original-Received: from localhost ([::1]:57754 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dpALk-00004v-GM for geb-bug-gnu-emacs@m.gmane.org; Tue, 05 Sep 2017 05:40:52 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43492) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dpA7Y-0004NK-SL for bug-gnu-emacs@gnu.org; Tue, 05 Sep 2017 05:26:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dpA7O-000582-SV for bug-gnu-emacs@gnu.org; Tue, 05 Sep 2017 05:26:10 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:41579) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dpA7O-00057k-Of for bug-gnu-emacs@gnu.org; Tue, 05 Sep 2017 05:26:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dpA7O-0007ct-D0 for bug-gnu-emacs@gnu.org; Tue, 05 Sep 2017 05:26:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Tak Kunihiro Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 05 Sep 2017 09:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27530 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 27530-submit@debbugs.gnu.org id=B27530.150460354829291 (code B ref 27530); Tue, 05 Sep 2017 09:26:02 +0000 Original-Received: (at 27530) by debbugs.gnu.org; 5 Sep 2017 09:25:48 +0000 Original-Received: from localhost ([127.0.0.1]:50259 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dpA79-0007cN-QX for submit@debbugs.gnu.org; Tue, 05 Sep 2017 05:25:47 -0400 Original-Received: from mxl065v67.mxlogic.net ([208.81.65.67]:34736 helo=s14p02o144.mxlogic.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dpA77-0007cB-KI for 27530@debbugs.gnu.org; Tue, 05 Sep 2017 05:25:46 -0400 Original-Received: from unknown [42.127.236.175] (EHLO mlsec.cc.okayama-u.ac.jp) by s14p02o144.mxlogic.net(mxl_mta-8.5.0-1834) over TLS secured channel with ESMTP id 79d6ea95.0.301868.00-385.629191.s14p02o144.mxlogic.net (envelope-from ); Tue, 05 Sep 2017 03:25:43 -0600 (MDT) X-MXL-Hash: 59ae6d975f516eee-50fcf25ae7fb29185cf26ee88a7b24ed99bbfeb2 Original-Received: from alml002.ouadm.okayama-u.ac.jp (unknown [42.127.236.168]) by mlsec.cc.okayama-u.ac.jp with smtp id 5aa4_f927_52a8042c_757e_4396_9f71_730c32b6b349; Tue, 05 Sep 2017 18:25:39 +0900 Original-Received: from localhost (vesta.misasa.okayama-u.ac.jp [150.46.48.154]) by alml002.ouadm.okayama-u.ac.jp (Postfix) with ESMTPSA id 033934C0BFB; Tue, 5 Sep 2017 18:25:39 +0900 (JST) In-Reply-To: <87pob5bn1t.fsf@gmail.com> X-Mailer: Mew version 6.7 on Emacs 25.2 / Mule 6.0 (HANACHIRUSATO) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 11 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 4 Rules triggered EDT_SA_AU_PASS=0, EDT_SA_DN_PASS=0, EDT_SA_TS_PASS=0, RV6108=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6108> : inlines <6055> : streams <1761670> : uri <2495264> X-AnalysisOut: [v=2.2 cv=ObLoNlbY c=1 sm=1 tr=0 a=8LLPK8U+aGQ6qN8QlyMYtQ==] X-AnalysisOut: [:117 a=8LLPK8U+aGQ6qN8QlyMYtQ==:17 a=kj9zAlcOel0A:10 a=2JC] X-AnalysisOut: [JgTwv5E4A:10 a=YNNQrFaTQH1LlkTNSwcA:9 a=7Zwj6sZBwVKJAoWSPK] X-AnalysisOut: [xL6X1jA+E=:19 a=CjuIK1q_8ugA:10] X-Spam: [F=0.5000000000; CM=0.500; MH=0.500(2017090504); S=0.478(2015072901)] X-MAIL-FROM: X-SOURCE-IP: [42.127.236.175] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:136598 Archived-At: >> The function `mouse-exchange-point-and-mark-secondary' exchanges `mark >> and point' and secondary. When there is neither primary nor >> secondary, it behaves as `exchange-point-and-mark'. By doing this, no >> revision is necessary for functions that react to region. > > This description seems to contradict the docstring: >> >> +(defun mouse-exchange-point-and-mark-secondary (&optional arg) >> + "Exchange the point and the mark, and the secondary selection. >> +When the mark is active, this exchanges the point and the mark >> +then creates the secondary selection from the primary selection. >> +When the mark is not active but the secondary selection exists, >> +this restores the primary selection from the secondary selection." > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > Could you explain in more detail how this functions? The behaviour > seems useful, but I don't understand exactly what it does just from > the docstring. The function exchanges point and mark. When there is region, this also creates secondary. When there is secondary, this converts secondary to primary in advance. As a consequence, an user sees the function exchanges - `point' and `mark' - `point and mark' (= primary) and secondary at the same time.