Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why do my emacs comint buffers sometimes seem to share the same history?

Tags:

emacs

I often have several comint buffers open at once, for example I'll have a SQLi buffer open to a database and a set of shell buffers open in various places. Sometimes, for no reason I can detect, all of these buffers start to share a common buffer command history, such that M-p will pull up my last SQL command in a shell-mode buffer, and so on.

How can I fix this? What on earth is causing it?

like image 772
Chris R Avatar asked Aug 17 '10 19:08

Chris R


1 Answers

Have you exited from any of the shells or SQL sessions? Long time since I used emacs but I seem to remember when a shell terminated the commands would be part of a 'global-command-history-list'.

note - A shell can quit, but the buffer will still be there in emacs.

like image 150
user622100 Avatar answered Oct 05 '22 03:10

user622100