Skip to content

Align Copilot process filter indentation in backend infra#255

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/fix-copilot-filter-indentation
Draft

Align Copilot process filter indentation in backend infra#255
Copilot wants to merge 2 commits intomainfrom
copilot/fix-copilot-filter-indentation

Conversation

Copy link
Contributor

Copilot AI commented Mar 22, 2026

The Copilot backend filter block in ai-code-backends-infra.el had inconsistent indentation around the original filter call and notification tracking path. This did not affect execution, but it obscured the structure of the process filter logic.

  • What changed

    • Reindented the set-process-filter lambda for the Copilot session path in ai-code-backends-infra.el.
    • Aligned the when orig-filter and with-current-buffer forms to reflect the actual control flow and nesting.
  • Result

    • The filter reads as a two-step pipeline:
      1. delegate to the original process filter
      2. record meaningful output and linkify recent session output
  • Updated shape

    (lambda (process output)
      ;; Call original filter first
      (when orig-filter
        (funcall orig-filter process output))
      ;; Then track activity for notifications
      (with-current-buffer (process-buffer process)
        (when (ai-code-backends-infra--output-meaningful-p output)
          (ai-code-backends-infra--note-meaningful-output))
        (ai-code-session-link--linkify-recent-output output)))
Original prompt

This section details on the original issue you should resolve

<issue_title>Incorrect indentation in copilot filter function</issue_title>
<issue_description>## Location
ai-code-backends-infra.el:938-944

Severity

Low

Problem

The filter function for the "copilot" backend has misaligned indentation.

(when orig-filter
    (funcall orig-filter process output))  ; Wrong indentation
  ;; Then track activity for notifications
   (with-current-buffer (process-buffer process)  ; Wrong indentation

Impact

This doesn't affect execution (Emacs is whitespace-tolerant in let-bindings), but it's a formatting issue that makes the code harder to read.

Suggested Fix

Fix the indentation to follow standard Elisp conventions.</issue_description>

Comments on the Issue (you are @copilot in this section)

@tninja Thanks

🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Copilot AI changed the title [WIP] Fix incorrect indentation in copilot filter function Align Copilot process filter indentation in backend infra Mar 22, 2026
Copilot AI requested a review from tninja March 22, 2026 01:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect indentation in copilot filter function

2 participants