all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: master 67ef1d54e7e 1/2: Make c-ts-common--fill-paragraph work for rust line comment
       [not found] ` <20240424055618.02D69C1DAEC@vcs2.savannah.gnu.org>
@ 2024-04-26  0:55   ` john muhl
  2024-04-27  2:58     ` Yuan Fu
  0 siblings, 1 reply; 2+ messages in thread
From: john muhl @ 2024-04-26  0:55 UTC (permalink / raw)
  To: Yuan Fu; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 96 bytes --]

This caused a c-ts-mode test to start failing.

  make test/lisp/progmodes/c-ts-mode-tests.log


[-- Attachment #2: c-ts-mode-tests.log --]
[-- Type: text/plain, Size: 2654 bytes --]

Running 4 tests (2024-04-24 02:52:40-0500, selector `(not (or (tag :expensive-test) (tag :unstable) (tag :nativecomp)))')
Test c-ts-mode-test-filling backtrace:
  signal(ert-test-failed (("Mismatch in test \"Not Over Fill 3\", file
  ert-fail(("Mismatch in test \"Not Over Fill 3\", file /home/build/em
  ert-test--erts-test(((code lambda nil (c-ts-mode) (setq-local indent
  ert-test-erts-file("/home/build/emacs/src-motif/test/lisp/progmodes/
  #[0 "\304C\3051\f\0\306C0\202\27\0\1\307\240\210\211@\1AD\262\1\310C
  #[0 "\303\300!\11>\204\17\0\304\305\306\300D\"\210\300\307H\303\1!\n
  handler-bind-1(#[0 "\303\300!\11>\204\17\0\304\305\306\300D\"\210\30
  ert--run-test-internal(#s(ert--test-execution-info :test ... :result
  ert-run-test(#s(ert-test :name c-ts-mode-test-filling :documentation
  ert-run-or-rerun-test(#s(ert--stats :selector ... :tests ... :test-m
  ert-run-tests((not (or (tag :expensive-test) (tag :unstable) (tag :n
  ert-run-tests-batch((not (or (tag :expensive-test) (tag :unstable) (
  ert-run-tests-batch-and-exit((not (or (tag :expensive-test) (tag :un
  eval((ert-run-tests-batch-and-exit '(not (or (tag :expensive-test) (
  command-line-1(("-L" ":." "-l" "ert" "--eval" "(setq treesit-extra-l
  command-line()
  normal-top-level()
Test c-ts-mode-test-filling condition:
    (ert-test-failed
     ("Mismatch in test \"Not Over Fill 3\", file /home/build/emacs/src-motif/test/lisp/progmodes/c-ts-mode-resources/filling.erts"
      "// woooomy woooomy woooomy woooomy woooomy woooomy woooomy woooomy woooomy\nreturn; // woooomy woooomy woooomy woooomy woooomy woooomy woooomy\n// woooomy woooomy woooomy woooomy woooomy woooomy woooomy woooomy woooomy\n// woooomy woooomy woooomy woooomy woooomy woooomy woooomy\nreturn; // woooomy woooomy woooomy woooomy woooomy woooomy woooomy woooomy\n"
      "// woooomy woooomy woooomy woooomy woooomy woooomy woooomy woooomy woooomy\nreturn; // woooomy woooomy woooomy woooomy woooomy woooomy woooomy\n        // woooomy woooomy woooomy woooomy woooomy woooomy woooomy\n        // woooomy woooomy woooomy woooomy woooomy woooomy woooomy\n        // woooomy woooomy\nreturn; // woooomy woooomy woooomy woooomy woooomy woooomy woooomy woooomy\n"))
   FAILED  1/4  c-ts-mode-test-filling (0.057602 sec) at lisp/progmodes/c-ts-mode-tests.el:38
Mark set
   passed  2/4  c-ts-mode-test-indentation (1.366066 sec)
   passed  3/4  c-ts-mode-test-indentation-bsd (0.106362 sec)
   passed  4/4  c-ts-mode-test-indentation-preproc (0.066358 sec)

Ran 4 tests, 3 results as expected, 1 unexpected (2024-04-24 02:52:42-0500, 1.795714 sec)

1 unexpected results:
   FAILED  c-ts-mode-test-filling


[-- Attachment #3: Type: text/plain, Size: 1162 bytes --]



Yuan Fu <casouri@gmail.com> writes:

> branch: master
> commit 67ef1d54e7e3983bb03840cf8f2990d579942710
> Author: Yuan Fu <casouri@gmail.com>
> Commit: Yuan Fu <casouri@gmail.com>
>
>     Make c-ts-common--fill-paragraph work for rust line comment
>     
>     * lisp/progmodes/c-ts-common.el (c-ts-common--fill-paragraph): Back to
>     BOL before checking for //.
> ---
>  lisp/progmodes/c-ts-common.el | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/lisp/progmodes/c-ts-common.el b/lisp/progmodes/c-ts-common.el
> index 457aa55c195..c06295b8a87 100644
> --- a/lisp/progmodes/c-ts-common.el
> +++ b/lisp/progmodes/c-ts-common.el
> @@ -125,6 +125,9 @@ ARG is passed to `fill-paragraph'."
>                              (treesit-node-type node))
>          (if (save-excursion
>                (goto-char (treesit-node-start node))
> +              ;; In rust, NODE will be the body of a comment excluding
> +              ;; the //, so we need to go to BOL to check for //.
> +              (back-to-indentation)
>                (looking-at "//"))
>              (fill-comment-paragraph arg)
>            (c-ts-common--fill-block-comment arg)))


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: master 67ef1d54e7e 1/2: Make c-ts-common--fill-paragraph work for rust line comment
  2024-04-26  0:55   ` master 67ef1d54e7e 1/2: Make c-ts-common--fill-paragraph work for rust line comment john muhl
@ 2024-04-27  2:58     ` Yuan Fu
  0 siblings, 0 replies; 2+ messages in thread
From: Yuan Fu @ 2024-04-27  2:58 UTC (permalink / raw)
  To: john muhl; +Cc: emacs-devel



> On Apr 25, 2024, at 5:55 PM, john muhl <jm@pub.pink> wrote:
> 
> This caused a c-ts-mode test to start failing.
> 
>  make test/lisp/progmodes/c-ts-mode-tests.log
> 
> <c-ts-mode-tests.log>

Thanks John! I pushed a fix for it.

Yuan



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-04-27  2:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <171393817752.19291.7218731840020151471@vcs2.savannah.gnu.org>
     [not found] ` <20240424055618.02D69C1DAEC@vcs2.savannah.gnu.org>
2024-04-26  0:55   ` master 67ef1d54e7e 1/2: Make c-ts-common--fill-paragraph work for rust line comment john muhl
2024-04-27  2:58     ` Yuan Fu

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.