From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "B. T. Raven" Newsgroups: gmane.emacs.help Subject: Re: why is this function not instantaneous? Date: Thu, 21 Mar 2013 14:38:37 -0500 Organization: NewsGuy - Unlimited Usenet $23.95 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1363912307 22350 80.91.229.3 (22 Mar 2013 00:31:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 22 Mar 2013 00:31:47 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Mar 22 01:32:11 2013 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 1UIptz-0005Ro-Er for geh-help-gnu-emacs@m.gmane.org; Fri, 22 Mar 2013 01:32:11 +0100 Original-Received: from localhost ([::1]:38917 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIptc-0007nW-3x for geh-help-gnu-emacs@m.gmane.org; Thu, 21 Mar 2013 20:31:48 -0400 Original-Path: usenet.stanford.edu!goblin1!goblin2!goblin.stu.neva.ru!newsfeed.sovam.com!news.mi.ras.ru!spln!extra.newsguy.com!newsp.newsguy.com!news1 Original-Newsgroups: gnu.emacs.help Original-Lines: 35 Original-NNTP-Posting-Host: pff4655c803855afc0562da02775a5ebfdf98f100a933aa38.newsdawg.com User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120907 Thunderbird/15.0.1 In-Reply-To: Original-Xref: usenet.stanford.edu gnu.emacs.help:197365 X-Mailman-Approved-At: Thu, 21 Mar 2013 20:28:18 -0400 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:89649 Archived-At: Eric wrote: > (defun my-yank-to-other-window (p m) > "Yank region to point of other window." > (interactive "r") > (let ((s (if (use-region-p) > (buffer-substring-no-properties p m) > (current-word)))) > (select-window (next-window)) > (insert s))) Thanks, Eric. That works without delay. Since I use this only (almost only) to transfer text between a dictionary and an rcirc window, I will use this hybrid of my and your functions: (defun tow (p m) ;; bind to F8 "Copy region text or word to buffer in other window\n" (interactive "r") (let ((s (if (use-region-p) (buffer-substring-no-properties p m) (current-word nil t)))) (other-window 1) (insert s))) I don't really understand the "strict" and "reallyword" optional arguments to 'current-word but using nil and t for them doesn't cause a hang-up like my 'copy-region-as-kill function did. (could it be coercing garbage collection?) In fact, 'current-word was a new function to me. Thanks for that. Btw, my pathological naming 'tow is just so I can used M-x tow in case I want to assign something else to f8. Ed