When using M-/, the text in the current buffer is autocompleted with suggestions out of all active buffers.
Is there a way to limit the suggestions to only one specific buffer?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Assuming you are talking about
dabbrev-expand(M-/ is the usual binding), then there are a variety of options depending on your requirements.To search only a specific white list of buffers, the simplest approach is to set the variable
dabbrev-search-these-buffers-only:Here’s an example from a custom mode of mine (I rebind
M-/to this function for this mode)Note that there are several other ways in which you can filter the list of buffers which dabbrev will search inside. The dabbrev customize group has the details:
M-x
customize-groupRETdabbrevRET