Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8517951
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T05:50:58+00:00 2026-06-11T05:50:58+00:00

I added add-to-list ‘same-window-buffer-names *grep* to my .emacs in order to get output from

  • 0

I added add-to-list 'same-window-buffer-names "*grep*" to my .emacs in order to get output from grep-find to come out in the same buffer I M-x grep find from. But after I get the output of the grep, say:

-*- mode: grep; default-directory: "~/sandbox/" -*-
Grep started at Sat Sep  1 17:01:38

find . -type f -print0 | xargs -0 -e grep -nH -e vector
./main.cpp:4:#include <vector>
./typelist.cpp:2:#include <vector>
./main.cpp.eulerbak:4:#include <vector>

If I hit enter on one of those, say typelist.cpp:2, it will split my buffer horizontally and open it there, switching point to the line in that file with the include..is there a way for it NOT to split my buffer and just open it over the grep buffer? This would make it easy for me to then kill the buffer and fall back on the grep results..

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T05:51:00+00:00Added an answer on June 11, 2026 at 5:51 am

    Add this to your init file.

    (eval-when-compile (require 'cl))
    (defun kill-grep-window ()
      (destructuring-bind (window major-mode)
          (with-selected-window (next-window (selected-window))
            (list (selected-window) major-mode))
        (when (eq major-mode 'grep-mode)
          (delete-window window))))
    
    (add-hook 'next-error-hook 'kill-grep-window)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

If buttons are dynamically added in wpf from code behind how can you add
I implemented a select from-to pair of lists on a page and added add/remove
What is the purpose this and why this be added when we add new
I've added as wsdl file using the add servece reference dialog in vs2008. MyService
I added a new subdir within my git respository: git add feeds Then commited
I want to add multiple jpanels to jpanel.So i added a root panel to
How can I add click event to newly added item of menu? Below is
I'm trying to add a value (in this case the string I Added This)
I added a batch (.bat) file to my project. I want to add a
I'm trying to add a collapsible panel to a panel I added in the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.