refile also moves the subsequent sibling heading

オープン 初心者向け
#1,213 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
76/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
lua
領域
tooling

調査の方向性

まず Org mode の refile コマンドと、どの見出しと子要素が移動するかを決定するロジックを特定します。提供された org ドキュメントと <leader>or で問題を再現し、refile 対象の後に兄弟の見出しが続くケースをカバーする回帰テストを追加または更新します。完了とは、Heading 3 は移動し、Heading 4 は Heading 1 の下に残ることを意味します。

索引モデルが issue の本文から書いたものです。

説明

bug
Describe the bug

Refiling a heading also moves the sibling heading that follows it.

checkhealth

orgmode: ✅

Orgmode ~

  • ✅ OK Treesitter grammar installed (version 2.1.0)
  • ✅ OK Setup called
  • ✅ OK org_agenda_files configured
  • ✅ OK org_default_notes_file configured
Steps to reproduce
  1. Open a file inside a directory covered by org_agenda_files (e.g., ~/orgfiles/a.org) with this content:
* Heading 1
** Heading 2
*** Heading 3
*** Heading 4

* Heading 5
  1. Put the cursor on Heading 3 and run refile (<leader>or)
  2. Choose Heading 5 as the target
  3. Heading 4 is moved along with Heading 3.
Expected behavior

Only Heading 3 should move. Heading 4 should stay where it was.

Emacs functionality

In Emacs, only the heading and its children move. Following siblings aren't included.

Minimal init.lua

vim.g.mapleader = " "

vim.pack.add({ 'https://github.com/nvim-orgmode/orgmode' })

-- Setup orgmode
require('orgmode').setup({
  org_agenda_files = '~/orgfiles/**/*',
  org_default_notes_file = '~/orgfiles/refile.org',
})

-- Experimental LSP support
vim.lsp.enable('org')
Screenshots and recordings

No response

nvim-orgmode version

65eed3046dd599f20392bc8b1ec87e98f2eb492c

OS / Distro

Ubuntu 24.04 LTS (WSL2)

Neovim version/commit

0.12.6

Additional context

No response

主要言語
Lua
スター
3.9k
フォーク
193
平均マージ
5日 7時間
マージ済み PR(30日)
6

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

nvim-orgmode/orgmode のほかの issue

nvim-orgmode/orgmode の issue をすべて見る

似ている issue

Lua の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。