From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mario Lassnig Newsgroups: gmane.emacs.help Subject: Re: How to open two or more scratch buffers ? Date: Fri, 14 Jan 2011 23:34:34 +0100 Organization: Aioe.org NNTP Server Message-ID: References: Reply-To: mario@lassnig.net NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1295044848 6690 80.91.229.12 (14 Jan 2011 22:40:48 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 14 Jan 2011 22:40:48 +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 Jan 14 23:40:44 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PdsK1-0001d1-UI for geh-help-gnu-emacs@m.gmane.org; Fri, 14 Jan 2011 23:40:42 +0100 Original-Received: from localhost ([127.0.0.1]:41934 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PdsJx-0001iJ-1e for geh-help-gnu-emacs@m.gmane.org; Fri, 14 Jan 2011 17:40:37 -0500 Original-Path: usenet.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!newsgate.news.xs4all.nl!news2.euro.net!feeder.news-service.com!94.75.214.39.MISMATCH!aioe.org!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 51 Original-NNTP-Posting-Host: tB+B9iv7JfuqJDqQmclraA.user.speranza.aioe.org Original-X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-GB; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 Original-Xref: usenet.stanford.edu gnu.emacs.help:184287 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:78454 Archived-At: On 1/14/11 11:18 PM, Drew Adams wrote: >> (1) I want to compare two or three files (compare-windows) but I dont >> want to save them in files, > > Then you want to compare not files but buffers, no? > >> only as scratch buffers. > > Do you mean buffer `*scratch*' or just throw-away buffers? > > You can open any buffers you want, using `C-x b'. The buffer need not exist > first. I use this simple shortcut about a hundred times a day: (defun new-scratchpad () (interactive) (switch-to-buffer (concat "scratch-" (number-to-string (abs (random)))))) (global-set-key (kbd "C-n") 'new-scratchpad) > >> C-x 2 replicates the same buffer in two different windows. > > Then you are not comparing buffers or files, but the contents of windows > (`compare-windows', as you mentioned). > > Consider using different, throw-away buffers, and using `ediff-compare-buffers'. > >> Suppose the above is solved, then how to have a nice key binding if >> there is no pre-existing one as I dont want to deviate from the normal >> defaults, but only on these few occasions. > > Personally, I use these bindings: > > C-= b ediff-buffers > C-= d diff > C-= e ediff-files > C-= f ediff-files > C-= w compare-windows > > http://www.emacswiki.org/emacs/setup-keys.el > >