Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error using find-file in jmax-org.el #5

Closed
jboes opened this issue Apr 7, 2014 · 1 comment
Closed

error using find-file in jmax-org.el #5

jboes opened this issue Apr 7, 2014 · 1 comment

Comments

@jboes
Copy link
Contributor

jboes commented Apr 7, 2014

Error which occurs while loading into the jmax init.el file for the first time:

This is copied from the message log:
Loading /home-research/jboes/Dropbox/jmax/jmax-org.el (source)...
find-file-noselect: Wrong type argument: stringp, nil

Error was avoided by commenting out the following lines in jmax-org.el:
;; I like a random bibtex entry in my agenda.
;(defun formatted-bibtex-entry ()
; "return a bibtex entry as a formatted string. I hand-built the format.

;this treats all entries as a journal article."
; (interactive)
; (bibtex-beginning-of-entry)
; (let* ((bibtex-expand-strings t)
; (entry (bibtex-parse-entry t))
; (title (replace-regexp-in-string "\n|\t|\s+" " " (reftex-get-bib-field "title" entry)))
; (year (reftex-get-bib-field "year" entry))
; (author (replace-regexp-in-string "\n|\t|\s+" " " (reftex-get-bib-field "author" entry)))
; (key (reftex-get-bib-field "=key=" entry))
; (journal (reftex-get-bib-field "journal" entry))
; (volume (reftex-get-bib-field "volume" entry))
; (issue (reftex-get-bib-field "issue" entry))
; (pages (reftex-get-bib-field "pages" entry))
; (doi (reftex-get-bib-field "doi" entry))
; (output))
; (concat (when author author) ", "
; (when title title) ", "
; (when journal journal) ", "
; (when volume volume)
; (if issue (format "(%s), " issue) ", ")
; (when pages pages) ", "
; (when year (format "(%s)." year))
; (when doi (format " http://dx.doi.org/%s" doi)))))

;; this returns a string for my agenda.
;(defun get-random-bibtex-entry (&optional arg)
; "for printing in my agenda"
; (let ((keys) (lucky-key) (output))
; (with-current-buffer
; (find-file (car reftex-default-bibliography))
; (setq keys (bibtex-parse-keys))
; (setq lucky-key (car
; (nth
; (random (safe-length keys)) keys)))
; (goto-char (point-min))
; (re-search-forward lucky-key)
; (setq output (formatted-bibtex-entry))
; (kill-buffer)
; (format "%s\ncite:%s" output lucky-key))))

;(setq initial-scratch-message (get-random-bibtex-entry))

@jkitchin
Copy link
Owner

jkitchin commented Apr 7, 2014

I took this code out of jmax. That should solve this problem.

@jkitchin jkitchin closed this as completed Apr 7, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants