Are you sure you executed the code? I just tried:
(push '(org-tags-view . completing-read-default)
and it worked as expected.
Responding to the comment:
Indeed when calling it from org-agenda it does not work. As you supposed, this is because this-command is changed to org-agenda. As you probably don't want affect ...
I recommend ido-mode. It changes how completing-read works, adding an inline display of possible matches, and adding several extra keyboard commands for manipulating the list. There are quite a lot of them, but the one I use most frequently is probably C-s, which cycles the current list of matches so that the next one is selected.
In your example, C-x b sh ...
Yes, vanilla Emacs is weak/broken wrt option completion-ignored-extensions.
If you use Icicles there is no such problem. When a file name is ignored it is ignored completely; it is not shown in *Completions*.
And in Icicles you can toggle this ignoring off or on at any time during completion, using C-. in the minibuffer.
Icicles - File-Name ...
Your completion-function is a function, but not a proper completion table (it does not obey all the expected behavior).
I recommend you use completion-table-dynamic to build a proper completion table function from a function that simply lists all the possible completions.
(defun my-completion-function (prefix)
;; You can just ignore the prefix
Use icomplete-mode - the builtin incremental minibuffer completion mode. It continuously displays a list of possible completions as soon as you type in minibuffer. Then M-x oc-m and C-j to accept completion candidate.
What troubles me here is that the totally nebulous computation that I removed did not affect anything.
And for a reason. The temp-buffer-max-height variable does not have any effect unless another variable, namely temp-buffer-resize-mode, is set to t. Both variables are customizable. This is kind of documented with the temp-buffer-max-height variable help:
This answer is for using command icicle-find-file-absolute, which is similar in most regards to icicle-locate.
But icicle-locate uses a prefix arg differently, passing it to system-command locate. So icicle-locate doesn't handle the use of a prefix arg to make multi-completion candidates include also a last modification-date middle component.
You can get something like this with ivy, but you might have to write some code to get exactly what you want. Here, I get the files in the current directory, and construct a list of candidates that looks like "filename | directory". If you want them on separate lines, replace | with \n. Then you use ivy-read to get completion. If you want a buffer where you ...
Yes: just put (savehist-mode 1) in your ~/.emacs and that should do the trick.
[ Tho not quite in the way you describe: c will still not be among the completion candidates. But it will be in your history and hence accessible via M-p, M-s, ... ]
I'm not really sure what you're trying to do, but maybe this will help:
(defun foo ()
(global-set-key (kbd "<f4>") 'foo)
Jumping to a bookmark with Bookmark+ is like doing the same with vanilla Emacs.
Completion of a bookmark name uses standard Emacs function completing-read to read the name. This means that you either have to use a key (e.g. TAB) to initiate completion, or you have to use some completion library that lets you make completing-read initiate completion ...
Here is my code. Yes the documentation is awful for phpactor and it takes some digging. I have this currently and it shows how to use transients and bind them to a key in php-mode. Hopefully useful to someone.