[comp.emacs] GnuEmacs Query: scribe.el?

clamen@b.gp.cs.cmu.edu (Stewart Clamen) (01/20/87)

Has anyone out there consed up a Scribe Mode for GnuEmacs?  There is a
demand for one here at CMU, and I don't believe in reinventing the
wheel.

					Thanks,


------------------------------------------------------------------------------
ARPA:   CLAMEN@C.CS.CMU.EDU
USENET: ...!rochester!cmu-cs-pt!b.gp.cs.cmu.edu!clamen
TRW(*): Stewart M. Clamen

(*) The Real World, not the company
-- 
------------------------------------------------------------------------------
ARPA:   CLAMEN@C.CS.CMU.EDU
USENET: ...!rochester!cmu-cs-pt!b.gp.cs.cmu.edu!clamen
TRW(*): Stewart M. Clamen

(*) The Real World, not the company

jbs@mit-eddie.MIT.EDU (Jeff Siegal) (01/20/87)

In article <3@b.gp.cs.cmu.edu> clamen@b.gp.cs.cmu.edu (Stewart Clamen) writes:
>Has anyone out there consed up a Scribe Mode for GnuEmacs?  There is a
>demand for one here at CMU, and I don't believe in reinventing the
>wheel.

Emacs 18.33 includes a scribe mode.

Jeff Siegal

peterson@utah-cs.UUCP (John W Peterson) (01/21/87)

As long as you're hacking scribe, you may find the following useful:

;
; Emacs Scribe bibliography entry package - John A. Nestor March 1982
; Converted to E-lisp from mocklisp, John W. Peterson, November 1986
; 
; The following functions expedite the entry of the various bibliography
; types supported by Scribe.

