From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 26 05:39:48 2023 Received: (at submit) by debbugs.gnu.org; 26 Jun 2023 09:39:48 +0000 Received: from localhost ([127.0.0.1]:44498 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qDihH-0005Dg-O1 for submit@debbugs.gnu.org; Mon, 26 Jun 2023 05:39:48 -0400 Received: from lists.gnu.org ([209.51.188.17]:44392) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qDihD-0005DW-Qd for submit@debbugs.gnu.org; Mon, 26 Jun 2023 05:39:46 -0400 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 1qDihC-0005Z6-Rf for bug-gnu-emacs@gnu.org; Mon, 26 Jun 2023 05:39:43 -0400 Received: from mout.gmx.net ([212.227.17.22]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qDih9-000383-5q for bug-gnu-emacs@gnu.org; Mon, 26 Jun 2023 05:39:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=s31663417; t=1687772376; x=1688377176; i=stephen.berman@gmx.net; bh=pCiclBk+xm+s/5JiXYT0muDuL5J1o1vzBL/YtqforQQ=; h=X-UI-Sender-Class:From:To:Subject:Date; b=lpxOOaRPTdJSaaB3cvF9/79wgCgH7kL+81HY+JB4KVhyKVKjWs/M+I7ycVjeQsF26kfQTll +HhCToa820/5vZIuxWc2/kzh9UKDA31DJKIKzInKvHbaxOZ21lwTrNWxTUiRpuemDKuVI+47Q 0rJeQyJNyFzkYGTIrUY+87Vx1aRgpYLrI5+NtQewdb7zY+sCvZ3tZ/QvMNdGw9OUPnQpNl9o/ tl1zoHuPCT/vwtCEIyb+OliqVYbz2L/UZLWWltoewP09dF8KBfkhKYqnGBlf614Rv+6wTnCS+ 2LL6DzdocIUlqr6b7XAcQVjExiAORqVHEBwGu6q4RAwVaqirAn/w== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from strobelfssd ([89.246.37.151]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N2V4J-1q4Bjc49ap-013rlN for ; Mon, 26 Jun 2023 11:39:36 +0200 From: Stephen Berman To: bug-gnu-emacs@gnu.org Subject: 29.0.92; Fixes for several todo-mode bugs Date: Mon, 26 Jun 2023 11:39:35 +0200 Message-ID: <87leg6v9yg.fsf@gmx.net> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Provags-ID: V03:K1:ENHuovt8rDRcDdnZtXmLvYBNeD2Hm4TY5NoUV82u+TZKaZVIoXR JCE5HuJ55H6nGB/dQTXfgRqpg8K+Z25mkEX74DpOuae8Tv4aN1GXhywC7N2L3atMLXm8JMb GLTMIKzXxvuZBTMvYbaI1Z/iqB8l3z5ji/nLIUhIiW/8wxxR/Rg5oU0180FlPeWx5oPU0cz SmILkZh3EMUWUdJqWEI3g== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:uK7NaJ5jpz4=;CRbx133ZR4zPzODfrpPjXyJj/D/ Hq2GrDkJNEMnX74MfZ9Ul5WunUdbsoRr3eg7Nv/u8OdlXXNnqbsT//XNq4Sn86LP5lC2YKQFV iPYBv1XsUoF35brXsEjk2YecdyKmbzgxJFOUyMUglRo9aeyFZSwRQIhhF/tvuSQ+zhjXrUG74 GiRmvC955TI/7tpg2p7qhg8ihooxxpw8L0+7tcSin7w+ukuTMQkl7zGW2UmvIf1kl21IDtq3U pEDj5EJ8x7IFRztHkDma4mBVwsnUtv5mByBzDTiPmVa0gNFoPX0WCSEt6xMC1HVB8OuhJyi5l Kxm8sfd5BAYW/Mx4O5YPiFWbQI5n2CF1I8Sd6dYs5ssI/V/NyGXSviarhGOuy01l42veGkDl3 IIPag9O47V87xLtJl8vc1+osewk0ocG38z1MeU2aFKMCH6GkZLVgHa7yrkUEqpfDaeNwElgeK wWjkRZjeDZGifer9RG0rB+TiffHZ8waH86Q2DVCIVa7WehGiB+enRgz/3I6Jq6cySwCA0rYX5 +VO8adk3myMXZ4BiLge8miRdTm8uzidO6C9zqe7t7/VeC7OV/fRE8BTQz27Dp9xgpzvL9BWCO XxOt/h+ksOiKUDbqlRe45pUUWeNK4LZO/o5m16kmQPc+ws+XaE2NYCCFXijUnTIfxMfDEeJyu Bmdi9jRC1Dk0miwloLAvHcYychbb5/hqLjDfE8AjeM7NkhVeKZN53UEKznMDDg+pk6ZMdvWcq PP3Jz/DcB8meHRMuc5PmBMF9vlCK9olpGEiCxvKAxtM8MZ53smscARsvGlpBXQIZF5Usa/c8C PfcjgZVCT/w84l+gXSpRf3xu+ViRhHUQMrQ3qtwfbYc2VncWsf/JKKcKA/DzdTgnKtwI2BXQI /YxGGWphcWkGilrDZXaOqVeUYhNIUYXF9FeZWyVJe51NlBVeRIgrk1/c7EKAwFNux5DMoKpJF W1M7zg== Received-SPF: pass client-ip=212.227.17.22; envelope-from=stephen.berman@gmx.net; helo=mout.gmx.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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 (--) --=-=-= Content-Type: text/plain This report describes and provides patches for four different bugs in todo-mode.el. Three of the bugs can result in todo-mode file format corruption, and the fourth is a documentation bug, so I think the fixes should all be installed in the release branch, and I'm asking for permission to do that. As with my previous todo-mode bugfix, which also went into the release branch (bug#63811), the patches touch only todo-mode.el and with them all todo-mode unit tests pass. The first bug is further instances of the bug in bug#63811 that made the todo-mode buffer manually editable and hence susceptible to file format corruption. In that bug report I only looked at item editing, but now I've reviewed all cases in todo-mode.el where buffer-read-only is set to nil and found that a number of them could give rise to the same issue. I have fixed these in the same way, by restricting the the scope of nil buffer-read-only. The second bug I encountered while testing one case of the buffer-read-only bugs: currently, when moving a block of done items to another category that does not already have done items, only the first moved done item gets relocated to the target category's done section; the remaining moved done items wrongly end up in the todo section of the following category in the file, and since these items are tagged as done, this breaks the format of non-done todo items. The patch makes sure the moved items are correctly relocated. The third bug I discovered after reading the report of bug#54612, which is about unintendend truncation of sexps resulting from the user globally setting print-length or print-level to a sufficiently small value. The internal file format of todo-mode makes crucial use of specially formatted sexps that are part of the file contents, and if these get truncated, that can break the required format and cause errors when using todo-mode commands. This is prevented by binding print-{length,level} to nil, as in the fix for bug#54612. The fourth bug is a doc bug: the doc string of one todo-mode user option refers to use of a todo-mode insertion command argument that, quite embarrassingly, is a remnant of an earlier state of my revision of todo-mode.el and was actually eliminated before the revision was merged into the Emacs trunk ten years ago. The patch replaces this obsolete doc string with a description of the current behavior (which fortunately is already correctly documented in the Todo mode info manual). Since these four bugs are conceptually independent of each other, I would like to install the fixes in separate commits; is that all right? 2023-06-26 Stephen Berman Avoid making todo mode buffers manually editable * todo-mode.el (todo-edit-item--header, todo-set-item-priority) (todo-move-item, todo-item-undone, todo-archive-done-item) (todo-set-category-number): Restrict the scope of nil buffer-read-only to the function calls that change buffer text, thereby preventing todo mode buffers from becoming manually editable and hence possibly corrupted when the minibuffer is in use. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment Content-Description: Avoid making todo mode buffers manually editable Content-Transfer-Encoding: quoted-printable diff --git a/todo-mode.el b/todo-mode.el index 35cac5d..b6bd443 100644 =2D-- a/todo-mode.el +++ b/todo-mode.el @@ -2314,7 +2314,6 @@ made in the number or names of categories." ;; INC must be an integer, but users could pass it via ;; `todo-edit-item' as e.g. `-' or `C-u'. (inc (prefix-numeric-value inc)) - (buffer-read-only nil) ndate ntime year monthname month day) ;; dayname (when marked (todo--user-error-if-marked-done-item)) @@ -2477,13 +2476,14 @@ made in the number or names of categories." (day day) (dayname nil)) ;; dayname (mapconcat #'eval calendar-date-display-form ""))= ))) - (when ndate (replace-match ndate nil nil nil 1)) - ;; Add new time string to the header, if it was supplied. - (when ntime - (if otime - (replace-match ntime nil nil nil 2) - (goto-char (match-end 1)) - (insert ntime))) + (let ((buffer-read-only nil)) + (when ndate (replace-match ndate nil nil nil 1)) + ;; Add new time string to the header, if it was supplied. + (when ntime + (if otime + (replace-match ntime nil nil nil 2) + (goto-char (match-end 1)) + (insert ntime)))) (setq todo-date-from-calendar nil) (setq first nil)) ;; Apply the changes to the first marked item header to the @@ -2650,8 +2650,7 @@ meaning to raise or lower the item's priority by one= ." (1- curnum)) ((and (eq arg 'lower) (<=3D curnum maxnum)) (1+ curnum)))) - candidate - buffer-read-only) + candidate) (unless (and priority (or (and (eq arg 'raise) (zerop priority)) (and (eq arg 'lower) (> priority maxnum)))) @@ -2703,31 +2702,31 @@ meaning to raise or lower the item's priority by o= ne." (match-string-no-properties 1))))))) (when match (user-error (concat "Cannot reprioritize items from the same " - "category in this mode, only in Todo mode"))))) - ;; Interactively or with non-nil ARG, relocate the item within its - ;; category. - (when (or arg (called-interactively-p 'any)) - (todo-remove-item)) - (goto-char (point-min)) - (when priority - (unless (=3D priority 1) - (todo-forward-item (1- priority)) - ;; When called from todo-item-undone and the highest priority - ;; is chosen, this advances point to the first done item, so - ;; move it up to the empty line above the done items - ;; separator. - (when (looking-back (concat "^" - (regexp-quote todo-category-done) - "\n") - (line-beginning-position 0)) - (todo-backward-item)))) - (todo-insert-with-overlays item) - ;; If item was marked, restore the mark. - (and marked - (let* ((ov (todo-get-overlay 'prefix)) - (pref (overlay-get ov 'before-string))) - (overlay-put ov 'before-string - (concat todo-item-mark pref)))))))) + "category in this mode, only in Todo mode"))))) + (let ((buffer-read-only nil)) + ;; Interactively or with non-nil ARG, relocate the item within its + ;; category. + (when (or arg (called-interactively-p 'any)) + (todo-remove-item)) + (goto-char (point-min)) + (when priority + (unless (=3D priority 1) + (todo-forward-item (1- priority)) + ;; When called from todo-item-undone and the highest priority is + ;; chosen, this advances point to the first done item, so move + ;; it up to the empty line above the done items separator. + (when (looking-back (concat "^" + (regexp-quote todo-category-done) + "\n") + (line-beginning-position 0)) + (todo-backward-item)))) + (todo-insert-with-overlays item) + ;; If item was marked, restore the mark. + (and marked + (let* ((ov (todo-get-overlay 'prefix)) + (pref (overlay-get ov 'before-string))) + (overlay-put ov 'before-string + (concat todo-item-mark pref))))))))) (defun todo-raise-item-priority () "Raise priority of current item by moving it up by one item." @@ -2768,8 +2767,7 @@ section in the category moved to." (save-excursion (beginning-of-line) (looking-at todo-category-done))) (not marked)) - (let* ((buffer-read-only) - (file1 todo-current-todo-file) + (let* ((file1 todo-current-todo-file) (item (todo-item-string)) (done-item (and (todo-done-item-p) item)) (omark (save-excursion (todo-item-start) (point-marker))) @@ -2828,7 +2826,8 @@ section in the category moved to." (setq here (point)) (while todo-items (todo-forward-item) - (todo-insert-with-overlays (pop todo-items)))) + (let ((buffer-read-only nil)) + (todo-insert-with-overlays (pop todo-items))))) ;; Move done items en bloc to top of done items section. (when done-items (todo-category-number cat2) @@ -2842,7 +2841,8 @@ section in the category moved to." (forward-line) (unless here (setq here (point))) (while done-items - (todo-insert-with-overlays (pop done-items)) + (let ((buffer-read-only nil)) + (todo-insert-with-overlays (pop done-items))) (todo-forward-item))) ;; If only done items were moved, move point to the top ;; one, otherwise, move point to the top moved todo item. @@ -2881,12 +2881,14 @@ section in the category moved to." (goto-char beg) (while (< (point) end) (if (todo-marked-item-p) - (todo-remove-item) + (let ((buffer-read-only nil)) + (todo-remove-item)) (todo-forward-item))) (setq todo-categories-with-marks (assq-delete-all cat1 todo-categories-with-marks))) (if ov (delete-overlay ov)) - (todo-remove-item)))) + (let ((buffer-read-only nil)) + (todo-remove-item))))) (when todo (todo-update-count 'todo (- todo) cat1)) (when diary (todo-update-count 'diary (- diary) cat1)) (when done (todo-update-count 'done (- done) cat1)) @@ -3015,8 +3017,7 @@ comments without asking." (marked (assoc cat todo-categories-with-marks)) (num (if (not marked) 1 (cdr marked)))) (when (or marked (todo-done-item-p)) - (let ((buffer-read-only) - (opoint (point)) + (let ((opoint (point)) (omark (point-marker)) (first 'first) (item-count 0) @@ -3078,19 +3079,20 @@ comments without asking." (when ov (delete-overlay ov)) (if (not undone) (goto-char opoint) - (if marked - (progn - (setq item nil) - (re-search-forward - (concat "^" (regexp-quote todo-category-done)) nil t) - (while (not (eobp)) - (if (todo-marked-item-p) - (todo-remove-item) - (todo-forward-item))) - (setq todo-categories-with-marks - (assq-delete-all cat todo-categories-with-marks))) - (goto-char omark) - (todo-remove-item)) + (let ((buffer-read-only nil)) + (if marked + (progn + (setq item nil) + (re-search-forward + (concat "^" (regexp-quote todo-category-done)) nil t) + (while (not (eobp)) + (if (todo-marked-item-p) + (todo-remove-item) + (todo-forward-item))) + (setq todo-categories-with-marks + (assq-delete-all cat todo-categories-with-marks))) + (goto-char omark) + (todo-remove-item))) (todo-update-count 'todo item-count) (todo-update-count 'done (- item-count)) (when diary-count (todo-update-count 'diary diary-count)) @@ -3175,8 +3177,7 @@ this category does not exist in the archive, it is c= reated." (concat (todo-item-string) "\n"))) (count 0) (opoint (unless (todo-done-item-p) (point))) - marked-items beg end all-done - buffer-read-only) + marked-items beg end all-done) (cond (all (if (todo-y-or-n-p "Archive all done items in this category? ") @@ -3246,36 +3247,37 @@ this category does not exist in the archive, it is= created." (todo-archive-mode)) (if headers-hidden (todo-toggle-item-header)))) (with-current-buffer tbuf - (cond - (all - (save-excursion - (save-restriction - ;; Make sure done items are accessible. - (widen) - (remove-overlays beg end) - (delete-region beg end) - (todo-update-count 'done (- count)) - (todo-update-count 'archived count)))) - ((or marked - ;; If we're archiving all done items, can't - ;; first archive item point was on, since - ;; that will short-circuit the rest. - (and item (not all))) - (and marked (goto-char (point-min))) - (catch 'done - (while (not (eobp)) - (if (or (and marked (todo-marked-item-p)) item) - (progn - (todo-remove-item) - (todo-update-count 'done -1) - (todo-update-count 'archived 1) - ;; Don't leave point below last item. - (and (or marked item) (bolp) (eolp) - (< (point-min) (point-max)) - (todo-backward-item)) - (when item - (throw 'done (setq item nil)))) - (todo-forward-item)))))) + (let ((buffer-read-only nil)) + (cond + (all + (save-excursion + (save-restriction + ;; Make sure done items are accessible. + (widen) + (remove-overlays beg end) + (delete-region beg end) + (todo-update-count 'done (- count)) + (todo-update-count 'archived count)))) + ((or marked + ;; If we're archiving all done items, can't + ;; first archive item point was on, since + ;; that will short-circuit the rest. + (and item (not all))) + (and marked (goto-char (point-min))) + (catch 'done + (while (not (eobp)) + (if (or (and marked (todo-marked-item-p)) item) + (progn + (todo-remove-item) + (todo-update-count 'done -1) + (todo-update-count 'archived 1) + ;; Don't leave point below last item. + (and (or marked item) (bolp) (eolp) + (< (point-min) (point-max)) + (todo-backward-item)) + (when item + (throw 'done (setq item nil)))) + (todo-forward-item))))))) (when marked (setq todo-categories-with-marks (assq-delete-all cat todo-categories-with-marks))) @@ -3524,7 +3526,6 @@ decreasing or increasing its number." (let* ((maxnum (length todo-categories)) (prompt (format "Set category priority (1-%d): " maxnum)) (col (current-column)) - (buffer-read-only nil) (priority (cond ((and (eq arg 'raise) (> curnum 1)) (1- curnum)) ((and (eq arg 'lower) (< curnum maxnum)) @@ -3549,6 +3550,7 @@ decreasing or increasing its number." ;; Category's name and items counts list. (catcons (nth (1- curnum) todo-categories)) (todo-categories (nconc head (list catcons) tail)) + (buffer-read-only nil) newcats) (when lower (setq todo-categories (nreverse todo-categories))) (setq todo-categories (delete-dups todo-categories)) --=-=-= Content-Type: text/plain 2023-06-26 Stephen Berman Ensure correct relocation of moved todo-mode done items * todo-mode.el (todo-move-item): Don't use todo-forward-item when moving done items, to avoid mislocation if done items sections of the the target category was empty before moving. (todo-forward-item): Remove commented out code meant to have the effect of the above change in todo-move-item, but it did not work. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment Content-Description: Ensure correct relocation of moved todo-mode done items Content-Transfer-Encoding: quoted-printable diff --git a/todo-mode.el b/todo-mode.el index b6bd443..14fadb8 100644 =2D-- a/todo-mode.el +++ b/todo-mode.el @@ -2843,7 +2843,8 @@ section in the category moved to." (while done-items (let ((buffer-read-only nil)) (todo-insert-with-overlays (pop done-items))) - (todo-forward-item))) + (todo-item-end) + (forward-line))) ;; If only done items were moved, move point to the top ;; one, otherwise, move point to the top moved todo item. (goto-char here) @@ -5277,21 +5278,7 @@ changes you have made in the order of the categorie= s. ;; legitimate place to insert an item. But skip this space if ;; count > 1, since that should only stop on an item. (when (and not-done (todo-done-item-p) (not count)) - ;; (if (or (not count) (=3D count 1)) - (re-search-backward "^$" start t))));) - ;; The preceding sexp is insufficient when buffer is not narrowed, - ;; since there could be no done items in this category, so the - ;; search puts us on first todo item of next category. Does this - ;; ever happen? If so: - ;; (let ((opoint) (point)) - ;; (forward-line -1) - ;; (when (or (not count) (=3D count 1)) - ;; (cond ((looking-at (concat "^" (regexp-quote todo-category-beg))) - ;; (forward-line -2)) - ;; ((looking-at (concat "^" (regexp-quote todo-category-done))= ) - ;; (forward-line -1)) - ;; (t - ;; (goto-char opoint))))))) + (re-search-backward "^$" start t)))) (defun todo-backward-item (&optional count) "Move point up to start of item with next higher priority. --=-=-= Content-Type: text/plain 2023-06-26 Stephen Berman Prevent truncation of todo-mode categories sexp * todo-mode.el (todo-delete-file, todo-move-category) (todo-convert-legacy-files, todo-update-categories-sexp) (todo-check-format): Bind print-length and print-level to nil before using prin1 and related functions, to avoid truncating the todo categories sexp and possibly corrupting the file format. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment Content-Description: Prevent truncation of todo-mode categories sexp Content-Transfer-Encoding: quoted-printable diff --git a/todo-mode.el b/todo-mode.el index 14fadb8..1e31dab 100644 =2D-- a/todo-mode.el +++ b/todo-mode.el @@ -1205,7 +1205,9 @@ visiting the deleted files." (let ((sexp (read (buffer-substring-no-properties (line-beginning-position) (line-end-position)))) - (buffer-read-only nil)) + (buffer-read-only nil) + (print-length nil) + (print-level nil)) (mapc (lambda (x) (aset (cdr x) 3 0)) sexp) (delete-region (line-beginning-position) (line-end-position)) (prin1 sexp (current-buffer))))) @@ -1480,7 +1482,9 @@ the archive of the file moved to, creating it if it = does not exist." nfile-short) (format "the category \"%s\";\n" cat) "enter a new category name: ")) - buffer-read-only) + (buffer-read-only nil) + (print-length nil) + (print-level nil)) (widen) (goto-char (point-max)) (insert content) @@ -4878,7 +4882,9 @@ name in `todo-directory'. See also the documentatio= n string of (insert-file-contents file) (let ((sexp (read (buffer-substring-no-properties (line-beginning-position) - (line-end-position))))) + (line-end-position)))) + (print-length nil) + (print-level nil)) (dolist (cat sexp) (let ((archive-cat (assoc (car cat) archive-sexp))) (if archive-cat @@ -5059,7 +5065,9 @@ With nil or omitted CATEGORY, default to the current= category." (defun todo-update-categories-sexp () "Update the `todo-categories' sexp at the top of the file." - (let (buffer-read-only) + (let ((buffer-read-only nil) + (print-length nil) + (print-level nil)) (save-excursion (save-restriction (widen) @@ -5168,7 +5176,9 @@ but the categories sexp differs from the current val= ue of (save-restriction (widen) (goto-char (point-min)) - (let* ((cats (prin1-to-string todo-categories)) + (let* ((print-length nil) + (print-level nil) + (cats (prin1-to-string todo-categories)) (ssexp (buffer-substring-no-properties (line-beginning-position) (line-end-position))) (sexp (read ssexp))) --=-=-= Content-Type: text/plain 2023-06-26 Stephen Berman Rewrite obsolete todo-mode.el doc string * todo-mode.el (todo-always-add-time-string): Replace doc string, which was mistakenly retained in the initial merge of this version of todo-mode.el, by a correct description of this user option. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment Content-Description: Rewrite obsolete todo-mode.el doc string Content-Transfer-Encoding: quoted-printable diff --git a/todo-mode.el b/todo-mode.el index 1e31dab..0a641f8 100644 =2D-- a/todo-mode.el +++ b/todo-mode.el @@ -1710,11 +1710,19 @@ insertion provided it doesn't begin with `todo-non= diary-marker'." :group 'todo-edit) (defcustom todo-always-add-time-string nil - "Non-nil adds current time to a new item's date header by default. -When the todo insertion commands have a non-nil \"maybe-notime\" -argument, this reverses the effect of -`todo-always-add-time-string': if t, these commands omit the -current time, if nil, they include it." + "Whether to add the time to an item's date header by default. + +If non-nil, this automatically adds the current time when adding +a new item using an insertion command without a time parameter, +or when tagging an item as done; when adding a new item using a +time parameter, or when editing the header of an existing todo item +using a time parameter, typing automatically inserts the +current time. + +When this option is nil (the default), no time string is inserted +either automatically or when typing at the time +prompt (and in the latter case, when editing an existing time +string, typing deletes it)." :type 'boolean :group 'todo-edit) --=-=-= Content-Type: text/plain In GNU Emacs 29.0.92 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.38, cairo version 1.17.6) of 2023-06-23 built on strobelfssd Repository revision: e962cf4ba726943b0f4ea57e1d740742e7618e3a Repository branch: emacs-29 Windowing system distributor 'The X.Org Foundation', version 11.0.12101008 System Description: Linux From Scratch r11.3-100-systemd Configured using: 'configure -C --with-xwidgets 'CFLAGS=-Og -g3' PKG_CONFIG_PATH=/opt/qt5/lib/pkgconfig' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBSYSTEMD LIBXML2 MODULES NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS WEBP X11 XDBE XIM XINPUT2 XPM XWIDGETS GTK3 ZLIB --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 26 07:48:31 2023 Received: (at 64298) by debbugs.gnu.org; 26 Jun 2023 11:48:31 +0000 Received: from localhost ([127.0.0.1]:44686 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qDkhr-0002ye-7T for submit@debbugs.gnu.org; Mon, 26 Jun 2023 07:48:31 -0400 Received: from eggs.gnu.org ([209.51.188.92]:56142) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qDkhp-0002xs-4Y for 64298@debbugs.gnu.org; Mon, 26 Jun 2023 07:48:29 -0400 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 1qDkhj-00011d-HD; Mon, 26 Jun 2023 07:48:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=oneMYFwhDSuCqz9ntFHvdjimJgNM5FOQxD5hHwBgMic=; b=D3YziX3X/NaP aoogiUFQ6zimiDgMkdr6BwTOXBclPfwB2HRQn/Vvd5ic/6oU3O84HviPanR0IU13JTEuSGBRlBFAT CJaG9WOzYg+M9Nf5vRcJFzfCHwjh/sKDzqULEFQJT6c4PRg5YTUapQr+Oqf5X0W4dBfoiq2JDK5wF 4yKtu4QcpgPtu6bK8P40nCensUXM+NAW6NOnZQwG18LngaUEe4jO639m3fpjf+4oPDLQrk3GDzpw5 XnwfLf9Zdw3+3s12wWUKW1uQeKmGTqWHOVQuIuA3PosBRSHFEJl50Y3XwmaNoSoh/l4X5VMzELrfE 4u8Jj6zEcdzl0SlUVybxyw==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qDkhi-0002Pp-Ek; Mon, 26 Jun 2023 07:48:23 -0400 Date: Mon, 26 Jun 2023 14:48:43 +0300 Message-Id: <835y7axx44.fsf@gnu.org> From: Eli Zaretskii To: Stephen Berman In-Reply-To: <87leg6v9yg.fsf@gmx.net> (message from Stephen Berman on Mon, 26 Jun 2023 11:39:35 +0200) Subject: Re: bug#64298: 29.0.92; Fixes for several todo-mode bugs References: <87leg6v9yg.fsf@gmx.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 64298 Cc: 64298@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: Stephen Berman > Date: Mon, 26 Jun 2023 11:39:35 +0200 > > This report describes and provides patches for four different bugs in > todo-mode.el. Three of the bugs can result in todo-mode file format > corruption, and the fourth is a documentation bug, so I think the fixes > should all be installed in the release branch, and I'm asking for > permission to do that. As with my previous todo-mode bugfix, which also > went into the release branch (bug#63811), the patches touch only > todo-mode.el and with them all todo-mode unit tests pass. The 3rd and the 4th patches are okay for the release branch. The first one looks OK, but how sure you are that you have identified all the places which need buffer-read-only bound to nil? Did you exercise all the possible code paths in the places affected by this change? The 2nd patch is the scariest. How grave is it, and if it's grave, how come it was not reported until now? In general, I'd prefer to have the 2nd patch on master, not on the release branch, at least for now. (We could consider backporting it after Emacs 29.1 is released.) Thanks. From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 27 06:02:41 2023 Received: (at 64298) by debbugs.gnu.org; 27 Jun 2023 10:02:41 +0000 Received: from localhost ([127.0.0.1]:47696 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qE5Wy-00063u-0N for submit@debbugs.gnu.org; Tue, 27 Jun 2023 06:02:41 -0400 Received: from mout.gmx.net ([212.227.15.18]:34359) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qE5Wv-00063e-1V for 64298@debbugs.gnu.org; Tue, 27 Jun 2023 06:02:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=s31663417; t=1687860150; x=1688464950; i=stephen.berman@gmx.net; bh=QqIyVh1xvdBBUT+gKFk2KUAeJb8uohPX/+XypDO5FnE=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date; b=bvR9h168ptVwpIfjhFN9doAxtcfjlFwR7QNMoyCyZn2W07pEuFoEiO24gxmHyS5qPcCEfmB 7grEY0eh0fatdimBQc21CpRKLSr2SKYzE2fDBmlbooGBEhX9CGMUyYAUd1/j7O5uI0i+tMglQ 55o3Cp5lIX3ZK39nlqb8RhTYvOsuWlqM3CVfarfMWCrLtblNLNLly/mgWTHK9sIrDwAqDJgem 92Vn+Y3PVl1muY/KFYBTv44o5rkBZ43Xm2wmPNuTq6hm+8OSI21pdjyXD6QnJWchzVf4A7scg l+wEjeJhcTl5OhxCsoNIb7KrW44Ucun2vdV9mnJrZMJh8SEtYRag== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from strobelfssd ([89.246.36.44]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1N49lD-1q5SWl2Dqb-0104fa; Tue, 27 Jun 2023 12:02:30 +0200 From: Stephen Berman To: Eli Zaretskii Subject: Re: bug#64298: 29.0.92; Fixes for several todo-mode bugs In-Reply-To: <835y7axx44.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 26 Jun 2023 14:48:43 +0300") References: <87leg6v9yg.fsf@gmx.net> <835y7axx44.fsf@gnu.org> Date: Tue, 27 Jun 2023 12:02:29 +0200 Message-ID: <87y1k5rznu.fsf@gmx.net> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Provags-ID: V03:K1:tBA4qG4uQ3pNd+G/QTy5dOvpF7ymjzvbU//zqEJdIR4/EPMjK8a D/1s8+3S5NCrnNNoXVzpu5hi62sLQZkfvaN62P/2sklHuhvgHeoUxENnmtFfsBxJsPY7G/M CXLdIj2rHxxpQRwVKNsVsn6NNvgpSQOkQuIp6U0PiX4lFdrVh5UQX+nOcgk0yQhVou/Co6t LRhsF0VXdrZKG7gTwXlSg== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:TsT8Pdgas6k=;eSwca00liX2pIUpi6HpxkVyOtCx KSdiMis/C++PCA2OGxm63hcYzKuoEeQSGbmhMqBiBnw9PgQJ2DXTOydYWpcxpORFN0Wby3LVu fP+TyTfWoyOMh9BskRU/T8W+YVK7Q4miegaVVIyyiEaCuijqU7gC+fldeftWoZZDVzapPwu4A f7eE28RP63RDQu2hZNrM42/LAHTVDXphLC9tQjLGzkG26kFtRsKwhv07XEryNq6Q8nwPfz2tv 7MWJaj2O4tsNkcTBY/la9y00Kbs6ZjgZHCcm1MfDI8vMff5o9SB98ycKd7fh7gIkhACmI/Ms8 7kKaUshQFYFxtHm45TlDvFYUKjiCYaNN5wnAoVUzjkzxUOPKwv3nmMwuRjauxSwI/F1DxXdZL ofJi9w8sL70XghJsJuHTzVkKxButbCd+RWMkxY75CQWXZ1AbfC7TYBtDHS2+Oz+D3dFgTeRpK 8yLcfGO5MUWbIc2NdDYZEGqgtc7Q9W0YxypKRQ+f+1t5F8ycD2qAXugND7H+U3ij0399DvDWO I4WhUupSWysPf7PIEp4XT1KaQmJW8upLf0uu8izRZPcu9dxI+WGNhYDdaWhZkNwsR/VyZe0Qh H85h4vGx3yT8hds4/Pz3tpp2alIyRUAFGtwQ+rh+BMRStTOLFFVCT5M+rtJKxp/OrZJwQ3PmV Kq6EUlnC9ymiP7VzgqeBqWDDtUTSbQ3QGdxIO6E/LUOSvcfpGFC9eTIggD3Z5WFhRESi1Vu+v UwaO3Pe7ArWDcLARMTGYIzzAJncvTQ8w7wGvhDVVlulOgfL+bUyd5oJtvUg+k2vRf58i/j94Q Hin+CrMnxpLg/mKLxHLL61+PyHcYjI8YdDNIq0RxvKpSDXZfBJAR6H3jC4r/PX1IAB6gbObHG bLNobgkppv5mxb08MVePC9i9noCx0YQEq4HIYLD/z5Qn69t1CK9wQ1iwtHY760XFAgEeTzZmD UpOJuGBHhzztUCYpcOW1+GwOMWk= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 64298 Cc: 64298@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.7 (-) --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Mon, 26 Jun 2023 14:48:43 +0300 Eli Zaretskii wrote: >> From: Stephen Berman >> Date: Mon, 26 Jun 2023 11:39:35 +0200 >> >> This report describes and provides patches for four different bugs in >> todo-mode.el. Three of the bugs can result in todo-mode file format >> corruption, and the fourth is a documentation bug, so I think the fixes >> should all be installed in the release branch, and I'm asking for >> permission to do that. As with my previous todo-mode bugfix, which als= o >> went into the release branch (bug#63811), the patches touch only >> todo-mode.el and with them all todo-mode unit tests pass. > > The 3rd and the 4th patches are okay for the release branch. The > first one looks OK, but how sure you are that you have identified all > the places which need buffer-read-only bound to nil? Did you exercise > all the possible code paths in the places affected by this change? I tested each todo-mode command in which buffer-read-only is bound to nil, and the ones listed in the ChangeLog entry are the problematic cases I found, where the buffer became writeable on entering the minibuffer. I thought that was sufficient, but thanks for making me take another, and closer, look, because I had indeed overlooked two cases where prompting for user input made the buffer writeable under specific conditions that I had neglected to test. I've now fixed these cases with the revised first patch appended below (the first three hunks are new, the rest the same as the first patch in my OP). I cannot guarantee that all possibilities are now accounted for, but systematically going through all combinations of commands and the conditions under which they are executed would be very tedious and time-consuming, and I think it's better to include fixes for the known problems in emacs-29 rather than waiting for a possibly more comprehensive fix. One of the two cases, that of moving a todo-mode category from one todo file to another, also revealed a bad UX effect. Moving the category requires applying `widen' (since todo-mode uses narrowing to show only the current category's items), but in the current code the user is prompted for the target file after widening, which makes the file's internal structure visible, which is ugly and unnecessarily confusing. I fixed this with the second attached patch (applied after the first one) by narrowing again before the prompt and later widening again to delete the content of the moved category. This is a straightforward and no-risk fix, so I hope it's also acceptable for emacs-29. > The 2nd patch is the scariest. How grave is it, and if it's grave, > how come it was not reported until now? In general, I'd prefer to > have the 2nd patch on master, not on the release branch, at least for > now. (We could consider backporting it after Emacs 29.1 is released.) I'm surprised you find this patch scary; what specifically do you think is dangerous about it? AFAICS it's a fairly straightforward fix that accounts for a case I had failed to test: moving two or more done items to a non-final category that doesn't yet have any done items. Without the fix, after inserting the first moved done item, the current code using todo-forward-item moves point too far, into the todo section of the next category and the remaining moved done items are inserted there, with the result that many todo-mode commands will not apply to them correctly, and executing such commands can mess up the category's counts of todo and done items, leading at least to confusion. AFAICT such problems don't lead to data loss and with some effort can be repaired, but they shouldn't happen in the first place, and with the fix, they don't. And I don't think the fix can cause any other problems, at least I haven't seen any in testing it. As for why there has been no previous report of this bug, I guess it's due to a combination of involving a relatively seldom needed command, having triggering conditions that probably also don't occur very often, and above all, there being presumably very few regular users of todo-mode. Admittedly, that combination speaks against the urgency of committing the fix to emacs-29, but again, the problem is, if not grave, at least very confusing, and AFAICT the fix works and is low-risk. Finally, after I posted the bug report, I received private email from someone requesting a further doc fix: the reference in the Commentary section of todo-mode.el to "the Todo mode user manual, which is included in the Info documentation" led this person to a futile search for information about Todo mode in the Emacs Info manual. So I would also like to install the third attached patch to clarify that it's a separate Info manual. Steve Berman 2023-06-27 Stephen Berman Avoid making todo mode buffers manually editable * lisp/calendar/todo-mode.el (todo-add-category) (todo-move-category, todo-edit-item--header) (todo-set-item-priority, todo-move-item, todo-item-undone) (todo-archive-done-item, todo-set-category-number): Restrict the scope of nil buffer-read-only to the function calls that change buffer text, thereby preventing todo mode buffers from becoming manually editable and hence possibly corrupted when the minibuffer is in use. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment Content-Description: Avoid making todo mode buffers manually editable Content-Transfer-Encoding: quoted-printable diff --git a/lisp/calendar/todo-mode.el b/lisp/calendar/todo-mode.el index 35cac5d7310..564ead1376b 100644 =2D-- a/lisp/calendar/todo-mode.el +++ b/lisp/calendar/todo-mode.el @@ -1294,15 +1294,15 @@ todo-add-category file))) (find-file file0) (let ((counts (make-vector 4 0)) ; [todo diary done archived] - (num (1+ (length todo-categories))) - (buffer-read-only nil)) + (num (1+ (length todo-categories)))) (setq todo-current-todo-file file0) (setq todo-categories (append todo-categories (list (cons cat counts)))) (widen) (goto-char (point-max)) (save-excursion ; Save point for todo-category-select. - (insert todo-category-beg cat "\n\n" todo-category-done "\n")) + (let ((buffer-read-only nil)) + (insert todo-category-beg cat "\n\n" todo-category-done "\n"))) (todo-update-categories-sexp) ;; If invoked by user, display the newly added category, if ;; called programmatically return the category number to the @@ -1459,8 +1459,7 @@ todo-move-category (match-beginning 0) (point-max))) (content (buffer-substring-no-properties beg end)) - (counts (cdr (assoc cat todo-categories))) - buffer-read-only) + (counts (cdr (assoc cat todo-categories)))) ;; Move the category to the new file. Also update or create ;; archive file if necessary. (with-current-buffer @@ -1520,25 +1519,26 @@ todo-move-category ;; Delete the category from the old file, and if that was the ;; last category, delete the file. Also handle archive file ;; if necessary. - (remove-overlays beg end) - (delete-region beg end) - (goto-char (point-min)) - ;; Put point after todo-categories sexp. - (forward-line) - (if (eobp) ; Aside from sexp, file is empty. - (progn - ;; Skip confirming killing the archive buffer. - (set-buffer-modified-p nil) - (delete-file todo-current-todo-file) - (kill-buffer) - (when (member todo-current-todo-file todo-files) - (todo-update-filelist-defcustoms))) - (setq todo-categories (delete (assoc cat todo-categories) - todo-categories)) - (todo-update-categories-sexp) - (when (> todo-category-number (length todo-categories)) - (setq todo-category-number 1)) - (todo-category-select))))) + (let ((buffer-read-only nil)) + (remove-overlays beg end) + (delete-region beg end) + (goto-char (point-min)) + ;; Put point after todo-categories sexp. + (forward-line) + (if (eobp) ; Aside from sexp, file is empty. + (progn + ;; Skip confirming killing the archive buffer. + (set-buffer-modified-p nil) + (delete-file todo-current-todo-file) + (kill-buffer) + (when (member todo-current-todo-file todo-files) + (todo-update-filelist-defcustoms))) + (setq todo-categories (delete (assoc cat todo-categories) + todo-categories)) + (todo-update-categories-sexp) + (when (> todo-category-number (length todo-categories)) + (setq todo-category-number 1)) + (todo-category-select)))))) (set-window-buffer (selected-window) (set-buffer (find-file-noselect nfile)))))) @@ -2314,7 +2314,6 @@ todo-edit-item--header ;; INC must be an integer, but users could pass it via ;; `todo-edit-item' as e.g. `-' or `C-u'. (inc (prefix-numeric-value inc)) - (buffer-read-only nil) ndate ntime year monthname month day) ;; dayname (when marked (todo--user-error-if-marked-done-item)) @@ -2477,13 +2476,14 @@ todo-edit-item--header (day day) (dayname nil)) ;; dayname (mapconcat #'eval calendar-date-display-form ""))= ))) - (when ndate (replace-match ndate nil nil nil 1)) - ;; Add new time string to the header, if it was supplied. - (when ntime - (if otime - (replace-match ntime nil nil nil 2) - (goto-char (match-end 1)) - (insert ntime))) + (let ((buffer-read-only nil)) + (when ndate (replace-match ndate nil nil nil 1)) + ;; Add new time string to the header, if it was supplied. + (when ntime + (if otime + (replace-match ntime nil nil nil 2) + (goto-char (match-end 1)) + (insert ntime)))) (setq todo-date-from-calendar nil) (setq first nil)) ;; Apply the changes to the first marked item header to the @@ -2650,8 +2650,7 @@ todo-set-item-priority (1- curnum)) ((and (eq arg 'lower) (<=3D curnum maxnum)) (1+ curnum)))) - candidate - buffer-read-only) + candidate) (unless (and priority (or (and (eq arg 'raise) (zerop priority)) (and (eq arg 'lower) (> priority maxnum)))) @@ -2703,31 +2702,31 @@ todo-set-item-priority (match-string-no-properties 1))))))) (when match (user-error (concat "Cannot reprioritize items from the same " - "category in this mode, only in Todo mode"))))) - ;; Interactively or with non-nil ARG, relocate the item within its - ;; category. - (when (or arg (called-interactively-p 'any)) - (todo-remove-item)) - (goto-char (point-min)) - (when priority - (unless (=3D priority 1) - (todo-forward-item (1- priority)) - ;; When called from todo-item-undone and the highest priority - ;; is chosen, this advances point to the first done item, so - ;; move it up to the empty line above the done items - ;; separator. - (when (looking-back (concat "^" - (regexp-quote todo-category-done) - "\n") - (line-beginning-position 0)) - (todo-backward-item)))) - (todo-insert-with-overlays item) - ;; If item was marked, restore the mark. - (and marked - (let* ((ov (todo-get-overlay 'prefix)) - (pref (overlay-get ov 'before-string))) - (overlay-put ov 'before-string - (concat todo-item-mark pref)))))))) + "category in this mode, only in Todo mode"))))) + (let ((buffer-read-only nil)) + ;; Interactively or with non-nil ARG, relocate the item within its + ;; category. + (when (or arg (called-interactively-p 'any)) + (todo-remove-item)) + (goto-char (point-min)) + (when priority + (unless (=3D priority 1) + (todo-forward-item (1- priority)) + ;; When called from todo-item-undone and the highest priority is + ;; chosen, this advances point to the first done item, so move + ;; it up to the empty line above the done items separator. + (when (looking-back (concat "^" + (regexp-quote todo-category-done) + "\n") + (line-beginning-position 0)) + (todo-backward-item)))) + (todo-insert-with-overlays item) + ;; If item was marked, restore the mark. + (and marked + (let* ((ov (todo-get-overlay 'prefix)) + (pref (overlay-get ov 'before-string))) + (overlay-put ov 'before-string + (concat todo-item-mark pref))))))))) (defun todo-raise-item-priority () "Raise priority of current item by moving it up by one item." @@ -2768,8 +2767,7 @@ todo-move-item (save-excursion (beginning-of-line) (looking-at todo-category-done))) (not marked)) - (let* ((buffer-read-only) - (file1 todo-current-todo-file) + (let* ((file1 todo-current-todo-file) (item (todo-item-string)) (done-item (and (todo-done-item-p) item)) (omark (save-excursion (todo-item-start) (point-marker))) @@ -2828,7 +2826,8 @@ todo-move-item (setq here (point)) (while todo-items (todo-forward-item) - (todo-insert-with-overlays (pop todo-items)))) + (let ((buffer-read-only nil)) + (todo-insert-with-overlays (pop todo-items))))) ;; Move done items en bloc to top of done items section. (when done-items (todo-category-number cat2) @@ -2842,7 +2841,8 @@ todo-move-item (forward-line) (unless here (setq here (point))) (while done-items - (todo-insert-with-overlays (pop done-items)) + (let ((buffer-read-only nil)) + (todo-insert-with-overlays (pop done-items))) (todo-forward-item))) ;; If only done items were moved, move point to the top ;; one, otherwise, move point to the top moved todo item. @@ -2881,12 +2881,14 @@ todo-move-item (goto-char beg) (while (< (point) end) (if (todo-marked-item-p) - (todo-remove-item) + (let ((buffer-read-only nil)) + (todo-remove-item)) (todo-forward-item))) (setq todo-categories-with-marks (assq-delete-all cat1 todo-categories-with-marks))) (if ov (delete-overlay ov)) - (todo-remove-item)))) + (let ((buffer-read-only nil)) + (todo-remove-item))))) (when todo (todo-update-count 'todo (- todo) cat1)) (when diary (todo-update-count 'diary (- diary) cat1)) (when done (todo-update-count 'done (- done) cat1)) @@ -3015,8 +3017,7 @@ todo-item-undone (marked (assoc cat todo-categories-with-marks)) (num (if (not marked) 1 (cdr marked)))) (when (or marked (todo-done-item-p)) - (let ((buffer-read-only) - (opoint (point)) + (let ((opoint (point)) (omark (point-marker)) (first 'first) (item-count 0) @@ -3078,19 +3079,20 @@ todo-item-undone (when ov (delete-overlay ov)) (if (not undone) (goto-char opoint) - (if marked - (progn - (setq item nil) - (re-search-forward - (concat "^" (regexp-quote todo-category-done)) nil t) - (while (not (eobp)) - (if (todo-marked-item-p) - (todo-remove-item) - (todo-forward-item))) - (setq todo-categories-with-marks - (assq-delete-all cat todo-categories-with-marks))) - (goto-char omark) - (todo-remove-item)) + (let ((buffer-read-only nil)) + (if marked + (progn + (setq item nil) + (re-search-forward + (concat "^" (regexp-quote todo-category-done)) nil t) + (while (not (eobp)) + (if (todo-marked-item-p) + (todo-remove-item) + (todo-forward-item))) + (setq todo-categories-with-marks + (assq-delete-all cat todo-categories-with-marks))) + (goto-char omark) + (todo-remove-item))) (todo-update-count 'todo item-count) (todo-update-count 'done (- item-count)) (when diary-count (todo-update-count 'diary diary-count)) @@ -3175,8 +3177,7 @@ todo-archive-done-item (concat (todo-item-string) "\n"))) (count 0) (opoint (unless (todo-done-item-p) (point))) - marked-items beg end all-done - buffer-read-only) + marked-items beg end all-done) (cond (all (if (todo-y-or-n-p "Archive all done items in this category? ") @@ -3246,36 +3247,37 @@ todo-archive-done-item (todo-archive-mode)) (if headers-hidden (todo-toggle-item-header)))) (with-current-buffer tbuf - (cond - (all - (save-excursion - (save-restriction - ;; Make sure done items are accessible. - (widen) - (remove-overlays beg end) - (delete-region beg end) - (todo-update-count 'done (- count)) - (todo-update-count 'archived count)))) - ((or marked - ;; If we're archiving all done items, can't - ;; first archive item point was on, since - ;; that will short-circuit the rest. - (and item (not all))) - (and marked (goto-char (point-min))) - (catch 'done - (while (not (eobp)) - (if (or (and marked (todo-marked-item-p)) item) - (progn - (todo-remove-item) - (todo-update-count 'done -1) - (todo-update-count 'archived 1) - ;; Don't leave point below last item. - (and (or marked item) (bolp) (eolp) - (< (point-min) (point-max)) - (todo-backward-item)) - (when item - (throw 'done (setq item nil)))) - (todo-forward-item)))))) + (let ((buffer-read-only nil)) + (cond + (all + (save-excursion + (save-restriction + ;; Make sure done items are accessible. + (widen) + (remove-overlays beg end) + (delete-region beg end) + (todo-update-count 'done (- count)) + (todo-update-count 'archived count)))) + ((or marked + ;; If we're archiving all done items, can't + ;; first archive item point was on, since + ;; that will short-circuit the rest. + (and item (not all))) + (and marked (goto-char (point-min))) + (catch 'done + (while (not (eobp)) + (if (or (and marked (todo-marked-item-p)) item) + (progn + (todo-remove-item) + (todo-update-count 'done -1) + (todo-update-count 'archived 1) + ;; Don't leave point below last item. + (and (or marked item) (bolp) (eolp) + (< (point-min) (point-max)) + (todo-backward-item)) + (when item + (throw 'done (setq item nil)))) + (todo-forward-item))))))) (when marked (setq todo-categories-with-marks (assq-delete-all cat todo-categories-with-marks))) @@ -3524,7 +3526,6 @@ todo-set-category-number (let* ((maxnum (length todo-categories)) (prompt (format "Set category priority (1-%d): " maxnum)) (col (current-column)) - (buffer-read-only nil) (priority (cond ((and (eq arg 'raise) (> curnum 1)) (1- curnum)) ((and (eq arg 'lower) (< curnum maxnum)) @@ -3549,6 +3550,7 @@ todo-set-category-number ;; Category's name and items counts list. (catcons (nth (1- curnum) todo-categories)) (todo-categories (nconc head (list catcons) tail)) + (buffer-read-only nil) newcats) (when lower (setq todo-categories (nreverse todo-categories))) (setq todo-categories (delete-dups todo-categories)) --=-=-= Content-Type: text/plain 2023-06-27 Stephen Berman Avoid exposing todo file internal structure * todo-mode.el (todo-move-category): Restore display of selected category in source file, so internal file structure is not visible if user is prompted to choose a new category name in target file, and widen again to delete moved category from source file. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment Content-Description: Avoid exposing todo file internal structure diff --git a/todo-mode.el b/todo-mode.el index ab0e649..da55fb4 100644 --- a/todo-mode.el +++ b/todo-mode.el @@ -1462,6 +1462,10 @@ the archive of the file moved to, creating it if it does not exist." (point-max))) (content (buffer-substring-no-properties beg end)) (counts (cdr (assoc cat todo-categories)))) + ;; Restore display of selected category, so internal file + ;; structure is not visible if user is prompted to choose a new + ;; category name in target file. + (todo-category-select) ;; Move the category to the new file. Also update or create ;; archive file if necessary. (with-current-buffer @@ -1524,6 +1528,7 @@ the archive of the file moved to, creating it if it does not exist." ;; last category, delete the file. Also handle archive file ;; if necessary. (let ((buffer-read-only nil)) + (widen) (remove-overlays beg end) (delete-region beg end) (goto-char (point-min)) --=-=-= Content-Type: text/plain 2023-06-27 Stephen Berman Clarify phrasing in the todo-mode.el Commentary * todo-mode.el: Explicitly note that the Todo mode user manual is a separate Info manual in the Emacs installation. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment Content-Description: Clarify phrasing in the todo-mode.el Commentary Content-Transfer-Encoding: quoted-printable diff --git a/todo-mode.el b/todo-mode.el index da55fb4..4d377d9 100644 =2D-- a/todo-mode.el +++ b/todo-mode.el @@ -49,7 +49,8 @@ ;; To get started, type `M-x todo-show'. For full details of the user ;; interface, commands and options, consult the Todo mode user manual, -;; which is included in the Info documentation. +;; which is one of the Info manuals included in the standard Emacs +;; installation. ;;; Code: --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 27 07:37:19 2023 Received: (at 64298) by debbugs.gnu.org; 27 Jun 2023 11:37:19 +0000 Received: from localhost ([127.0.0.1]:47781 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qE70Y-0002lr-SV for submit@debbugs.gnu.org; Tue, 27 Jun 2023 07:37:19 -0400 Received: from eggs.gnu.org ([209.51.188.92]:49774) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qE70W-0002lc-HU for 64298@debbugs.gnu.org; Tue, 27 Jun 2023 07:37:17 -0400 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 1qE70R-0001Fl-3l; Tue, 27 Jun 2023 07:37:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=+a4y/nHHRuDJTCJ5xZGzdMUAENn7pAoCpqI1ppxseSk=; b=Kay6xIoJ8ERr 8zSdBrnVSXSxPJr4auNI4TNpEZ4FfG0BLl20gnm3E+63D2NfjvV2M/zBkYcfK71x7e6AC0PUgw3dz mzvSUqhj7iFGP352WXNrk0PIgxgUkOceWibPCEkmjzrslRg3KIcQlnhTYcosYyAc1x/X8mm3JCZRO 0evdKPAokwCbwdFeeLeShNO8PQuhWMpFuVv75dEZCPa3xra4+vp9pdeZ39qgPve8jhcvGO2dId/pJ 6qBEaT0J0x7d7ekCf9fIlUigT0WFTCNL3bh1R4vBoO/DKTTW4BUGI5xwto2kM4+OpIp1R7WDnTHyP ZBZyIHkTzmgK5EZxVJ4scw==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qE70Q-00011L-Jy; Tue, 27 Jun 2023 07:37:10 -0400 Date: Tue, 27 Jun 2023 14:37:33 +0300 Message-Id: <83bkh1w2yq.fsf@gnu.org> From: Eli Zaretskii To: Stephen Berman In-Reply-To: <87y1k5rznu.fsf@gmx.net> (message from Stephen Berman on Tue, 27 Jun 2023 12:02:29 +0200) Subject: Re: bug#64298: 29.0.92; Fixes for several todo-mode bugs References: <87leg6v9yg.fsf@gmx.net> <835y7axx44.fsf@gnu.org> <87y1k5rznu.fsf@gmx.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 64298 Cc: 64298@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: Stephen Berman > Cc: 64298@debbugs.gnu.org > Date: Tue, 27 Jun 2023 12:02:29 +0200 > > I cannot guarantee that all possibilities are now accounted for, but > systematically going through all combinations of commands and the > conditions under which they are executed would be very tedious and > time-consuming, and I think it's better to include fixes for the known > problems in emacs-29 rather than waiting for a possibly more > comprehensive fix. OK. > One of the two cases, that of moving a todo-mode category from one todo > file to another, also revealed a bad UX effect. Moving the category > requires applying `widen' (since todo-mode uses narrowing to show only > the current category's items), but in the current code the user is > prompted for the target file after widening, which makes the file's > internal structure visible, which is ugly and unnecessarily confusing. > I fixed this with the second attached patch (applied after the first > one) by narrowing again before the prompt and later widening again to > delete the content of the moved category. This is a straightforward and > no-risk fix, so I hope it's also acceptable for emacs-29. It looks safe, but it is also not very urgent, since this problem existed since long ago, right? So how about doing this on master instead? > > The 2nd patch is the scariest. How grave is it, and if it's grave, > > how come it was not reported until now? In general, I'd prefer to > > have the 2nd patch on master, not on the release branch, at least for > > now. (We could consider backporting it after Emacs 29.1 is released.) > > I'm surprised you find this patch scary; what specifically do you think > is dangerous about it? The non-trivial dance with regular expressions, of course. > AFAICT such problems don't lead to data loss and with some effort can be > repaired, but they shouldn't happen in the first place, and with the > fix, they don't. And I don't think the fix can cause any other > problems, at least I haven't seen any in testing it. > > As for why there has been no previous report of this bug, I guess it's > due to a combination of involving a relatively seldom needed command, > having triggering conditions that probably also don't occur very often, > and above all, there being presumably very few regular users of > todo-mode. Admittedly, that combination speaks against the urgency of > committing the fix to emacs-29, but again, the problem is, if not grave, > at least very confusing, and AFAICT the fix works and is low-risk. I'd like to release Emacs 29.1 _soon_. The only way to ensure this is not to install on emacs-29 anything that doesn't _have_ to be there. So please look at this from my vantage point, and try to play "devil's advocate" against yourself. Then tell me what you think. > Finally, after I posted the bug report, I received private email from > someone requesting a further doc fix: the reference in the Commentary > section of todo-mode.el to "the Todo mode user manual, which is included > in the Info documentation" led this person to a futile search for > information about Todo mode in the Emacs Info manual. So I would also > like to install the third attached patch to clarify that it's a separate > Info manual. Documentation fixes are always OK on the release branch. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 27 08:50:32 2023 Received: (at 64298) by debbugs.gnu.org; 27 Jun 2023 12:50:33 +0000 Received: from localhost ([127.0.0.1]:47845 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qE89Q-0004lu-FU for submit@debbugs.gnu.org; Tue, 27 Jun 2023 08:50:32 -0400 Received: from mout.gmx.net ([212.227.17.20]:40537) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qE89M-0004lc-EH for 64298@debbugs.gnu.org; Tue, 27 Jun 2023 08:50:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=s31663417; t=1687870222; x=1688475022; i=stephen.berman@gmx.net; bh=cYfGBmCUgTsjslQluILJklM09OV/aQVbmRSxGVg43O0=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date; b=WN8SvPTFY4X82VBpLJm2hjKUHO8TH6aWOVWHOXEk0mzDAZR7FyAk91rz7jBx34tuj8QvzhW q6ds+BQgQPSe1CNSb+Du6CSdtVPqdsJ7TPjN2Hi/4W1OkVIQ52kj6f2eBPHC1o2reT7c/6FLd +VdZXOtbFPnJl9dEp5KQdtmQ0x5BppFeqflvtoThRx7CmAXdHuOXfBFcL1LeSI69DqqSAzrS1 wusTOGLyv2vs6xHGjvngz+wgiXNo5mOsFdCaKbr00grsOUBk4oLOVYy6yvg8hCjM9v9K1Hc3j 7U7TJboAsooYi22ch/ZY9XD2MtgPUartC+O6OIf5KkttgQ20izvA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from strobelfssd ([89.246.36.44]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MC30P-1qM8N124bt-00COzO; Tue, 27 Jun 2023 14:50:22 +0200 From: Stephen Berman To: Eli Zaretskii Subject: Re: bug#64298: 29.0.92; Fixes for several todo-mode bugs In-Reply-To: <83bkh1w2yq.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 27 Jun 2023 14:37:33 +0300") References: <87leg6v9yg.fsf@gmx.net> <835y7axx44.fsf@gnu.org> <87y1k5rznu.fsf@gmx.net> <83bkh1w2yq.fsf@gnu.org> Date: Tue, 27 Jun 2023 14:50:21 +0200 Message-ID: <87ttutrrw2.fsf@gmx.net> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:yAniPy4DBGwPJ7P1ucxz9v5KEIWOz1quy564GLYTP/HBo5zLxBr T405snLvqDKxMnfh6w1GbRxIyqyQaflcDBVAQGaTXox4Vc0lNWc4xJfguwqYd1/GSxN0hIV eOTUOmJUIwdKUFyqQtXhQEZHjZks8+NbfTolKqqunJ6SbBlDV5bF7jWxkOeWoOEoIsWZKGq M578UKHGfW71yq9nJOULw== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:i6q2Rbvp5es=;tB68NonCw5xySSGUGxOq4FedDiE O48BHP8tmZda9+8XCxN5Zgn/Ka+tjYANQ4fYcJnNmCh+1TjCUtGEZktHhTQOzJZbjhQvjzbiM to/L8AOE/W/ox+peJtGEH2U1E7CFVin9WR3a8MPApfmXtHBkcdt8zOHz8imVWw9d4+iwcVfXn SHs0fmzwgMKeMe1a2+dGrkOYtbYNEiKFhw1Whlg/4IJChNMqythdXYZPWr6Rx4YLsPVlZaB3I UecZjuL4mOcb6qT0Ry56m487WcnS/KuxlNfk2luMnSiluoJOGFMXUUSv/tvZFHa4gJ3joFM9m 9T9AS+Y0nZkA8LiYCbQsPFwIC4wiFFQeLlg2cdG/TOevZ1e+pmUsPtdGNrek50MlVFGZF88jh qY5ySg1nsE+gSvuxxEE07Cjnmu3ksN8v3U8QKKmog0B3F4CJbiM3tgK5C4xlvt6r2ajUDOMxy ML2HdLvjXe9jhu/P6J1fAIm94NnZduLRGC0jzyr0Ia8Rl3NzEbDT3dUvjFW1MT36vB7+tanR5 Wqfcs0tD+FQMIUvQ8/1zOUxv4sS2Pkm5xXLDmb9KlfeoGttod8skQs44zwEnbKC7OS3vQbAE7 3uFSjshzdm1WM2zGzTASQ1pONKiIDZQzngWnJNJYXr6WMC8eAFEdkHZU3lXyGZ73snzX2AQi0 DmjT+W/gqaPOu35G0p2yr3MRRsguv0Qt6e6LUY+a/Ykmo+yfs6LMduY8sHEJ3dFL7a4f93MuA LNj0SiQZaVGg095a5anToIgtUy6Ti8XUmHgwwfr3YpPjVcZwi3dDFhgXquQ1g7g2J58ijxEiT 9bnZFBSLB2ZCOLE4+33reC0tGRHjag6i4NsFeZq1cTbqaVCLgW+IHBhMw8k0IaF67Y3I631Rg cD7YlR1EXGY/qxLvKCjIQTcTMHQyzim52NXhmthAEkGg38DV0iHc6iktPZZZ534HtvX3qYbdT P23hLanB3Gj2Wo6/lox0BXi3O1A= Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 64298 Cc: 64298@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.7 (-) On Tue, 27 Jun 2023 14:37:33 +0300 Eli Zaretskii wrote: >> From: Stephen Berman >> Cc: 64298@debbugs.gnu.org >> Date: Tue, 27 Jun 2023 12:02:29 +0200 >> >> I cannot guarantee that all possibilities are now accounted for, but >> systematically going through all combinations of commands and the >> conditions under which they are executed would be very tedious and >> time-consuming, and I think it's better to include fixes for the known >> problems in emacs-29 rather than waiting for a possibly more >> comprehensive fix. > > OK. > >> One of the two cases, that of moving a todo-mode category from one todo >> file to another, also revealed a bad UX effect. Moving the category >> requires applying `widen' (since todo-mode uses narrowing to show only >> the current category's items), but in the current code the user is >> prompted for the target file after widening, which makes the file's >> internal structure visible, which is ugly and unnecessarily confusing. >> I fixed this with the second attached patch (applied after the first >> one) by narrowing again before the prompt and later widening again to >> delete the content of the moved category. This is a straightforward an= d >> no-risk fix, so I hope it's also acceptable for emacs-29. > > It looks safe, but it is also not very urgent, since this problem > existed since long ago, right? So how about doing this on master > instead? All right. >> > The 2nd patch is the scariest. How grave is it, and if it's grave, >> > how come it was not reported until now? In general, I'd prefer to >> > have the 2nd patch on master, not on the release branch, at least for >> > now. (We could consider backporting it after Emacs 29.1 is released.= ) >> >> I'm surprised you find this patch scary; what specifically do you think >> is dangerous about it? > > The non-trivial dance with regular expressions, of course. Due to using todo-item-end instead of todo-forward-item? Well ok, I can't readily prove your reservations are unwarranted. >> AFAICT such problems don't lead to data loss and with some effort can b= e >> repaired, but they shouldn't happen in the first place, and with the >> fix, they don't. And I don't think the fix can cause any other >> problems, at least I haven't seen any in testing it. >> >> As for why there has been no previous report of this bug, I guess it's >> due to a combination of involving a relatively seldom needed command, >> having triggering conditions that probably also don't occur very often, >> and above all, there being presumably very few regular users of >> todo-mode. Admittedly, that combination speaks against the urgency of >> committing the fix to emacs-29, but again, the problem is, if not grave= , >> at least very confusing, and AFAICT the fix works and is low-risk. > > I'd like to release Emacs 29.1 _soon_. The only way to ensure this is > not to install on emacs-29 anything that doesn't _have_ to be there. > So please look at this from my vantage point, and try to play "devil's > advocate" against yourself. Then tell me what you think. I understand and appreciate your concerns. So I'll push the revised buffer-read-only fix, the print-{length,level} fix and the two doc fixes to emacs-29, and install the other two patches in master (after the emacs-29 fixes have been merged to master). But if someone else does report bugs against emacs-29 that the those two patches fix, I'll come back to you about backporting them ;-). Steve Berman From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 27 08:54:01 2023 Received: (at 64298) by debbugs.gnu.org; 27 Jun 2023 12:54:01 +0000 Received: from localhost ([127.0.0.1]:47860 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qE8Cm-0004rD-Vr for submit@debbugs.gnu.org; Tue, 27 Jun 2023 08:54:01 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47658) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qE8Ck-0004r0-KR for 64298@debbugs.gnu.org; Tue, 27 Jun 2023 08:53:59 -0400 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 1qE8Cb-0004SH-7O; Tue, 27 Jun 2023 08:53:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=lDt73vxDfBHnQDJUtrmOD8n8eriHAYlZUGZTFdW2FZE=; b=FELTUPEb85+E t3cmH8gJKDcUZzPd+I7JVpS7/sJGiJQimuXC1tt6+5sBehF+3/fjkdaZtF/aHd7/J9yjOK0y36M7H DEGO6bod4dkWGPcxQz4K/sRyHru9fGyuo+s9w9hCqR1fs07Ep4oLunDr2/oCGhrDuVMiauTGuKiOM Gg+3dCi2gCp/56PK/80jCIYgauwm6zF3X4iTQ1ZfY8K1MtQsKuGQdZQasapUPEfNVE6iQ5OHSk+IW YhzfhYABkxof5GCSIIBMbKCJCjvW1DUweot3xzOP6FTeRIC3k/y8ciR5QWhSc/Zwkx8yqMcuJ1k9n ABYhlVeXIyxM1oFPB8d43A==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qE8CY-0000vs-Ah; Tue, 27 Jun 2023 08:53:49 -0400 Date: Tue, 27 Jun 2023 15:54:08 +0300 Message-Id: <83352dvzf3.fsf@gnu.org> From: Eli Zaretskii To: Stephen Berman In-Reply-To: <87ttutrrw2.fsf@gmx.net> (message from Stephen Berman on Tue, 27 Jun 2023 14:50:21 +0200) Subject: Re: bug#64298: 29.0.92; Fixes for several todo-mode bugs References: <87leg6v9yg.fsf@gmx.net> <835y7axx44.fsf@gnu.org> <87y1k5rznu.fsf@gmx.net> <83bkh1w2yq.fsf@gnu.org> <87ttutrrw2.fsf@gmx.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 64298 Cc: 64298@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: Stephen Berman > Cc: 64298@debbugs.gnu.org > Date: Tue, 27 Jun 2023 14:50:21 +0200 > > On Tue, 27 Jun 2023 14:37:33 +0300 Eli Zaretskii wrote: > > > I'd like to release Emacs 29.1 _soon_. The only way to ensure this is > > not to install on emacs-29 anything that doesn't _have_ to be there. > > So please look at this from my vantage point, and try to play "devil's > > advocate" against yourself. Then tell me what you think. > > I understand and appreciate your concerns. So I'll push the revised > buffer-read-only fix, the print-{length,level} fix and the two doc fixes > to emacs-29, and install the other two patches in master (after the > emacs-29 fixes have been merged to master). Thanks. > But if someone else does report bugs against emacs-29 that the those > two patches fix, I'll come back to you about backporting them ;-). Fair enough. From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 27 11:58:35 2023 Received: (at 64298) by debbugs.gnu.org; 27 Jun 2023 15:58:35 +0000 Received: from localhost ([127.0.0.1]:49410 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qEB5O-0004Gx-UO for submit@debbugs.gnu.org; Tue, 27 Jun 2023 11:58:35 -0400 Received: from mout.gmx.net ([212.227.15.18]:56381) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qEB5K-0004Ge-F2 for 64298@debbugs.gnu.org; Tue, 27 Jun 2023 11:58:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=s31663417; t=1687881504; x=1688486304; i=stephen.berman@gmx.net; bh=cFtCv7QvhHvGneP46P4bV5mGzPi9hpxLwx8vI1+Tjcw=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date; b=tT/P6D9z8o1K99DAIPt0jgqZwX3qpNclBO3iTaJycfK2HEkAYlW8an28QRbErv/Uz71oAq3 mTOu2hRUOvmosf+gNVAxnA2rtCuy1O68Ggg7j8NsIAiynbhy0Dsf/QTjXjETgEa4cjFByr1fT cDxC2liNMrlKvuqp99/MirBPceYKQ78sI/kAq1WbpTK3VaKfaXw+Ilqiw5KppJ6L+md4cNc2/ EZ0foHErxh9uXeL7wWzHuxW3jI6R6PoodjX4aL5D0R4r2TKJFutlN/jHjaVF3zQqdqZpQq3A1 6PzMkuYBGt+R5zG8So8gJtYx4AefQaeexOYVK2TakAvuTng+yn5A== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from strobelfssd ([89.246.36.44]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MaJ7v-1qb7HZ1bev-00WDT1; Tue, 27 Jun 2023 17:58:24 +0200 From: Stephen Berman To: Eli Zaretskii Subject: Re: bug#64298: 29.0.92; Fixes for several todo-mode bugs In-Reply-To: <83352dvzf3.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 27 Jun 2023 15:54:08 +0300") References: <87leg6v9yg.fsf@gmx.net> <835y7axx44.fsf@gnu.org> <87y1k5rznu.fsf@gmx.net> <83bkh1w2yq.fsf@gnu.org> <87ttutrrw2.fsf@gmx.net> <83352dvzf3.fsf@gnu.org> Date: Tue, 27 Jun 2023 17:58:23 +0200 Message-ID: <87leg4sxr4.fsf@gmx.net> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:0mvoMUu0tK+PI4B+Nf8II6GltDZJwuOmwHKEhwQ2c+KpKxnWaL8 0Or2AEpyWHCGP+jk62cFyPlPSTTiyVXhgAs2km/7hAclQRGCSFxSj6MDq3cTChLltdIqIdy IYE8kdpyJFSkvUD3axOV9MlppTmvIv5Z5bs89b4YqfJ++HbmF87KHoK5/mgQ8nY3Kv/xEBR x0AVoaWk/UmvBahYxxkUw== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:5vkQfbIhSGw=;Vl9fMbjJH9pKzAZtJ89q92e5z0k khb3mjGBXp04DAp4buSavey18vO3h0aYw78czwa9IQmWAgOsOu5KZOl6NuUiG9+KC9uJZTp3E hDlLrOdPGgLcVPH9QIn6d7eBdozeOT+WkkqXonFWle8s8Tjh74TzWW1wKGBdrhlMAs/ZEn62L EfQSEAfxbZmDR4n2V1A6/A1QMbSprOnJf8UnOc7d1FmPmNqX43JBfmn1nAymC1c0TDDTYfIq8 KbTb74k9J3nFNaPb+2QX0t1gRU0qgEVXbKFUCpwBrwpn8FUflcDrtMWxXNemUvWlSHyHFJAp2 lyzWxRN2WmaJIoTXdpyJW313ooj9uerLTZkdGsJzWFOW5jykuBNrlFZEEa6as/EyeR7rzCW5t SFFvLwpi792XzNO8oNCwF+SPMg0EhBbKhwfUQXDK7NUnJJWSLPL7dW+lKAg0EeegdL4ZDYt4A Re2OjhCOgEvFgEbH2OKGDfN0RiiRJ70zzoTg7ULNjqVwuH9qVT1c6BBqRM4MWN5sJCUZljU+o fun2GACc4Ac9MmtO51zlhv84Mbo/Sdf7JITKIJN8aHKwj+byfU+49umt0ZRciCAsp4VKBt/Ug 0MQBfPDxq7XxXK/Iytn4egwW94aZHrSZhs2Kd3zCroNO4lJUU/TJi9MCtMJCwO4mAl1W12Ijj HXwXYiW2zZaKBMDMUfTkFjoz5FM3p5nprcyUy7/iy5EeHEUFASIkeeyqzgcvaNQXgWVb/ucq5 K0vZZMi6qpNgv6/W9I0eI+dsyozQAEh8SrF6c/+0fhatWGoClLp3DfNL7YeollK7zyJ1QX9Va A2l532L5A0dkKX6rqrw34BNQCJsGKfkkqcrtZ7Bup4z5gMoX6vtplNV7CHHVK6lAajicUd1U2 ZUdIiNUS1x8VDRAnNZuNFcBLfBhhHIqGpJUij6XMlGRagsePdnamom7AbSlB+jT3+bPsm1B/3 myYdX2c1gSA55lwl4nV6Adi2fSI= Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 64298 Cc: 64298@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.7 (-) On Tue, 27 Jun 2023 15:54:08 +0300 Eli Zaretskii wrote: >> From: Stephen Berman >> Cc: 64298@debbugs.gnu.org >> Date: Tue, 27 Jun 2023 14:50:21 +0200 >> >> On Tue, 27 Jun 2023 14:37:33 +0300 Eli Zaretskii wrote: >> >> > I'd like to release Emacs 29.1 _soon_. The only way to ensure this i= s >> > not to install on emacs-29 anything that doesn't _have_ to be there. >> > So please look at this from my vantage point, and try to play "devil'= s >> > advocate" against yourself. Then tell me what you think. >> >> I understand and appreciate your concerns. So I'll push the revised >> buffer-read-only fix, the print-{length,level} fix and the two doc fixe= s >> to emacs-29, and install the other two patches in master (after the >> emacs-29 fixes have been merged to master). > > Thanks. I've now pushed the emacs-29 commits as ee41f07be52, 6ae83322d4c and 11cead0d73c (unfortunately, I forgot to add the bug # to the first two commits). I'll keep this bug open until I've installed the two fixes for master. Steve Berman From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 02 05:52:55 2023 Received: (at 64298-done) by debbugs.gnu.org; 2 Jul 2023 09:52:55 +0000 Received: from localhost ([127.0.0.1]:59341 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qFtlH-0003Wu-GE for submit@debbugs.gnu.org; Sun, 02 Jul 2023 05:52:55 -0400 Received: from mout.gmx.net ([212.227.17.22]:57037) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qFtlF-0003Wh-KS for 64298-done@debbugs.gnu.org; Sun, 02 Jul 2023 05:52:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=s31663417; t=1688291567; x=1688896367; i=stephen.berman@gmx.net; bh=qMFm8xh6dbK+2OuVqTYZlXJV+mB7qW7eDGwVuqa2k/U=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date; b=Nf3G/5rvWyFZWQcODIEHuj/noYl/UutUMNZusqzL3ma39u9HwYXYLH7TOTL+zMqb8tI/eXY 01KGKYHfhfY4GfynyQ80Q+Pczwr4P0IxA4i0bAEa3CQuMHFJYc92O40muP1Nn0LtlPfkCnmai o42FbvpWNIOuMhaRTtPkK24O3pJtk9Q799z4F5WXe3mc7OUsb0UAwDdLJrK5NHHRvPWc6PM9o 4h2L0yTVBdOvvTcJUe/cBd/6EmNyDmxf/Bu3uDXxwGW4lCOkSL4F3KhNRMuYZZPcp8dwhlATi ZEQU4la/uaumARbgEqJMqcUdGyC7rpuP3TtnVhgLoAd7s4LE+kkQ== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from strobelfssd ([89.246.36.197]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MYvY8-1qT51L28p6-00UonD; Sun, 02 Jul 2023 11:52:47 +0200 From: Stephen Berman To: Eli Zaretskii Subject: Re: bug#64298: 29.0.92; Fixes for several todo-mode bugs In-Reply-To: <87leg4sxr4.fsf@gmx.net> (Stephen Berman's message of "Tue, 27 Jun 2023 17:58:23 +0200") References: <87leg6v9yg.fsf@gmx.net> <835y7axx44.fsf@gnu.org> <87y1k5rznu.fsf@gmx.net> <83bkh1w2yq.fsf@gnu.org> <87ttutrrw2.fsf@gmx.net> <83352dvzf3.fsf@gnu.org> <87leg4sxr4.fsf@gmx.net> Date: Sun, 02 Jul 2023 11:52:47 +0200 Message-ID: <87wmziskr4.fsf@gmx.net> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:fl/Z+8fj4IyMd8+Dca0Yw3V581gfLelU4sFVmCl8C44TK1skyfj 9l0JpkwJ1oHFtvNl5OWqfXBjeiFXxFPL2C7F1Df5z7gVmRWGOUeJKdkLYADRotqUWk0cF/D 4te2z5r4/qwslLP65GUjvt0nr6ZFMfmgnv7knZJBZo82kPOd9LTh25F+ygr+A85GV4K1ln6 yqFwSgo6b5OP9BtgBp/KQ== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:eNtRND/hHLA=;/Nk6r27OZoLkyG5Oa3NHl0WpB13 1UNtmluaiKWV/i2umdDGgLmgVCM+qRXU5iWrF+joVSjwvscmhsXVrWYpAl5vNk7sIarkjy9d5 /WGKA8cJwvM0h//pU6YcTOT9zei1ABltc26VSrvZjvFRdK7m22u8/CnqGHea0mVdoTfT3Lj5f iPQmeWlX1LlXmGHu5q6ZMEC1UGY8p+8j/opUZWnf4ao4WC5aeSUrqV6QKAXnWLItsPX+T87YV UDktDG25YCeV3gvIOxLz2jL9DfsoCGxCnbVtMuK4xfaMahmx+t0O9f3QEdM+2s0qjfAU8fmCk NpC2P48kXXojpk48E8nj5KLfwmRe0LHtuH+2qodIt1oVdN5+aSsat9SGF3SXDqj9HA/b++S6R Qir1Xrg4LVoTyoPGa9oNmny9UJb5vqDDy9O1bI0C6AD5g/7HSJzE2WzijV1PSFCQiHkWz424f gzWUhs/rMrCvBx5ynZdOrffn+aUGv6jDW5in18Gq0gr9FECFTnTC5VwqGabk7CzB6pdP/M3IT twtqhM4436KuDwSK2I8JJAXv0z95+nh/Aw9cYypcRdw43C2J5fymh3vt1AfwjeGC48IFxAKjP B4dDVV5AmIZRtb2uGwnRHVd/4wilWzWd+YiPQ7MVj5LK6X/SEMkid9QBGDNbQ+E+wzcFdMiVi Oo2YA08uSOYuFL2+WyoS/k26/NmUxVjSDCNiTXiYTdm5pzpxOibN6YmSC0Lx/qOEzChqUaSk3 DSYEjhKBCvSyPnwJRB0K36QIORyq9Rwag0tAUQToBF0lu+aCB7nnmLYxEN75wdVKiSEOLXqKu qMZLpVgkFxZWP9KdtGIP9zfcLygIDfwaUS/rfULcgpjlxnr+gjGRtycc7NcJngBkNmvYegk8d RTBi3hRUn0xqMNuFSvoX2El9FcniVyEr4WSL1p4hlyA9ci4ekEVCnHb0J9/MuNDUnhut70l7F OVr1Vw== Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 64298-done Cc: 64298-done@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.7 (-) On Tue, 27 Jun 2023 17:58:23 +0200 Stephen Berman = wrote: > On Tue, 27 Jun 2023 15:54:08 +0300 Eli Zaretskii wrote: > >>> From: Stephen Berman >>> Cc: 64298@debbugs.gnu.org >>> Date: Tue, 27 Jun 2023 14:50:21 +0200 >>> >>> On Tue, 27 Jun 2023 14:37:33 +0300 Eli Zaretskii wrote: >>> >>> > I'd like to release Emacs 29.1 _soon_. The only way to ensure this = is >>> > not to install on emacs-29 anything that doesn't _have_ to be there. >>> > So please look at this from my vantage point, and try to play "devil= 's >>> > advocate" against yourself. Then tell me what you think. >>> >>> I understand and appreciate your concerns. So I'll push the revised >>> buffer-read-only fix, the print-{length,level} fix and the two doc fix= es >>> to emacs-29, and install the other two patches in master (after the >>> emacs-29 fixes have been merged to master). >> >> Thanks. > > I've now pushed the emacs-29 commits as ee41f07be52, 6ae83322d4c and > 11cead0d73c (unfortunately, I forgot to add the bug # to the first two > commits). I'll keep this bug open until I've installed the two fixes > for master. I've now pushed to the two remaining fixes to master as commit a2ccab18ca2 and am closing this bug. Steve Berman From unknown Sat Aug 16 19:16:25 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, 30 Jul 2023 11:24:16 +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