cute-jumper / gscholar-bibtex

Retrieve BibTeX entries from Google Scholar, ACM Digital Library, IEEE Xplore and DBLP
107 stars 12 forks source link

Write search results to the correct buffer #18

Closed thomp closed 8 years ago

thomp commented 8 years ago

If I have multiple windows open and execute a search via M-x gscholar-bibtex, the content of the wrong buffer is sometimes overwritten.

The issue occurs when a search is conducted, the search results buffer is left open, and then a second search is conducted. If the focus is in another window, distinct from the window holding the gscholar-bibtex Search Results buffer, and the second search is initiated at that point, the content of that buffer (not the already-open search results buffer) is erased and replaced with the new search results.

Steps to reproduce:

  1. open several windows with different buffers including x.tex (or some other dummy file)
  2. M-x gscholar-bibtex
  3. search for something
  4. leave the gscholar-bibtex Search Results buffer and containing window open
  5. move the focus/pointer to another window containing x.tex
  6. M-x gscholar-bibtex
  7. conduct search

The desired outcome: the gscholar-bibtex Search Results should be updated with the new search results.

Observed behavior: the buffer corresponding to x.tex has its content erased and then the search results are written to that buffer.

17 might resolve this.

cute-jumper commented 8 years ago

Thanks for reporting! I've pushed a simpler code to fix it. Feel free to reopen the issue if that doesn't help.

thomp commented 8 years ago

Thanks for the quick response. 7346964 resolves the issue.