GNU bug report logs -
#75109
[PATCH] indent.el Comments for indent-for-tab-command as a first step for refactoring.
Previous Next
Reported by: Vitaliy <vitalij <at> gmx.com>
Date: Thu, 26 Dec 2024 04:34:03 UTC
Severity: wishlist
Tags: moreinfo
Done: Stefan Kangas <stefankangas <at> gmail.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 75109 in the body.
You can then email your comments to 75109 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#75109
; Package
emacs
.
(Thu, 26 Dec 2024 04:34:03 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Vitaliy <vitalij <at> gmx.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Thu, 26 Dec 2024 04:34:03 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Fixed "From" header inside of patch.
Vitaliy <vitalij <at> gmx.com> writes:
[0001-Comment-for-indent-for-tab-command-as-a-first-step-t.patch (text/x-patch, inline)]
From 00c1dbbf729b1180963abb6743116ec4c8c6b5ad Mon Sep 17 00:00:00 2001
From: Vitaliy <vitalij <at> gmx.com>
Date: Wed, 25 Dec 2024 21:26:05 +0000
Subject: [PATCH] Comment for indent-for-tab-command as a first step to
refactoring.
---
lisp/indent.el | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/lisp/indent.el b/lisp/indent.el
index 74ef9183d95..613454918b8 100644
--- a/lisp/indent.el
+++ b/lisp/indent.el
@@ -160,6 +160,7 @@ prefix argument is ignored."
;; The region is active, indent it.
((use-region-p)
(indent-region (region-beginning) (region-end)))
+ ;; *1.* inserts a tab character for special indentation cases.
((or ;; indent-to-left-margin is only meant for indenting,
;; so we force it to always insert a tab here.
(eq indent-line-function 'indent-to-left-margin)
@@ -172,15 +173,17 @@ prefix argument is ignored."
(old-point (point))
(old-indent (current-indentation)))
- ;; Indent the line.
+ ;; *2.* Indent the line with specified function
(or (not (eq (indent--funcall-widened indent-line-function) 'noindent))
+ ;; *3.* Indent comment
(indent--default-inside-comment)
+ ;; *4.* Fallback to default indent function
(when (or (<= (current-column) (current-indentation))
(not (eq tab-always-indent 'complete)))
(indent--funcall-widened (default-value 'indent-line-function))))
(cond
- ;; If the text was already indented right, try completion.
+ ;; *5.* If the text was already indented right, try completion.
((and (eq tab-always-indent 'complete)
(eql old-point (point))
(eql old-tick (buffer-chars-modified-tick))
@@ -193,9 +196,9 @@ prefix argument is ignored."
('word-or-paren (not (memq syn '(2 4 5))))
('word-or-paren-or-punct (not (memq syn '(2 4 5 1))))))))
(completion-at-point))
-
- ;; If a prefix argument was given, rigidly indent the following
- ;; sexp to match the change in the current line's indentation.
+ ;; *6* If a prefix argument was given, rigidly indent the
+ ;; following sexp to match the change in the current line's
+ ;; indentation.
(arg
(let ((end-marker
(save-excursion
--
2.45.2
[Message part 3 (text/plain, inline)]
> Tags: notabug
> Package: indent.el
> Version: master
> Severity: wishlist
>
> In GNU Emacs master.
>
> #'indent-for-tab-command function now have strict steps, I hope in
> future we will add ability to select on what orded they should go, as a
> first step I suggest to comment them to separate.
> This steps in unclear heap now:
> -. **Check for Active Region**: If there is an active region, it indents that region.
> 1. **Handle Special Indentation Cases**: If the indentation function is specific or certain conditions are met, it inserts a tab character.
> 2. **Default Indentation Handling**: If neither of the above, it performs standard line indentation.
> 3. **Check for Completion Conditions**: If specific conditions are met after indentation, it triggers completion.
> 4. **Rigid Indentation with Prefix Argument**: If a prefix argument is provided, it rigidly indents the balanced expression to reflect the current line's indentation.
> From 00c1dbbf729b1180963abb6743116ec4c8c6b5ad Mon Sep 17 00:00:00 2001
> From: none <none>
> Date: Wed, 25 Dec 2024 21:26:05 +0000
> Subject: [PATCH] Comment for indent-for-tab-command as a first step to
> refactoring.
>
> ---
> lisp/indent.el | 13 ++++++++-----
> 1 file changed, 8 insertions(+), 5 deletions(-)
>
> diff --git a/lisp/indent.el b/lisp/indent.el
> index 74ef9183d95..613454918b8 100644
> --- a/lisp/indent.el
> +++ b/lisp/indent.el
> @@ -160,6 +160,7 @@ prefix argument is ignored."
> ;; The region is active, indent it.
> ((use-region-p)
> (indent-region (region-beginning) (region-end)))
> + ;; *1.* inserts a tab character for special indentation cases.
> ((or ;; indent-to-left-margin is only meant for indenting,
> ;; so we force it to always insert a tab here.
> (eq indent-line-function 'indent-to-left-margin)
> @@ -172,15 +173,17 @@ prefix argument is ignored."
> (old-point (point))
> (old-indent (current-indentation)))
>
> - ;; Indent the line.
> + ;; *2.* Indent the line with specified function
> (or (not (eq (indent--funcall-widened indent-line-function) 'noindent))
> + ;; *3.* Indent comment
> (indent--default-inside-comment)
> + ;; *4.* Fallback to default indent function
> (when (or (<= (current-column) (current-indentation))
> (not (eq tab-always-indent 'complete)))
> (indent--funcall-widened (default-value 'indent-line-function))))
>
> (cond
> - ;; If the text was already indented right, try completion.
> + ;; *5.* If the text was already indented right, try completion.
> ((and (eq tab-always-indent 'complete)
> (eql old-point (point))
> (eql old-tick (buffer-chars-modified-tick))
> @@ -193,9 +196,9 @@ prefix argument is ignored."
> ('word-or-paren (not (memq syn '(2 4 5))))
> ('word-or-paren-or-punct (not (memq syn '(2 4 5 1))))))))
> (completion-at-point))
> -
> - ;; If a prefix argument was given, rigidly indent the following
> - ;; sexp to match the change in the current line's indentation.
> + ;; *6* If a prefix argument was given, rigidly indent the
> + ;; following sexp to match the change in the current line's
> + ;; indentation.
> (arg
> (let ((end-marker
> (save-excursion
> --
> 2.45.2
>
>
> --
> Best regards,
> Vitaliy
> Magic number: 7850B0B5E3F536601D2E6A9DE1C43E074A047699
--
Best regards,
Magic number: 7850B0B5E3F536601D2E6A9DE1C43E074A047699
Severity set to 'wishlist' from 'normal'
Request was from
Stefan Kangas <stefankangas <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Thu, 02 Jan 2025 01:25:03 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#75109
; Package
emacs
.
(Sat, 04 Jan 2025 11:56:02 GMT)
Full text and
rfc822 format available.
Message #10 received at 75109 <at> debbugs.gnu.org (full text, mbox):
> Date: Wed, 25 Dec 2024 21:48:58 -0000
> From: Vitaliy via "Bug reports for GNU Emacs,
> the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
>
> Fixed "From" header inside of patch.
>
> Vitaliy <vitalij <at> gmx.com> writes:
>
> >From 00c1dbbf729b1180963abb6743116ec4c8c6b5ad Mon Sep 17 00:00:00 2001
> From: Vitaliy <vitalij <at> gmx.com>
> Date: Wed, 25 Dec 2024 21:26:05 +0000
> Subject: [PATCH] Comment for indent-for-tab-command as a first step to
> refactoring.
Thanks, but we prefer to make such changes as part of the real
changes, not by themselves. So please include these in your followup
patches that do the real refactoring.
P.S. I don't see your copyright assignment on file, so if you intend
to keep contributing changes to Emacs, I suggest to start your
assignment paperwork now. If this is fine with you, I will send you
the form to fill and the instructions to go with it.
Thank you for your interest in Emacs.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#75109
; Package
emacs
.
(Thu, 13 Feb 2025 09:57:02 GMT)
Full text and
rfc822 format available.
Message #13 received at 75109 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
>> Date: Wed, 25 Dec 2024 21:48:58 -0000
>> From: Vitaliy via "Bug reports for GNU Emacs,
>> the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
>>
>> Fixed "From" header inside of patch.
>>
>> Vitaliy <vitalij <at> gmx.com> writes:
>>
>> >From 00c1dbbf729b1180963abb6743116ec4c8c6b5ad Mon Sep 17 00:00:00 2001
>> From: Vitaliy <vitalij <at> gmx.com>
>> Date: Wed, 25 Dec 2024 21:26:05 +0000
>> Subject: [PATCH] Comment for indent-for-tab-command as a first step to
>> refactoring.
>
> Thanks, but we prefer to make such changes as part of the real
> changes, not by themselves. So please include these in your followup
> patches that do the real refactoring.
>
> P.S. I don't see your copyright assignment on file, so if you intend
> to keep contributing changes to Emacs, I suggest to start your
> assignment paperwork now. If this is fine with you, I will send you
> the form to fill and the instructions to go with it.
>
> Thank you for your interest in Emacs.
Ping. Has there been any progress here?
Removed tag(s) patch.
Request was from
Stefan Kangas <stefankangas <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Thu, 13 Feb 2025 09:57:02 GMT)
Full text and
rfc822 format available.
Added tag(s) moreinfo.
Request was from
Stefan Kangas <stefankangas <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Sun, 23 Feb 2025 00:23:02 GMT)
Full text and
rfc822 format available.
Reply sent
to
Stefan Kangas <stefankangas <at> gmail.com>
:
You have taken responsibility.
(Sun, 02 Mar 2025 04:23:05 GMT)
Full text and
rfc822 format available.
Notification sent
to
Vitaliy <vitalij <at> gmx.com>
:
bug acknowledged by developer.
(Sun, 02 Mar 2025 04:23:05 GMT)
Full text and
rfc822 format available.
Message #22 received at 75109-done <at> debbugs.gnu.org (full text, mbox):
Stefan Kangas <stefankangas <at> gmail.com> writes:
> Eli Zaretskii <eliz <at> gnu.org> writes:
>
>>> Date: Wed, 25 Dec 2024 21:48:58 -0000
>>> From: Vitaliy via "Bug reports for GNU Emacs,
>>> the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
>>>
>>> Fixed "From" header inside of patch.
>>>
>>> Vitaliy <vitalij <at> gmx.com> writes:
>>>
>>> >From 00c1dbbf729b1180963abb6743116ec4c8c6b5ad Mon Sep 17 00:00:00 2001
>>> From: Vitaliy <vitalij <at> gmx.com>
>>> Date: Wed, 25 Dec 2024 21:26:05 +0000
>>> Subject: [PATCH] Comment for indent-for-tab-command as a first step to
>>> refactoring.
>>
>> Thanks, but we prefer to make such changes as part of the real
>> changes, not by themselves. So please include these in your followup
>> patches that do the real refactoring.
>>
>> P.S. I don't see your copyright assignment on file, so if you intend
>> to keep contributing changes to Emacs, I suggest to start your
>> assignment paperwork now. If this is fine with you, I will send you
>> the form to fill and the instructions to go with it.
>>
>> Thank you for your interest in Emacs.
>
> Ping. Has there been any progress here?
No comments within 2 weeks, so I'm closing this bug for now.
Please open a new one when you have made some more progress.
Thanks in advance.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 30 Mar 2025 11:24:11 GMT)
Full text and
rfc822 format available.
This bug report was last modified 131 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.