From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 11 06:00:02 2021 Received: (at submit) by debbugs.gnu.org; 11 Aug 2021 10:00:02 +0000 Received: from localhost ([127.0.0.1]:33473 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mDl1l-0006pG-GV for submit@debbugs.gnu.org; Wed, 11 Aug 2021 06:00:02 -0400 Received: from lists.gnu.org ([209.51.188.17]:36090) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mDl1j-0006or-FO for submit@debbugs.gnu.org; Wed, 11 Aug 2021 05:59:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53210) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mDl1i-0001YC-RD for bug-gnu-emacs@gnu.org; Wed, 11 Aug 2021 05:59:59 -0400 Received: from server.a16n.net ([178.33.238.77]:41184) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mDl1g-0003q4-Ky for bug-gnu-emacs@gnu.org; Wed, 11 Aug 2021 05:59:58 -0400 Received: from ws.localdomain (arennes-662-1-84-172.w2-14.abo.wanadoo.fr [2.14.50.172]) by server.a16n.net (Postfix) with ESMTPSA id CA68F43E09B8 for ; Wed, 11 Aug 2021 11:59:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=a16n.net; s=a16n; t=1628675993; bh=zAVjR0/Xz/9yglGXK+ra8fi4QnB5zHmClEs7dS3BNL8=; h=From:To:Subject:Date; b=AhEz+nMhUHHD7pquzzRemc1278ZUVek/Sl1zP9xqwlz7Oz9EHaqrujC5fR8c8GRmi DC9VuycdsSa7VI/94060NihaekXMpf8VrKlYQWh5OgIWcF0N7RnqQlN38kpdB+9bHV /xKzzBUq+D6LmdQrincqFpKYnInjLLEDa1M5rGbSe1qHjP8OCs+OFCmirOQH8zO5D9 tLJr24FkD89v8xNggNJaY9bJoAUVwcHlkWPup1PS/rjJ+keRvitDBQbF7KjVJZ0nW4 HEGF+F5noWDO1IX3F2Aq/7WUh4vYJTR5Bqqd05vqiSOvxf61r3kS7zaafoFS1r+889 JD318ZXjnBl1w== Received: by ws.localdomain (Postfix, from userid 1000) id 167D474235E; Wed, 11 Aug 2021 11:59:53 +0200 (CEST) From: =?utf-8?Q?Peter_M=C3=BCnster?= To: bug-gnu-emacs@gnu.org Subject: 27.2; save-mark-and-excursion does not save mark-active Date: Wed, 11 Aug 2021 11:59:53 +0200 Message-ID: <87bl64l2sm.fsf@a16n.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=178.33.238.77; envelope-from=pm@a16n.net; helo=server.a16n.net X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -2.3 (--) Hi, It seems, that save-mark-and-excursion does not restore the mark state. Here is a test function: (defun my-test-func () "Test if save-mark-and-excursion is working." (interactive) (with-current-buffer "test-buf" (save-mark-and-excursion (goto-char (point-min)) (add-face-text-property (point) (1+ (point)) (list :background "orange"))))) Test case: - "emacs -Q" - evaluate my-test-func - open a new buffer "test-buf" - type some characters - mark a region somewhere - M-x my-test-func Result: point is restored, but mark-active is nil. Kind regards, Peter In GNU Emacs 27.2 (build 1, x86_64-suse-linux-gnu, GTK+ Version 3.24.20, cairo version 1.16.0) Windowing system distributor 'The X.Org Foundation', version 11.0.12003000 System Description: openSUSE Leap 15.2 Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Making completion list... Configured using: 'configure --disable-build-details --with-pop --without-hesiod --with-gameuser=:games --with-kerberos --with-kerberos5 --with-file-notification=inotify --with-modules --enable-autodepend --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --localstatedir=/var --sharedstatedir=/var/lib --libexecdir=/usr/lib --enable-locallisppath=/usr/share/emacs/27.2/site-lisp:/usr/share/emacs/site-lisp --with-x --with-xim --with-sound --with-xpm --with-jpeg --with-tiff --with-gif --with-png --with-rsvg --with-dbus --with-xft --without-gpm --with-x-toolkit=gtk3 --with-toolkit-scroll-bars --x-includes=/usr/include --x-libraries=/usr/lib64 --with-libotf --with-m17n-flt --with-cairo --with-xwidgets --build=x86_64-suse-linux --with-dumping=pdumper 'CFLAGS=-fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -g -D_GNU_SOURCE -DGDK_DISABLE_DEPRECATION_WARNINGS -DGLIB_DISABLE_DEPRECATION_WARNINGS -pipe -Wno-pointer-sign -Wno-unused-variable -Wno-unused-label -fno-optimize-sibling-calls -fno-PIE -DSYSTEM_PURESIZE_EXTRA=55000 -DSITELOAD_PURESIZE_EXTRA=10000 -DPDMP_BASE='\''"emacs-gtk"'\''' LDFLAGS=-Wl,-O2' Configured features: XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND DBUS GSETTINGS GLIB NOTIFY INOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS XWIDGETS LIBSYSTEMD JSON PDUMPER LCMS2 GMP Important settings: value of $LC_CTYPE: en_GB.utf8 value of $LC_MESSAGES: en_GB.utf8 value of $LC_NUMERIC: POSIX value of $XMODIFIERS: @im=local locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs format-spec rfc822 mml easymenu mml-sec password-cache epa derived epg epg-config gnus-util rmail rmail-loaddefs text-property-search time-date subr-x seq byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils delsel lpr easy-mmode pcase tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting xwidget-internal cairo move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 44541 7328) (symbols 48 5999 1) (strings 32 15714 1987) (string-bytes 1 506059) (vectors 16 9402) (vector-slots 8 125772 9350) (floats 8 20 43) (intervals 56 279 0) (buffers 1000 13)) -- Peter From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 11 08:20:04 2021 Received: (at 49999) by debbugs.gnu.org; 11 Aug 2021 12:20:04 +0000 Received: from localhost ([127.0.0.1]:33734 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mDnDD-0002bb-Re for submit@debbugs.gnu.org; Wed, 11 Aug 2021 08:20:04 -0400 Received: from quimby.gnus.org ([95.216.78.240]:57686) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mDnD8-0002bE-Cb for 49999@debbugs.gnu.org; Wed, 11 Aug 2021 08:19:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=Z/bnmiZTLtGnJk+lo9S5iV2k0Ep3U2Vfqe6j9IOSVo0=; b=Rpbu2D8ToHFmebMuiiiJZbie8h sx6RQbxREBT/yKdaAovAvlqpri+Ky1mR7FtEa2g84apkjCqC9BawRCXWY1MVG2PAq3b5aqaKfCbf4 fZ1DTDp15CUSw7rEBkrNc3TE21SOULzqhb8c2ygf28LtM+YT5W/+MXghcHajUZRRqJj0=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mDnCy-0007qK-4o; Wed, 11 Aug 2021 14:19:48 +0200 From: Lars Ingebrigtsen To: Peter =?utf-8?Q?M=C3=BCnster?= Subject: Re: bug#49999: 27.2; save-mark-and-excursion does not save mark-active References: <87bl64l2sm.fsf@a16n.net> Date: Wed, 11 Aug 2021 14:19:43 +0200 In-Reply-To: <87bl64l2sm.fsf@a16n.net> ("Peter =?utf-8?Q?M=C3=BCnster=22's?= message of "Wed, 11 Aug 2021 11:59:53 +0200") Message-ID: <87r1f0rx5s.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Peter Münster writes: > It seems, that save-mark-and-excursion does not restore the mark state. > > Here is a test function: > > (defun my-test-func () > "Test if save-mark-and-excursion is working." > (interactive) > (wit [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 49999 Cc: 49999@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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.3 (---) Peter M=C3=BCnster writes: > It seems, that save-mark-and-excursion does not restore the mark state. > > Here is a test function: > > (defun my-test-func () > "Test if save-mark-and-excursion is working." > (interactive) > (with-current-buffer "test-buf" > (save-mark-and-excursion > (goto-char (point-min)) > (add-face-text-property > (point) (1+ (point)) (list :background "orange"))))) > > Test case: > - "emacs -Q" > - evaluate my-test-func > - open a new buffer "test-buf" > - type some characters > - mark a region somewhere > - M-x my-test-func > > Result: point is restored, but mark-active is nil. I can reproduce this, but I'm not quite sure what's going on. I tweaked your function: (defun my-test-func () "Test if save-mark-and-excursion is working." (interactive) (save-mark-and-excursion (goto-char (point-min)) (add-face-text-property (point) (1+ (point)) (list :background "orange"))) (message "%s" mark-active)) This messages t -- but evaling mark-active afterwards shows that it's nil. So something is deactivating the mark after the command has run, apparently? Hm... this sounds vaguely familiar to me... Anybody know what could be going on here? --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 11 08:20:09 2021 Received: (at control) by debbugs.gnu.org; 11 Aug 2021 12:20:09 +0000 Received: from localhost ([127.0.0.1]:33738 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mDnDM-0002cV-BU for submit@debbugs.gnu.org; Wed, 11 Aug 2021 08:20:09 -0400 Received: from quimby.gnus.org ([95.216.78.240]:57700) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mDnDH-0002bT-9A for control@debbugs.gnu.org; Wed, 11 Aug 2021 08:20:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=WTX0vPwyaVgJe2rDz3DghvfGYa5xk+2E/PzZy23zzmw=; b=H9qVcDyWRmtT2mneI5C8rsUXbm iKM5l5/VrO7kuvLtJPDZMfNW9wDY7S2jdKt5z08lnslRI1aI/6TSINe8Cuaebk91sRTLSSE7EnC0K K9rXCraMGVIBHWHBtt0/Ur+JNa4UF1mg6mJBopHgQY6GX+wLK8OrxChJatRAe8mWhqug=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mDnD9-0007qc-A6 for control@debbugs.gnu.org; Wed, 11 Aug 2021 14:19:57 +0200 Date: Wed, 11 Aug 2021 14:19:53 +0200 Message-Id: <87pmukrx5i.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #49999 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 49999 + confirmed quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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.3 (---) tags 49999 + confirmed quit From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 11 11:47:13 2021 Received: (at 49999) by debbugs.gnu.org; 11 Aug 2021 15:47:13 +0000 Received: from localhost ([127.0.0.1]:36345 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mDqRk-0002oJ-Ph for submit@debbugs.gnu.org; Wed, 11 Aug 2021 11:47:13 -0400 Received: from quimby.gnus.org ([95.216.78.240]:59426) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mDqRj-0002o4-8G for 49999@debbugs.gnu.org; Wed, 11 Aug 2021 11:47:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=A2vU1BI4IqW0aDHMCh1d3PV3m7VnADFuPzibxMOn/jY=; b=nSGwTuQgk52YCgJcsFj/B0OiT1 ib/sHSyumhzrHlgMCRDDUZz4YBhwkD2mmIB5RouoSor52PUTOt4Q/yBic3XGy4SuLAx2OiR0Z5d8v WUAB+/rvuufYwJ9+uOFML9r7JRj5pBwac3K9bMv8fjboTdj8DtrJA91I701ZESj7IqOU=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mDqRY-0001KM-7L; Wed, 11 Aug 2021 17:47:04 +0200 From: Lars Ingebrigtsen To: Peter =?utf-8?Q?M=C3=BCnster?= Subject: Re: bug#49999: 27.2; save-mark-and-excursion does not save mark-active References: <87bl64l2sm.fsf@a16n.net> <87r1f0rx5s.fsf@gnus.org> Date: Wed, 11 Aug 2021 17:46:57 +0200 In-Reply-To: <87r1f0rx5s.fsf@gnus.org> (Lars Ingebrigtsen's message of "Wed, 11 Aug 2021 14:19:43 +0200") Message-ID: <87y298oufi.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Lars Ingebrigtsen writes: > I can reproduce this, but I'm not quite sure what's going on. I tweaked > your function: > > (defun my-test-func () > "Test if save-mark-and-excursion is working." > (interactive) > (save-mark-and-e [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 49999 Cc: 49999@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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.3 (---) Lars Ingebrigtsen writes: > I can reproduce this, but I'm not quite sure what's going on. I tweaked > your function: > > (defun my-test-func () > "Test if save-mark-and-excursion is working." > (interactive) > (save-mark-and-excursion > (goto-char (point-min)) > (add-face-text-property > (point) (1+ (point)) (list :background "orange"))) > (message "%s" mark-active)) > > This messages t -- but evaling mark-active afterwards shows that it's > nil. So something is deactivating the mark after the command has run, > apparently? Hm... this sounds vaguely familiar to me... Anybody know > what could be going on here? Oh, right -- it's transient mark mode that does this stuff? That is, if you run a command that inserts something in the buffer, then it'll switch the region off? So `save-mark-and-excursion' works exactly as it should. But if you don't want transient-mark-mode to switch itself off, you have to say something like: (defun my-test-func () "Test if save-mark-and-excursion is working." (interactive) (save-mark-and-excursion (goto-char (point-min)) (with-silent-modifications (add-face-text-property (point) (1+ (point)) (list :background "orange"))))) -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 13 05:19:36 2021 Received: (at 49999) by debbugs.gnu.org; 13 Aug 2021 09:19:36 +0000 Received: from localhost ([127.0.0.1]:40498 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mETLg-00050c-IA for submit@debbugs.gnu.org; Fri, 13 Aug 2021 05:19:36 -0400 Received: from server.a16n.net ([178.33.238.77]:42088) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mETLb-00050H-J5 for 49999@debbugs.gnu.org; Fri, 13 Aug 2021 05:19:31 -0400 Received: from ws.localdomain (lfbn-ren-1-1338-34.w86-229.abo.wanadoo.fr [86.229.185.34]) by server.a16n.net (Postfix) with ESMTPSA id D81C543E04CA; Fri, 13 Aug 2021 11:19:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=a16n.net; s=a16n; t=1628846360; bh=OQPas2Ael+b1Hu5/TdzakAVgYPDhj1OrJaYTXwQU/7Y=; h=From:To:Cc:Subject:References:Date; b=lKJaLLnn//vU/GxrsQjbdXgzF2+xE1xlwqgBC2DJBZDL12rUFFgSnHCDs+Pp1NOKI IxwEKB6WvUPbAhZBIkaNjc9ED/8FV1Ypoz1taGtJBzhUsxrNTk31if74PLkJM5K5gC jCOAiGE3tJRXAJWWl9NeBi30NF4+J0s5tQ3GPIVYqqozT6WuMCEmQSvMDlWFogTIql 9ffHRvY51fF1bn7FJ5grtKs7YGV2AxqQvv0Sxo8l0K/b9wZKeY+ynyZCkI57VnlCX7 A2Xf6ESGm3fuzaGY8OGz+D+XfoPcaxjyLF2KJwH7/u/u48IbTM+1iUMactg+qMFl0w gWvFF48zgTrVg== Received: by ws.localdomain (Postfix, from userid 1000) id 3C6547406D1; Fri, 13 Aug 2021 11:19:20 +0200 (CEST) From: =?utf-8?Q?Peter_M=C3=BCnster?= To: Lars Ingebrigtsen Subject: Re: bug#49999: 27.2; save-mark-and-excursion does not save mark-active References: <87bl64l2sm.fsf@a16n.net> <87r1f0rx5s.fsf@gnus.org> <87y298oufi.fsf@gnus.org> Date: Fri, 13 Aug 2021 11:19:20 +0200 Message-ID: <875yw9aehz.fsf@a16n.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 49999 Cc: 49999@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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.0 (-) --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Wed, Aug 11 2021, Lars Ingebrigtsen wrote: > So `save-mark-and-excursion' works exactly as it should. But if you > don't want transient-mark-mode to switch itself off, you have to say > something like: Thanks for your explanation. Please find attached a patch, that uses your solution. =2D-=20 Peter --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Minor-enhancements-for-image-dired.el.patch Content-Transfer-Encoding: quoted-printable From=208e0d6c4e787ecb56ef8eede83ea5c5d8ed0db5e1 Mon Sep 17 00:00:00 2001 From: =3D?UTF-8?q?Peter=3D20M=3DC3=3DBCnster?=3D Date: Fri, 13 Aug 2021 11:13:43 +0200 Subject: [PATCH] Minor enhancements for image-dired.el * lisp/image-dired.el (image-dired-thumb-visible-marks): Add the group. (image-dired-thumb-update-marks): Keep the mark state when changing faces. =2D-- lisp/image-dired.el | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/lisp/image-dired.el b/lisp/image-dired.el index 76c7ae91f0..34bf1d02a9 100644 =2D-- a/lisp/image-dired.el +++ b/lisp/image-dired.el @@ -465,6 +465,7 @@ This is where you see the cursor." If non-nil, apply the `image-dired-thumb-mark' face to marked images." :type 'boolean + :group 'image-dired :version "28.1") =20 (defface image-dired-thumb-mark @@ -2360,20 +2361,18 @@ non-nil." =20 (defun image-dired-thumb-update-marks () "Update the marks in the thumbnail buffer." =2D ;; TODO: only called by image-dired-mouse-toggle-mark but there are =2D ;; certainly other places, where it should be called too. (when image-dired-thumb-visible-marks (with-current-buffer image-dired-thumbnail-buffer =2D (save-excursion + (save-mark-and-excursion (goto-char (point-min)) (let ((inhibit-read-only t)) (while (not (eobp)) =2D (if (image-dired-thumb-file-marked-p) =2D (add-face-text-property =2D (point) (1+ (point)) =2D 'image-dired-thumb-mark) =2D (remove-text-properties (point) (1+ (point)) =2D '(face image-dired-thumb-mark))) + (with-silent-modifications + (if (image-dired-thumb-file-marked-p) + (add-face-text-property (point) (1+ (point)) + 'image-dired-thumb-mark) + (remove-text-properties (point) (1+ (point)) + '(face image-dired-thumb-mark)))) (forward-char))))))) =20 (defun image-dired-mouse-toggle-mark-1 () =2D-=20 2.26.2 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iGoEARECACoWIQS/5hHRBUjla4uZVXU6jitvQ7HLaAUCYRY5GAwccG1AYTE2bi5u ZXQACgkQOo4rb0Oxy2hO9QCfTKhiUibjYTzMUDNZhEEZ6+oPTAoAn14eVp/GCS99 XBQR7OcZBD6XchCU =NQt2 -----END PGP SIGNATURE----- --==-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 13 06:30:29 2021 Received: (at 49999) by debbugs.gnu.org; 13 Aug 2021 10:30:29 +0000 Received: from localhost ([127.0.0.1]:40532 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mEUSG-00070y-Sx for submit@debbugs.gnu.org; Fri, 13 Aug 2021 06:30:29 -0400 Received: from quimby.gnus.org ([95.216.78.240]:49692) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mEUSA-00070T-OK for 49999@debbugs.gnu.org; Fri, 13 Aug 2021 06:30:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=MGVmVXA3ky5IqI9kjdwmZ2d0PioqsKHxZwTGL+E6Gno=; b=gwjUgjxx1jBrk/OFSR1GAKSmIo KCmVM2u/xGAMbhAC1sN+Nr9cYCtGQ330R2faYyiwW1y1w3jTv05hdnpeJHDkFhl3kEM5fDOzIF+T8 bx5hilZ/gupBbSiFL5qDeszs1jHUQbBQ/ZLqcbwz9du2Kl9LAFCDMjVhVvTMmJO0n8u0=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mEURz-0002Ml-O7; Fri, 13 Aug 2021 12:30:12 +0200 From: Lars Ingebrigtsen To: Peter =?utf-8?Q?M=C3=BCnster?= Subject: Re: bug#49999: 27.2; save-mark-and-excursion does not save mark-active References: <87bl64l2sm.fsf@a16n.net> <87r1f0rx5s.fsf@gnus.org> <87y298oufi.fsf@gnus.org> <875yw9aehz.fsf@a16n.net> Date: Fri, 13 Aug 2021 12:30:02 +0200 In-Reply-To: <875yw9aehz.fsf@a16n.net> ("Peter =?utf-8?Q?M=C3=BCnster=22's?= message of "Fri, 13 Aug 2021 11:19:20 +0200") Message-ID: <87eeaxhc2d.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Peter Münster writes: > Thanks for your explanation. Please find attached a patch, that uses > your solution. Thanks; applied with one change: Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 49999 Cc: 49999@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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.3 (---) Peter M=C3=BCnster writes: > Thanks for your explanation. Please find attached a patch, that uses > your solution. Thanks; applied with one change: > + :group 'image-dired We don't normally add :group to defcustoms these days -- the `defgroup' at the start of the file says what group they belong in. (I've now removed all the :group things from the defcustoms in the file.) --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 13 06:30:36 2021 Received: (at control) by debbugs.gnu.org; 13 Aug 2021 10:30:36 +0000 Received: from localhost ([127.0.0.1]:40535 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mEUSO-00071M-EQ for submit@debbugs.gnu.org; Fri, 13 Aug 2021 06:30:36 -0400 Received: from quimby.gnus.org ([95.216.78.240]:49706) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mEUSI-00070n-Qi for control@debbugs.gnu.org; Fri, 13 Aug 2021 06:30:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=X4sCSauUuK2aEdLnz9HGRBWY4iqppVovfOzT5ubS8J8=; b=lIrPj0DRbIjwMLn7L0JYFTrxPw Al3Blgo70ILtiZ7gFf2SPIgBcFyW/UhtDVGPkvSJ8g0bbjZzFTarbvztjvvHp1cC697YUpmaOxmom YCsztJv5ggZzzb2lXJs4a4dhp2E0rmjc9A0q4F9oBIwaYuL7jq8i7Kz0irHVty5KLhFQ=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mEUSA-0002N6-VE for control@debbugs.gnu.org; Fri, 13 Aug 2021 12:30:21 +0200 Date: Fri, 13 Aug 2021 12:30:18 +0200 Message-Id: <87czqhhc1x.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #49999 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 49999 28.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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.3 (---) close 49999 28.1 quit From unknown Sun Jun 22 11:33:06 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 10 Sep 2021 11:24:08 +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