From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ken Olum Newsgroups: gmane.emacs.bugs Subject: bug#59108: 28.2; rmail-get-new-mail sets unmodified if no new mail even if buffer modified before Date: Mon, 07 Nov 2022 11:20:20 -0500 Message-ID: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30508"; mail-complaints-to="usenet@ciao.gmane.io" To: 59108@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Nov 07 17:21:24 2022 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 1os4sG-0007d6-Rn for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 07 Nov 2022 17:21:24 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1os4s3-0001jz-6u; Mon, 07 Nov 2022 11:21:11 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1os4rv-0001gY-OC for bug-gnu-emacs@gnu.org; Mon, 07 Nov 2022 11:21:05 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1os4rv-0006LW-E8 for bug-gnu-emacs@gnu.org; Mon, 07 Nov 2022 11:21:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1os4rt-0006x4-QK for bug-gnu-emacs@gnu.org; Mon, 07 Nov 2022 11:21:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Ken Olum Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 07 Nov 2022 16:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 59108 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.166783803526661 (code B ref -1); Mon, 07 Nov 2022 16:21:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 7 Nov 2022 16:20:35 +0000 Original-Received: from localhost ([127.0.0.1]:35180 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1os4rS-0006vw-HA for submit@debbugs.gnu.org; Mon, 07 Nov 2022 11:20:34 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:50984) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1os4rQ-0006vo-66 for submit@debbugs.gnu.org; Mon, 07 Nov 2022 11:20:32 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1os4rQ-0001C1-0c for bug-gnu-emacs@gnu.org; Mon, 07 Nov 2022 11:20:32 -0500 Original-Received: from cosmos.phy.tufts.edu ([130.64.84.253]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1os4rM-0006BL-Lx for bug-gnu-emacs@gnu.org; Mon, 07 Nov 2022 11:20:31 -0500 Original-Received: from kdo by cosmos.phy.tufts.edu ([local]:local) with local id 1os4rE-0006ds-1R - Using Exim-4.96 (MandrivaLinux) MTA (return-path ); Mon, 07 Nov 2022 11:20:20 -0500 Received-SPF: none client-ip=130.64.84.253; envelope-from=kdo@cosmos.phy.tufts.edu; helo=cosmos.phy.tufts.edu X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:247287 Archived-At: rmail-get-new-mail-1 sets buffer-modified-p at the beginning to deal with locking issues right away. Then if there is no new mail it clears buffer-modified-p. Thus if the buffer was modified already it gets marked unmodified without being saved. I think it should restore buffer-modified-p to whatever it was to begin with when it doesn't find any new mail. I'll send a patch if you like. To reproduce: emacs -Q M-x rmail Delete a message or make some other change. Buffer now marked modified. Without having any new mail, press "g". Get message "0 new messages read". Buffer now marked unmodified. Ken In GNU Emacs 28.2 (build 1, x86_64-pc-linux-gnu, X toolkit, Xaw scroll bars) of 2022-11-07 built on cosmos Windowing system distributor 'The X.Org Foundation', version 11.0.11906000 System Description: Ubuntu 18.04.6 LTS Configured features: FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG LIBXML2 MODULES NOTIFY INOTIFY PDUMPER PNG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XFT XIM XPM LUCID ZLIB Important settings: value of $LC_ALL: C value of $LANG: en_US.UTF-8 locale-coding-system: nil Major mode: RMAIL Minor modes in effect: tooltip-mode: t global-eldoc-mode: t show-paren-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 buffer-read-only: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug sendmail shr-color color shr kinsoku svg xml dom browse-url url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util url-parse url-vars mailcap rmailmm message rmc puny dired dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068 epg-config gnus-util text-property-search time-date mm-decode mm-bodies mm-encode mailabbrev gmm-utils mailheader mail-parse rfc2231 rmail rmail-loaddefs auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs cl-loaddefs cl-lib password-cache json subr-x map seq byte-opt gv bytecomp byte-compile cconv rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode 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 lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax 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 emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads inotify dynamic-setting system-font-setting font-render-setting x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 61191 13369) (symbols 48 7588 1) (strings 32 23283 2385) (string-bytes 1 722945) (vectors 16 14763) (vector-slots 8 204330 17922) (floats 8 135 324) (intervals 56 334 0) (buffers 992 12))