emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "J. G." <jerzor@pacbell.net>
To: Org-Mode Mailing List <emacs-orgmode@gnu.org>
Subject: org-bibtex-yank failing with error Wrong type argument: stringp, nil
Date: Fri, 11 Aug 2023 16:34:31 +0000 (UTC)	[thread overview]
Message-ID: <1939460027.3272000.1691771671040@mail.yahoo.com> (raw)
In-Reply-To: 1939460027.3272000.1691771671040.ref@mail.yahoo.com

Hi, I'm trying to figure out why I'm getting consistent failures using org-bibtex-yank. This appears to be identical to the problem posted here:

https://stackoverflow.com/questions/31174281/org-bibtex-yank-fails-with-wrong-type-argument-stringp-nil

On my system I am using a fresh Ubuntu 23.04 VM with the following emacs and org-mode build info:

GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.37, cairo version 1.16.0) of 2023-08-11

Org mode version 9.7-pre (release_9.6.7-652-gcfea24 @ /home/test/org-mode/lisp/)

My backtrace is very similar to that posted in the stackoverflow thread:

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  looking-at(nil)
  bibtex-parse-entry()
  org-bibtex-read()
  org-bibtex-yank()
  funcall-interactively(org-bibtex-yank)
  call-interactively(org-bibtex-yank record nil)
  command-execute(org-bibtex-yank record)
  execute-extended-command(nil "org-bibtex-yank" nil)
  funcall-interactively(execute-extended-command nil "org-bibtex-yank" nil)
  call-interactively(execute-extended-command nil nil)
  command-execute(execute-extended-command)

My steps to reproduce, with this as my init.el file:

(add-to-list 'load-path "~/org-mode/lisp")
(require 'org-loaddefs)

1. Open test.org in emacs.

2. Copy a bibtex entry in Firefox, for example this entry from Google Scholar:

@article{dominik2004org,
  title={Org Mode Manual},
  author={Dominik, Carsten},
  year={2004}
}

3. In the org file call M-x org-bibtex-yank.

After that I experience the failure above 100% of the time.

Attempts to troubleshoot:

One of the comments in the stackoverflow thread mentioned that a reason this could have failed was that the variable "bibtex-dialect" wasn't set. C-h v confirms it was set in my case (to "BibTeX"), but the problem was still present. I added a line in my init.el file "(setq bibtex-dialect 'biblatex)" just to double check and the problem was still present.

As described in the same comment, with my original 2 line init.el file above,

1. simply opening a new file "dummy.bib" (doing nothing with it),

2. then opening "test.org",

3. copying a bibtex entry in Firefox,

4. calling org-bibtex-yank

caused org-bibtex-yank to correctly function. I did not need to call bibtex-set-dialect as the comment described.


       reply	other threads:[~2023-08-13  2:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1939460027.3272000.1691771671040.ref@mail.yahoo.com>
2023-08-11 16:34 ` J. G. [this message]
2023-08-12  4:15   ` org-bibtex-yank failing with error Wrong type argument: stringp, nil J. G.
2023-08-13  7:57     ` Ihor Radchenko
2023-08-13 15:30       ` Jeremias Gonzalez
2023-08-13 15:44         ` Ihor Radchenko
2023-08-13 16:15           ` Jeremias Gonzalez
2023-08-13 16:25             ` Ihor Radchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1939460027.3272000.1691771671040@mail.yahoo.com \
    --to=jerzor@pacbell.net \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).