(defun get-keypair (field)
  "Get a pair of keywords for scribe-bib mode"
  (let* (ans)
	(setq ans (read-string (concat field ":")))
	(if (not (equal ans ""))
	    (insert-string (concat ",\n\t" field "=" """" ans """")))))

(defun @article ()
  "Generate an @article bib entry"
  (interactive)
  (newline 1)
  (newline 1)
  (insert-string "@Article(")
  (insert-string (read-string "CodeWord:"))
  (get-keypair "Author")
  (get-keypair "Key")
  (get-keypair "Title")
  (get-keypair "Journal")
  (get-keypair "Volume")
  (get-keypair "Number")
  (get-keypair "Pages")
  (get-keypair "Month")
  (get-keypair "Year")
  (get-keypair "Note")
  (insert-string ")")
  (newline 1))


(defun @book()
  "Generate an @book bib entry"
  (interactive)
  (newline 1)
  (newline 1)
  (insert-string "@Book(")
  (insert-string (read-string "CodeWord:"))
  (get-keypair "Author")
  (get-keypair "Key")
  (get-keypair "Title")
  (get-keypair "Publisher")
  (get-keypair "Address")
  (get-keypair "Series")
  (get-keypair "Volume")
  (get-keypair "Year")
  (get-keypair "Note")
  (insert-string ")")
  (newline 1))


(defun @booklet()
  "Generate an @Booklet bib entry"
  (interactive)
  (newline 1)
  (newline 1)
  (insert-string "@Book(")
  (insert-string (read-string "CodeWord:"))
  (get-keypair "Author")
  (get-keypair "Key")
  (get-keypair "Title")
  (get-keypair "HowPublished")
  (get-keypair "Address")
  (get-keypair "Year")
  (get-keypair "Note")
  (insert-string ")")
  (newline 1))


(defun @inbook()
  "Generate an @InBook bib entry"
  (interactive)
  (newline 1)
  (newline 1)
  (insert-string "@InBook(")
  (insert-string (read-string "CodeWord:"))
  (get-keypair "Author")
  (get-keypair "Key")
  (get-keypair "Title")
  (get-keypair "Chapter")
  (get-keypair "Pages")
  (get-keypair "Publisher")
  (get-keypair "Address")
  (get-keypair "Series")
  (get-keypair "Volume")
  (get-keypair "Year")
  (get-keypair "Note")
  (insert-string ")")
  (newline 1))


(defun @incollection()
  "Generate an @InCollection bib entry"
  (interactive)
  (newline 1)
  (newline 1)
  (insert-string "@InCollection(")
  (insert-string (read-string "CodeWord:"))
  (get-keypair "Author")
  (get-keypair "Key")
  (get-keypair "Title")
  (get-keypair "BookTitle")
  (get-keypair "Chapter")
  (get-keypair "Pages")
  (get-keypair "Editor")
  (get-keypair "Publisher")
  (get-keypair "Address")
  (get-keypair "Year")
  (get-keypair "Note")
  (insert-string ")")
  (newline 1))


(defun @inproceedings()
  "Generate an @InProceedings bib entry"
  (interactive)
  (newline 1)
  (newline 1)
  (insert-string "@InProceedings(")
  (insert-string (read-string "CodeWord:"))
  (get-keypair "Author")
  (get-keypair "Key")
  (get-keypair "Title")
  (get-keypair "Organization")
  (get-keypair "BookTitle")
  (get-keypair "Editor")
  (get-keypair "Address")
  (get-keypair "Pages")
  (get-keypair "Month")
  (get-keypair "Year")
  (get-keypair "Note")
  (insert-string ")")
  (newline 1))

(defun @manual()
  "Generate a @Manual bib entry"
  (interactive)
  (newline 1)
  (newline 1)
  (insert-string "@Manual(")
  (insert-string (read-string "CodeWord:"))
  (get-keypair "Author")
  (get-keypair "Key")
  (get-keypair "Title")
  (get-keypair "Edition")
  (get-keypair "Organization")
  (get-keypair "Address")
  (get-keypair "Year")
  (get-keypair "Note")
  (insert-string ")")
  (newline 1))

(defun @mastersthesis()
  "Generate a @MastersThesis bib entry"
  (interactive)
  (newline 1)
  (newline 1)
  (insert-string "@MastersThesis(")
  (insert-string (read-string "CodeWord:"))
  (get-keypair "Author")
  (get-keypair "Key")
  (get-keypair "Title")
  (get-keypair "School")
  (get-keypair "Month")
  (get-keypair "Year")
  (get-keypair "Note")
  (insert-string ")")
  (newline 1))


(defun @misc()
  "Generate a @Misc bib entry"
  (interactive)
  (newline 1)
  (newline 1)
  (insert-string "@MastersThesis(")
  (insert-string (read-string "CodeWord:"))
  (get-keypair "Author")
  (get-keypair "Key")
  (get-keypair "Title")
  (get-keypair "HowPublished")
  (get-keypair "Note")
  (insert-string ")")
  (newline 1))


(defun @phdthesis()
  "Generate a @PhDThesis bib entry"
  (interactive)
  (newline 1)
  (newline 1)
  (insert-string "@PhDThesis(")
  (insert-string (read-string "CodeWord:"))
  (get-keypair "Author")
  (get-keypair "Key")
  (get-keypair "Title")
  (get-keypair "School")
  (get-keypair "Month")
  (get-keypair "Year")
  (get-keypair "Note")
  (insert-string ")")
  (newline 1))

(defun @proceedings()
  "Generate a @Proceedings bib entry"
  (interactive)
  (newline 1)
  (newline 1)
  (insert-string "@Proceedings(")
  (insert-string (read-string "CodeWord:"))
  (get-keypair "Organization")
  (get-keypair "Editor")
  (get-keypair "Publisher")
  (get-keypair "Key")
  (get-keypair "Title")
  (get-keypair "Address")
  (get-keypair "Note")
  (insert-string ")")
  (newline 1))


(defun @techreport()
  "Generate a @TechReport bib entry"
  (interactive)
  (newline 1)
  (newline 1)
  (insert-string "@TechReport(")
  (insert-string (read-string "CodeWord:"))
  (get-keypair "Author")
  (get-keypair "Key")
  (get-keypair "Title")
  (get-keypair "Institution")
  (get-keypair "Number")
  (get-keypair "Type")
  (get-keypair "Month")
  (get-keypair "Year")
  (get-keypair "Note")
  (insert-string ")")
  (newline 1))


(defun @unpublished()
  "Generate a @unpublished bib entry"
  (interactive)
  (newline 1)
  (newline 1)
  (insert-string "@Unpublished")
  (insert-string (read-string "CodeWord:"))
  (get-keypair "Author")
  (get-keypair "Key")
  (get-keypair "Title")
  (get-keypair "Note")
  (insert-string ")")
  (newline 1))



; Mode setup and related junk

(defun scribe-bib-mode ()
  "set up Scribe-Bib mode"
  (interactive)
  (use-local-map nil)
  (setq mode-name "Scribe-Bib"))