Emacs: forced ido mode to forget history

I wonder if I can leave ido I don’t remember my history and only show the completion of the files in the current directory when I search for the file. I understand that this history function is useful from time to time, but I often end up editing the wrong file because I think I am editing the file called 'abc.txt' in the current directory, but in fact I am editing the file with the same name to another that I visited earlier (often happens when the current directory does not have "abc.txt", as I mistakenly assume). From reading the ido.el file, I decided to install .emacs in my file (also evaluated these expressions in the emacs instance):

(custom-set-variables '(ido-enable-last-directory-history nil) '(ido-record-commands nil) ) 

and deleted the file named .ido.last in ~ /, but still it remembers some previous files that I visited before making these changes. How can I clear my previous history, and I'm not quite sure what the difference between the two variables is above, but it seems to have done the trick to keep ido from remembering the files that I visit in the future?

Thank you for your help!

+6
emacs elisp
source share
3 answers

Removing ~ / .ido.last and setting variables, as mentioned above, does not allow ido from searching for files visited in the past.

Edit: Actually, the full setup for this task will be

 (custom-set-variables '(ido-enable-last-directory-history nil) '(ido-record-commands nil) '(ido-max-work-directory-list 0) '(ido-max-work-file-list 0)) 
+8
source share

It happens to me all the time. Given that I am in the /path/to/dir directory and I am trying to edit abc.txt , (ido-find-file) will be β€œuseful” to pop up to /somewhere/else/abc.txt if /path/to/dir/abc.txt does not exist and /somewhere/else/abc.txt does.

In this situtation, CTRL-F in the minibuffer when in the middle (ido-find-file) returns to the normal behavior (find-file) , so I can get Emacs to edit /path/to/dir/abc.txt , dammit.

+4
source share

Setting ido-auto-merge-work-directories-length to -1 disables automatic directory switching.

+1
source share

All Articles