From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jambunathan K Newsgroups: gmane.emacs.bugs Subject: bug#11298: 24.0.95; (WISH) Re-look scratch buffers Date: Sun, 22 Apr 2012 02:20:01 +0530 Message-ID: <81r4vgq07a.fsf@gmail.com> References: <81397xm657.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1335041451 23730 80.91.229.3 (21 Apr 2012 20:50:51 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 21 Apr 2012 20:50:51 +0000 (UTC) Cc: 11298@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Apr 21 22:50:50 2012 Return-path: Envelope-to: geb-bug-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 1SLhGU-0001Fz-U2 for geb-bug-gnu-emacs@m.gmane.org; Sat, 21 Apr 2012 22:50:43 +0200 Original-Received: from localhost ([::1]:38363 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SLhGU-0002LY-2o for geb-bug-gnu-emacs@m.gmane.org; Sat, 21 Apr 2012 16:50:42 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:56549) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SLhGN-0002LS-V7 for bug-gnu-emacs@gnu.org; Sat, 21 Apr 2012 16:50:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SLhGJ-0005kt-Kq for bug-gnu-emacs@gnu.org; Sat, 21 Apr 2012 16:50:35 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:45066) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SLhGJ-0005kn-EV for bug-gnu-emacs@gnu.org; Sat, 21 Apr 2012 16:50:31 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SLhGo-00024P-TO for bug-gnu-emacs@gnu.org; Sat, 21 Apr 2012 16:51:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jambunathan K Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 21 Apr 2012 20:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11298 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 11298-submit@debbugs.gnu.org id=B11298.13350414607949 (code B ref 11298); Sat, 21 Apr 2012 20:51:02 +0000 Original-Received: (at 11298) by debbugs.gnu.org; 21 Apr 2012 20:51:00 +0000 Original-Received: from localhost ([127.0.0.1]:46100 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SLhGi-000247-Tn for submit@debbugs.gnu.org; Sat, 21 Apr 2012 16:51:00 -0400 Original-Received: from mail-pz0-f42.google.com ([209.85.210.42]:36084) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SLhGc-00023q-JF for 11298@debbugs.gnu.org; Sat, 21 Apr 2012 16:50:55 -0400 Original-Received: by dang27 with SMTP id g27so17762250dan.29 for <11298@debbugs.gnu.org>; Sat, 21 Apr 2012 13:50:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=qMjVji2IFwXuXo+qlXcaS4ry7qLAbdPBvktdp18ZdZ4=; b=OZnsaSLkJbrp9XT8YNWcr5QSJGfIFzGKA4qnXyZRQxyw9XOM39a5BWzN2UcNgJl2jc baQV2obxV2ZKAUSdWSPh4j04FkAFYOvrCXRaYBIatAtSGR3FrXbQR/HgZPQRa7DvPUmE VRGsj6LRaGpuPhTtttxwf7DHar7MgXlp4E3e1+Xg16wrF7uJp6aBgNeLZnprvu4CKwm8 bcTKYu5+4RurZ2WPdPF5WE/cJyyxBLd6dSEX4771WvvFjASpn+UiFXErg7LforubSXu+ VMjCGBaYiO1rWOG7R7jbKLI2/86tWYA6f47mVnn4UoP0Z1pzaQJ7FWNLkkXedgVjMFzj 4Q2w== Original-Received: by 10.68.136.161 with SMTP id qb1mr16753829pbb.104.1335041412549; Sat, 21 Apr 2012 13:50:12 -0700 (PDT) Original-Received: from JAMBU-NETBOOK ([115.242.237.57]) by mx.google.com with ESMTPS id wn3sm9343922pbc.74.2012.04.21.13.50.07 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 21 Apr 2012 13:50:10 -0700 (PDT) In-Reply-To: (Stefan Monnier's message of "Sat, 21 Apr 2012 15:53:34 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.95 (windows-nt) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:59377 Archived-At: Stefan Monnier writes: >> 1. Allow multiple scratch buffers one for each mode the user is >> interested in. > > We do not disallow that, so could you be more specific in what you mean > by that? > Instead of creating one scratch buffer, make changes such a way that N scratch buffers are created. N = 0, 1, 2, 3 etc etc. >> The defcustom can have a solitary text-mode entry. > > Which defcustom? This defcustom will be newly introduced as part of this change. Let's call it `scratch-buffer-modes'. With the below setting, (setq scratch-buffer-modes '(emacs-lisp-mode org-mode)) I will get 2 scratch buffers by default on startup. One *org-scratch* in org-mode and one *emacs-lisp-scratch* in emacs-lisp mode. If someone is unhappy with having any scratch buffers at all, then one could just do a (setq scratch-buffer-mode nil) >> C-u C-x b can offer to create *scratch-%s* (or %s-scratch) in >> %s-mode. > > Interesting idea. It might not even need a C-u: we could simply make > C-x b query the user for a major-mode when the buffer doesn't exist yet > (and we could try and take a hint from the buffer name to guess a good > default: e.g. looking for a major-mode name in the buffer name, or > matching the buffer name against auto-mode-alist). Whatever is chosen, this prompt "No buffer matching whatever, create one (y/n)?" should be removed. This is annoying. I am not destroying things. I am not sure why the world is against people creating stuff :-). A sensible name *must* be offered, which I can just RET with possibly a minor modification. >> 3. I think it is not the scratch buffer that is idiosyncratic but the >> /name/. Instead of using scratch one could call it say a notes >> buffer or a temp buffer. > > I'm not married to "*scratch*", but "notes" sounds like something you'd > want to save, and "temp" sounds like something that might disappear > without warning. May be, marry scratch buffer with emacs-lock-mode... I don't use persistent scratch buffers. A persistent scratch buffer could be same as what we now call an `initial-buffer-choice'. Only difference is that the file is ~/.emacs.d/scratch ("secretly" chosen by the Emacs).