gscholar-bibtex
gscholar-bibtex copied to clipboard
variant of "args out of range" error on Mac OS
I have both a Mac and a Linux machine running gscholar-bibtex. On Linux, there are no problems.
At the moment the "args-out-of-range [], 0" error appears on the Mac every time I run gscholar-bibtex except for the first time I run it after starting Emacs. In other words, I can start Emacs, run gscholar-bibtex, retrieve some bibtex without problem. If I try to do that whole process again, I get this error:
Debugger entered--Lisp error: (args-out-of-range [] 0)
gscholar-bibtex-retrieve-and-show-bibtex()
gscholar-bibtex-copy-bibtex-entry()
funcall-interactively(gscholar-bibtex-copy-bibtex-entry)
call-interactively(gscholar-bibtex-copy-bibtex-entry nil nil)
command-execute(gscholar-bibtex-copy-bibtex-entry)
The page of source material that's retrieved from Google looks different in the second run: in the first run, the needed scholar.bib
snippets are there:
<div class="gs_fl"><a href="javascript:void(0)" class="gs_or_sav" title="Save" role="button"><svg viewBox="-1 0 17 16" class="gs_or_svg"><path d="M8 11.57l3.824 2.308-1.015-4.35 3.379-2.926-4.45-.378L8 2.122 6.261 6.224l-4.449.378 3.379 2.926-1.015 4.35z"/></svg></a> <a href="javascript:void(0)" class="gs_or_cit gs_nph" title="Cite" role="button" aria-controls="gs_cit" aria-haspopup="true"><svg viewBox="-1 0 17 16" class="gs_or_svg"><path d="M1.5 3.5v5h2v.375L1.75 12.5h3L6.5 8.875V3.5zM9.5 3.5v5h2v.375L9.75 12.5h3L14.5 8.875V3.5z"/></svg></a> <a href="/scholar?cites=13641810468647596779&as_sdt=2005&sciodt=0,5&hl=en">Cited by 44418</a> <a href="/scholar?q=related:6_LxBFhyUb0J:scholar.google.com/&scioq=nice&hl=en&as_sdt=0,5">Related articles</a> <a href="/scholar?cluster=13641810468647596779&hl=en&as_sdt=0,5" class="gs_nph">All 7 versions</a> <a href="https://scholar.googleusercontent.com/scholar.bib?q=info:6_LxBFhyUb0J:scholar.google.com/&output=citation&scisig=AAGBfm0AAAAAW5VVOZYnNrbHZTDzJDds7q-y3cTT-o0l&scisf=4&ct=citation&cd=0&hl=en" class="gs_nta gs_nph">Import into BibTeX</a> <a href="javascript:void(0)" title="More" class="gs_or_mor" role="button"><svg viewBox="-1 0 17 16" class="gs_or_svg"><path d="M1.5 5.5l2-2L8 8l-4.5 4.5-2-2L4 8zM8.5 5.5l2-2L15 8l-4.5 4.5-2-2L11 8z"/></svg></a> <a href="/scholar?output=instlink&q=info:6_LxBFhyUb0J:scholar.google.com/&hl=en&as_sdt=0,5&scillfp=15666607128863329517&oi=llo" class="gs_or_nvi">Library Search</a> <a href="javascript:void(0)" title="Fewer" class="gs_or_nvi gs_or_mor" role="button"><svg viewBox="0 0 17 16" class="gs_or_svg"><path d="M8.5 5.5l-2-2L2 8l4.5 4.5 2-2L6 8zM15.5 5.5l-2-2L9 8l4.5 4.5 2-2L13 8z"/></svg></a></div>
For subsequent requests, they aren't there:
<div class="gs_fl"><a href="javascript:void(0)" class="gs_or_sav" title="Save" role="button"><svg viewBox="-1 0 17 16" class="gs_or_svg"><path d="M8 11.57l3.824 2.308-1.015-4.35 3.379-2.926-4.45-.378L8 2.122 6.261 6.224l-4.449.378 3.379 2.926-1.015 4.35z"/></svg></a> <a href="javascript:void(0)" class="gs_or_cit gs_nph" title="Cite" role="button" aria-controls="gs_cit" aria-haspopup="true"><svg viewBox="-1 0 17 16" class="gs_or_svg"><path d="M1.5 3.5v5h2v.375L1.75 12.5h3L6.5 8.875V3.5zM9.5 3.5v5h2v.375L9.75 12.5h3L14.5 8.875V3.5z"/></svg></a> <a href="/scholar?cites=13641810468647596779&as_sdt=2005&sciodt=0,5&hl=en">Cited by 44418</a> <a href="/scholar?q=related:6_LxBFhyUb0J:scholar.google.com/&scioq=nice&hl=en&as_sdt=0,5">Related articles</a> <a href="/scholar?cluster=13641810468647596779&hl=en&as_sdt=0,5" class="gs_nph">All 7 versions</a> <a href="javascript:void(0)" title="More" class="gs_or_mor" role="button"><svg viewBox="-1 0 17 16" class="gs_or_svg"><path d="M1.5 5.5l2-2L8 8l-4.5 4.5-2-2L4 8zM8.5 5.5l2-2L15 8l-4.5 4.5-2-2L11 8z"/></svg></a> <a href="/scholar?output=instlink&q=info:6_LxBFhyUb0J:scholar.google.com/&hl=en&as_sdt=0,5&scillfp=15666607128863329517&oi=llo" class="gs_or_nvi">Library Search</a> <a href="javascript:void(0)" title="Fewer" class="gs_or_nvi gs_or_mor" role="button"><svg viewBox="0 0 17 16" class="gs_or_svg"><path d="M8.5 5.5l-2-2L2 8l4.5 4.5 2-2L6 8zM15.5 5.5l-2-2L9 8l4.5 4.5 2-2L13 8z"/></svg></a></div>
I'd be very happy to do further debugging! Please advise.
I notice in *URL-DEBUG* that if I don't hard-code the cookie (as suggested in #10) then sometimes the file seems to contain a truncated cookie:
Cookie: HttpOnly=nil; NID=132=1VGl6Z2-44w9IfQFjBA3uEOTAo43GNCXcO2C3PM4fz3IkNLw0BCpM7AbJE96tPH3Xq2TWfdMVdzL0rvjH-7rqMXLjUxzGyPhiHBkEbFfoLgLra45o7d7cq_yK45JkBl-
as opposed to the full correct one
Cookie: HttpOnly=nil; NID=132=1VGl6Z2-44w9IfQFjBA3uEOTAo43GNCXcO2C3PM4fz3IkNLw0BCpM7AbJE96tPH3Xq2TWfdMVdzL0rvjH-7rqMXLjUxzGyPhiHBkEbFfoLgLra45o7d7cq_yK45JkBl-; GSP=CF=4:LM=1536686075:S=9_V2ncxq7t9osm2l