From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: jorge.alfaro-murillo@yale.edu (Jorge A. Alfaro-Murillo) Newsgroups: gmane.emacs.help Subject: Re: How to speed up cutting & pasting from/to emacs? Date: Mon, 13 Jul 2015 11:30:27 -0400 Message-ID: <878uakqdm4.fsf@yale.edu> References: <87zj31605c.fsf@skimble.plus.com> <87wpy58fkd.fsf@nl106-137-147.student.uu.se> <87y4ilp5iv.fsf@skimble.plus.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; format=flowed X-Trace: ger.gmane.org 1436801385 2747 80.91.229.3 (13 Jul 2015 15:29:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 13 Jul 2015 15:29:45 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jul 13 17:29:34 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZEffh-0004Gx-PI for geh-help-gnu-emacs@m.gmane.org; Mon, 13 Jul 2015 17:29:33 +0200 Original-Received: from localhost ([::1]:55365 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZEffh-0006mg-1E for geh-help-gnu-emacs@m.gmane.org; Mon, 13 Jul 2015 11:29:33 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38683) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZEffV-0006mb-5L for help-gnu-emacs@gnu.org; Mon, 13 Jul 2015 11:29:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZEffO-0003Gs-0a for help-gnu-emacs@gnu.org; Mon, 13 Jul 2015 11:29:16 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:60934) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZEffN-0003GG-PT for help-gnu-emacs@gnu.org; Mon, 13 Jul 2015 11:29:13 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ZEffI-00046I-DO for help-gnu-emacs@gnu.org; Mon, 13 Jul 2015 17:29:08 +0200 Original-Received: from 130.132.236.141 ([130.132.236.141]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 13 Jul 2015 17:29:08 +0200 Original-Received: from jorge.alfaro-murillo by 130.132.236.141 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 13 Jul 2015 17:29:08 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 73 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 130.132.236.141 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) Cancel-Lock: sha1:kzCGRgLdg549rKadtiYFRYdE/dk= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:105690 Archived-At: Sharon Kimble writes: > Emanuel Berg writes: > >> Sharon Kimble writes: >> >>> I'm involved in a project which involves a lot of pasting into >>> emacs From the clipboard, which is taking a long time. >> >> The best answer/method is: don't do it! >> >> What other program(s) are you using, to/from which you >> copy/paste? Have you examined if Emacs can do what these >> programs do, in what case you don't have that problem anymore >> but can rely on kill/yank instead, which is much more powerful >> and fast. > > Primarily 'zim' and pasting to and from 'JabRef', I'm mostly > creating bibtex records from a published bibliography on an > article on the web, which I've opened in w3m. I would use 'eew' > if I could only find out how to use tabs with it! Generally (at least for STEAM and medical fields) you can download the references of the article in bibtex format from the journal website. I have a bash script ~/bin/emacsbib with the following: #+BEGIN_SRC shell #!/bin/bash $HOME/bin/emacsclient -a '' -e "(jaam/bibtex-add-citation \"${1}\")" #+END_SRC and then in my .emacs I have: #+BEGIN_SRC emacs-lisp (defun jaam/bibtex-add-citation (filename &optional bibfile) (interactive) (if bibfile (find-file bibfile) (find-file (car bibtex-string-files))) (read-only-mode 0) (goto-char (point-max)) (re-search-backward "}$" nil t) (forward-char 1) (delete-blank-lines) (insert "\n") (insert-file-contents filename)) #+END_SRC Additionally you should set bibtex-string-files with a list of your reference files. Then opening a file from the browser with emacsbib yanks the citation to the first entry of bibtex-string-files. This works with almost any journal, in rare (stupid) occasions, e.g. Nature, the journal does not provide bibtex files, but they have RIS format. For those occasions I have another script ~/bin/emacsris with: #+BEGIN_SRC shell #!/bin/bash /usr/share/cb2bib/c2btools/ris2bib $1 /tmp/tempbib $HOME/bin/emacsbib /tmp/tempbib #+END_SRC You need to have the ris2bib script which in debian is part of the package cb2bib. Best, -- Jorge.