From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 15 03:04:10 2014 Received: (at submit) by debbugs.gnu.org; 15 Nov 2014 08:04:10 +0000 Received: from localhost ([127.0.0.1]:33177 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XpYL4-0005XZ-2u for submit@debbugs.gnu.org; Sat, 15 Nov 2014 03:04:10 -0500 Received: from eggs.gnu.org ([208.118.235.92]:59744) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XpXTW-0003By-4C for submit@debbugs.gnu.org; Sat, 15 Nov 2014 02:08:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XpXTL-0000nq-Nd for submit@debbugs.gnu.org; Sat, 15 Nov 2014 02:08:49 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: * X-Spam-Status: No, score=1.4 required=5.0 tests=BAYES_50,INVALID_MSGID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:49083) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XpXTL-0000ng-KG for submit@debbugs.gnu.org; Sat, 15 Nov 2014 02:08:39 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33142) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XpXTB-0001yH-4b for bug-gnu-emacs@gnu.org; Sat, 15 Nov 2014 02:08:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XpXT1-0000h3-0G for bug-gnu-emacs@gnu.org; Sat, 15 Nov 2014 02:08:29 -0500 Received: from relay3-d.mail.gandi.net ([2001:4b98:c:538::195]:58263) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XpXT0-0000gv-Pp for bug-gnu-emacs@gnu.org; Sat, 15 Nov 2014 02:08:18 -0500 Received: from mfilter36-d.gandi.net (mfilter36-d.gandi.net [217.70.178.167]) by relay3-d.mail.gandi.net (Postfix) with ESMTP id 6B2EFA80C4 for ; Sat, 15 Nov 2014 08:08:18 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mfilter36-d.gandi.net Received: from relay3-d.mail.gandi.net ([217.70.183.195]) by mfilter36-d.gandi.net (mfilter36-d.gandi.net [10.0.15.180]) (amavisd-new, port 10024) with ESMTP id Nes9sK0fbs8e for ; Sat, 15 Nov 2014 08:08:17 +0100 (CET) X-Originating-IP: 73.169.42.166 Received: from localhost (c-73-169-42-166.hsd1.co.comcast.net [73.169.42.166]) (Authenticated sender: kelly@prtime.org) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id A6383A80BE for ; Sat, 15 Nov 2014 08:08:15 +0100 (CET) From: Kelly Dean To: bug-gnu-emacs@gnu.org Subject: [PATCH] Desktop restore fails to run mark activation hooks when it should Date: Sat, 15 Nov 2014 06:56:28 +0000 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -3.8 (---) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sat, 15 Nov 2014 03:04:08 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.8 (---) --=-=-= Content-Type: text/plain Delete your .emacs.desktop, and put in init.el: (desktop-save-mode 1) (add-hook 'deactivate-mark-hook (lambda () (setq cursor-type t))) (add-hook 'activate-mark-hook (lambda () (setq cursor-type 'bar))) Start Emacs 24.4, open a file, press C-SPC, then exit Emacs and save the desktop, then restart Emacs. Notice that the cursor type is now a block, not a bar. It should be a bar. This bug wasn't in 24.3, and is the opposite of bug 14430. The fix for this new bug is the same patch that I already sent on May 20, 2013 for that bug (my patch fixed that bug without introducing this new bug). That patch wasn't accepted, and instead this new bug and a FIXME comment were introduced into desktop.el for 24.4. This new bug could be fixed without applying that patch by instead applying second-restoremarkbug.bad-patch that's attached to this message (conditionally calling activate-mark as the new FIXME proposes), but that's a hack that invites future bugs when somebody modifies set-mark and forgets to correspondingly modify the code in desktop-create-buffer that duplicates the functionality of set-mark. The right fix is to not duplicate the functionality of set-mark, and instead just call set-mark and tell it whether to call activate-mark, as my original patch did. I've been asked to not send any more patches to apply to Emacs, but this new patch is just to point out what NOT to apply, so I trust it's ok to send it. Of course, nobody besides me cares about this bug, but its existence serves as a convenient excuse for me to ask Stefan to please add the dont-activate option to set-mark so I don't have to maintain it anymore in my personal patches. ;-) --=-=-= Content-Type: application/octet-stream Content-Disposition: attachment; filename=second-restoremarkbug.bad-patch Content-Transfer-Encoding: base64 RG9uJ3QgYXBwbHkgdGhpcyBwYXRjaCEgSXQncyB0aGUgd3JvbmcgZml4IGZvciB0aGUgYnVnLgoK LS0tIGVtYWNzLTI0LjQvbGlzcC9kZXNrdG9wLmVsCisrKyBlbWFjcy0yNC40L2xpc3AvZGVza3Rv cC5lbApAQCAtMTQxMyw4ICsxNDEzLDcgQEAKICAgICAgICAgICAgIChpZiAoY29uc3AgZGVza3Rv cC1idWZmZXItbWFyaykKICAgICAgICAgICAgICAgICAocHJvZ24KICAgICAgICAgICAgICAgICAg IChtb3ZlLW1hcmtlciAobWFyay1tYXJrZXIpIChjYXIgZGVza3RvcC1idWZmZXItbWFyaykpCi0g ICAgICAgICAgICAgICAgICA7OyBGSVhNRTogU2hvdWxkIHdlIGNhbGwgKGRlKWFjdGl2YXRlLW1h cmsgaW5zdGVhZD8KLSAgICAgICAgICAgICAgICAgIChzZXRxIG1hcmstYWN0aXZlIChjYXIgKGNk ciBkZXNrdG9wLWJ1ZmZlci1tYXJrKSkpKQorICAgICAgICAgICAgICAgICAgKGlmIChjYXIgKGNk ciBkZXNrdG9wLWJ1ZmZlci1tYXJrKSkgKGFjdGl2YXRlLW1hcmsgJ25vLXRtbSkpKQogICAgICAg ICAgICAgICAobW92ZS1tYXJrZXIgKG1hcmstbWFya2VyKSBkZXNrdG9wLWJ1ZmZlci1tYXJrKSkp CiAJICA7OyBOZXZlciBvdmVycmlkZSBmaWxlIHN5c3RlbSBpZiB0aGUgZmlsZSByZWFsbHkgaXMg cmVhZC1vbmx5IG1hcmtlZC4KIAkgICh3aGVuIGRlc2t0b3AtYnVmZmVyLXJlYWQtb25seSAoc2V0 cSBidWZmZXItcmVhZC1vbmx5IGRlc2t0b3AtYnVmZmVyLXJlYWQtb25seSkpCg== --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 21 13:02:58 2014 Received: (at 19058-done) by debbugs.gnu.org; 21 Nov 2014 18:02:58 +0000 Received: from localhost ([127.0.0.1]:41158 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XrsXp-0002jw-Jo for submit@debbugs.gnu.org; Fri, 21 Nov 2014 13:02:57 -0500 Received: from pruche.dit.umontreal.ca ([132.204.246.22]:40673) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XrsXn-0002jj-42 for 19058-done@debbugs.gnu.org; Fri, 21 Nov 2014 13:02:55 -0500 Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id sALI2r64027991; Fri, 21 Nov 2014 13:02:54 -0500 Received: by pastel.home (Postfix, from userid 20848) id 9C75343B8; Fri, 21 Nov 2014 13:02:53 -0500 (EST) From: Stefan Monnier To: Kelly Dean Subject: Re: bug#19058: [PATCH] Desktop restore fails to run mark activation hooks when it should Message-ID: References: Date: Fri, 21 Nov 2014 13:02:53 -0500 In-Reply-To: (Kelly Dean's message of "Sat, 15 Nov 2014 06:56:28 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV5132=0 X-NAI-Spam-Version: 2.3.0.9393 : core <5132> : inlines <1553> : streams <1346322> : uri <1835585> X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: 19058-done Cc: 19058-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.3 (-) > Of course, nobody besides me cares about this bug, but its existence serves > as a convenient excuse for me to ask Stefan to please add the dont-activate > option to set-mark so I don't have to maintain it anymore in my personal > patches. ;-) But if you call set-mark and a non-nil dont-activate argument, you get the same as (move-marker (mark-marker) ), so this arg only makes sense in the case where you dynamically want to choose whether to activate the mark or not, which is very rare. So I installed a patch that just calls activate-mark. Stefan From unknown Mon Jun 23 18:34:08 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 20 Dec 2014 12:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator