tmalsburg / helm-bibtex

Search and manage bibliographies in Emacs
GNU General Public License v2.0
463 stars 73 forks source link

running any action on ivy-bibtex results throws error #118

Closed japhir closed 8 years ago

japhir commented 8 years ago

Hi!

When I run any action after running ivy-bibtex and finding the correct reference (in this case Sluijs et al 2011) I get various errors:

It worked fine on helm-bibtex but I recently switched to ivy and would like it to work there too! :).

open pdf/insert citation/insert reference/insert bibtex key/entry/attach email:

Wrong type argument: lisp, "Sluijs2011"

open URL/doi:

Search failed: "^@\\([^^\"@\\&$#%',={}()    
]*\\)[[:space:]]*[({][[:space:]]*Sluijs, Bijl, Schouten, R\\\\ohl, Reich Southern ocean warming, sea level and hydrological change during the Pal 2011 ⌘  article[[:space:]]*,"

edit notes/show entry:

Wrong type argument: stringp, ("Sluijs, Bijl, Schouten, R\\ohl, Reich Southern ocean warming, sea level and hydrological change during the Pal 2011 ⌘  article" . "Sluijs2011")
tmalsburg commented 8 years ago

Thanks for the report. I'm not using ivy-bibtex myself and the code was contributed by a user (@justbur). If you want to work on this issue, I'd be happy to look at and merge a PR but I won't have time to work on it myself. Sorry that I don't have more to offer. (I wonder if it's a mistake to advertise ivy-bibtex and to put it on MELPA when no one is really supporting it.)

justbur commented 8 years ago

It's a result of this breaking change https://github.com/abo-abo/swiper/commit/c009b28337f408fe571b24be7bdb304bbc596a76

It used to be the case that ivy passed the cdr of the alist to the actions, but now it passes the whole item. It's kind of annoying to fix this I think.

tmalsburg commented 8 years ago

@japhir could you please test @justbur's code with your ivy setup? (Just replace your bibtex-completion.el with his and reload.) I tested with my helm-bibtex setup and it works.

For testing, select one entry and test each of the actions (insert reference, insert bibtex, ...). Then select multiple entries and test the actions again. Thank you!

japhir commented 8 years ago

Awesome! That was fast!

Since I'm not sure if I tested it correctly I'll post what I did: I replaced the file in my ~/.emacs.d/elpa/helm-bibtex directory, deleted the .elc file and relaunched my emacsclient (I use a systemd service). It seems that emacs doesn't automatically create a compiled version of the replaced script, but for now it's fine. My helm-bibtex config section can be found here.

Testing one entry:

I don't know if there is a way to select multiple entries in ivy, I can perform the default action without closing the menu by entering M-RET, but this is basically doing the one-entry thing twice, without closing the menu. I'm not sure how to do multiple citations at once.

swarnendubiswas commented 8 years ago

I had the same issue with ivy and my default action was "insert BibTeX key" from the README. I tried the proposed patch and it works for me. Thanks @justbur.

japhir commented 8 years ago

Too bad that updating the package overruled the patch ;). Can this be merged because it's better than not working at all? :)

justbur commented 8 years ago

I pushed a commit to fix the edit notes action. Please test

japhir commented 8 years ago

For any action it throws the error: wrong type argument: "citation_key" (where citation_key is the bibtex entry).

justbur commented 8 years ago

@japhir I just test all of the actions and they seem to be working fine for me. Are you sure the new code is loaded properly? Also, try M-x toggle-debug-on-error to generate a backtrace you can post here.

japhir commented 8 years ago

@justbur that's weird. I'll post what I did to make sure I didn't mess up:

  1. copy all the .el files in your git repo into ~/.emacs.d/elpa/ivy-bibtex-20160714.1000/ and into ~/.emacs.d/elpa/helm-bibtex-20160721.1617/.
  2. remove all .elc files from those directories
  3. restart my emacsclient with my init file
  4. M-x toggle-debug-on-error
  5. hit C-x c in scratch to call ivy-bibtex
  6. RET for default action (open pdf)

error:

Debugger entered--Lisp error: (wrong-type-argument listp "Allerton1998")
  mapcar(bibtex-completion-find-pdf (#("Allerton                             20 . Paleomagnetic Results From     Holes 959D and 960a ,                    1998 ⌘  article" 0 1 (idx 0)) . "Allerton1998"))
  -map(bibtex-completion-find-pdf (#("Allerton                             20 . Paleomagnetic Results From Holes 959D and 960a ,                    1998 ⌘  article" 0 1 (idx 0)) . "Allerton1998"))
  (-flatten (-map (quote bibtex-completion-find-pdf) (if (listp candidates) candidates (list candidates))))
  (let ((it (-flatten (-map (quote bibtex-completion-find-pdf) (if (listp candidates) candidates (list candidates)))))) (if it (-each it bibtex-completion-pdf-open-function) (message "No PDF(s) found.")))
  bibtex-completion-open-pdf((#("Allerton                             20 . Paleomagnetic Results From Holes 959D and 960a ,                    1998 ⌘  article" 0 1 (idx 0)) . "Allerton1998"))
  ivy-call()
  ivy-read("BibTeX Items: " ((#("Allerton                             20 . Paleomagnetic Results From Holes 959D and 960a ,                    1998 ⌘  article" 0 1 (idx 0)) . "Allerton1998") (#("DeConto, Pollard                     Rapid Cenozoic glaciation of Antarctica induced by declining atmospheric 2003 ⌘  article" 0 1 (idx 1)) . "DeConto2003a") (#("Hyland, Sheldon                      Coupled CO2-climate response during the Early Eocene Climatic Optimum    2013 ⌘  article" 0 1 (idx 2)) . "Hyland2013") (#("Bijl, Sluijs, Brinkhuis              A magneto- and chemostratigraphically calibrated dinoflagellate cyst zon 2013 ⌘  article" 0 1 (idx 3)) . "Bijl2013") (#("Eldrett, Greenwood, Harding, Huber   Increased seasonality through the Eocene to Oligocene transition in nort 2009 ⌘  article" 0 1 (idx 4)) . "Eldrett2009") (#("Huber, Nof                           The ocean circulation in the southern hemisphere and its climatic impact 2006 ⌘  article" 0 1 (idx 5)) . "Huber2006") (#("Sluijs, Pross, Brinkhuis             From greenhouse to icehouse; organic-walled dinoflagellate cysts as pale 2005 ⌘  article" 0 1 (idx 6)) . "Sluijs2005") (#("Brinkhuis, Sengers, Sluijs, Warnaar, Latest Cretaceous to earliest Oligocene, and Quaternary dinoflagellate c 2003 ⌘  article" 0 1 (idx 7)) . "Brinkhuis2003") (#("Schouten, Hopmans, Sinninghe Damst?? The organic geochemistry of glycerol dialkyl glycerol tetraether lipids: 2013 ⌘  article" 0 1 (idx 8)) . "Schouten2013") (#("Williams, Brinkhuis, Pearce, Fensome Southern Ocean and global dinoflagellate cyst events compared: Index eve 2004    article" 0 1 (idx 9)) . "Williams2004") (#("Agnini, Fornaciari, Raffi, Catanzari Biozonation and biochronology of Paleogene calcareous nannofossils from  2014 ⌘  article" 0 1 (idx 10)) . "Agnini2014") (#("Huguet, de Lange, Gustafsson, Middel Selective preservation of soil organic matter in oxidized marine sedimen 2008 ⌘  article" 0 1 (idx 11)) . "Huguet2008") (#("Gingerich                            Environment and evolution through the Paleocene-Eocene thermal maximum   2006 ⌘  article" 0 1 (idx 12)) . "Gingerich2006") (#("Westerhold, R\\ohl, Laskar, Raffi, Bo On the duration of magnetochrons C24r and C25n and the timing of early E 2007 ⌘  article" 0 1 (idx 13)) . "Westerhold2007") (#("Zeeden, Hilgen, R\\ohl, Seelos, Loure Sediment color as a tool in cyclostratigraphy – a new application for im 2015 ⌘  article" 0 1 (idx 14)) . "Zeeden2015") (#("Scientific party, Mascle, Lohman, Cl 9. Principal results                                                     1996 ⌘  article" 0 1 (idx 15)) . "Mascle2000") (#("Fensome, Guerstein, Williams         New insights on the Paleogene dinoflagellate cyst genera Enneadocysta an 2006 ⌘  article" 0 1 (idx 16)) . "Fensome2006") (#("Mashiotta, Lea, Spero                Glacial–interglacial changes in Subantarctic sea surface temperature and 1999 ⌘  article" 0 1 (idx 17)) . "Mashiotta1999") (#("Huber                                Climate change. A hotter greenhouse?                                     2008 ⌘  article" 0 1 (idx 18)) . "Huber2008") (#("Pearson, van Dongen, Nicholas, Panco Stable warm tropical climate through the Eocene Epoch                    2007 ⌘  article" 0 1 (idx 19)) . "Pearson2007") (#("Huber, Caballero                     The early Eocene equable climate problem revisited                       2011 ⌘  article" 0 1 (idx 20)) . "Huber2011") (#("Sloan, Barron                        Equable climates during Earth history?                                   1990 ⌘  article" 0 1 (idx 21)) . "Sloan1990") (#("Bijl, Bendle, Bohaty, Pross, Schoute Eocene cooling linked to early flow across the Tasmanian Gateway.        2013    article" 0 1 (idx 22)) . "Bijl2013proc") (#("Alves                                CRET\\'ACEO - PALE\\'OGENO DA BACIA DE DAHOMEY E ATL\\^ANTICO SUL EQUATORIA 2007    phdthes" 0 1 (idx 23)) . "Alves2007") (#("Strong, Hollis, Wilson               Foraminiferal, radiolarian, and dinoflagellate biostratigraphy of Late C 1995 ⌘  article" 0 1 (idx 24)) . "Strong1995a") (#("Jones, Lunt, Schmidt, Ridgwell, Slui Climate model and proxy data constraints on ocean warming across the Pal 2013 ⌘  article" 0 1 (idx 25)) . "Jones2013") (#("Hinsbergen, de Groot, van Schaik, Sp A Paleolatitude Calculator for Paleoclimate Studies (model version 1.2)  2015    article" 0 1 (idx 26)) . "Hinsbergen2015") (#("Sluijs, Bijl, Schouten, R\\ohl, Reich Southern ocean warming, sea level and hydrological change during the Pal 2011 ⌘  article" 0 1 (idx 27)) . "Sluijs2011") (#("Lourens, Sluijs, Kroon, Zachos, Thom Astronomical pacing of late Palaeocene to early Eocene global warming ev 2005 ⌘  article" 0 1 (idx 28)) . "Lourens2005") (#("Frieling, Iakovleva, Reichart, Aleks Paleocene-Eocene warming and biotic response in the epicontinental West  2014 ⌘  article" 0 1 (idx 29)) . "Frieling2014") (#("Huber, Caballero                     Eocene El Ni\\~no: evidence for robust tropical dynamics in the hothouse. 2003    article" 0 1 (idx 30)) . "Huber2003") (#("Jaramillo-Vogel, Strasser, Frijia, S Neritic isotope and sedimentary records of the Eocene–Oligocene greenhou 2013 ⌘  article" 0 1 (idx 31)) . "Jaramillo-Vogel2013") (#("Taylor, Huber, Hollis, Hernandez-San Re-evaluating modern and Palaeogene GDGT distributions: Implications for 2013 ⌘  article" 0 1 (idx 32)) . "Taylor2013") (#("Liu, Pagani, Zinniker, Deconto, Hube Eocene-Oligocene Climate Transition                                      2008 ⌘  article" 0 1 (idx 33)) . "Liu2008") (#("Wagner                               Late Cretaceous to early Quaternary organic sedimentation in the eastern 2002 ⌘  article" 0 1 (idx 34)) . "Wagner2002") (#("Hollis, Dickens, Field, Jones, Percy The Paleocene-Eocene transition at Mead Stream, New Zealand: A southern  2005 ⌘  article" 0 1 (idx 35)) . "Hollis2005") (#("Oboh-ikuenobe, Yepes, Gregg          25 . Palynostratigraphy, Palynofacies, and Thermal Maturation of Cretace 1998 ⌘  article" 0 1 (idx 36)) . "Oboh-ikuenobe1998") (#("Stover, Brinkhuis, Damassa, De Verte Mesozoic-Tertiary dinoflagellates, acritarchs and prasinophytes          1996    incolle" 0 1 (idx 37)) . "Stover1996") (#("Bijl, Schouten, Sluijs, Reichart, Za Early Palaeogene temperature evolution of the southwest Pacific Ocean.   2009 ⌘  article" 0 1 (idx 38)) . "Bijl2009") (#("Stap, Sluijs, Thomas, Lourens        Patterns and magnitude of deep sea carbonate dissolution during Eocene T 2009 ⌘  article" 0 1 (idx 39)) . "Stap2009") (#("Scher, Martin                        Timing and climatic consequences of the opening of Drake Passage.        2006 ⌘  article" 0 1 (idx 40)) . "Scher2006a") (#("Creech, Baker, Hollis, Morgans, Smit Eocene sea temperatures for the mid-latitude southwest Pacific from Mg/C 2010 ⌘  article" 0 1 (idx 41)) . "Creech2010") (#("Bohaty, Zachos                       Significant Southern Ocean warming event in the late middle Eocene       2003 ⌘  article" 0 1 (idx 42)) . "Bohaty2003") (#("Clarke, Wheeler                      The Inorganic Constituents of Marine Invertebrates                       1922    book   " 0 1 (idx 43)) . "Clarke1922") (#("Hollis, Handley, Crouch, Morgans, Ba Tropical sea temperatures in the high-latitude South Pacific during the  2009 ⌘  article" 0 1 (idx 44)) . "Hollis2009") (#("Frieling                             Climate, Carbon Cycling and Marine Ecolgoy during the Paleocene-Eocene T 2016    phdthes" 0 1 (idx 45)) . "FrielingThesis") (#("Hollis, Taylor, Handley, Pancost, Hu Early Paleogene temperature history of the Southwest Pacific Ocean: Reco 2012 ⌘  article" 0 1 (idx 46)) . "Hollis2012a") (#("Schouten, Hopmans, Schefu\\ss, Sinnin Distributional veriations in marine crenarchaeol membrane lipids: a new  2002 ⌘  article" 0 1 (idx 47)) . "Schouten2002") (#("Hollis, Strong, Rodgers, Rogers      Paleoenvironmental changes across the Cretaceous/Tertiary boundary at Fl 2003 ⌘  article" 0 1 (idx 48)) . "Hollis2003") (#("Pagani, Zachos, Freeman, Tipple, Boh Marked decline in atmospheric carbon dioxide concentrations during the P 2005 ⌘  article" 0 1 (idx 49)) . "Pagani2005") ...) :caller ivy-bibtex :action bibtex-completion-open-pdf)
  ivy-bibtex(nil)
  call-interactively(ivy-bibtex nil nil)
  command-execute(ivy-bibtex)

error:

progn: Search failed: "^@\\([^^\"@\\&$#%',={}()
 ]*\\)[[:space:]]*[({][[:space:]]*Allerton                             20 \\. Paleomagnetic Results From Holes 959D and 960a ,                    1998 ⌘  article[[:space:]]*," 

error:

Debugger entered--Lisp error: (wrong-type-argument listp "Allerton1998")
  mapconcat(identity (#("Allerton                             20 . Paleomagnetic Results From Holes 959D and 960a ,                    1998 ⌘  article" 0 1 (idx 0)) . "Allerton1998") ", ")
  s-join(", " (#("Allerton                             20 . Paleomagnetic Results From Holes 959D and 960a ,                    1998 ⌘  article" 0 1 (idx 0)) . "Allerton1998"))
  bibtex-completion-format-citation-default((#("Allerton                             20 . Paleomagnetic Results From Holes 959D and 960a ,                    1998 ⌘  article" 0 1 (idx 0)) . "Allerton1998"))
  funcall(bibtex-completion-format-citation-default (#("Allerton                             20 . Paleomagnetic Results From Holes 959D and 960a ,                    1998 ⌘  article" 0 1 (idx 0)) . "Allerton1998"))
  (insert (funcall format-function keys))
  (let ((keys (if (listp candidates) candidates (list candidates))) (format-function (cdr (or (assoc major-mode bibtex-completion-format-citation-functions) (assoc (quote default) bibtex-completion-format-citation-functions))))) (insert (funcall format-function keys)))
  bibtex-completion-insert-citation((#("Allerton                             20 . Paleomagnetic Results From Holes 959D and 960a ,                    1998 ⌘  article" 0 1 (idx 0)) . "Allerton1998"))
  ivy-call()
  ivy-read("BibTeX Items: " ((#("Allerton                             20 . Paleomagnetic Results From Holes 959D and 960a ,                    1998 ⌘  article" 0 1 (idx 0)) . "Allerton1998") (#("DeConto, Pollard                     Rapid Cenozoic glaciation of Antarctica induced by declining atmospheric 2003 ⌘  article" 0 1 (idx 1)) . "DeConto2003a") (#("Hyland, Sheldon                      Coupled CO2-climate response during the Early Eocene Climatic Optimum    2013 ⌘  article" 0 1 (idx 2)) . "Hyland2013") (#("Bijl, Sluijs, Brinkhuis              A magneto- and chemostratigraphically calibrated dinoflagellate cyst zon 2013 ⌘  article" 0 1 (idx 3)) . "Bijl2013") (#("Eldrett, Greenwood, Harding, Huber   Increased seasonality through the Eocene to Oligocene transition in nort 2009 ⌘  article" 0 1 (idx 4)) . "Eldrett2009") (#("Huber, Nof                           The ocean circulation in the southern hemisphere and its climatic impact 2006 ⌘  article" 0 1 (idx 5)) . "Huber2006") (#("Sluijs, Pross, Brinkhuis             From greenhouse to icehouse; organic-walled dinoflagellate cysts as pale 2005 ⌘  article" 0 1 (idx 6)) . "Sluijs2005") (#("Brinkhuis, Sengers, Sluijs, Warnaar, Latest Cretaceous to earliest Oligocene, and Quaternary dinoflagellate c 2003 ⌘  article" 0 1 (idx 7)) . "Brinkhuis2003") (#("Schouten, Hopmans, Sinninghe Damst?? The organic geochemistry of glycerol dialkyl glycerol tetraether lipids: 2013 ⌘  article" 0 1 (idx 8)) . "Schouten2013") (#("Williams, Brinkhuis, Pearce, Fensome Southern Ocean and global dinoflagellate cyst events compared: Index eve 2004    article" 0 1 (idx 9)) . "Williams2004") (#("Agnini, Fornaciari, Raffi, Catanzari Biozonation and biochronology of Paleogene calcareous nannofossils from  2014 ⌘  article" 0 1 (idx 10)) . "Agnini2014") (#("Huguet, de Lange, Gustafsson, Middel Selective preservation of soil organic matter in oxidized marine sedimen 2008 ⌘  article" 0 1 (idx 11)) . "Huguet2008") (#("Gingerich                            Environment and evolution through the Paleocene-Eocene thermal maximum   2006 ⌘  article" 0 1 (idx 12)) . "Gingerich2006") (#("Westerhold, R\\ohl, Laskar, Raffi, Bo On the duration of magnetochrons C24r and C25n and the timing of early E 2007 ⌘  article" 0 1 (idx 13)) . "Westerhold2007") (#("Zeeden, Hilgen, R\\ohl, Seelos, Loure Sediment color as a tool in cyclostratigraphy – a new application for im 2015 ⌘  article" 0 1 (idx 14)) . "Zeeden2015") (#("Scientific party, Mascle, Lohman, Cl 9. Principal results                                                     1996 ⌘  article" 0 1 (idx 15)) . "Mascle2000") (#("Fensome, Guerstein, Williams         New insights on the Paleogene dinoflagellate cyst genera Enneadocysta an 2006 ⌘  article" 0 1 (idx 16)) . "Fensome2006") (#("Mashiotta, Lea, Spero                Glacial–interglacial changes in Subantarctic sea surface temperature and 1999 ⌘  article" 0 1 (idx 17)) . "Mashiotta1999") (#("Huber                                Climate change. A hotter greenhouse?                                     2008 ⌘  article" 0 1 (idx 18)) . "Huber2008") (#("Pearson, van Dongen, Nicholas, Panco Stable warm tropical climate through the Eocene Epoch                    2007 ⌘  article" 0 1 (idx 19)) . "Pearson2007") (#("Huber, Caballero                     The early Eocene equable climate problem revisited                       2011 ⌘  article" 0 1 (idx 20)) . "Huber2011") (#("Sloan, Barron                        Equable climates during Earth history?                                   1990 ⌘  article" 0 1 (idx 21)) . "Sloan1990") (#("Bijl, Bendle, Bohaty, Pross, Schoute Eocene cooling linked to early flow across the Tasmanian Gateway.        2013    article" 0 1 (idx 22)) . "Bijl2013proc") (#("Alves                                CRET\\'ACEO - PALE\\'OGENO DA BACIA DE DAHOMEY E ATL\\^ANTICO SUL EQUATORIA 2007    phdthes" 0 1 (idx 23)) . "Alves2007") (#("Strong, Hollis, Wilson               Foraminiferal, radiolarian, and dinoflagellate biostratigraphy of Late C 1995 ⌘  article" 0 1 (idx 24)) . "Strong1995a") (#("Jones, Lunt, Schmidt, Ridgwell, Slui Climate model and proxy data constraints on ocean warming across the Pal 2013 ⌘  article" 0 1 (idx 25)) . "Jones2013") (#("Hinsbergen, de Groot, van Schaik, Sp A Paleolatitude Calculator for Paleoclimate Studies (model version 1.2)  2015    article" 0 1 (idx 26)) . "Hinsbergen2015") (#("Sluijs, Bijl, Schouten, R\\ohl, Reich Southern ocean warming, sea level and hydrological change during the Pal 2011 ⌘  article" 0 1 (idx 27)) . "Sluijs2011") (#("Lourens, Sluijs, Kroon, Zachos, Thom Astronomical pacing of late Palaeocene to early Eocene global warming ev 2005 ⌘  article" 0 1 (idx 28)) . "Lourens2005") (#("Frieling, Iakovleva, Reichart, Aleks Paleocene-Eocene warming and biotic response in the epicontinental West  2014 ⌘  article" 0 1 (idx 29)) . "Frieling2014") (#("Huber, Caballero                     Eocene El Ni\\~no: evidence for robust tropical dynamics in the hothouse. 2003    article" 0 1 (idx 30)) . "Huber2003") (#("Jaramillo-Vogel, Strasser, Frijia, S Neritic isotope and sedimentary records of the Eocene–Oligocene greenhou 2013 ⌘  article" 0 1 (idx 31)) . "Jaramillo-Vogel2013") (#("Taylor, Huber, Hollis, Hernandez-San Re-evaluating modern and Palaeogene GDGT distributions: Implications for 2013 ⌘  article" 0 1 (idx 32)) . "Taylor2013") (#("Liu, Pagani, Zinniker, Deconto, Hube Eocene-Oligocene Climate Transition                                      2008 ⌘  article" 0 1 (idx 33)) . "Liu2008") (#("Wagner                               Late Cretaceous to early Quaternary organic sedimentation in the eastern 2002 ⌘  article" 0 1 (idx 34)) . "Wagner2002") (#("Hollis, Dickens, Field, Jones, Percy The Paleocene-Eocene transition at Mead Stream, New Zealand: A southern  2005 ⌘  article" 0 1 (idx 35)) . "Hollis2005") (#("Oboh-ikuenobe, Yepes, Gregg          25 . Palynostratigraphy, Palynofacies, and Thermal Maturation of Cretace 1998 ⌘  article" 0 1 (idx 36)) . "Oboh-ikuenobe1998") (#("Stover, Brinkhuis, Damassa, De Verte Mesozoic-Tertiary dinoflagellates, acritarchs and prasinophytes          1996    incolle" 0 1 (idx 37)) . "Stover1996") (#("Bijl, Schouten, Sluijs, Reichart, Za Early Palaeogene temperature evolution of the southwest Pacific Ocean.   2009 ⌘  article" 0 1 (idx 38)) . "Bijl2009") (#("Stap, Sluijs, Thomas, Lourens        Patterns and magnitude of deep sea carbonate dissolution during Eocene T 2009 ⌘  article" 0 1 (idx 39)) . "Stap2009") (#("Scher, Martin                        Timing and climatic consequences of the opening of Drake Passage.        2006 ⌘  article" 0 1 (idx 40)) . "Scher2006a") (#("Creech, Baker, Hollis, Morgans, Smit Eocene sea temperatures for the mid-latitude southwest Pacific from Mg/C 2010 ⌘  article" 0 1 (idx 41)) . "Creech2010") (#("Bohaty, Zachos                       Significant Southern Ocean warming event in the late middle Eocene       2003 ⌘  article" 0 1 (idx 42)) . "Bohaty2003") (#("Clarke, Wheeler                      The Inorganic Constituents of Marine Invertebrates                       1922    book   " 0 1 (idx 43)) . "Clarke1922") (#("Hollis, Handley, Crouch, Morgans, Ba Tropical sea temperatures in the high-latitude South Pacific during the  2009 ⌘  article" 0 1 (idx 44)) . "Hollis2009") (#("Frieling                             Climate, Carbon Cycling and Marine Ecolgoy during the Paleocene-Eocene T 2016    phdthes" 0 1 (idx 45)) . "FrielingThesis") (#("Hollis, Taylor, Handley, Pancost, Hu Early Paleogene temperature history of the Southwest Pacific Ocean: Reco 2012 ⌘  article" 0 1 (idx 46)) . "Hollis2012a") (#("Schouten, Hopmans, Schefu\\ss, Sinnin Distributional veriations in marine crenarchaeol membrane lipids: a new  2002 ⌘  article" 0 1 (idx 47)) . "Schouten2002") (#("Hollis, Strong, Rodgers, Rogers      Paleoenvironmental changes across the Cretaceous/Tertiary boundary at Fl 2003 ⌘  article" 0 1 (idx 48)) . "Hollis2003") (#("Pagani, Zachos, Freeman, Tipple, Boh Marked decline in atmospheric carbon dioxide concentrations during the P 2005 ⌘  article" 0 1 (idx 49)) . "Pagani2005") ...) :caller ivy-bibtex :action bibtex-completion-open-pdf)
  ivy-bibtex(nil)
  call-interactively(ivy-bibtex nil nil)
  command-execute(ivy-bibtex)

error:

Debugger entered--Lisp error: (wrong-type-argument listp "Allerton1998")
  mapcar((lambda (it) (s-word-wrap fill-column (concat "\n- " (bibtex-completion-apa-format-reference it)))) (#("Allerton                             20 . Paleomagnetic Results From Holes 959D and 960a ,                    1998 ⌘  article" 0 1 (idx 0)) . "Allerton1998"))
  (let* ((keys (if (listp candidates) candidates (list candidates))) (refs (mapcar (function (lambda (it) (s-word-wrap fill-column (concat "\n- " ...)))) keys))) (insert "\n" (s-join "\n" refs) "\n"))
  bibtex-completion-insert-reference((#("Allerton                             20 . Paleomagnetic Results From Holes 959D and 960a ,                    1998 ⌘  article" 0 1 (idx 0)) . "Allerton1998"))
  ivy-call()
  ivy-read("BibTeX Items: " ((#("Allerton                             20 . Paleomagnetic Results From Holes 959D and 960a ,                    1998 ⌘  article" 0 1 (idx 0)) . "Allerton1998") (#("DeConto, Pollard                     Rapid Cenozoic glaciation of Antarctica induced by declining atmospheric 2003 ⌘  article" 0 1 (idx 1)) . "DeConto2003a") (#("Hyland, Sheldon                      Coupled CO2-climate response during the Early Eocene Climatic Optimum    2013 ⌘  article" 0 1 (idx 2)) . "Hyland2013") (#("Bijl, Sluijs, Brinkhuis              A magneto- and chemostratigraphically calibrated dinoflagellate cyst zon 2013 ⌘  article" 0 1 (idx 3)) . "Bijl2013") (#("Eldrett, Greenwood, Harding, Huber   Increased seasonality through the Eocene to Oligocene transition in nort 2009 ⌘  article" 0 1 (idx 4)) . "Eldrett2009") (#("Huber, Nof                           The ocean circulation in the southern hemisphere and its climatic impact 2006 ⌘  article" 0 1 (idx 5)) . "Huber2006") (#("Sluijs, Pross, Brinkhuis             From greenhouse to icehouse; organic-walled dinoflagellate cysts as pale 2005 ⌘  article" 0 1 (idx 6)) . "Sluijs2005") (#("Brinkhuis, Sengers, Sluijs, Warnaar, Latest Cretaceous to earliest Oligocene, and Quaternary dinoflagellate c 2003 ⌘  article" 0 1 (idx 7)) . "Brinkhuis2003") (#("Schouten, Hopmans, Sinninghe Damst?? The organic geochemistry of glycerol dialkyl glycerol tetraether lipids: 2013 ⌘  article" 0 1 (idx 8)) . "Schouten2013") (#("Williams, Brinkhuis, Pearce, Fensome Southern Ocean and global dinoflagellate cyst events compared: Index eve 2004    article" 0 1 (idx 9)) . "Williams2004") (#("Agnini, Fornaciari, Raffi, Catanzari Biozonation and biochronology of Paleogene calcareous nannofossils from  2014 ⌘  article" 0 1 (idx 10)) . "Agnini2014") (#("Huguet, de Lange, Gustafsson, Middel Selective preservation of soil organic matter in oxidized marine sedimen 2008 ⌘  article" 0 1 (idx 11)) . "Huguet2008") (#("Gingerich                            Environment and evolution through the Paleocene-Eocene thermal maximum   2006 ⌘  article" 0 1 (idx 12)) . "Gingerich2006") (#("Westerhold, R\\ohl, Laskar, Raffi, Bo On the duration of magnetochrons C24r and C25n and the timing of early E 2007 ⌘  article" 0 1 (idx 13)) . "Westerhold2007") (#("Zeeden, Hilgen, R\\ohl, Seelos, Loure Sediment color as a tool in cyclostratigraphy – a new application for im 2015 ⌘  article" 0 1 (idx 14)) . "Zeeden2015") (#("Scientific party, Mascle, Lohman, Cl 9. Principal results                                                     1996 ⌘  article" 0 1 (idx 15)) . "Mascle2000") (#("Fensome, Guerstein, Williams         New insights on the Paleogene dinoflagellate cyst genera Enneadocysta an 2006 ⌘  article" 0 1 (idx 16)) . "Fensome2006") (#("Mashiotta, Lea, Spero                Glacial–interglacial changes in Subantarctic sea surface temperature and 1999 ⌘  article" 0 1 (idx 17)) . "Mashiotta1999") (#("Huber                                Climate change. A hotter greenhouse?                                     2008 ⌘  article" 0 1 (idx 18)) . "Huber2008") (#("Pearson, van Dongen, Nicholas, Panco Stable warm tropical climate through the Eocene Epoch                    2007 ⌘  article" 0 1 (idx 19)) . "Pearson2007") (#("Huber, Caballero                     The early Eocene equable climate problem revisited                       2011 ⌘  article" 0 1 (idx 20)) . "Huber2011") (#("Sloan, Barron                        Equable climates during Earth history?                                   1990 ⌘  article" 0 1 (idx 21)) . "Sloan1990") (#("Bijl, Bendle, Bohaty, Pross, Schoute Eocene cooling linked to early flow across the Tasmanian Gateway.        2013    article" 0 1 (idx 22)) . "Bijl2013proc") (#("Alves                                CRET\\'ACEO - PALE\\'OGENO DA BACIA DE DAHOMEY E ATL\\^ANTICO SUL EQUATORIA 2007    phdthes" 0 1 (idx 23)) . "Alves2007") (#("Strong, Hollis, Wilson               Foraminiferal, radiolarian, and dinoflagellate biostratigraphy of Late C 1995 ⌘  article" 0 1 (idx 24)) . "Strong1995a") (#("Jones, Lunt, Schmidt, Ridgwell, Slui Climate model and proxy data constraints on ocean warming across the Pal 2013 ⌘  article" 0 1 (idx 25)) . "Jones2013") (#("Hinsbergen, de Groot, van Schaik, Sp A Paleolatitude Calculator for Paleoclimate Studies (model version 1.2)  2015    article" 0 1 (idx 26)) . "Hinsbergen2015") (#("Sluijs, Bijl, Schouten, R\\ohl, Reich Southern ocean warming, sea level and hydrological change during the Pal 2011 ⌘  article" 0 1 (idx 27)) . "Sluijs2011") (#("Lourens, Sluijs, Kroon, Zachos, Thom Astronomical pacing of late Palaeocene to early Eocene global warming ev 2005 ⌘  article" 0 1 (idx 28)) . "Lourens2005") (#("Frieling, Iakovleva, Reichart, Aleks Paleocene-Eocene warming and biotic response in the epicontinental West  2014 ⌘  article" 0 1 (idx 29)) . "Frieling2014") (#("Huber, Caballero                     Eocene El Ni\\~no: evidence for robust tropical dynamics in the hothouse. 2003    article" 0 1 (idx 30)) . "Huber2003") (#("Jaramillo-Vogel, Strasser, Frijia, S Neritic isotope and sedimentary records of the Eocene–Oligocene greenhou 2013 ⌘  article" 0 1 (idx 31)) . "Jaramillo-Vogel2013") (#("Taylor, Huber, Hollis, Hernandez-San Re-evaluating modern and Palaeogene GDGT distributions: Implications for 2013 ⌘  article" 0 1 (idx 32)) . "Taylor2013") (#("Liu, Pagani, Zinniker, Deconto, Hube Eocene-Oligocene Climate Transition                                      2008 ⌘  article" 0 1 (idx 33)) . "Liu2008") (#("Wagner                               Late Cretaceous to early Quaternary organic sedimentation in the eastern 2002 ⌘  article" 0 1 (idx 34)) . "Wagner2002") (#("Hollis, Dickens, Field, Jones, Percy The Paleocene-Eocene transition at Mead Stream, New Zealand: A southern  2005 ⌘  article" 0 1 (idx 35)) . "Hollis2005") (#("Oboh-ikuenobe, Yepes, Gregg          25 . Palynostratigraphy, Palynofacies, and Thermal Maturation of Cretace 1998 ⌘  article" 0 1 (idx 36)) . "Oboh-ikuenobe1998") (#("Stover, Brinkhuis, Damassa, De Verte Mesozoic-Tertiary dinoflagellates, acritarchs and prasinophytes          1996    incolle" 0 1 (idx 37)) . "Stover1996") (#("Bijl, Schouten, Sluijs, Reichart, Za Early Palaeogene temperature evolution of the southwest Pacific Ocean.   2009 ⌘  article" 0 1 (idx 38)) . "Bijl2009") (#("Stap, Sluijs, Thomas, Lourens        Patterns and magnitude of deep sea carbonate dissolution during Eocene T 2009 ⌘  article" 0 1 (idx 39)) . "Stap2009") (#("Scher, Martin                        Timing and climatic consequences of the opening of Drake Passage.        2006 ⌘  article" 0 1 (idx 40)) . "Scher2006a") (#("Creech, Baker, Hollis, Morgans, Smit Eocene sea temperatures for the mid-latitude southwest Pacific from Mg/C 2010 ⌘  article" 0 1 (idx 41)) . "Creech2010") (#("Bohaty, Zachos                       Significant Southern Ocean warming event in the late middle Eocene       2003 ⌘  article" 0 1 (idx 42)) . "Bohaty2003") (#("Clarke, Wheeler                      The Inorganic Constituents of Marine Invertebrates                       1922    book   " 0 1 (idx 43)) . "Clarke1922") (#("Hollis, Handley, Crouch, Morgans, Ba Tropical sea temperatures in the high-latitude South Pacific during the  2009 ⌘  article" 0 1 (idx 44)) . "Hollis2009") (#("Frieling                             Climate, Carbon Cycling and Marine Ecolgoy during the Paleocene-Eocene T 2016    phdthes" 0 1 (idx 45)) . "FrielingThesis") (#("Hollis, Taylor, Handley, Pancost, Hu Early Paleogene temperature history of the Southwest Pacific Ocean: Reco 2012 ⌘  article" 0 1 (idx 46)) . "Hollis2012a") (#("Schouten, Hopmans, Schefu\\ss, Sinnin Distributional veriations in marine crenarchaeol membrane lipids: a new  2002 ⌘  article" 0 1 (idx 47)) . "Schouten2002") (#("Hollis, Strong, Rodgers, Rogers      Paleoenvironmental changes across the Cretaceous/Tertiary boundary at Fl 2003 ⌘  article" 0 1 (idx 48)) . "Hollis2003") (#("Pagani, Zachos, Freeman, Tipple, Boh Marked decline in atmospheric carbon dioxide concentrations during the P 2005 ⌘  article" 0 1 (idx 49)) . "Pagani2005") ...) :caller ivy-bibtex :action bibtex-completion-open-pdf)
  ivy-bibtex(nil)
  call-interactively(ivy-bibtex nil nil)
  command-execute(ivy-bibtex)

And I don't think posting more of these massive outputs will help solve the issue more ;).

justbur commented 8 years ago

@japhir Somehow you are loading the wrong code. Just in your first example the bibtex-completion-open-pdf code is the old version. Are you using the right branch from my repo? It should be the normalize branch (not master).

japhir commented 8 years ago

@justbur whoops, yes I was using the master branch. On the normalize-branch everything works as expected! :+1:

tmalsburg commented 8 years ago

Sorry everyone, I'm currently traveling, reception is very spotty and my laptop's display is dying. Can I simply merge #119 to resolve this issue?

swarnendubiswas commented 8 years ago

I would say yes.

justbur commented 8 years ago

Well.. I haven't tested with helm, so I can't say for sure. @tmalsburg you mentioned that you tested before I put in the latest commit. It should be fine...

BTW, I made a couple of minor formatting changes to clean up the diff and force pushed just now.

tmalsburg commented 8 years ago

Merged. Thanks everyone and sorry for the slow response.

soonwookwon commented 5 years ago

Sorry for reviving the thread after three years, but I'm getting the same error after installing ivy-bibtex directly from MELPA. Everything worked fine with helm-bibtex. I'm trying to insert a citation (with bibtex key "donoho1994") and it throws an error

Wrong type argument: listp, "1994"

I'm on Emacs 26.2 and Arch Linux (kernel 5.1.3). Thanks!

tmalsburg commented 5 years ago

@soonwookwon, sorry for the slow response. I just tried this but couldn't reproduce your problem. Inserting citations works fine on my setup. Could you please send a minimal example with emacs -q. Thank you!