Open Source Contributions by James Cherti (Patches, Pull Requests, Issues…)

This page catalogs the open source development work completed by James Cherti.

Projects maintained by James Cherti

Visit the Projects page, which catalogs the portfolio of over 55 open source projects that are actively maintained by James Cherti.

Emacs

Emacs Patches: Merged

This section documents the specific patches authored by James Cherti that have been successfully merged into the Emacs core repository.

  • Fix wrong-type-argument errors in SMIE arithmetic operations
    Discussion: bug#81102: [PATCH] smie.el throws wrong-type-argument when smie-indent-calculate values like noindent
    Commit: f6a86d649255ffcd182bf9063c759c8297cef4dc
    Description: There is a type assumption bug in smie.el where the engine correctly allows smie-indent-calculate to return non-numeric symbols like ‘noindent, but subsequently assumes the return value is always a number in multiple arithmetic contexts. This causes a wrong-type-argument number-or-marker-p noindent error when smie-indent-virtual evaluates to ‘noindent and is passed to addition or subtraction operations. Instead of patching every arithmetic call, we can ensure smie-indent-calculate resolves non-numeric formatting instructions to (current-indentation).
  • Set tab-width to 2 in yaml-ts-mode
    Discussion: [PATCH] Set tab-width to 2 in yaml-ts-mode
    Commit: a57a3fd1abcbc90aa263641bb4ad74e38027a224
    Description: While the YAML specification does not mandate a specific number of spaces, a 2 space indentation style is the industry convention. Major automation platforms, configuration systems, and linters, including Ansible, Kubernetes, GitHub Actions, and yamllint, all use and enforce a 2 space default. Having tab-width reflect this industry standard enhances the editing behavior out of the box and ensures Emacs aligns with standard formatting expectations in the broader ecosystem.
  • Document outline-show-entry-and-parents in the Emacs manual
    Commit: b079716674d804608e0c4c29a0fb29d8e952f93a
    Description: Document the new ‘outline-show-entry-and-parents’ command and its ‘C-c C-e’ keybinding. Update the Foldout example to reference the new command (bug#79286).
  • Add outline-show-entry-and-parents to reveal entry hierarchy
    Commit: e7e9c55ba745e5499dc4d2370fda481b7270d74a
    Description: Add outline-show-entry-and-parents to reveal entry hierarchy * lisp/outline.el (outline-mode-prefix-map): Rebind ‘C-e’ from ‘outline-show-entry’ to ‘outline-show-entry-and-parents’. (outline-mode-menu-bar-map): Use ‘outline-show-entry-and-parents’ instead of ‘outline-show-entry’. (outline-isearch-open-invisible): Use the new command instead of the ‘outline-show-entry’ primitive. This prevents unintended side effects for packages relying on the base API and avoids the ‘isolated item’ effect. (outline-show-entry-and-parents): New function to climb the tree, reveal parent headings, and unfold the current entry (bug#79286).
  • Fix outline-end-of-subtree at end of buffer
    Discussion: bug#80917: [PATCH] outline-end-of-subtree misses final newline when at end of buffer
    Commit: 8decb653ffd8b046ffcccb5e9aa2e8a820ce6ab0
    Description: When using outline-mode (or outline-minor-mode), making a subtree invisible that is located at the very end of the buffer causes the final newline to be incorrectly flagged as invisible. This occurs because outline-end-of-subtree relies on (and (bolp) (not (eolp))) to decide whether to call outline–end-of-previous. At the end of a buffer terminating with a newline, point is at an empty line, making (not (eolp)) evaluate to nil, which makes the function skips stepping back over the final newline before the visibility is flagged. This results in the ellipsis swallowing the end-of-buffer marker.
  • sh-script: Mark + and * as punctuation rather than a symbol constituent
    Discussion: bug#80280: [PATCH] sh-script: Mark + and * as punctuation rather than a symbol constituent
    Commit: b3c0aee42b086af4b3c6e26da1a5d81490b6128b
    Description: sh-script: Mark + and * as punctuation rather than a symbol constituent In Bash, the characters + and * are not valid in variable names. In sh, they are also disallowed in both function and variable names. Treating them as punctuation is appropriate, as they most commonly appear as operators. Examples: . Arithmetic: $((var1*var2)) . Compound assignment: list_name+=(“item”)
  • Fix yaml-ts-mode comment-start-skip to improve commenting/uncommenting
    Discussion: bug#78892: [PATCH] Fix yaml-ts-mode comment-start-skip to improve commenting/uncommenting
    Commit: faae9f572ab3027c46800575a12a72c8c0eee7c1
    Description: Fix ‘comment-start-skip’ value to resolve an issue when commenting/uncommenting using the ‘comment-or-uncomment-region’ function. The previous ‘comment-start-skip’ value left some “-” uncommented after commenting and uncommenting multiple YAML indented blocks (bug#78892).
  • Mark !%:.^~, as punctuation rather than symbol constituents In Bash
    Discussion: bug#77746: [PATCH] sh-mode: Fix incorrect word syntax for punctuation in sh-mode
    Commit: 4e1fe56e316c041ed3b07f510ecba428c6b06cd1
    Description: Mark !%:.^~, as punctuation rather than symbol constituents In Bash, the characters !%:.^~, are not valid in variable names. In sh, they are not permitted in either function or variable names. Treating them as punctuation is convenient, as they are rarely used in function names and never in variable names. Even among commands, their usage is uncommon. The only character among these that is commonly seen in command names is ‘.’, although it is rarely used in function names. Marking these characters as punctuation, rather than symbol constituents, enhances the accuracy of symbol detection.
  • Missing blank line when moving outline subtrees with outline-blank-line set to non-nil
    Discussion: bug#77238: 30.1.50; [PATCH] Missing blank line when moving outline subtrees with outline-blank-line set to non-nil
    Commit: 40bf281c644e3323f010b007c9bfc730e92896aa
    Description: Emacs outline fails to preserve the final blank line after headings when moving subtrees up or down when the outline-blank-line variable is set to non-nil. Actual Behavior: The final blank line is omitted when moving outline subtrees, despite outline-blank-line being set to non-nil. Additional Information: Including a blank line when outline-blank-line is non-nil is important to maintain the structure of the document. Omitting it could cause subtrees to lose their separation, making the outline less readable.
  • ElDoc: Add more commands using ‘eldoc-add-command-completions’
    Commit: 1aebb026112016fb38ff458bd50c80be0f139538
    Description: Add more commands to ‘eldoc-add-command-completions’ to fix disappearing ElDoc help in the minibuffer for the following cases: All modes: Added “comment-indent-new-line”. All modes: Added “delete-char” for handling when the user presses delete. Python mode: Added “python-indent-dedent-line-backspace” for handling when the user presses backspace.
  • Add hyphen to sh-script function-name regexp: lisp/progmodes/sh-script.el
    Commit: 2ea0919550366babfea1de6468ef9e8b1857b478

Emacs Patches: Pending

  • bug#81258: [PATCH] Fix false positive warnings in elisp-flymake-checkdoc when narrowed
    Description: When working in an Emacs Lisp buffer and using narrowing, the elisp-flymake-checkdoc backend produces false-positive warnings. This occurs because the checkdoc-current-buffer function runs only on the accessible portion of the buffer. When the buffer is narrowed, checkdoc cannot see structural elements outside the visible region and may incorrectly report missing components such as file headers, footer sections, or other required documentation blocks. The attached patch addresses this issue by ensuring that elisp-flymake-checkdoc temporarily widens the buffer before invoking the style check, allowing checkdoc to analyze the complete buffer contents and avoid false-positive warnings.
  • bug#81223: [PATCH] Fix file-missing error during async native compilation
    Description: This patch fixes a race condition that causes a file-missing error during asynchronous native compilation. This issue frequently occurs when executing package-upgrade-all with native JIT compilation enabled. The package manager deletes the old package directory (e.g., evil-collection) from the filesystem and then yields the event loop while downloading the new package synchronously. If the async compilation queue attempts to process a pending job for a file in that newly deleted directory, comp-el-to-eln-filename will signal a ‘file-missing’ error because it cannot compute the hash for a non-existent file. This error interrupts the async queue. The attached patch addresses this by adding a file-regular-p check to comp–run-async-workers in lisp/emacs-lisp/comp-run.el.
  • bug#80226: [PATCH] Ignore missing init function errors in flymake-proc-legacy-flymake
    Description: This flymake-proc-legacy-flymake patch resolves an issue in which the backend may raise the error: “Can’t find a suitable init function”. This occurs when flymake-proc-legacy-flymake cannot locate an appropriate init function, which in certain cases can repeatedly trigger errors and disrupt normal editing.

Emacs Issues

  • ElDoc regression: Messages disappear from echo area under global-eldoc-mode
    Discussion: bug#81356: ElDoc regression: Messages disappear from echo area under global-eldoc-mode (fixed)
  • bug#81318: Allow overriding load-prefer-newer before early-init
    If a user accidentally generates a stale early-init.elc, Emacs will load the stale .elc file before it ever has a chance to read inside the updated .el source file. While the standard advice is to avoid byte-compiling initialization files altogether, in practice, many users rely on configuration frameworks, automated scripts, or package managers that aggressively compile the entire ~/.emacs.d directory. To fix this early-init.elc edge case, the attached patch is a proposed solution that is completely open for discussion. The patch adds a new environment variable, EMACSLOADPREFERNEWER. This variable allows users to globally enable load-prefer-newer before any user Lisp code is evaluated during the bootstrap sequence.
  • bug#79628: Change in url-auth.el breaks HTTP proxy authentication with user/password (fixed)
    Description: There is an issue with lisp/url/url-auth.el in Emacs 31 (master branch) that breaks HTTP proxy authentication using a username and password
  • bug#79286: outline-mode: attempting to open folded sections does not work as expected inside a deeply nested header (fixed)
    Description: When using outline-mode or outline-minor-mode, attempting to open folded sections (outline-show-entry) does not work as expected when the cursor is positioned inside a deeply nested header. Expected Behavior: The expected behavior is that only the heading at point (and its associated content) should be expanded, while all ancestor headings remain collapsed. (Similar to other editors.) Actual Behavior: Only the heading at point expands, while other headings remain invisible, which is confusing. In some cases, these hidden headings cannot be revealed until the parent heading is first collapsed and then expanded again.
  • bug#81232: c-ts-mode: Error applying c-ts-mode-indent-style via dir-locals and setopt-local (fixed)
    Description: Opening a file within a project that sets c-ts-mode-indent-style via .dir-locals.el causes a backtrace error on the master branch.
  • bug#79050: vc-git incorrectly treats git-crypt encrypted files as binary (fixed)
    Description: When using vc-diff in a Git repository where all files are encrypted with git-crypt https://github.com/AGWA/git-crypt the output does not reflect actual changes. Modified files appear unaltered, regardless of edits made. (vc-diff appears to compare the encrypted binary representations of the files, rather than their decrypted contents.) It appears that vc-diff does not take .gitattributes into account, even though Git itself uses it to determine how to handle diff filters. As a result, while git diff correctly shows textual diffs for git-crypt encrypted files (once the repository is unlocked), Emacs vc-diff treats them as binary and fails to display the actual changes.
  • bug#77438: [FEATURE REQUEST] Freely positioning the cursor anywhere in t
    Description: Implementing an Emacs equivalent of Vim’s ‘set virtualedit=all’ feature would be interesting, especially for editing indentation-sensitive file types like YAML or Python. In Vim, the ‘set virtualedit=all’ setting allows the cursor to move freely to any position in the text, even beyond the end of lines and after the last line of the file. This differs from the default behavior, where the cursor is constrained to valid text positions. Unlike Vim’s ‘virtualedit=all’ mode, Emacs’ quarter-plane, picture-mode, and artist-mode packages insert actual spaces into the buffer. In contrast, Vim’s ‘set virtualedit=all’ allows the cursor to be placed in positions where no text exists, but real spaces are not added until a character is typed. This distinction is important because, in ‘virtualedit=all’, the absence of real spaces ensures that the undo/redo history remains unaffected by cursor movements alone.

GitHub Projects: Merged

GitHub Projects: Pending