[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#67807: 30.0.50; interactive tagging doesn't work for dired-{next,pre
From: |
Visuwesh |
Subject: |
bug#67807: 30.0.50; interactive tagging doesn't work for dired-{next,previous}-line |
Date: |
Wed, 13 Dec 2023 10:21:02 +0530 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
[Wednesday December 13, 2023] Brian Leung wrote:
> Repro:
>
> 1. emacs -q
> 2. M-: (require 'dired)
> 3. In a non-dired buffer, type M-x dired-next-l TAB. Note that it
> autocompletes to dired-next-line in spite of the apparent interactive
> tagging added in 1c70458519b324c9403e8a9f57bd695fe39e8d2c.
Is there a step that you're missing here? M-x completes all commands
unless you set read-extended-command-predicate to a non-nil value, I set
it to command-completion-default-include-p. How about other commands
such as eww? Do they show up for you in M-x?
M-X OTOH is supposed to only show commands that are relevant to the
current buffer.
> I find that I have to explicitly write
>
>> (defun dired--command-p (_sym buffer)
>> "Return non-nil if BUFFER is in `dired-mode'."
>> (with-current-buffer buffer
>> (eq major-mode 'dired-mode)))
>>
>> (put 'dired-previous-line 'completion-predicate #'dired--command-p)
>> (put 'dired-next-line 'completion-predicate #'dired--command-p)
>
> to get the completion-exclusion to work properly.
>
>