From: Philip Kaludercic <philipk@posteo.net>
To: Pranshu Sharma <pranshu@bauherren.ovh>
Cc: Pranshu Sharma via "Emacs development discussions."
<emacs-devel@gnu.org>
Subject: Re: Merge haskell-ts-mode in upstream
Date: Sun, 29 Dec 2024 14:46:18 +0000 [thread overview]
Message-ID: <87cyhazgw5.fsf@posteo.net> (raw)
In-Reply-To: <87r05rmxhm.fsf@bauherren.ovh> (Pranshu Sharma's message of "Sun, 29 Dec 2024 05:13:57 +1000")
Pranshu Sharma <pranshu@bauherren.ovh> writes:
> Philip Kaludercic <philipk@posteo.net> writes:
>
>> Pranshu Sharma <pranshu@bauherren.ovh> writes:
>>
>>> Philip Kaludercic <philipk@posteo.net> writes:
>>>
>>>> I see that you have started a new repository. Do you want us to mirror
>>>> your changes with all the commit history, or are you OK with us just
>>>> copying over the coded periodically whenever you want to update the code?
>>>
>>> Ok, it seems like I'll be sticking to git one anyway, since
>>> git-hg-bridge or something doesn't work. I am fine with using the old
>>> repo.
>>
>> Wait, I am confused. The initial proposal was to add the package to
>> emacs.git, right?
>
> Yes, but iiuc it will still have own repo and emacs will just mirror it
> or smth.
Ok, that is fine. You'll just have to ping the mailing list whenever
there is a new release.
[...]
>>>>> (defun haskell-ts-indent-defun (pos)
>>>>> "Indent the current function."
>>>>> (interactive "d")
>>>>> (let ((node (treesit-node-at pos)))
>>>>> (while (not (string-match
>>>>> "^declarations$\\|haskell"
>>>>> (treesit-node-type (treesit-node-parent node))))
>>>>> (setq node (treesit-node-parent node)))
>>>>> (indent-region (treesit-node-start node) (treesit-node-end node))))
>>>>
>>>> Why is this function necessary, if we already have the general commands
>>>> for indenting a defun? If it is, it should probably be explained in the
>>>> docstring.
>>>
>>> Haskell functions are not paren wrapped(opptionally they are), so when I
>>> tested those functions don't work. C-M-h works, but the indentation is a
>>> little different in treesitter based mode, it works differently in
>>> incomplete sentences. Meaning newline-indent would rarley be the final
>>> indentation of any expression. I think the reason is too techical to
>>> include in docstring.
>>
>> So regular C-M-h would just re-indent a single equation, while this
>> matches all equations that constitute a total definition?
>
> Not really, it is mostly convince for C-M-h TAB, but since it is meant ot be
> used a lot, it get it's own special binding. The rules are tiny bit
> different.
But then my question is why doesn't M-q in Emacs 30 do the same as well?
If it is invoked in a prog-mode outside of a comment or a string, it
should mark the defun and indent it, or does it not do that for
tree-sitter modes?
[...]
>>> I attach new file, I have also pushed changes to codebrg repo.
>>
>> I think it would be someone with more Tree Sitter experience could take
>> a look at the code as well. Perhaps we should make this more formal by
>> moving over to the bug tracker?
>
> Sounds good.
1+
next prev parent reply other threads:[~2024-12-29 14:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-24 1:46 Merge haskell-ts-mode in upstream Pranshu Sharma via Emacs development discussions.
2024-12-24 12:00 ` Philip Kaludercic
2024-12-28 8:22 ` Pranshu Sharma via Emacs development discussions.
2024-12-28 16:15 ` Philip Kaludercic
2024-12-28 19:13 ` Pranshu Sharma via Emacs development discussions.
2024-12-29 14:46 ` Philip Kaludercic [this message]
2024-12-29 15:10 ` Pranshu Sharma via Emacs development discussions.
2024-12-31 13:49 ` Philip Kaludercic
2025-01-01 8:04 ` Pranshu Sharma via Emacs development discussions.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87cyhazgw5.fsf@posteo.net \
--to=philipk@posteo.net \
--cc=emacs-devel@gnu.org \
--cc=pranshu@bauherren.ovh \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.