From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Christopher Dimech Newsgroups: gmane.emacs.help Subject: How users start programming in Emacs Lisp... Date: Sun, 30 May 2021 04:11:13 +0200 Message-ID: References: <878s3xpab1.fsf@zoho.eu> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15703"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: Jean Louis Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun May 30 04:12:35 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lnAwM-0003qr-Sp for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 30 May 2021 04:12:34 +0200 Original-Received: from localhost ([::1]:34418 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lnAwL-0002Eu-Vg for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 29 May 2021 22:12:33 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59370) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lnAvc-0002Em-Cj for help-gnu-emacs@gnu.org; Sat, 29 May 2021 22:11:48 -0400 Original-Received: from mout.gmx.net ([212.227.17.22]:42739) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lnAvZ-0002dA-S1 for help-gnu-emacs@gnu.org; Sat, 29 May 2021 22:11:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1622340673; bh=gdtdesWnQ2rRiCKhEvP3QPGgvNM1YD+DMv2dKI7Jij8=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=LrrSfgjcJcsM6a43WeDPEsCuYwgGFqbB3BC67LCV/25dqKO5k1+wMBu8jokmkHN9C KPfczmnK2cT22e7aK3kaxAG9Mnlj3x9f/0YUlXjrxjX9qCecJXUFmMxIZm2NZGhdsz RoUvz0vDCAZJy4i61SQ7rOy/PS82F1MPmATOWctc= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [213.165.168.94] ([213.165.168.94]) by web-mail.gmx.net (3c-app-mailcom-bs16.server.lan [172.19.170.184]) (via HTTP); Sun, 30 May 2021 04:11:13 +0200 Importance: normal Sensitivity: Normal In-Reply-To: X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:8Ei9oelzqM5hRFbbugurU96wrjc4oYMb+ucRbWCARewBeIauN27kOunWHIi58A3wnKf6e dvJtqMqJSbEcpjO3MymeRU9K3QuzE7wTLf4/LMz4VT/wqx+L9nGIfe/pfGZT61qNbge6jJX0dpU1 P+u2xEFSeOWCgij0q9m+/rWhry+MjHpLpWlpTQkf0/WORPk2gG+/Gh7FmE+A39o6WqiRLmiLpWBu ccs6PFqbJopGUoTm/ARKpLm/wDbX4DHCxjDYjYZ5LTqKUOnC3n+VkbardZRlxYAqNNlqNyz4Yx67 AM= X-UI-Out-Filterresults: notjunk:1;V03:K0:BSr7xv24L5o=:0M26vEaHXHrM4Dw1jxBsS2 aX8cinCfeCNgaShGuDTFIZhwhPtw1BNGT/GIS7IZg6Q0T6axs9iPXuVTw3Lad2Xzrw+xx+yGx FDPkrhhnUert0tAruxzYzyhqunwArV3wZIDg1hRml7Le010LS2CRngYhtayQvz41O24OdoEWK KBjzvFOdM4nsM7XQ/uDudQxnXZvjWt65cPjYbay31PJEAw+10QWw1DPYL5gtP2T1mauv8osR7 W9+TK3NmvyEwSMZY7GjLNRBrF8coTJ8LwcrRa3Du/4B31D8fPct2oPavXmIvdBa675GlUoghd 292f/bBkKFkEENkXJ51UXTQN8Y9U0bzey/iPsdbsoRZd+NZU5UZSHZ1w4SpxrHMqS4UQAWsfD u0BBQxLpmHuzV363Q9lhs02LvZXYfgezYPZCP66Sq4msim+wPc8cDYge+ziJfjoxn+dEgsKSc Xq1ZL/kg+IkM4WvwZqnJ/GMf+lZSahiy8hyR4qhrGauursiIUIyIiv8NzCb5ZipCIs4WLmwX/ izV7i4wbg8iBf4113bUMJRYbK44ceNWkcPwHCd6v+bvyHoCJKpCDVVYMvfEIWpavWxGVKSOAw L0/fx81GYtdDsCkUuBnhn6QCaenqjO8UaKEnc9OKJDcVYI624o4Jr4ujVuvCrKYdXZxHGKP8X MhrckBGRsIwLYITkFr8hweGy/yqDhYeY9Jffzv7w4N9AJ8H6Ce2q1abbUR5kMMCkU0k1ztf6+ uI+4n+jwuqbS4vpy9qzGy+Rt3F/N/ujrx7GEyq2Z8K9tgU7y73fGcioNuX83azPvnIHb5/9M Received-SPF: pass client-ip=212.227.17.22; envelope-from=dimech@gmx.com; helo=mout.gmx.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:130312 Archived-At: > Sent: Sunday, May 30, 2021 at 10:37 AM > From: "Jean Louis" > To: "Christopher Dimech" > Cc: help-gnu-emacs@gnu=2Eorg > Subject: How users start programming in Emacs Lisp=2E=2E=2E > > * Christopher Dimech [2021-05-30 01:08]: > > Yes=2E For emacs-lisp-mode, there are some default settings already= =2E > > I rather not force users to first learn elisp before being able to > > easily work on their code=2E >=20 > When any user is setting any variable that is already Emacs Lisp=2E Is > is a slight subterfuge, we call it "customization" but user starts > already programming in Lisp=2E=20 >=20 > *scratch* buffer is famous for it=2E >=20 > I just need more of them but *scratch*, so I do it this way: >=20 > ;;;; =E2=86=9D RCD TEMPORARY BUFFERS >=20 > (defvar rcd-temp-buffer-mode-history nil) >=20 > (defun rcd-temp-buffer (&optional name mode) > (interactive "p") > (let* ((format "*RCD TEMPORARY BUFFER%s%s*") > (buffer (if name (format format ": " name) (format format "" "")))) > (switch-to-buffer (generate-new-buffer "*RCD TEMPORARY BUFFER*")) > (if current-prefix-arg > (let* ((modes '("adoc-mode" "emacs-lisp-mode" "lisp-mode" "markdown-mod= e" > "org-mode" "sql-mode" "fundamental-mode" "html-mode")) > (mode (completing-read "Mode: " modes nil t nil 'rcd-temp-buffer= -mode-history))) > (funcall (intern mode))) > (funcall (intern (or mode "fundamental-mode")))))) >=20 > (defun rcd-temp-buffer-destroy-em () > (kill-matching-buffers "RCD TEMPORARY BUFFER")) I wonder how you call the buffer optional parameters C-u 8 C-u 5 M-x rcd-temp-buffer Could you pass a buffer-name and mode as strings, or just the number as position in the corresponding list?