From unknown Fri Aug 15 14:15:47 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#61002 <61002@debbugs.gnu.org> To: bug#61002 <61002@debbugs.gnu.org> Subject: Status: 28.2; Gnus - "Date" scoring scores all articles. Reply-To: bug#61002 <61002@debbugs.gnu.org> Date: Fri, 15 Aug 2025 21:15:47 +0000 retitle 61002 28.2; Gnus - "Date" scoring scores all articles. reassign 61002 emacs submitter 61002 Kamil Jo=C5=84ca severity 61002 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 22 03:30:41 2023 Received: (at submit) by debbugs.gnu.org; 22 Jan 2023 08:30:41 +0000 Received: from localhost ([127.0.0.1]:50585 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pJVkO-00045f-G8 for submit@debbugs.gnu.org; Sun, 22 Jan 2023 03:30:41 -0500 Received: from lists.gnu.org ([209.51.188.17]:42562) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pJVkM-00045W-Fd for submit@debbugs.gnu.org; Sun, 22 Jan 2023 03:30:39 -0500 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 1pJVkM-0004iI-6I for bug-gnu-emacs@gnu.org; Sun, 22 Jan 2023 03:30:38 -0500 Received: from smtpa40.poczta.onet.pl ([213.180.142.40]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pJVkJ-0006IP-B0 for bug-gnu-emacs@gnu.org; Sun, 22 Jan 2023 03:30:37 -0500 Received: from alfa.kjonca (178235054008.warszawa.vectranet.pl [178.235.54.8]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: kjonca@poczta.onet.pl) by smtp.poczta.onet.pl (Onet) with ESMTPSA id 4P05ym4SvHzlg9j8 for ; Sun, 22 Jan 2023 09:30:22 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=poczta.onet.pl; s=2011; t=1674376224; bh=yc7TmtBj9PlcWHBxVBFML4wA6ay6GstQnOdgCTMgYQA=; h=From:To:Subject:Date:From; b=KyE7jhGQ2I3ofRuxOcfGftku7mJzV6y9HrdPrMmPutVDnA1S5OrAZ8dMeS1Was8HN N/i3zztGyx3YLBdrNtG6Q+oIdToecpp8zp5GrHfJOwQX6xfJ0iNNY9MR2Ii37v3DCP yCuZtsF/vnlisVrnfX4y8HFQrCqzrb0MARyIVR2M= Received: by alfa.kjonca (Postfix, from userid 1000) id 4P05yg5dhQzlVvd; Sun, 22 Jan 2023 09:30:19 +0100 (CET) From: =?iso-8859-2?Q?Kamil_Jo=F1ca?= To: bug-gnu-emacs@gnu.org Subject: 28.2; Gnus - "Date" scoring scores all articles. Date: Sun, 22 Jan 2023 09:30:17 +0100 Message-ID: <878rhvhsyu.fsf@alfa.kjonca> MIME-Version: 1.0 Content-Type: text/plain X-ONET_PL-MDA-SEGREGATION: 0 Received-SPF: pass client-ip=213.180.142.40; envelope-from=kjonca@poczta.onet.pl; helo=smtpa40.poczta.onet.pl X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) 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.4 (--) (I do not know if emacs list is the best one. If gnus have dedicated list please tell me) I have to resubscribe some of my groups. As I know that most of articles I have read already, I wanted to score them lower before first of January. But it seems that always all articles are marked as scored: key sequence C-u 1 L d b t Tue, 16 Jul 2019 09:20:31 +0000 (UTC) All articles are marked as scored. I would expect that only these before 16 jul 2019 will be marked. In GNU Emacs 28.2 (build 2, x86_64-pc-linux-gnu, X toolkit, cairo version 1.16.0, Xaw3d scroll bars) of 2022-12-20, modified by Debian built on x86-csail-01 Windowing system distributor 'The X.Org Foundation', version 11.0.12101005 System Description: Debian GNU/Linux bookworm/sid Configured using: 'configure --build x86_64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib --libexecdir=/usr/libexec --localstatedir=/var/lib --infodir=/usr/share/info --mandir=/usr/share/man --with-libsystemd --with-pop=yes --enable-locallisppath=/etc/emacs:/usr/local/share/emacs/28.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/28.2/site-lisp:/usr/share/emacs/site-lisp --with-sound=alsa --without-gconf --with-mailutils --with-native-compilation --build x86_64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib --libexecdir=/usr/libexec --localstatedir=/var/lib --infodir=/usr/share/info --mandir=/usr/share/man --with-libsystemd --with-pop=yes --enable-locallisppath=/etc/emacs:/usr/local/share/emacs/28.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/28.2/site-lisp:/usr/share/emacs/site-lisp --with-sound=alsa --without-gconf --with-mailutils --with-native-compilation --with-x=yes --with-x-toolkit=lucid --with-toolkit-scroll-bars --without-gsettings 'CFLAGS=-g -O2 -ffile-prefix-map=/build/emacs-OltuXQ/emacs-28.2+1=. -fstack-protector-strong -Wformat -Werror=format-security -Wall' 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2' LDFLAGS=-Wl,-z,relro' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM HARFBUZZ JPEG JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XAW3D XDBE XIM XPM LUCID ZLIB Important settings: value of $LC_MESSAGES: en_GB.utf8 value of $LC_TIME: C value of $LANG: pl_PL.UTF-8 locale-coding-system: utf-8-unix Major mode: Group Minor modes in effect: gnus-topic-mode: t shell-dirtrack-mode: t gnus-undo-mode: t desktop-save-mode: t tooltip-mode: t global-eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-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 column-number-mode: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t Load-path shadows: /usr/share/emacs/site-lisp/elpa/fsm-0.2.1/fsm hides /usr/share/emacs/site-lisp/elpa/jabber-0.8.9999snapshot1569/fsm /usr/share/emacs/site-lisp/elpa/jabber-0.8.9999snapshot1569/srv hides /usr/share/emacs/site-lisp/elpa/srv-0.2/srv /usr/share/emacs/site-lisp/elpa/fsm-0.2.1/fsm-pkg hides /usr/share/emacs/site-lisp/elpa-src/fsm-0.2.1/fsm-pkg /usr/share/emacs/site-lisp/elpa/fsm-0.2.1/fsm-autoloads hides /usr/share/emacs/site-lisp/elpa-src/fsm-0.2.1/fsm-autoloads /usr/share/emacs/site-lisp/elpa/fsm-0.2.1/fsm hides /usr/share/emacs/site-lisp/elpa-src/fsm-0.2.1/fsm /usr/share/emacs/site-lisp/elpa/jabber-0.8.9999snapshot1569/jabber-wmii hides /usr/share/emacs/site-lisp/elpa-src/jabber-0.8.9999snapshot1569/jabber-wmii /usr/share/emacs/site-lisp/elpa/jabber-0.8.9999snapshot1569/srv hides /usr/share/emacs/site-lisp/elpa-src/jabber-0.8.9999snapshot1569/srv /usr/share/emacs/site-lisp/elpa/jabber-0.8.9999snapshot1569/jabber-festival hides /usr/share/emacs/site-lisp/elpa-src/jabber-0.8.9999snapshot1569/jabber-festival /usr/share/emacs/site-lisp/elpa/jabber-0.8.9999snapshot1569/jabber-screen hides /usr/share/emacs/site-lisp/elpa-src/jabber-0.8.9999snapshot1569/jabber-screen /usr/share/emacs/site-lisp/elpa/jabber-0.8.9999snapshot1569/jabber hides /usr/share/emacs/site-lisp/elpa-src/jabber-0.8.9999snapshot1569/jabber /usr/share/emacs/site-lisp/elpa/jabber-0.8.9999snapshot1569/jabber-ratpoison hides /usr/share/emacs/site-lisp/elpa-src/jabber-0.8.9999snapshot1569/jabber-ratpoison /usr/share/emacs/site-lisp/elpa/jabber-0.8.9999snapshot1569/jabber-gmail hides /usr/share/emacs/site-lisp/elpa-src/jabber-0.8.9999snapshot1569/jabber-gmail /usr/share/emacs/site-lisp/elpa/jabber-0.8.9999snapshot1569/jabber-autoloads hides /usr/share/emacs/site-lisp/elpa-src/jabber-0.8.9999snapshot1569/jabber-autoloads /usr/share/emacs/site-lisp/elpa/jabber-0.8.9999snapshot1569/jabber-httpupload hides /usr/share/emacs/site-lisp/elpa-src/jabber-0.8.9999snapshot1569/jabber-httpupload /usr/share/emacs/site-lisp/elpa/jabber-0.8.9999snapshot1569/jabber-libnotify hides /usr/share/emacs/site-lisp/elpa-src/jabber-0.8.9999snapshot1569/jabber-libnotify /usr/share/emacs/site-lisp/elpa/jabber-0.8.9999snapshot1569/jabber-awesome hides /usr/share/emacs/site-lisp/elpa-src/jabber-0.8.9999snapshot1569/jabber-awesome /usr/share/emacs/site-lisp/elpa/jabber-0.8.9999snapshot1569/jabber-notifications hides /usr/share/emacs/site-lisp/elpa-src/jabber-0.8.9999snapshot1569/jabber-notifications /usr/share/emacs/site-lisp/elpa/jabber-0.8.9999snapshot1569/jabber-xmessage hides /usr/share/emacs/site-lisp/elpa-src/jabber-0.8.9999snapshot1569/jabber-xmessage /usr/share/emacs/site-lisp/elpa/fsm-0.2.1/fsm hides /usr/share/emacs/site-lisp/elpa-src/jabber-0.8.9999snapshot1569/fsm /usr/share/emacs/site-lisp/elpa/jabber-0.8.9999snapshot1569/jabber-ourversion hides /usr/share/emacs/site-lisp/elpa-src/jabber-0.8.9999snapshot1569/jabber-ourversion /usr/share/emacs/site-lisp/elpa/jabber-0.8.9999snapshot1569/jabber-pkg hides /usr/share/emacs/site-lisp/elpa-src/jabber-0.8.9999snapshot1569/jabber-pkg /usr/share/emacs/site-lisp/elpa/jabber-0.8.9999snapshot1569/jabber-sawfish hides /usr/share/emacs/site-lisp/elpa-src/jabber-0.8.9999snapshot1569/jabber-sawfish /usr/share/emacs/site-lisp/elpa/jabber-0.8.9999snapshot1569/hexrgb hides /usr/share/emacs/site-lisp/elpa-src/jabber-0.8.9999snapshot1569/hexrgb /usr/share/emacs/site-lisp/elpa/jabber-0.8.9999snapshot1569/jabber-tmux hides /usr/share/emacs/site-lisp/elpa-src/jabber-0.8.9999snapshot1569/jabber-tmux /usr/share/emacs/site-lisp/elpa/jabber-0.8.9999snapshot1569/srv hides /usr/share/emacs/site-lisp/elpa-src/srv-0.2/srv /usr/share/emacs/site-lisp/elpa/srv-0.2/srv-autoloads hides /usr/share/emacs/site-lisp/elpa-src/srv-0.2/srv-autoloads /usr/share/emacs/site-lisp/elpa/srv-0.2/srv-pkg hides /usr/share/emacs/site-lisp/elpa-src/srv-0.2/srv-pkg /usr/share/emacs/site-lisp/flim/sasl hides /usr/share/emacs/28.2/lisp/net/sasl /usr/share/emacs/site-lisp/sieve-mode hides /usr/share/emacs/28.2/lisp/net/sieve-mode Features: (shadow emacsbug sendmail appt w3m-form w3m-bookmark w3m timezone w3m-hist w3m-fb bookmark-w3m w3m-ems w3m-favicon w3m-image tab-line w3m-proc w3m-util sort gnus-cite flow-fill mm-archive mail-extr gnus-bcklg gnus-cus comp comp-cstr gnus-async qp gnus-ml disp-table gnus-topic nndraft nnmh utf-7 rfc2104 network-stream nsm gnus-agent gnus-srvr gnus-score nnvirtual gnus-msg nntp gnus-cache cus-start add-log spamassassin-mode skeleton score-mode diary-lib diary-loaddefs m4-mode vc-bzr mule-util info mhtml-mode css-mode color nroff-mode rng-xsd xsd-regexp rng-cmpct js imenu fetchmail-mode make-mode autoconf autoconf-mode rng-nxml rng-valid rng-loc rng-uri rng-parse nxml-parse rng-match rng-dt rng-util rng-pttrn nxml-ns nxml-mode nxml-outln nxml-rap sgml-mode facemenu nxml-util nxml-enc xmltok vc-dir ewoc vc edmacro kmacro pylint compile python tramp-sh tramp tramp-loaddefs trampver tramp-integration files-x tramp-compat shell ls-lisp perl-mode reveal sieve-mode org-element avl-tree generator ol-eww eww xdg url-queue mm-url ol-rmail ol-mhe ol-irc ol-info ol-gnus nnselect gnus-search eieio-opt cl-extra help-mode speedbar ezimage dframe gnus-art mm-uu mml2015 mm-view mml-smime smime dig gnus-sum shr kinsoku svg dom gnus-group gnus-undo gnus-start gnus-dbus dbus xml gnus-cloud nnimap nnmail mail-source utf7 netrc nnoo parse-time gnus-spec gnus-int gnus-range message rmc puny rfc822 mml mml-sec epa derived epg rfc6068 epg-config mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader gnus-win ol-docview doc-view image-mode exif ol-bibtex ol-bbdb ol-w3m ol-doi org-link-doi org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro org-footnote org-src ob-comint org-pcomplete pcomplete org-list org-faces org-entities noutline outline org-version ob-emacs-lisp ob-core ob-eval org-table oc-basic bibtex iso8601 ol rx org-keys oc org-compat advice org-macs org-loaddefs format-spec find-func cal-menu calendar cal-loaddefs conf-mode muttrc-mode man cc-awk cc-mode cc-guess cc-menus cc-cmds cc-styles cc-align jka-compr sql view thingatpt comint ansi-color ring dired-aux dired dired-loaddefs vc-git diff-mode easy-mmode vc-dispatcher sh-script smie executable server eudcb-ldap ldap eudc eudc-options-file cus-edit pp eudc-vars nnir cc-fonts cc-engine cc-vars cc-defs yaml-mode warnings gnus nnheader gnus-util rmail rmail-loaddefs rfc2047 rfc2045 ietf-drums text-property-search time-date mail-utils mm-util mail-prsvr wid-edit desktop frameset cus-load finder-inf w3m-load package browse-url url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json subr-x map url-vars seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib 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 dbusbind inotify lcms2 dynamic-setting font-render-setting cairo x-toolkit x multi-tty make-network-process native-compile emacs) Memory information: ((conses 16 1160502 145690) (symbols 48 41607 5) (strings 32 164870 28136) (string-bytes 1 5503368) (vectors 16 79426) (vector-slots 8 2023882 82342) (floats 8 484 404) (intervals 56 79344 393) (buffers 992 956)) -- http://stopstopnop.pl/stop_stopnop.pl_o_nas.html From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 19 19:14:55 2024 Received: (at 61002) by debbugs.gnu.org; 20 Jan 2024 00:14:55 +0000 Received: from localhost ([127.0.0.1]:60478 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rQz0g-0002bd-S1 for submit@debbugs.gnu.org; Fri, 19 Jan 2024 19:14:55 -0500 Received: from mail-ej1-x629.google.com ([2a00:1450:4864:20::629]:61929) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rQz0e-0002bP-Jh for 61002@debbugs.gnu.org; Fri, 19 Jan 2024 19:14:53 -0500 Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-a2cea0563cbso205347666b.3 for <61002@debbugs.gnu.org>; Fri, 19 Jan 2024 16:14:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705709684; x=1706314484; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:cc :user-agent:references:in-reply-to:subject:to:from:from:to:cc :subject:date:message-id:reply-to; bh=KSV01rFGPRDnmAaASmm5tPt8cBYj65yE6/+DUf9X/G4=; b=iPDi9Ej/hgRVXGOVF60IKYNEIPTTQv67j9ahUajve0oUuWlAHErl1IenXsEoN0B5mT nHG5lQC0ME8Q/6tWLUEHl0E7pMfh2aQKGXYM2Wh8ODJS0Gxep1WqWRHJk5fKvC8vJzUu kdVY26dV4yMMK7+1f/ohNLoHlj/mjEEGgqlWFUtgoVrlIFNCr19tYPXsk++lUdJXAP4u FSdV4gCPRJGCk3pzcm4CzH2UpNEgH5HxJ0Me2nLiMPhkWRDQesSPYbip0azaqBm+1AzF ONqRmA/7VPpI8NFXmxQi8PXbWKDpCzSOhWuJPUXS9+KOzpNJBXuCz2Fzc1HCCQfsr7vH 1Zaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705709684; x=1706314484; h=content-transfer-encoding:mime-version:message-id:date:cc :user-agent:references:in-reply-to:subject:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=KSV01rFGPRDnmAaASmm5tPt8cBYj65yE6/+DUf9X/G4=; b=wkwzg0yOVR0FlZMXuCLHJ4VASoRP15/QMvYexMfWybEcBQ8HwcLlomQZGEHr0/fLZ9 OwShERckkLClKdqPyHSrFEklN3qWo7Uo1276RUL/XZIxCT5zJvhB+DojPMVv8hj2/1nK VG+BKLmKhe+j4FYTB/imFq28UcKVU9NtxGKybHk9eoPXJ0iBTLPRglvUSQsZGBnydUYO gOaKYWDP2KaJFXr8/zix3djhspgQH0bKYFrKInNPCwNHl8hulp6mgIgXLmY90dQb2HGN 4hOXldnkn5Wcs7PwXp8uUX0UO/hCWbpdBDSwkc1W7D7v9VYKeEJn7vSy0iv1jci1BMa3 cuow== X-Gm-Message-State: AOJu0Yyd2XQs7eqodVc3xw5BQtBttiGqIRNOR61eQ1IHr017v7RxkKRG mPMS+DJjuwBc2KhZbD4MdFIa+/0v+CO0oHQ3ttlk1bM5sd8d3ltY X-Google-Smtp-Source: AGHT+IGI2XLFt4MqEBrA2Mb8YIgvC477Lp962yMk1QA1EVe6AgRR4yy4+93cHF6HlolTE8YiyrcsjA== X-Received: by 2002:a17:906:d157:b0:a23:6c6a:41a5 with SMTP id br23-20020a170906d15700b00a236c6a41a5mr297192ejb.45.1705709683537; Fri, 19 Jan 2024 16:14:43 -0800 (PST) Received: from Jakubs-MacBook-Air.local (ip-217-030-066-058.aim-net.cz. [217.30.66.58]) by smtp.gmail.com with ESMTPSA id f1-20020a170906c08100b00a28fdd21763sm10877904ejz.134.2024.01.19.16.14.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jan 2024 16:14:43 -0800 (PST) From: =?utf-8?Q?Jakub_Je=C4=8Dm=C3=ADnek?= To: 61002@debbugs.gnu.org Subject: [PATCH] Re: bug#61002: 28.2; Gnus - "Date" scoring scores all articles. In-Reply-To: <878rhvhsyu.fsf@alfa.kjonca> ("Kamil =?utf-8?Q?Jo=C5=84ca=22'?= =?utf-8?Q?s?= message of "Sun, 22 Jan 2023 09:30:17 +0100") References: <878rhvhsyu.fsf@alfa.kjonca> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.1 Date: Sat, 20 Jan 2024 01:14:42 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 61002 Cc: Lars Ingebrigtsen , Kamil =?utf-8?Q?Jo=C5=84ca?= 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 (-) Tags: patch Kamil Jo=C5=84ca writes: > (I do not know if emacs list is the best one. If gnus have dedicated > list please tell me) > > I have to resubscribe some of my groups. > As I know that most of articles I have read already, I wanted to score > them lower before first of January. But it seems that always all > articles are marked as scored: > key sequence > > C-u > 1 > L > d > b > t > Tue, 16 Jul 2019 09:20:31 +0000 (UTC) > > All articles are marked as scored. > I would expect that only these before 16 jul 2019 will be marked. Hi, thanks for the bug report! Maybe I'm missing something but it feels like Gnus is providing invalid default value for the match element as it should be integer. I would like to ask somebody who is more knowledgeable about Gnus to confirm my hypothesis. If so, I've prepared a patch which provides more meaningful default value - number of days between today and entry at point. Please see below. >From e0269f4aa369182fdc81231815b36a05190149ef Mon Sep 17 00:00:00 2001 From: =3D?UTF-8?q?Jakub=3D20Je=3DC4=3D8Dm=3DC3=3DADnek?=3D Date: Sat, 20 Jan 2024 00:51:03 +0100 Subject: [PATCH] Provide valid match element for date key during interactive gnus-summary-increase-score * lisp/gnus/gnus-score.el (gnus-summary-score-entry): The user is given inv= alid default match element value during interactive use of gnus-summary-increase= -score and gnus-summary-lower-score (date key). We fix that by providing more mean= ingful default value - number of days between today and entry at point. --- lisp/gnus/gnus-score.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/gnus/gnus-score.el b/lisp/gnus/gnus-score.el index bd19e7d7cd7..8199e94fd20 100644 --- a/lisp/gnus/gnus-score.el +++ b/lisp/gnus/gnus-score.el @@ -895,7 +895,11 @@ If optional argument `EXTRA' is non-nil, it's a non-st= andard overview header." (if (< score 0) "lower" "raise")) (if (numberp match) (int-to-string match) - match)))) + (int-to-string + (- + (mod 86400 (car (time-convert (current-time) 1))) + (mod 86400 (car (time-convert (gnus-date-get-time + (gnus-date-iso8601 m= atch))))))))))) ;; If this is an integer comparison, we transform from string to int. (if (eq (nth 2 (assoc header gnus-header-index)) 'gnus-score-integer) -- 2.39.3 (Apple Git-145) I'm happy to make further changes if need be and sign the paperwork. Best, Jakub Je=C4=8Dm=C3=ADnek From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 20 06:33:23 2024 Received: (at 61002) by debbugs.gnu.org; 20 Jan 2024 11:33:23 +0000 Received: from localhost ([127.0.0.1]:33041 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rR9bG-0001g1-Vf for submit@debbugs.gnu.org; Sat, 20 Jan 2024 06:33:23 -0500 Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]:52483) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rR9bF-0001fl-85 for 61002@debbugs.gnu.org; Sat, 20 Jan 2024 06:33:21 -0500 Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-5578485fc0eso1605828a12.1 for <61002@debbugs.gnu.org>; Sat, 20 Jan 2024 03:33:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705750392; x=1706355192; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:cc :user-agent:references:in-reply-to:subject:to:from:from:to:cc :subject:date:message-id:reply-to; bh=YEieEALTKwdjPE6z4muDQ0PoRw0cmzXd3uoBY02K1/Q=; b=R//Q7MIF5puKy2jonBOZ1pQeyfLFhTniSMr/vPr3iHN98GeLlLcmUAU/ythD3e6fvS cgx1tWpxhOfjRA8JnW11ejRKXH/RscBRi0lpqg69S4C+krvZqQcPGdmS3Z5Y9XzsgxvE FoHNcoYs/vUc/Mmgdr59n/G2L+/Uh5rB05AwI64IPXIcfVqDLPiwFZai7vIk6M/PdHr3 1QF3wMyZgTOGDk1DCknIO1DxvZajTdiYEhAa6UC7GJoj3MlXCbZL+lBZNuSfOo3SQETT FuQc4a47o9EBvZRAsv1WMbjp9FqBCDsWFZa2lkez3hW3YlhoK+9Y8r3Dj44/9KCRVcoX B/MQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705750392; x=1706355192; h=content-transfer-encoding:mime-version:message-id:date:cc :user-agent:references:in-reply-to:subject:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=YEieEALTKwdjPE6z4muDQ0PoRw0cmzXd3uoBY02K1/Q=; b=WDgCHNHapEEkjhWkg9k340TzrEZU801e7vLkDFAzAuZEwYrPPA50y2jJ8wd8R1mfZh 9vSrD2hOjGe/B3Wzp1kYcIjgaD+7guJChVvQVxD+fPfAyW1gpY3dWeVXnloiW1Tgronn VlIFeD9hJ12+XyV8SQ2FfUTAG4Od7vRO0VggjcMwa/NB9K5448Jb/PetArexTmT6dikq XYEWDlgqLKBJV3Ukj2A5FYGh0taD9qwKzpVKysw0+Ccsxs54EJ6EYJhQU86kOfMvoO7O 0ei5PLlNBCiD/1G/tGan3HH6fOrwUYN+N8ImK679TQPIIfH0/LVb0Dg0lGbfndoRioIm Nvkg== X-Gm-Message-State: AOJu0YxrqArFhsIIYtgGF5r2LPo44/H3o9AYYA7dDk8i1JuYnC/EU0kh K3UuvyHBtnbNh4sjsXScPCGUH2pP9Fp+YLn8SCahAd0rrSdtgDRJ X-Google-Smtp-Source: AGHT+IEvGvMdnl24AzaSw3m96+/J95tzznqmkMCHqL8Q/xpAKPGVj1C2BrYg2ilIB9E3NYIxuZn+vw== X-Received: by 2002:a05:6402:1d0c:b0:55a:fffe:440f with SMTP id dg12-20020a0564021d0c00b0055afffe440fmr278767edb.12.1705750392477; Sat, 20 Jan 2024 03:33:12 -0800 (PST) Received: from Jakubs-MacBook-Air.local (ip-217-030-066-058.aim-net.cz. [217.30.66.58]) by smtp.gmail.com with ESMTPSA id d7-20020aa7c1c7000000b00559b9df8509sm5610029edp.81.2024.01.20.03.33.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 Jan 2024 03:33:12 -0800 (PST) From: =?utf-8?Q?Jakub_Je=C4=8Dm=C3=ADnek?= To: 61002@debbugs.gnu.org Subject: Re: bug#61002: 28.2; Gnus - "Date" scoring scores all articles. In-Reply-To: ("Jakub =?utf-8?B?SmXEjW3DrW5layIn?= =?utf-8?B?cw==?= message of "Sat, 20 Jan 2024 01:14:42 +0100") References: <878rhvhsyu.fsf@alfa.kjonca> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.1 Date: Sat, 20 Jan 2024 12:33:11 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 61002 Cc: Lars Ingebrigtsen , Kamil =?utf-8?Q?Jo=C5=84ca?= 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 (-) I've made huge mistake in my previous patch (now everyone will know that I'm terrible programmer). Here's working solution of what I'm proposing: >From 0631de4d7be1d9891b3d42b77446ce6ea4d0c709 Mon Sep 17 00:00:00 2001 From: =3D?UTF-8?q?Jakub=3D20Je=3DC4=3D8Dm=3DC3=3DADnek?=3D Date: Sat, 20 Jan 2024 00:51:03 +0100 Subject: [PATCH] Provide valid match element for date key during interactive gnus-summary-increase-score * lisp/gnus/gnus-score.el (gnus-summary-score-entry): The user is given inv= alid default match element value during interactive use of gnus-summary-increase= -score and gnus-summary-lower-score (date key). We fix that by providing more mean= ingful default value - number of days between today and entry at point. --- lisp/gnus/gnus-score.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/gnus/gnus-score.el b/lisp/gnus/gnus-score.el index bd19e7d7cd7..46ccb14751d 100644 --- a/lisp/gnus/gnus-score.el +++ b/lisp/gnus/gnus-score.el @@ -895,7 +895,11 @@ If optional argument `EXTRA' is non-nil, it's a non-st= andard overview header." (if (< score 0) "lower" "raise")) (if (numberp match) (int-to-string match) - match)))) + (int-to-string + (- + (/ (car (time-convert (current-time) 1)) 86400) + (/ (car (time-convert (gnus-date-get-time (gnus-dat= e-iso8601 match)) 1)) + 86400))))))) ;; If this is an integer comparison, we transform from string to int. (if (eq (nth 2 (assoc header gnus-header-index)) 'gnus-score-integer) -- 2.39.3 (Apple Git-145) Best, Jakub Je=C4=8Dm=C3=ADnek From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 27 04:30:56 2024 Received: (at 61002) by debbugs.gnu.org; 27 Jan 2024 09:30:56 +0000 Received: from localhost ([127.0.0.1]:53478 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rTf1b-0006jl-Ib for submit@debbugs.gnu.org; Sat, 27 Jan 2024 04:30:56 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:52700) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rTf1Y-0006jW-K4 for 61002@debbugs.gnu.org; Sat, 27 Jan 2024 04:30:53 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rTf1L-000409-Pz; Sat, 27 Jan 2024 04:30:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=8lkgVEUJLgsgMOelc6hHAT9OPlPdNUSXzi2Ddhvkv70=; b=QhF8KNFdLXsk+2trpb4p B4KB2wS+ofqpZqrlGD+Kgiy8VIvAXhFb1uYVnUo38UtlGisFYHk3ntXQUm5+KoJK0UvYVV52fhYWy XKMxRkG47+YW9eoV7dbM4ELJop08fGrq9MP6ILqZSOstFyL496OxH4dVMMd8eY/FoEOaHbe+e6xQc FPhsLJuTBuRUPQgUhZTb4LUi/F6rfbOiKXhDMwUnWxq4+kS0nF1yTk0q30xyutBJcLYmWMop7HfeA k+2uixM5yPI8OVqPdkTGYQEIXrBxNf357RN/wiCpOgC2ccu6Q5DGxMrdm+6rb0KNK8uGhBHsHC71w vBoRAlZZWMTs0w==; Date: Sat, 27 Jan 2024 11:30:36 +0200 Message-Id: <86ttmz86o3.fsf@gnu.org> From: Eli Zaretskii To: Jakub =?utf-8?B?SmXEjW3DrW5law==?= , Eric Abrahamsen In-Reply-To: (message from Jakub =?utf-8?B?SmXEjW3DrW5law==?= on Sat, 20 Jan 2024 12:33:11 +0100) Subject: Re: bug#61002: 28.2; Gnus - "Date" scoring scores all articles. References: <878rhvhsyu.fsf@alfa.kjonca> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 61002 Cc: kjonca@poczta.onet.pl, larsi@gnus.org, 61002@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 (---) > From: Jakub Ječmínek > Date: Sat, 20 Jan 2024 12:33:11 +0100 > Cc: Lars Ingebrigtsen , > Kamil Jońca > > I've made huge mistake in my previous patch (now everyone will know > that I'm terrible programmer). > > Here's working solution of what I'm proposing: Eric, Lars: any comments? Should this be installed? > > >From 0631de4d7be1d9891b3d42b77446ce6ea4d0c709 Mon Sep 17 00:00:00 2001 > From: =?UTF-8?q?Jakub=20Je=C4=8Dm=C3=ADnek?= > Date: Sat, 20 Jan 2024 00:51:03 +0100 > Subject: [PATCH] Provide valid match element for date key during interactive > gnus-summary-increase-score > > * lisp/gnus/gnus-score.el (gnus-summary-score-entry): The user is given invalid > default match element value during interactive use of gnus-summary-increase-score > and gnus-summary-lower-score (date key). We fix that by providing more meaningful > default value - number of days between today and entry at point. > --- > lisp/gnus/gnus-score.el | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/lisp/gnus/gnus-score.el b/lisp/gnus/gnus-score.el > index bd19e7d7cd7..46ccb14751d 100644 > --- a/lisp/gnus/gnus-score.el > +++ b/lisp/gnus/gnus-score.el > @@ -895,7 +895,11 @@ If optional argument `EXTRA' is non-nil, it's a non-standard overview header." > (if (< score 0) "lower" "raise")) > (if (numberp match) > (int-to-string match) > - match)))) > + (int-to-string > + (- > + (/ (car (time-convert (current-time) 1)) 86400) > + (/ (car (time-convert (gnus-date-get-time (gnus-date-iso8601 match)) 1)) > + 86400))))))) > > ;; If this is an integer comparison, we transform from string to int. > (if (eq (nth 2 (assoc header gnus-header-index)) 'gnus-score-integer) > -- > 2.39.3 (Apple Git-145) > > Best, > > Jakub Ječmínek > > > > From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 10 03:08:15 2024 Received: (at 61002) by debbugs.gnu.org; 10 Feb 2024 08:08:15 +0000 Received: from localhost ([127.0.0.1]:51014 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rYiPH-00032U-1h for submit@debbugs.gnu.org; Sat, 10 Feb 2024 03:08:15 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34774) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rYiPE-000321-9X for 61002@debbugs.gnu.org; Sat, 10 Feb 2024 03:08:13 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rYiOs-0003aD-Ot; Sat, 10 Feb 2024 03:07:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=/3VufkFapXmwZOGfwhXCGn6TVDW0a06TrhKYIWamoeI=; b=sIauxBHOTa0jVKcGjW+h zoEcmHIKHOawcADTSrzW8KpQgxWXmO3IPCS2/9zzgWENXcYqgO4xSAT0CnFApyvOfB1Jo/xUhhEIp 6KB9949oCkivmnb5DwhZbGaLsPf/4FTGVuWYrTML5t/0xc+BtpidaeG9YxcHMJzVe4tFY8hax04s4 MlEF5Pxk/tX99M3fSuxKhwVQQxvRbXgL0gJ1Nn45XLCfLry78eAcWGPU3gp6a5JLjaMThES0Ow1yK 9Rz98u3ReegXeEudrq9Ij3FwiA9USCPOYjVrwc5K52PA68OMTBiCDyoDU9YlO4rX0np/B7ufJNkrH ZkOQ9vqQUQovzQ==; Date: Sat, 10 Feb 2024 10:07:48 +0200 Message-Id: <86h6igvj1n.fsf@gnu.org> From: Eli Zaretskii To: eric@ericabrahamsen.net, In-Reply-To: <86ttmz86o3.fsf@gnu.org> (message from Eli Zaretskii on Sat, 27 Jan 2024 11:30:36 +0200) Subject: Re: bug#61002: 28.2; Gnus - "Date" scoring scores all articles. References: <878rhvhsyu.fsf@alfa.kjonca> <86ttmz86o3.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 61002 Cc: kjonca@poczta.onet.pl, larsi@gnus.org, jecminek.k@gmail.com, 61002@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 (---) Ping! > Cc: kjonca@poczta.onet.pl, larsi@gnus.org, 61002@debbugs.gnu.org > Date: Sat, 27 Jan 2024 11:30:36 +0200 > From: Eli Zaretskii > > > From: Jakub Ječmínek > > Date: Sat, 20 Jan 2024 12:33:11 +0100 > > Cc: Lars Ingebrigtsen , > > Kamil Jońca > > > > I've made huge mistake in my previous patch (now everyone will know > > that I'm terrible programmer). > > > > Here's working solution of what I'm proposing: > > Eric, Lars: any comments? Should this be installed? > > > > > >From 0631de4d7be1d9891b3d42b77446ce6ea4d0c709 Mon Sep 17 00:00:00 2001 > > From: =?UTF-8?q?Jakub=20Je=C4=8Dm=C3=ADnek?= > > Date: Sat, 20 Jan 2024 00:51:03 +0100 > > Subject: [PATCH] Provide valid match element for date key during interactive > > gnus-summary-increase-score > > > > * lisp/gnus/gnus-score.el (gnus-summary-score-entry): The user is given invalid > > default match element value during interactive use of gnus-summary-increase-score > > and gnus-summary-lower-score (date key). We fix that by providing more meaningful > > default value - number of days between today and entry at point. > > --- > > lisp/gnus/gnus-score.el | 6 +++++- > > 1 file changed, 5 insertions(+), 1 deletion(-) > > > > diff --git a/lisp/gnus/gnus-score.el b/lisp/gnus/gnus-score.el > > index bd19e7d7cd7..46ccb14751d 100644 > > --- a/lisp/gnus/gnus-score.el > > +++ b/lisp/gnus/gnus-score.el > > @@ -895,7 +895,11 @@ If optional argument `EXTRA' is non-nil, it's a non-standard overview header." > > (if (< score 0) "lower" "raise")) > > (if (numberp match) > > (int-to-string match) > > - match)))) > > + (int-to-string > > + (- > > + (/ (car (time-convert (current-time) 1)) 86400) > > + (/ (car (time-convert (gnus-date-get-time (gnus-date-iso8601 match)) 1)) > > + 86400))))))) > > > > ;; If this is an integer comparison, we transform from string to int. > > (if (eq (nth 2 (assoc header gnus-header-index)) 'gnus-score-integer) > > -- > > 2.39.3 (Apple Git-145) > > > > Best, > > > > Jakub Ječmínek > > > > > > > > > > > > From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 10 12:40:17 2024 Received: (at 61002) by debbugs.gnu.org; 10 Feb 2024 17:40:17 +0000 Received: from localhost ([127.0.0.1]:57164 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rYrKq-00037v-GT for submit@debbugs.gnu.org; Sat, 10 Feb 2024 12:40:17 -0500 Received: from mail.ericabrahamsen.net ([52.70.2.18]:36856) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rYrEK-0002nB-DM for 61002@debbugs.gnu.org; Sat, 10 Feb 2024 12:33:33 -0500 Received: from localhost (71-212-21-65.tukw.qwest.net [71.212.21.65]) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id 5A9C2FA011; Sat, 10 Feb 2024 17:27:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericabrahamsen.net; s=mail; t=1707586056; bh=VV7E9fn52sKe7+TqQPXFRackS8W4aDdx7KlZMT91O0c=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=mWiC82wjE7m36faFx15GG84JoyHO6C9aOe3en55pdgcqaqAf2uAJUqrrTMt+PxnTu evNNCtn1zZkYlkMLl/1Lfup4UEJe2ptF+oSVWvJJerJdt61vpJXsowM8BzL77exeS+ vM8VOuDCq0lpvvvo2rNrWM5ao+bp2iJ/hh5Wgtmg= From: Eric Abrahamsen To: Eli Zaretskii Subject: Re: bug#61002: 28.2; Gnus - "Date" scoring scores all articles. In-Reply-To: <86h6igvj1n.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 10 Feb 2024 10:07:48 +0200") References: <878rhvhsyu.fsf@alfa.kjonca> <86ttmz86o3.fsf@gnu.org> <86h6igvj1n.fsf@gnu.org> Date: Sat, 10 Feb 2024 09:27:35 -0800 Message-ID: <87bk8oz0u0.fsf@ericabrahamsen.net> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 61002 Cc: jecminek.k@gmail.com, larsi@gnus.org, kjonca@poczta.onet.pl, 61002@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 (---) Eli Zaretskii writes: > Ping! > >> Cc: kjonca@poczta.onet.pl, larsi@gnus.org, 61002@debbugs.gnu.org >> Date: Sat, 27 Jan 2024 11:30:36 +0200 >> From: Eli Zaretskii >>=20 >> > From: Jakub Je=C4=8Dm=C3=ADnek >> > Date: Sat, 20 Jan 2024 12:33:11 +0100 >> > Cc: Lars Ingebrigtsen , >> > Kamil Jo=C5=84ca >> >=20 >> > I've made huge mistake in my previous patch (now everyone will know >> > that I'm terrible programmer). >> >=20 >> > Here's working solution of what I'm proposing: Thanks for the ping. TBH I've never used scoring in Gnus, so this is new territory for me. I tried the patch and it worked correctly, but... The patch is doing this: (gnus-date-get-time (gnus-date-iso8601 match)) This is the definition of `gnus-date-iso8601': (defun gnus-date-iso8601 (date) "Convert the DATE to YYYYMMDDTHHMMSS." (condition-case () (gnus-time-iso8601 (gnus-date-get-time date)) (error ""))) So error handling aside, the patch ends up doing the equivalent of: (let ((ds "Sun, 22 Jan 2023 09:30:17 +0100")) (gnus-date-get-time (gnus-time-iso8601 (gnus-date-get-time ds)))) which effectively round-trips the date string through two different formats. Given that this is just providing a reasonable default value for a user prompt, I think we should just keep the inner `gnus-date-get-time' call, and wrap the whole `int-to-string' form in a `condition-case'. If anything at all goes wrong we really don't care, we can just skip it and return a "1" or something. WDYT? From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 12 10:59:00 2024 Received: (at 61002) by debbugs.gnu.org; 12 Feb 2024 15:59:00 +0000 Received: from localhost ([127.0.0.1]:38486 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rZYhw-0005Rw-2S for submit@debbugs.gnu.org; Mon, 12 Feb 2024 10:59:00 -0500 Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]:61445) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rZYhs-0005RD-KY for 61002@debbugs.gnu.org; Mon, 12 Feb 2024 10:58:57 -0500 Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-a2a17f3217aso436105066b.2 for <61002@debbugs.gnu.org>; Mon, 12 Feb 2024 07:58:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707753513; x=1708358313; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=X4Hg5aP0uO4K+BwGtXht84qF44HXMuJS8MTZoNuutf8=; b=eGaNKxbHPCKn7h8oT78mtX2GGH19ShseGndATwXlKY2X/IQmxx0TggJHI8SvNKoSQO v43ZWR8E7f6KfeWTjmwGLvQPckhD8Oi5WwPin1OTJxXwg/Z0cGnu3y/D0YO1AHN0/FaJ uUCQI0cGxNlABxZw+mD+gaQyywG7MXA5soLspRI5oIwZ/bWpfou5+ggudibuW1SIgTLH wNCZqIasUhzi6QIeULEQiAUBlp7wJ1QtUGY4E4B+frKRUYUC4znbV1WCz3GjVG5/rIvu 0TFn2jJlIHFXRb0v4lN1WrxEnTuTQOyGLAJ5gMcmakwu8ohG/wkugVw6BNclEANWY/zw U4NQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707753513; x=1708358313; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=X4Hg5aP0uO4K+BwGtXht84qF44HXMuJS8MTZoNuutf8=; b=p/rEEjRsVK8Azz9SN6VCQobCbqVhTzhu5IStTWUcsBJ2M9zWJKN80mcRvTaemerJPg 76kDepHUEje+oK2GaW0T8p5qWyiRNMq109bWlZcryF+s8mGx8seF53BwW/RS6iHCqY22 /i/tcXOsH74CoTWboeHyqgRj89w4bxkyLQR7eChgw4wMknLWNgekJP63Z2tjLdXVAclq YUUOok9RdO+MV5ninT6G41nSR15QMk1D7WgBPvDKtj6GBAjqXtkozCTV1gl3Pfu2OOfI WmCXOABPO5SzhbcmWscXfdsKCh0c2Fsy+ZbkwcY3ekdVakpghi/xv2Rg1g2LQYXCjEKY gB8A== X-Forwarded-Encrypted: i=1; AJvYcCVO4RF5GMv/ICJ/LoAvH+RyhfE6Fa5iJWkI1SMenoVKcgFZsKbUoYUs9KrqcY3u1S0aMIrSoRkmfzwXBKvj/qMksDV9QBs= X-Gm-Message-State: AOJu0YwPuICE0tk7HdR4DKzLnIDXEdOkSfvXFmCnNl2Hkkqw4S0ZsUMw dJONfiAVSdGkZEXRw2GjpgA23QlclfNtVIYcO7XBMa3IkW+mqYi12aABNwcqJBA= X-Google-Smtp-Source: AGHT+IGe6QtukH7E/e5nTSJdKAUH5QdYVKbtKCXXvY6razKEKQkVBIq6LKRr5ulk6biYPODKOa4VQA== X-Received: by 2002:a17:906:2894:b0:a38:423c:771c with SMTP id o20-20020a170906289400b00a38423c771cmr4925127ejd.17.1707753513016; Mon, 12 Feb 2024 07:58:33 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCWkjEKggfZ4UrjJ4Hmw0WlWjAVWZ2LIcdVG5/kM95GA0BNDWQF/qMIP44vsEn1siqLRoUbNrZFEUxeIxc2TF7jXSMrNEqBvdlF91nEwevlH5uOO82CMnJf1ktGdUdmo3qwySYZwpkGjNpIman0= Received: from Jakubs-MacBook-Air.local ([185.249.114.4]) by smtp.gmail.com with ESMTPSA id d13-20020a170906370d00b00a3c66ac5146sm329656ejc.120.2024.02.12.07.58.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 07:58:32 -0800 (PST) From: =?utf-8?Q?Jakub_Je=C4=8Dm=C3=ADnek?= To: Eric Abrahamsen Subject: Re: bug#61002: 28.2; Gnus - "Date" scoring scores all articles. In-Reply-To: <87bk8oz0u0.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Sat, 10 Feb 2024 09:27:35 -0800") References: <878rhvhsyu.fsf@alfa.kjonca> <86ttmz86o3.fsf@gnu.org> <86h6igvj1n.fsf@gnu.org> <87bk8oz0u0.fsf@ericabrahamsen.net> Date: Mon, 12 Feb 2024 16:58:30 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 61002 Cc: 61002@debbugs.gnu.org, Eli Zaretskii , kjonca@poczta.onet.pl, larsi@gnus.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 (-) Hi, thanks for the feedback! Eric Abrahamsen writes: > Thanks for the ping. TBH I've never used scoring in Gnus, so this is new > territory for me. I tried the patch and it worked correctly, but... > > The patch is doing this: > > (gnus-date-get-time (gnus-date-iso8601 match)) > > This is the definition of `gnus-date-iso8601': > > (defun gnus-date-iso8601 (date) > "Convert the DATE to YYYYMMDDTHHMMSS." > (condition-case () > (gnus-time-iso8601 (gnus-date-get-time date)) > (error ""))) > > So error handling aside, the patch ends up doing the equivalent of: > > (let ((ds "Sun, 22 Jan 2023 09:30:17 +0100")) > (gnus-date-get-time > (gnus-time-iso8601 > (gnus-date-get-time ds)))) > > which effectively round-trips the date string through two different > formats. You're right. I've replaced the offending form with this: (car (time-convert (gnus-date-get-time match) 1)) > [...] I think we should just keep the inner > `gnus-date-get-time' call, and wrap the whole `int-to-string' form in a > `condition-case'. If anything at all goes wrong we really don't care, we > can just skip it and return a "1" or something. > > WDYT? I believe that error handling is now redundant, because even if we try to parse invalid date using `gnus-date-get-time' we still end up with valid value (0). (/ (car (time-convert (gnus-date-get-time "invalid date") 1)) 86400) But, there's one important thing I failed to realize - the code I wrote would break prompts for other headers. Therefore I propose we add `cond' and distinguish which header we're scoring on. Please let me know what you think, here's the patch: >From 4e2174503c1d69345536929a22483ae309048271 Mon Sep 17 00:00:00 2001 From: =3D?UTF-8?q?Jakub=3D20Je=3DC4=3D8Dm=3DC3=3DADnek?=3D Date: Mon, 12 Feb 2024 14:03:24 +0100 Subject: [PATCH] Provide valid match string when scoring on date header (Bug#61002) * lisp/gnus/gnus-score.el (gnus-summary-score-entry): Fix invalid default match string when creating score file interactively on date header. --- lisp/gnus/gnus-score.el | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lisp/gnus/gnus-score.el b/lisp/gnus/gnus-score.el index bd19e7d7cd7..479b7496cf1 100644 --- a/lisp/gnus/gnus-score.el +++ b/lisp/gnus/gnus-score.el @@ -893,9 +893,14 @@ If optional argument `EXTRA' is non-nil, it's a non-st= andard overview header." (t "permanent")) header (if (< score 0) "lower" "raise")) - (if (numberp match) - (int-to-string match) - match)))) + (cond ((numberp match) (int-to-string match)) + ((string=3D header "date") + (int-to-string + (- + (/ (car (time-convert (current-time) 1)) 86400) + (/ (car (time-convert (gnus-date-get-time matc= h) 1)) + 86400)))) + (t match))))) ;; If this is an integer comparison, we transform from string to int. (if (eq (nth 2 (assoc header gnus-header-index)) 'gnus-score-integer) -- 2.39.3 (Apple Git-145) The patch should be correctly indented even though it doesn't look like it is. The reason is that previous lines contain mixture of tabs and spaces. Best Jakub Je=C4=8Dm=C3=ADnek From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 17 12:42:13 2024 Received: (at 61002-done) by debbugs.gnu.org; 17 Feb 2024 17:42:13 +0000 Received: from localhost ([127.0.0.1]:33754 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rbOhY-0006nF-Kl for submit@debbugs.gnu.org; Sat, 17 Feb 2024 12:42:13 -0500 Received: from mail.ericabrahamsen.net ([52.70.2.18]:54262) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rbOhW-0006n1-RC for 61002-done@debbugs.gnu.org; Sat, 17 Feb 2024 12:42:11 -0500 Received: from localhost (71-212-21-65.tukw.qwest.net [71.212.21.65]) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id D506BFA183; Sat, 17 Feb 2024 17:41:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericabrahamsen.net; s=mail; t=1708191704; bh=kZMf/X7VZVjGRK2EyWYgEFYrJVoWimbdXzJRJaa0ZUY=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=KRdJllA9JXFhTPekM55GYbyquX0GVXVlBzIfNPx2LrQYha+UuYh1hdR2oEOx0OTcw 3Z8a3npGFoeCJ6ynZz1i6H2UWKpygjbsrvGuAzjViBeTT7eavGHgh9dMnBHdcYEddR rodKiodhhuPiVzC6LhDbFbLqn0uZCIlH1iXjewGQ= From: Eric Abrahamsen To: Jakub =?utf-8?B?SmXEjW3DrW5law==?= Subject: Re: bug#61002: 28.2; Gnus - "Date" scoring scores all articles. In-Reply-To: ("Jakub =?utf-8?B?SmXEjW3DrW5layIn?= =?utf-8?B?cw==?= message of "Mon, 12 Feb 2024 16:58:30 +0100") References: <878rhvhsyu.fsf@alfa.kjonca> <86ttmz86o3.fsf@gnu.org> <86h6igvj1n.fsf@gnu.org> <87bk8oz0u0.fsf@ericabrahamsen.net> Date: Sat, 17 Feb 2024 09:41:42 -0800 Message-ID: <87jzn3q97t.fsf@ericabrahamsen.net> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: 61002-done Cc: kjonca@poczta.onet.pl, Eli Zaretskii , 61002-done@debbugs.gnu.org, larsi@gnus.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: -5.2 (-----) Jakub Je=C4=8Dm=C3=ADnek writes: > Hi, thanks for the feedback! > > Eric Abrahamsen writes: > >> Thanks for the ping. TBH I've never used scoring in Gnus, so this is new >> territory for me. I tried the patch and it worked correctly, but... >> >> The patch is doing this: >> >> (gnus-date-get-time (gnus-date-iso8601 match)) >> >> This is the definition of `gnus-date-iso8601': >> >> (defun gnus-date-iso8601 (date) >> "Convert the DATE to YYYYMMDDTHHMMSS." >> (condition-case () >> (gnus-time-iso8601 (gnus-date-get-time date)) >> (error ""))) >> >> So error handling aside, the patch ends up doing the equivalent of: >> >> (let ((ds "Sun, 22 Jan 2023 09:30:17 +0100")) >> (gnus-date-get-time >> (gnus-time-iso8601 >> (gnus-date-get-time ds)))) >> >> which effectively round-trips the date string through two different >> formats. > > You're right. I've replaced the offending form with this: > > (car (time-convert (gnus-date-get-time match) 1)) > >> [...] I think we should just keep the inner >> `gnus-date-get-time' call, and wrap the whole `int-to-string' form in a >> `condition-case'. If anything at all goes wrong we really don't care, we >> can just skip it and return a "1" or something. >> >> WDYT? > > I believe that error handling is now redundant, because even if we try to > parse invalid date using `gnus-date-get-time' we still end up with valid > value (0). > > (/ (car (time-convert (gnus-date-get-time "invalid date") 1)) 86400) > > But, there's one important thing I failed to realize - the code I wrote > would break prompts for other headers. Therefore I propose we add `cond' > and distinguish which header we're scoring on. > > Please let me know what you think, here's the patch: > >>>From 4e2174503c1d69345536929a22483ae309048271 Mon Sep 17 00:00:00 2001 > From: =3D?UTF-8?q?Jakub=3D20Je=3DC4=3D8Dm=3DC3=3DADnek?=3D > Date: Mon, 12 Feb 2024 14:03:24 +0100 > Subject: [PATCH] Provide valid match string when scoring on date header > (Bug#61002) > > * lisp/gnus/gnus-score.el (gnus-summary-score-entry): Fix invalid > default match string when creating score file interactively on date heade= r. > --- > lisp/gnus/gnus-score.el | 11 ++++++++--- > 1 file changed, 8 insertions(+), 3 deletions(-) > > diff --git a/lisp/gnus/gnus-score.el b/lisp/gnus/gnus-score.el > index bd19e7d7cd7..479b7496cf1 100644 > --- a/lisp/gnus/gnus-score.el > +++ b/lisp/gnus/gnus-score.el > @@ -893,9 +893,14 @@ If optional argument `EXTRA' is non-nil, it's a non-= standard overview header." > (t "permanent")) > header > (if (< score 0) "lower" "raise")) > - (if (numberp match) > - (int-to-string match) > - match)))) > + (cond ((numberp match) (int-to-string match)) > + ((string=3D header "date") > + (int-to-string > + (- > + (/ (car (time-convert (current-time) 1)) 864= 00) > + (/ (car (time-convert (gnus-date-get-time ma= tch) 1)) > + 86400)))) > + (t match))))) > > ;; If this is an integer comparison, we transform from string to int. > (if (eq (nth 2 (assoc header gnus-header-index)) 'gnus-score-integer) > -- > 2.39.3 (Apple Git-145) > > The patch should be correctly indented even though it doesn't look like > it is. The reason is that previous lines contain mixture of tabs and > spaces. Looks good! I've pushed, and am closing this bug, thanks. From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 17 13:19:28 2024 Received: (at 61002) by debbugs.gnu.org; 17 Feb 2024 18:19:29 +0000 Received: from localhost ([127.0.0.1]:33841 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rbPHb-0007of-Ud for submit@debbugs.gnu.org; Sat, 17 Feb 2024 13:19:28 -0500 Received: from mout01.posteo.de ([185.67.36.65]:39011) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rbPHZ-0007oO-R9 for 61002@debbugs.gnu.org; Sat, 17 Feb 2024 13:19:26 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id B4C95240027 for <61002@debbugs.gnu.org>; Sat, 17 Feb 2024 19:18:59 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1708193939; bh=CWZ62rCjrXNVc1RtF3/45nc9J3MKCpPZuadcWBgi7JQ=; h=From:To:Cc:Subject:Autocrypt:Date:Message-ID:MIME-Version: Content-Type:Content-Transfer-Encoding:From; b=UsfCO9M1qY5L/E+L5iVejOi8tBiUwNkJ//Dh7IENAGaQEVe5WKH1wz7fBtB6Se1si Y6+T8u1kQRztcbspRtRGJlFQNv01WiZTKLhgM7LNmBrCq7Yn/ABQFpKNKSjzA4msid JRB9t9cmifkbV++Bv7l6L99e0N9KEcwKjOalGEPo7cdqCe9e9rgRmSNkb3qaut0hFq uoiBUFyIPVCNKa8FxqDa7i3JL3nsQIzYw9MFui8H4LK7HVTJV6VhiJz5YFZdtWygNd MQV/K3xobfkA1zXyDC2ZIg01X3g7Vq+HH51NEqMIqQlHiO1FJ5E2BRrzwca0qttFwc eeRMVh7+PsK4A== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4TccWP13Kmz9rxB; Sat, 17 Feb 2024 19:18:56 +0100 (CET) From: Philip Kaludercic To: Jakub =?utf-8?B?SmXEjW3DrW5law==?= Subject: Re: bug#61002: 28.2; Gnus - "Date" scoring scores all articles. In-Reply-To: ("Jakub =?utf-8?B?SmXEjW3DrW5layIn?= =?utf-8?B?cw==?= message of "Mon, 12 Feb 2024 16:58:30 +0100") References: <878rhvhsyu.fsf@alfa.kjonca> <86ttmz86o3.fsf@gnu.org> <86h6igvj1n.fsf@gnu.org> <87bk8oz0u0.fsf@ericabrahamsen.net> X-Hashcash: 1:20:240217:larsi@gnus.org::dd7sgm9Bg2xH4XCR:YLk X-Hashcash: 1:20:240217:kjonca@poczta.onet.pl::XZUO8nNrTi0tWQba:02zd X-Hashcash: 1:20:240217:eric@ericabrahamsen.net::xEPFSvOS+PVFGbdy:0Y8N X-Hashcash: 1:20:240217:eliz@gnu.org::TLwFmGDE4wxEEBET:1h4c X-Hashcash: 1:20:240217:61002@debbugs.gnu.org::aoVfymnskXqR0bcK:2FtI X-Hashcash: 1:20:240217:jecminek.k@gmail.com::jTjpAe4BhOFuecJ2:81q9 Autocrypt: addr=philipk@posteo.net; keydata= mDMEZBBQQhYJKwYBBAHaRw8BAQdAHJuofBrfqFh12uQu0Yi7mrl525F28eTmwUDflFNmdui0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiWBBMWCAA+FiEEDg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwMFCQHhM4AFCwkI BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ8xYDWXahwulikAEA77hloUiSrXgFkUVJhlKBpLCHUjA0 mWZ9j9w5d08+jVwBAK6c4iGP7j+/PhbkxaEKa4V3MzIl7zJkcNNjHCXmvFcEuDgEZBBQQhIKKwYB BAGXVQEFAQEHQI5NLiLRjZy3OfSt1dhCmFyn+fN/QKELUYQetiaoe+MMAwEIB4h+BBgWCAAmFiEE Dg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwwFCQHhM4AACgkQ8xYDWXahwukm+wEA8cml4JpK NeAu65rg+auKrPOP6TP/4YWRCTIvuYDm0joBALw98AMz7/qMHvSCeU/hw9PL6u6R2EScxtpKnWof z4oM Date: Sat, 17 Feb 2024 18:18:55 +0000 Message-ID: <87plwvgdio.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: 61002 Cc: Eric Abrahamsen , kjonca@poczta.onet.pl, Eli Zaretskii , 61002@debbugs.gnu.org, larsi@gnus.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: -5.2 (-----) Jakub Je=C4=8Dm=C3=ADnek writes: > Hi, thanks for the feedback! > > Eric Abrahamsen writes: > >> Thanks for the ping. TBH I've never used scoring in Gnus, so this is new >> territory for me. I tried the patch and it worked correctly, but... >> >> The patch is doing this: >> >> (gnus-date-get-time (gnus-date-iso8601 match)) >> >> This is the definition of `gnus-date-iso8601': >> >> (defun gnus-date-iso8601 (date) >> "Convert the DATE to YYYYMMDDTHHMMSS." >> (condition-case () >> (gnus-time-iso8601 (gnus-date-get-time date)) >> (error ""))) >> >> So error handling aside, the patch ends up doing the equivalent of: >> >> (let ((ds "Sun, 22 Jan 2023 09:30:17 +0100")) >> (gnus-date-get-time >> (gnus-time-iso8601 >> (gnus-date-get-time ds)))) >> >> which effectively round-trips the date string through two different >> formats. > > You're right. I've replaced the offending form with this: > > (car (time-convert (gnus-date-get-time match) 1)) > >> [...] I think we should just keep the inner >> `gnus-date-get-time' call, and wrap the whole `int-to-string' form in a >> `condition-case'. If anything at all goes wrong we really don't care, we >> can just skip it and return a "1" or something. >> >> WDYT? > > I believe that error handling is now redundant, because even if we try to > parse invalid date using `gnus-date-get-time' we still end up with valid > value (0). > > (/ (car (time-convert (gnus-date-get-time "invalid date") 1)) 86400) > > But, there's one important thing I failed to realize - the code I wrote > would break prompts for other headers. Therefore I propose we add `cond' > and distinguish which header we're scoring on. > > Please let me know what you think, here's the patch: > >>>From 4e2174503c1d69345536929a22483ae309048271 Mon Sep 17 00:00:00 2001 > From: =3D?UTF-8?q?Jakub=3D20Je=3DC4=3D8Dm=3DC3=3DADnek?=3D > Date: Mon, 12 Feb 2024 14:03:24 +0100 > Subject: [PATCH] Provide valid match string when scoring on date header > (Bug#61002) > > * lisp/gnus/gnus-score.el (gnus-summary-score-entry): Fix invalid > default match string when creating score file interactively on date heade= r. > --- > lisp/gnus/gnus-score.el | 11 ++++++++--- > 1 file changed, 8 insertions(+), 3 deletions(-) > > diff --git a/lisp/gnus/gnus-score.el b/lisp/gnus/gnus-score.el > index bd19e7d7cd7..479b7496cf1 100644 > --- a/lisp/gnus/gnus-score.el > +++ b/lisp/gnus/gnus-score.el > @@ -893,9 +893,14 @@ If optional argument `EXTRA' is non-nil, it's a non-= standard overview header." > (t "permanent")) > header > (if (< score 0) "lower" "raise")) > - (if (numberp match) > - (int-to-string match) > - match)))) > + (cond ((numberp match) (int-to-string match)) > + ((string=3D header "date") > + (int-to-string > + (- > + (/ (car (time-convert (current-time) 1)) 864= 00) > + (/ (car (time-convert (gnus-date-get-time ma= tch) 1)) > + 86400)))) > + (t match))))) > > ;; If this is an integer comparison, we transform from string to int. > (if (eq (nth 2 (assoc header gnus-header-index)) 'gnus-score-integer) > -- > 2.39.3 (Apple Git-145) > > The patch should be correctly indented even though it doesn't look like > it is. The reason is that previous lines contain mixture of tabs and > spaces. This results in an error while building Emacs! --8<---------------cut here---------------start------------->8--- ELC org/ox.elc In toplevel form: org/ox.el:82:11: Error: Eager macro-expansion failure: (void-variable gnus-= not-ignore) make[3]: *** [Makefile:335: org/ox.elc] Error 1 ELC org/ox-texinfo.elc In toplevel form: org/ox-texinfo.el:33:11: Error: Eager macro-expansion failure: (void-variab= le gnus-not-ignore) make[3]: *** [Makefile:335: org/ox-texinfo.elc] Error 1 ELC org/org-element.elc In toplevel form: org/org-element.el:68:11: Error: Eager macro-expansion failure: (void-varia= ble gnus-not-ignore) make[3]: *** [Makefile:335: org/org-element.elc] Error 1 make[3]: Target 'compile-targets' not remade because of errors. make[3]: Leaving directory '/home/philip/Source/emacs/lisp' make[2]: *** [Makefile:382: main-first] Error 2 GEN autoloads INFO Scraping files for loaddefs...=20 INFO Scraping files for loaddefs...done INFO Scraping files for loaddefs...=20 INFO Scraping files for loaddefs...done GEN finder-inf.el Error: error ("Eager macro-expansion failure: (void-variable gnus-not-ignor= e)") signal(error ("Eager macro-expansion failure: (void-variable gnus-not-ign= ore)")) error("Eager macro-expansion failure: %S" (void-variable gnus-not-ignore)) internal-macroexpand-for-load((eval-when-compile (require 'mm-decode) (re= quire 'mm-view)) nil) eval-buffer(# nil "/home/philip/Source/emacs/lisp/= url/url.el" nil t) load-with-code-conversion("/home/philip/Source/emacs/lisp/url/url.el" "/h= ome/philip/Source/emacs/lisp/url/url.el" nil t) require(url) eval-buffer(# nil "/home/philip/Source/emacs/lisp/= net/browse-url.el" nil t) load-with-code-conversion("/home/philip/Source/emacs/lisp/net/browse-url.= el" "/home/philip/Source/emacs/lisp/net/browse-url.el" nil t) require(browse-url) eval-buffer(# nil "/home/philip/Source/emacs/lisp/= emacs-lisp/package.el" nil t) load-with-code-conversion("/home/philip/Source/emacs/lisp/emacs-lisp/pack= age.el" "/home/philip/Source/emacs/lisp/emacs-lisp/package.el" nil t) require(package) eval-buffer(# nil "/home/philip/Source/emacs/lisp/finder.= el" nil t) load-with-code-conversion("/home/philip/Source/emacs/lisp/finder.el" "/ho= me/philip/Source/emacs/lisp/finder.el" nil t) load("finder" nil t) command-line-1(("-l" "finder" "--eval" "(setq generated-finder-keywords-f= ile (unmsys--file-name \"./finder-inf.el\"))" "-f" "finder-compile-keywords= -make-dist" "." "./calc" "./calendar" "./cedet" "./cedet/ede" "./cedet/sema= ntic" "./cedet/semantic/analyze" "./cedet/semantic/bovine" "./cedet/semanti= c/decorate" "./cedet/semantic/symref" "./cedet/semantic/wisent" "./cedet/sr= ecode" "./emacs-lisp" "./emulation" "./erc" "./eshell" "./gnus" "./image" "= ./international" "./language" "./mail" "./mh-e" "./net" "./nxml" "./org" ".= /play" "./progmodes" "./textmodes" "./url" "./use-package" "./vc")) command-line() normal-top-level() Eager macro-expansion failure: (void-variable gnus-not-ignore) --8<---------------cut here---------------end--------------->8--- > Best > > Jakub Je=C4=8Dm=C3=ADnek > > > > --=20 Philip Kaludercic From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 17 13:24:17 2024 Received: (at 61002) by debbugs.gnu.org; 17 Feb 2024 18:24:17 +0000 Received: from localhost ([127.0.0.1]:33846 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rbPMG-0007vw-8y for submit@debbugs.gnu.org; Sat, 17 Feb 2024 13:24:17 -0500 Received: from mout02.posteo.de ([185.67.36.66]:36015) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rbPME-0007vj-Mq for 61002@debbugs.gnu.org; Sat, 17 Feb 2024 13:24:15 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 11DCF240104 for <61002@debbugs.gnu.org>; Sat, 17 Feb 2024 19:23:48 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1708194229; bh=InZ34BlGmpnWppTJKR6IyrOaMGVtFSQFip+lDbAnbmg=; h=From:To:Cc:Subject:Autocrypt:Date:Message-ID:MIME-Version: Content-Type:Content-Transfer-Encoding:From; b=VWg/NgzRr036E1Sn/m604ydRtQ7ryjs6hhLQl0nXY9Ivn9NhKMddjh7/ulv10Z3xK hjztkvs7316oGORnS61/W2SLKT4V2p7Ad9t60EWjkEs3L809uc3zvhY079Vj+65HpJ 0+4HV5y6GBl87qheoRMUqwqzENQ0a0GmEQDlaLIFcFm9CeY+aV/R5ItaZKiWUziGtI Lab2tIsGaJsrWlPFJrqixSM9WCNesjjQmwKPXEslTXGFn2rM1bwoqkoA2uKKmoLCTp dgpqqeztizBRjqx/NYU1zSpRTxLUw2cJXt5rEcirX/fIEggRa0kaGMr9uwX3H39U9m 7UeLgDN0easdg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Tccd02Xn4z6tyH; Sat, 17 Feb 2024 19:23:48 +0100 (CET) From: Philip Kaludercic To: Jakub =?utf-8?B?SmXEjW3DrW5law==?= Subject: Re: bug#61002: 28.2; Gnus - "Date" scoring scores all articles. In-Reply-To: <87plwvgdio.fsf@posteo.net> (Philip Kaludercic's message of "Sat, 17 Feb 2024 18:18:55 +0000") References: <878rhvhsyu.fsf@alfa.kjonca> <86ttmz86o3.fsf@gnu.org> <86h6igvj1n.fsf@gnu.org> <87bk8oz0u0.fsf@ericabrahamsen.net> <87plwvgdio.fsf@posteo.net> X-Hashcash: 1:20:240217:eliz@gnu.org::xOMTrdnrzECbW21V:1UF X-Hashcash: 1:20:240217:jecminek.k@gmail.com::a7lqLTPqlk9YFPaO:fX1 X-Hashcash: 1:20:240217:larsi@gnus.org::HnNdzGhbBJgFnQ8o:0z8u X-Hashcash: 1:20:240217:61002@debbugs.gnu.org::/HGXQFECSa5bDtWj:0YJt X-Hashcash: 1:20:240217:kjonca@poczta.onet.pl::CqPUYn40x2A4Rc6M:39i8 X-Hashcash: 1:20:240217:eric@ericabrahamsen.net::IY3i75omSfaY/ZLP:4teU Autocrypt: addr=philipk@posteo.net; keydata= mDMEZBBQQhYJKwYBBAHaRw8BAQdAHJuofBrfqFh12uQu0Yi7mrl525F28eTmwUDflFNmdui0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiWBBMWCAA+FiEEDg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwMFCQHhM4AFCwkI BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ8xYDWXahwulikAEA77hloUiSrXgFkUVJhlKBpLCHUjA0 mWZ9j9w5d08+jVwBAK6c4iGP7j+/PhbkxaEKa4V3MzIl7zJkcNNjHCXmvFcEuDgEZBBQQhIKKwYB BAGXVQEFAQEHQI5NLiLRjZy3OfSt1dhCmFyn+fN/QKELUYQetiaoe+MMAwEIB4h+BBgWCAAmFiEE Dg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwwFCQHhM4AACgkQ8xYDWXahwukm+wEA8cml4JpK NeAu65rg+auKrPOP6TP/4YWRCTIvuYDm0joBALw98AMz7/qMHvSCeU/hw9PL6u6R2EScxtpKnWof z4oM Date: Sat, 17 Feb 2024 18:23:47 +0000 Message-ID: <87msrzgdak.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: 61002 Cc: Eric Abrahamsen , 61002@debbugs.gnu.org, Eli Zaretskii , kjonca@poczta.onet.pl, larsi@gnus.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: -5.2 (-----) Philip Kaludercic writes: > Jakub Je=C4=8Dm=C3=ADnek writes: > >> Hi, thanks for the feedback! >> >> Eric Abrahamsen writes: >> >>> Thanks for the ping. TBH I've never used scoring in Gnus, so this is new >>> territory for me. I tried the patch and it worked correctly, but... >>> >>> The patch is doing this: >>> >>> (gnus-date-get-time (gnus-date-iso8601 match)) >>> >>> This is the definition of `gnus-date-iso8601': >>> >>> (defun gnus-date-iso8601 (date) >>> "Convert the DATE to YYYYMMDDTHHMMSS." >>> (condition-case () >>> (gnus-time-iso8601 (gnus-date-get-time date)) >>> (error ""))) >>> >>> So error handling aside, the patch ends up doing the equivalent of: >>> >>> (let ((ds "Sun, 22 Jan 2023 09:30:17 +0100")) >>> (gnus-date-get-time >>> (gnus-time-iso8601 >>> (gnus-date-get-time ds)))) >>> >>> which effectively round-trips the date string through two different >>> formats. >> >> You're right. I've replaced the offending form with this: >> >> (car (time-convert (gnus-date-get-time match) 1)) >> >>> [...] I think we should just keep the inner >>> `gnus-date-get-time' call, and wrap the whole `int-to-string' form in a >>> `condition-case'. If anything at all goes wrong we really don't care, we >>> can just skip it and return a "1" or something. >>> >>> WDYT? >> >> I believe that error handling is now redundant, because even if we try to >> parse invalid date using `gnus-date-get-time' we still end up with valid >> value (0). >> >> (/ (car (time-convert (gnus-date-get-time "invalid date") 1)) 86400) >> >> But, there's one important thing I failed to realize - the code I wrote >> would break prompts for other headers. Therefore I propose we add `cond' >> and distinguish which header we're scoring on. >> >> Please let me know what you think, here's the patch: >> >>>>>From 4e2174503c1d69345536929a22483ae309048271 Mon Sep 17 00:00:00 2001 >> From: =3D?UTF-8?q?Jakub=3D20Je=3DC4=3D8Dm=3DC3=3DADnek?=3D >> Date: Mon, 12 Feb 2024 14:03:24 +0100 >> Subject: [PATCH] Provide valid match string when scoring on date header >> (Bug#61002) >> >> * lisp/gnus/gnus-score.el (gnus-summary-score-entry): Fix invalid >> default match string when creating score file interactively on date head= er. >> --- >> lisp/gnus/gnus-score.el | 11 ++++++++--- >> 1 file changed, 8 insertions(+), 3 deletions(-) >> >> diff --git a/lisp/gnus/gnus-score.el b/lisp/gnus/gnus-score.el >> index bd19e7d7cd7..479b7496cf1 100644 >> --- a/lisp/gnus/gnus-score.el >> +++ b/lisp/gnus/gnus-score.el >> @@ -893,9 +893,14 @@ If optional argument `EXTRA' is non-nil, it's a non= -standard overview header." >> (t "permanent")) >> header >> (if (< score 0) "lower" "raise")) >> - (if (numberp match) >> - (int-to-string match) >> - match)))) >> + (cond ((numberp match) (int-to-string match)) >> + ((string=3D header "date") >> + (int-to-string >> + (- >> + (/ (car (time-convert (current-time) 1)) 86= 400) >> + (/ (car (time-convert (gnus-date-get-time m= atch) 1)) >> + 86400)))) >> + (t match))))) >> >> ;; If this is an integer comparison, we transform from string to in= t. >> (if (eq (nth 2 (assoc header gnus-header-index)) 'gnus-score-intege= r) >> -- >> 2.39.3 (Apple Git-145) >> >> The patch should be correctly indented even though it doesn't look like >> it is. The reason is that previous lines contain mixture of tabs and >> spaces. > > This results in an error while building Emacs! Turns out this was due to the above change, but a typo in the previous commit (db5e84af202532b138918295ea6dd1b0ea910d78). I have taken the liberty to push a commit fixing the issue. Hope that is ok with everyone. > ELC org/ox.elc > > In toplevel form: > org/ox.el:82:11: Error: Eager macro-expansion failure: (void-variable gnu= s-not-ignore) > make[3]: *** [Makefile:335: org/ox.elc] Error 1 > ELC org/ox-texinfo.elc > > In toplevel form: > org/ox-texinfo.el:33:11: Error: Eager macro-expansion failure: (void-vari= able gnus-not-ignore) > make[3]: *** [Makefile:335: org/ox-texinfo.elc] Error 1 > ELC org/org-element.elc > > In toplevel form: > org/org-element.el:68:11: Error: Eager macro-expansion failure: (void-var= iable gnus-not-ignore) > make[3]: *** [Makefile:335: org/org-element.elc] Error 1 > make[3]: Target 'compile-targets' not remade because of errors. > make[3]: Leaving directory '/home/philip/Source/emacs/lisp' > make[2]: *** [Makefile:382: main-first] Error 2 > GEN autoloads > INFO Scraping files for loaddefs...=20 > INFO Scraping files for loaddefs...done > INFO Scraping files for loaddefs...=20 > INFO Scraping files for loaddefs...done > GEN finder-inf.el > > Error: error ("Eager macro-expansion failure: (void-variable gnus-not-ign= ore)") > signal(error ("Eager macro-expansion failure: (void-variable gnus-not-i= gnore)")) > error("Eager macro-expansion failure: %S" (void-variable gnus-not-ignor= e)) > internal-macroexpand-for-load((eval-when-compile (require 'mm-decode) (= require 'mm-view)) nil) > eval-buffer(# nil "/home/philip/Source/emacs/lis= p/url/url.el" nil t) > load-with-code-conversion("/home/philip/Source/emacs/lisp/url/url.el" "= /home/philip/Source/emacs/lisp/url/url.el" nil t) > require(url) > eval-buffer(# nil "/home/philip/Source/emacs/lis= p/net/browse-url.el" nil t) > load-with-code-conversion("/home/philip/Source/emacs/lisp/net/browse-ur= l.el" "/home/philip/Source/emacs/lisp/net/browse-url.el" nil t) > require(browse-url) > eval-buffer(# nil "/home/philip/Source/emacs/lis= p/emacs-lisp/package.el" nil t) > load-with-code-conversion("/home/philip/Source/emacs/lisp/emacs-lisp/pa= ckage.el" "/home/philip/Source/emacs/lisp/emacs-lisp/package.el" nil t) > require(package) > eval-buffer(# nil "/home/philip/Source/emacs/lisp/finde= r.el" nil t) > load-with-code-conversion("/home/philip/Source/emacs/lisp/finder.el" "/= home/philip/Source/emacs/lisp/finder.el" nil t) > load("finder" nil t) > command-line-1(("-l" "finder" "--eval" "(setq generated-finder-keywords= -file (unmsys--file-name \"./finder-inf.el\"))" "-f" "finder-compile-keywor= ds-make-dist" "." "./calc" "./calendar" "./cedet" "./cedet/ede" "./cedet/se= mantic" "./cedet/semantic/analyze" "./cedet/semantic/bovine" "./cedet/seman= tic/decorate" "./cedet/semantic/symref" "./cedet/semantic/wisent" "./cedet/= srecode" "./emacs-lisp" "./emulation" "./erc" "./eshell" "./gnus" "./image"= "./international" "./language" "./mail" "./mh-e" "./net" "./nxml" "./org" = "./play" "./progmodes" "./textmodes" "./url" "./use-package" "./vc")) > command-line() > normal-top-level() > Eager macro-expansion failure: (void-variable gnus-not-ignore) > > >> Best >> >> Jakub Je=C4=8Dm=C3=ADnek >> >> >> >> --=20 Philip Kaludercic From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 17 13:41:35 2024 Received: (at 61002) by debbugs.gnu.org; 17 Feb 2024 18:41:35 +0000 Received: from localhost ([127.0.0.1]:33861 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rbPd0-0008M1-EQ for submit@debbugs.gnu.org; Sat, 17 Feb 2024 13:41:34 -0500 Received: from mail.ericabrahamsen.net ([52.70.2.18]:49542) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rbPcx-0008Lo-Im for 61002@debbugs.gnu.org; Sat, 17 Feb 2024 13:41:32 -0500 Received: from localhost (71-212-21-65.tukw.qwest.net [71.212.21.65]) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id C7A5EFA183; Sat, 17 Feb 2024 18:41:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericabrahamsen.net; s=mail; t=1708195265; bh=p1uK7C4Y1f2sodll4A2HRU664J8LRun74mN0nDiC4uo=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=QRBC7WnQys7pH11IqiDQ0Hfhv+7H1pmZ8ykc8uzmLRVbc8WTCW9YL5CsDlHgPCVrk pgxPwMepNRtBshBmF9xXdrhA/TJwgVfBc9b+zHk9QFLJj15t3kl5Yh4M4y5qdnP3Nz KMj74BgfqaaovWNtzvAiG/l+vlKQ1aT1a6hUyBnQ= From: Eric Abrahamsen To: Philip Kaludercic Subject: Re: bug#61002: 28.2; Gnus - "Date" scoring scores all articles. In-Reply-To: <87msrzgdak.fsf@posteo.net> (Philip Kaludercic's message of "Sat, 17 Feb 2024 18:23:47 +0000") References: <878rhvhsyu.fsf@alfa.kjonca> <86ttmz86o3.fsf@gnu.org> <86h6igvj1n.fsf@gnu.org> <87bk8oz0u0.fsf@ericabrahamsen.net> <87plwvgdio.fsf@posteo.net> <87msrzgdak.fsf@posteo.net> Date: Sat, 17 Feb 2024 10:41:03 -0800 Message-ID: <8734trq6gw.fsf@ericabrahamsen.net> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: 61002 Cc: 61002@debbugs.gnu.org, Eli Zaretskii , kjonca@poczta.onet.pl, Jakub =?utf-8?B?SmXEjW3DrW5law==?= , larsi@gnus.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: -5.2 (-----) Philip Kaludercic writes: > Philip Kaludercic writes: > >> Jakub Je=C4=8Dm=C3=ADnek writes: >> >>> Hi, thanks for the feedback! >>> >>> Eric Abrahamsen writes: >>> >>>> Thanks for the ping. TBH I've never used scoring in Gnus, so this is n= ew >>>> territory for me. I tried the patch and it worked correctly, but... >>>> >>>> The patch is doing this: >>>> >>>> (gnus-date-get-time (gnus-date-iso8601 match)) >>>> >>>> This is the definition of `gnus-date-iso8601': >>>> >>>> (defun gnus-date-iso8601 (date) >>>> "Convert the DATE to YYYYMMDDTHHMMSS." >>>> (condition-case () >>>> (gnus-time-iso8601 (gnus-date-get-time date)) >>>> (error ""))) >>>> >>>> So error handling aside, the patch ends up doing the equivalent of: >>>> >>>> (let ((ds "Sun, 22 Jan 2023 09:30:17 +0100")) >>>> (gnus-date-get-time >>>> (gnus-time-iso8601 >>>> (gnus-date-get-time ds)))) >>>> >>>> which effectively round-trips the date string through two different >>>> formats. >>> >>> You're right. I've replaced the offending form with this: >>> >>> (car (time-convert (gnus-date-get-time match) 1)) >>> >>>> [...] I think we should just keep the inner >>>> `gnus-date-get-time' call, and wrap the whole `int-to-string' form in a >>>> `condition-case'. If anything at all goes wrong we really don't care, = we >>>> can just skip it and return a "1" or something. >>>> >>>> WDYT? >>> >>> I believe that error handling is now redundant, because even if we try = to >>> parse invalid date using `gnus-date-get-time' we still end up with valid >>> value (0). >>> >>> (/ (car (time-convert (gnus-date-get-time "invalid date") 1)) 86400) >>> >>> But, there's one important thing I failed to realize - the code I wrote >>> would break prompts for other headers. Therefore I propose we add `cond' >>> and distinguish which header we're scoring on. >>> >>> Please let me know what you think, here's the patch: >>> >>>>>>From 4e2174503c1d69345536929a22483ae309048271 Mon Sep 17 00:00:00 2001 >>> From: =3D?UTF-8?q?Jakub=3D20Je=3DC4=3D8Dm=3DC3=3DADnek?=3D >>> Date: Mon, 12 Feb 2024 14:03:24 +0100 >>> Subject: [PATCH] Provide valid match string when scoring on date header >>> (Bug#61002) >>> >>> * lisp/gnus/gnus-score.el (gnus-summary-score-entry): Fix invalid >>> default match string when creating score file interactively on date hea= der. >>> --- >>> lisp/gnus/gnus-score.el | 11 ++++++++--- >>> 1 file changed, 8 insertions(+), 3 deletions(-) >>> >>> diff --git a/lisp/gnus/gnus-score.el b/lisp/gnus/gnus-score.el >>> index bd19e7d7cd7..479b7496cf1 100644 >>> --- a/lisp/gnus/gnus-score.el >>> +++ b/lisp/gnus/gnus-score.el >>> @@ -893,9 +893,14 @@ If optional argument `EXTRA' is non-nil, it's a no= n-standard overview header." >>> (t "permanent")) >>> header >>> (if (< score 0) "lower" "raise")) >>> - (if (numberp match) >>> - (int-to-string match) >>> - match)))) >>> + (cond ((numberp match) (int-to-string match)) >>> + ((string=3D header "date") >>> + (int-to-string >>> + (- >>> + (/ (car (time-convert (current-time) 1)) 8= 6400) >>> + (/ (car (time-convert (gnus-date-get-time = match) 1)) >>> + 86400)))) >>> + (t match))))) >>> >>> ;; If this is an integer comparison, we transform from string to i= nt. >>> (if (eq (nth 2 (assoc header gnus-header-index)) 'gnus-score-integ= er) >>> -- >>> 2.39.3 (Apple Git-145) >>> >>> The patch should be correctly indented even though it doesn't look like >>> it is. The reason is that previous lines contain mixture of tabs and >>> spaces. >> >> This results in an error while building Emacs! > > Turns out this was due to the above change, but a typo in the previous > commit (db5e84af202532b138918295ea6dd1b0ea910d78). I have taken the > liberty to push a commit fixing the issue. Hope that is ok with > everyone. Yes, thank you! Sorry for not testing that better. From unknown Fri Aug 15 14:15:47 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 17 Mar 2024 11: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