* bug#36565: [PATCH] Suppress interactive-only warnings in undo-tests.el @ 2019-07-10 1:14 Stefan Kangas 2019-07-10 1:24 ` Stefan Kangas 2019-07-10 12:09 ` Lars Ingebrigtsen 0 siblings, 2 replies; 11+ messages in thread From: Stefan Kangas @ 2019-07-10 1:14 UTC (permalink / raw) To: 36565 This patch fixes these warnings in make check: ELC src/undo-tests.elc In toplevel form: src/undo-tests.el:262:6:Warning: `delete-forward-char' is for interactive use only; use `delete-char' instead. src/undo-tests.el:317:6:Warning: `delete-forward-char' is for interactive use only; use `delete-char' instead. src/undo-tests.el:353:47:Warning: `delete-forward-char' is for interactive use only; use `delete-char' instead. src/undo-tests.el:370:13:Warning: `delete-forward-char' is for interactive use only; use `delete-char' instead. src/undo-tests.el:394:19:Warning: `delete-forward-char' is for interactive use only; use `delete-char' instead. src/undo-tests.el:433:11:Warning: `delete-forward-char' is for interactive use only; use `delete-char' instead. (I'll send the patch in a separate message once this is assigned a bug number.) Thanks, Stefan Kangas ^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#36565: [PATCH] Suppress interactive-only warnings in undo-tests.el 2019-07-10 1:14 bug#36565: [PATCH] Suppress interactive-only warnings in undo-tests.el Stefan Kangas @ 2019-07-10 1:24 ` Stefan Kangas 2019-07-10 3:40 ` Stefan Kangas 2019-07-10 12:09 ` Lars Ingebrigtsen 1 sibling, 1 reply; 11+ messages in thread From: Stefan Kangas @ 2019-07-10 1:24 UTC (permalink / raw) To: 36565 [-- Attachment #1: Type: text/plain, Size: 166 bytes --] Stefan Kangas <stefan@marxist.se> writes: > (I'll send the patch in a separate message once this is assigned a bug > number.) Patch attached. Thanks, Stefan Kangas [-- Attachment #2: 0001-Suppress-interactive-only-warnings-in-undo-tests.el.patch --] [-- Type: application/octet-stream, Size: 3003 bytes --] From 5eebeba79f0e9d62daf226ca17bda9ea0248ccc3 Mon Sep 17 00:00:00 2001 From: Stefan Kangas <stefankangas@gmail.com> Date: Wed, 10 Jul 2019 03:05:16 +0200 Subject: [PATCH] Suppress interactive-only warnings in undo-tests.el * test/src/undo-tests.el (undo-test-region-deletion) (undo-test-region-example, undo-test-marker-adjustment-nominal) (undo-test-region-t-marker, undo-test-marker-adjustment-moved) (undo-test-region-mark-adjustment): Suppress interactive-only warnings. --- test/src/undo-tests.el | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/test/src/undo-tests.el b/test/src/undo-tests.el index b84f5a5847..14ba0659a3 100644 --- a/test/src/undo-tests.el +++ b/test/src/undo-tests.el @@ -255,7 +255,9 @@ undo-test-region-deletion (insert "12345") (search-backward "4") (undo-boundary) - (delete-forward-char 1) + (with-suppressed-warnings + (interactive-only delete-forward-char) + (delete-forward-char 1)) (search-backward "1") (undo-boundary) (insert "xxxx") @@ -299,7 +301,9 @@ undo-test-region-example (insert "ddd") (search-backward "ad") (undo-boundary) - (delete-forward-char 2) + (with-suppressed-warnings + (interactive-only delete-forward-char) + (delete-forward-char 2)) (undo-boundary) ;; Select "dd" (push-mark (point) t t) @@ -348,7 +352,9 @@ undo-test-marker-adjustment-nominal (let ((m (make-marker))) (set-marker m 2 (current-buffer)) (goto-char (point-min)) - (delete-forward-char 3) + (with-suppressed-warnings + (interactive-only delete-forward-char) + (delete-forward-char 3)) (undo-boundary) (should (= (point-min) (marker-position m))) (undo) @@ -369,7 +375,9 @@ undo-test-region-t-marker (push-mark (point) t t) (setq mark-active t) (goto-char (point-min)) - (delete-forward-char 1) ;; delete region covering "ab" + (with-suppressed-warnings + (interactive-only delete-forward-char) + (delete-forward-char 1)) ;; delete region covering "ab" (undo-boundary) (should (= (point-min) (marker-position m))) ;; Resurrect "ab". m's insertion type means the reinsertion @@ -389,7 +397,9 @@ undo-test-marker-adjustment-moved (let ((m (make-marker))) (set-marker m 2 (current-buffer)) ; m at b (goto-char (point-min)) - (delete-forward-char 3) ; m at d + (with-suppressed-warnings + (interactive-only delete-forward-char) + (delete-forward-char 3)) ; m at d (undo-boundary) (set-marker m 4) ; m at g (undo) @@ -422,7 +432,9 @@ undo-test-region-mark-adjustment (push-mark (point) t t) (setq mark-active t) (goto-char (- (point) 3)) - (delete-forward-char 1) + (with-suppressed-warnings + (interactive-only delete-forward-char) + (delete-forward-char 1)) (undo-boundary) (insert "bbb") -- 2.21.0 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* bug#36565: [PATCH] Suppress interactive-only warnings in undo-tests.el 2019-07-10 1:24 ` Stefan Kangas @ 2019-07-10 3:40 ` Stefan Kangas 2019-07-10 3:53 ` Stefan Kangas 0 siblings, 1 reply; 11+ messages in thread From: Stefan Kangas @ 2019-07-10 3:40 UTC (permalink / raw) To: 36565 [-- Attachment #1: Type: text/plain, Size: 477 bytes --] Stefan Kangas <stefan@marxist.se> writes: > > Stefan Kangas <stefan@marxist.se> writes: > > (I'll send the patch in a separate message once this is assigned a bug > > number.) > > Patch attached. 1. Wrong patch attached, ugh. Please find correct version attached. 2. This actually doesn't work due to an issue with with-suppressed-tests. I have reported a separate Bug#36568 for this. This patch therefore unfortunately would have no effect for now. Thanks, Stefan Kangas [-- Attachment #2: 0001-Suppress-interactive-only-warnings-in-undo-tests.el.patch --] [-- Type: application/octet-stream, Size: 3003 bytes --] From 5eebeba79f0e9d62daf226ca17bda9ea0248ccc3 Mon Sep 17 00:00:00 2001 From: Stefan Kangas <stefankangas@gmail.com> Date: Wed, 10 Jul 2019 03:05:16 +0200 Subject: [PATCH] Suppress interactive-only warnings in undo-tests.el * test/src/undo-tests.el (undo-test-region-deletion) (undo-test-region-example, undo-test-marker-adjustment-nominal) (undo-test-region-t-marker, undo-test-marker-adjustment-moved) (undo-test-region-mark-adjustment): Suppress interactive-only warnings. --- test/src/undo-tests.el | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/test/src/undo-tests.el b/test/src/undo-tests.el index b84f5a5847..14ba0659a3 100644 --- a/test/src/undo-tests.el +++ b/test/src/undo-tests.el @@ -255,7 +255,9 @@ undo-test-region-deletion (insert "12345") (search-backward "4") (undo-boundary) - (delete-forward-char 1) + (with-suppressed-warnings + (interactive-only delete-forward-char) + (delete-forward-char 1)) (search-backward "1") (undo-boundary) (insert "xxxx") @@ -299,7 +301,9 @@ undo-test-region-example (insert "ddd") (search-backward "ad") (undo-boundary) - (delete-forward-char 2) + (with-suppressed-warnings + (interactive-only delete-forward-char) + (delete-forward-char 2)) (undo-boundary) ;; Select "dd" (push-mark (point) t t) @@ -348,7 +352,9 @@ undo-test-marker-adjustment-nominal (let ((m (make-marker))) (set-marker m 2 (current-buffer)) (goto-char (point-min)) - (delete-forward-char 3) + (with-suppressed-warnings + (interactive-only delete-forward-char) + (delete-forward-char 3)) (undo-boundary) (should (= (point-min) (marker-position m))) (undo) @@ -369,7 +375,9 @@ undo-test-region-t-marker (push-mark (point) t t) (setq mark-active t) (goto-char (point-min)) - (delete-forward-char 1) ;; delete region covering "ab" + (with-suppressed-warnings + (interactive-only delete-forward-char) + (delete-forward-char 1)) ;; delete region covering "ab" (undo-boundary) (should (= (point-min) (marker-position m))) ;; Resurrect "ab". m's insertion type means the reinsertion @@ -389,7 +397,9 @@ undo-test-marker-adjustment-moved (let ((m (make-marker))) (set-marker m 2 (current-buffer)) ; m at b (goto-char (point-min)) - (delete-forward-char 3) ; m at d + (with-suppressed-warnings + (interactive-only delete-forward-char) + (delete-forward-char 3)) ; m at d (undo-boundary) (set-marker m 4) ; m at g (undo) @@ -422,7 +432,9 @@ undo-test-region-mark-adjustment (push-mark (point) t t) (setq mark-active t) (goto-char (- (point) 3)) - (delete-forward-char 1) + (with-suppressed-warnings + (interactive-only delete-forward-char) + (delete-forward-char 1)) (undo-boundary) (insert "bbb") -- 2.21.0 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* bug#36565: [PATCH] Suppress interactive-only warnings in undo-tests.el 2019-07-10 3:40 ` Stefan Kangas @ 2019-07-10 3:53 ` Stefan Kangas 2019-07-17 20:08 ` Noam Postavsky 0 siblings, 1 reply; 11+ messages in thread From: Stefan Kangas @ 2019-07-10 3:53 UTC (permalink / raw) To: 36565 [-- Attachment #1: Type: text/plain, Size: 130 bytes --] Correct patch attached -- third attempt. (Sorry about the noise -- it was created in the "test" subdirectory and I mixed it up.) [-- Attachment #2: 0001-Suppress-interactive-only-warnings-in-undo-tests.el-.patch --] [-- Type: application/octet-stream, Size: 3032 bytes --] From eddaf5350b6ad25f3cb908793756195cc3bd5fad Mon Sep 17 00:00:00 2001 From: Stefan Kangas <stefankangas@gmail.com> Date: Wed, 10 Jul 2019 03:05:16 +0200 Subject: [PATCH] Suppress interactive-only warnings in undo-tests.el (Bug#36565) * test/src/undo-tests.el (undo-test-region-deletion) (undo-test-region-example, undo-test-marker-adjustment-nominal) (undo-test-region-t-marker, undo-test-marker-adjustment-moved) (undo-test-region-mark-adjustment): Suppress interactive-only warnings. --- test/src/undo-tests.el | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/test/src/undo-tests.el b/test/src/undo-tests.el index b84f5a5847..34c470592f 100644 --- a/test/src/undo-tests.el +++ b/test/src/undo-tests.el @@ -255,7 +255,9 @@ undo-test-region-deletion (insert "12345") (search-backward "4") (undo-boundary) - (delete-forward-char 1) + (with-suppressed-warnings + ((interactive-only delete-forward-char)) + (delete-forward-char 1)) (search-backward "1") (undo-boundary) (insert "xxxx") @@ -299,7 +301,9 @@ undo-test-region-example (insert "ddd") (search-backward "ad") (undo-boundary) - (delete-forward-char 2) + (with-suppressed-warnings + ((interactive-only delete-forward-char)) + (delete-forward-char 2)) (undo-boundary) ;; Select "dd" (push-mark (point) t t) @@ -348,7 +352,9 @@ undo-test-marker-adjustment-nominal (let ((m (make-marker))) (set-marker m 2 (current-buffer)) (goto-char (point-min)) - (delete-forward-char 3) + (with-suppressed-warnings + ((interactive-only delete-forward-char)) + (delete-forward-char 3)) (undo-boundary) (should (= (point-min) (marker-position m))) (undo) @@ -369,7 +375,9 @@ undo-test-region-t-marker (push-mark (point) t t) (setq mark-active t) (goto-char (point-min)) - (delete-forward-char 1) ;; delete region covering "ab" + (with-suppressed-warnings + ((interactive-only delete-forward-char)) + (delete-forward-char 1)) ;; delete region covering "ab" (undo-boundary) (should (= (point-min) (marker-position m))) ;; Resurrect "ab". m's insertion type means the reinsertion @@ -389,7 +397,9 @@ undo-test-marker-adjustment-moved (let ((m (make-marker))) (set-marker m 2 (current-buffer)) ; m at b (goto-char (point-min)) - (delete-forward-char 3) ; m at d + (with-suppressed-warnings + ((interactive-only delete-forward-char)) + (delete-forward-char 3)) ; m at d (undo-boundary) (set-marker m 4) ; m at g (undo) @@ -422,7 +432,9 @@ undo-test-region-mark-adjustment (push-mark (point) t t) (setq mark-active t) (goto-char (- (point) 3)) - (delete-forward-char 1) + (with-suppressed-warnings + ((interactive-only delete-forward-char)) + (delete-forward-char 1)) (undo-boundary) (insert "bbb") -- 2.21.0 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* bug#36565: [PATCH] Suppress interactive-only warnings in undo-tests.el 2019-07-10 3:53 ` Stefan Kangas @ 2019-07-17 20:08 ` Noam Postavsky 2019-08-04 16:46 ` Stefan Kangas 0 siblings, 1 reply; 11+ messages in thread From: Noam Postavsky @ 2019-07-17 20:08 UTC (permalink / raw) To: Stefan Kangas; +Cc: 36565 Stefan Kangas <stefan@marxist.se> writes: > (undo-boundary) > - (delete-forward-char 1) > + (with-suppressed-warnings > + ((interactive-only delete-forward-char)) > + (delete-forward-char 1)) Perhaps it would be better to use funcall-interactively? ^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#36565: [PATCH] Suppress interactive-only warnings in undo-tests.el 2019-07-17 20:08 ` Noam Postavsky @ 2019-08-04 16:46 ` Stefan Kangas 2019-08-08 12:30 ` Noam Postavsky 0 siblings, 1 reply; 11+ messages in thread From: Stefan Kangas @ 2019-08-04 16:46 UTC (permalink / raw) To: Noam Postavsky; +Cc: 36565 [-- Attachment #1: Type: text/plain, Size: 170 bytes --] Noam Postavsky <npostavs@gmail.com> writes: > Perhaps it would be better to use funcall-interactively? Good idea. How about the attached patch? Thanks, Stefan Kangas [-- Attachment #2: 0001-Suppress-interactive-only-warnings-in-undo-tests.el-.patch --] [-- Type: text/x-patch, Size: 2670 bytes --] From cf0acdd73e665228913836a89d61dac854e296ed Mon Sep 17 00:00:00 2001 From: Stefan Kangas <stefankangas@gmail.com> Date: Fri, 2 Aug 2019 16:46:08 +0200 Subject: [PATCH] Suppress interactive-only warnings in undo-tests.el (Bug#36565) * test/src/undo-tests.el (undo-test-region-deletion) (undo-test-region-example, undo-test-marker-adjustment-nominal) (undo-test-region-t-marker, undo-test-marker-adjustment-moved) (undo-test-region-mark-adjustment): Suppress interactive-only warnings by using funcall-interactively. --- test/src/undo-tests.el | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/src/undo-tests.el b/test/src/undo-tests.el index 8395ba9909..fc2dfe027e 100644 --- a/test/src/undo-tests.el +++ b/test/src/undo-tests.el @@ -255,7 +255,7 @@ undo-test-region-deletion (insert "12345") (search-backward "4") (undo-boundary) - (delete-forward-char 1) + (funcall-interactively 'delete-forward-char 1) (search-backward "1") (undo-boundary) (insert "xxxx") @@ -299,7 +299,7 @@ undo-test-region-example (insert "ddd") (search-backward "ad") (undo-boundary) - (delete-forward-char 2) + (funcall-interactively 'delete-forward-char 2) (undo-boundary) ;; Select "dd" (push-mark (point) t t) @@ -348,7 +348,7 @@ undo-test-marker-adjustment-nominal (let ((m (make-marker))) (set-marker m 2 (current-buffer)) (goto-char (point-min)) - (delete-forward-char 3) + (funcall-interactively 'delete-forward-char 3) (undo-boundary) (should (= (point-min) (marker-position m))) (undo) @@ -369,7 +369,7 @@ undo-test-region-t-marker (push-mark (point) t t) (setq mark-active t) (goto-char (point-min)) - (delete-forward-char 1) ;; delete region covering "ab" + (funcall-interactively 'delete-forward-char 1) ; delete region covering "ab" (undo-boundary) (should (= (point-min) (marker-position m))) ;; Resurrect "ab". m's insertion type means the reinsertion @@ -389,7 +389,7 @@ undo-test-marker-adjustment-moved (let ((m (make-marker))) (set-marker m 2 (current-buffer)) ; m at b (goto-char (point-min)) - (delete-forward-char 3) ; m at d + (funcall-interactively 'delete-forward-char 3) ; m at d (undo-boundary) (set-marker m 4) ; m at g (undo) @@ -422,7 +422,7 @@ undo-test-region-mark-adjustment (push-mark (point) t t) (setq mark-active t) (goto-char (- (point) 3)) - (delete-forward-char 1) + (funcall-interactively 'delete-forward-char 1) (undo-boundary) (insert "bbb") -- 2.20.1 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* bug#36565: [PATCH] Suppress interactive-only warnings in undo-tests.el 2019-08-04 16:46 ` Stefan Kangas @ 2019-08-08 12:30 ` Noam Postavsky 0 siblings, 0 replies; 11+ messages in thread From: Noam Postavsky @ 2019-08-08 12:30 UTC (permalink / raw) To: Stefan Kangas; +Cc: 36565 tags 36565 fixed close 36565 27.1 quit >> Perhaps it would be better to use funcall-interactively? > > Good idea. How about the attached patch? Pushed to master. 2c0f6c3540 2019-08-08T08:26:31-04:00 "Suppress interactive-only warnings in undo-tests.el (Bug#36565)" https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=2c0f6c3540ccad4b5832e9e00ece483a6a456bbb ^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#36565: [PATCH] Suppress interactive-only warnings in undo-tests.el 2019-07-10 1:14 bug#36565: [PATCH] Suppress interactive-only warnings in undo-tests.el Stefan Kangas 2019-07-10 1:24 ` Stefan Kangas @ 2019-07-10 12:09 ` Lars Ingebrigtsen 2019-07-10 22:53 ` Stefan Kangas 1 sibling, 1 reply; 11+ messages in thread From: Lars Ingebrigtsen @ 2019-07-10 12:09 UTC (permalink / raw) To: Stefan Kangas; +Cc: 36565 Stefan Kangas <stefan@marxist.se> writes: > This patch fixes these warnings in make check: > > ELC src/undo-tests.elc > > In toplevel form: > src/undo-tests.el:262:6:Warning: `delete-forward-char' is for interactive use > only; use `delete-char' instead. Hm... is it worth it to suppress warnings in the tests, though? I think we kinda expect there to be a lot of noise when running the tests? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no ^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#36565: [PATCH] Suppress interactive-only warnings in undo-tests.el 2019-07-10 12:09 ` Lars Ingebrigtsen @ 2019-07-10 22:53 ` Stefan Kangas 2019-07-11 14:11 ` Lars Ingebrigtsen 0 siblings, 1 reply; 11+ messages in thread From: Stefan Kangas @ 2019-07-10 22:53 UTC (permalink / raw) To: Lars Ingebrigtsen; +Cc: 36565 Lars Ingebrigtsen <larsi@gnus.org> writes: > Hm... is it worth it to suppress warnings in the tests, though? I > think we kinda expect there to be a lot of noise when running the tests? I'm not sure I understand. Do you mean that you're not sure if it's worth it to fix warnings in the Emacs test suite, or do you mean fixing with-suppressed-warnings to handle this case? Best regards, Stefan Kangas ^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#36565: [PATCH] Suppress interactive-only warnings in undo-tests.el 2019-07-10 22:53 ` Stefan Kangas @ 2019-07-11 14:11 ` Lars Ingebrigtsen 2019-07-11 17:31 ` Stefan Kangas 0 siblings, 1 reply; 11+ messages in thread From: Lars Ingebrigtsen @ 2019-07-11 14:11 UTC (permalink / raw) To: Stefan Kangas; +Cc: 36565 Stefan Kangas <stefan@marxist.se> writes: > Lars Ingebrigtsen <larsi@gnus.org> writes: >> Hm... is it worth it to suppress warnings in the tests, though? I >> think we kinda expect there to be a lot of noise when running the tests? > > I'm not sure I understand. Do you mean that you're not sure if it's > worth it to fix warnings in the Emacs test suite, or do you mean > fixing with-suppressed-warnings to handle this case? I meant the first. I mean, I'm not opposed to it or anything, but my opinion is that aiming for a warning-free test suite would be to put an undue burden on the test writers for little gain. (When we're used to having a warning-free build, then any warning sticks out like a sore thumb and is generally fixed pretty quickly...) -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no ^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#36565: [PATCH] Suppress interactive-only warnings in undo-tests.el 2019-07-11 14:11 ` Lars Ingebrigtsen @ 2019-07-11 17:31 ` Stefan Kangas 0 siblings, 0 replies; 11+ messages in thread From: Stefan Kangas @ 2019-07-11 17:31 UTC (permalink / raw) To: Lars Ingebrigtsen; +Cc: 36565 Lars Ingebrigtsen <larsi@gnus.org> writes: > I mean, I'm not opposed to it or anything, but my > opinion is that aiming for a warning-free test suite would be to put > an undue burden on the test writers for little gain. Thanks for clarifying, and I fully agree. Best regards, Stefan Kangas ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2019-08-08 12:30 UTC | newest] Thread overview: 11+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2019-07-10 1:14 bug#36565: [PATCH] Suppress interactive-only warnings in undo-tests.el Stefan Kangas 2019-07-10 1:24 ` Stefan Kangas 2019-07-10 3:40 ` Stefan Kangas 2019-07-10 3:53 ` Stefan Kangas 2019-07-17 20:08 ` Noam Postavsky 2019-08-04 16:46 ` Stefan Kangas 2019-08-08 12:30 ` Noam Postavsky 2019-07-10 12:09 ` Lars Ingebrigtsen 2019-07-10 22:53 ` Stefan Kangas 2019-07-11 14:11 ` Lars Ingebrigtsen 2019-07-11 17:31 ` Stefan Kangas
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/emacs.git https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.