diff options
| author | Kévin Le Gouguec <kevin.legouguec@gmail.com> | 2022-05-22 18:46:39 +0200 |
|---|---|---|
| committer | Kévin Le Gouguec <kevin.legouguec@gmail.com> | 2022-05-22 18:46:39 +0200 |
| commit | 9b2bda7f2b714e59c5c53ab6bea7221730da0cea (patch) | |
| tree | c7ed1f22a0d0c2895a244b3fac28ce4b8fc97c8b /itches | |
| parent | 74fc0f0d2d06597602931bf0f1eb984e3f1f6d91 (diff) | |
| download | memory-leaks-9b2bda7f2b714e59c5c53ab6bea7221730da0cea.tar.xz | |
Note down some discoveries about org-refile completion
Diffstat (limited to 'itches')
| -rw-r--r-- | itches/emacs/tracker.org | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/itches/emacs/tracker.org b/itches/emacs/tracker.org index b667de5..a9c3507 100644 --- a/itches/emacs/tracker.org +++ b/itches/emacs/tracker.org @@ -504,9 +504,32 @@ allows "ipsum" to be aligned below "lorem". ID, but it returns integers, so maybe the tweak should be made somewhere above in the call stack? **** TODO Make org-refile completion more similar to filename completion -With =C-x p p=, =C-x p f=, and Gnus's =B m=, typing "bar" matches -"foo/bar". Not in org-refile with ~org-refile-use-outline-path~, for -some reason. +I'd like to have org-refile completion work like =C-x p p=, =C-x p f=, and +Gnus's =B m=, where typing "bar" matches "x/bar". + +Current org-refile config: +#+begin_src elisp +(setq org-refile-targets (list (cons nil (cons :maxlevel 10))) + org-refile-use-outline-path t + org-outline-path-complete-in-steps nil) +#+end_src + +IIUC =C-x p= commands use ~project--file-completion-table~, which passes a +lambda to ~completing-read~ which returns ~(category . project-file)~ +metadata, and… + +#+begin_src elisp +(alist-get 'styles (alist-get 'project-file completion-category-defaults)) +#+end_src + +… says =substring=. Likewise, ~gnus-summary-move-article~ uses +~gnus-completing-read~, which by default uses +~gnus-emacs-completing-read~, which sets ~completion-styles~ to +~gnus-completion-styles~, which includes =substring=. + +Ergo: either I add =substring= to my ~completion-styles~, or I teach +~org-refile~ to use =substring=… by default? when ~path-complete-in-steps~ +is nil? depending on a user option? 🤔 *** Programming modes **** ~conf-mode~ ***** TODO Tweak ~javaprop~ comments |
