From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: tpeplt Newsgroups: gmane.emacs.help Subject: Re: [External] : Re: Commands to insert a heading and a new page Date: Sun, 31 Mar 2024 14:40:46 -0400 Message-ID: <87msqe9rdd.fsf@gmail.com> References: <4WUuQL20YTsYDAkZrAEn-bQhNMGdVJVvGstbcI3F-ubHqcgctXVdEryoO7rgjvU51mk_uwxQYtCjS89ffdnVD6-dQd8wvE7kem231VD-a6s=@protonmail.com> <87le63fg07.fsf@gmail.com> <87plvfxd6l.fsf@dataswamp.org> 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="3456"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Emanuel Berg , "help-gnu-emacs@gnu.org" To: Drew Adams Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun Mar 31 20:41:28 2024 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 1rr07U-0000l4-BR for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 31 Mar 2024 20:41:28 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rr06v-0002hx-Sh; Sun, 31 Mar 2024 14:40:53 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rr06u-0002hh-1v for help-gnu-emacs@gnu.org; Sun, 31 Mar 2024 14:40:52 -0400 Original-Received: from mail-ot1-x332.google.com ([2607:f8b0:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rr06s-0000gZ-8a for help-gnu-emacs@gnu.org; Sun, 31 Mar 2024 14:40:51 -0400 Original-Received: by mail-ot1-x332.google.com with SMTP id 46e09a7af769-6e89bdd4e3fso200796a34.0 for ; Sun, 31 Mar 2024 11:40:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711910448; x=1712515248; darn=gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=1yfhIIjV5KftXJc/x1fJiH2W5Fg5Yo7Bqz+w211JW94=; b=Id7rC2f7QZEzhkDJFqk/ybplchmq66fJJ9Jah5xuX4KP56SYZkR9an9hk6q2EekCMM F1HXe4055Buzf7LOMZi4OHuxDj7s1qcx15MPM4Ny2ml1pFFTzIALaxSPcgM019axyqQG yDt0T0Sjj2xjr/ofg8/urbqr2Exh/95xWyDU7j44W8d7n5EqzK8+uQ7Eqv1C/5F4u173 1ME0bffDdLWbtMyM93+iAmnTWGBF0skF7S1gm0Ir0ftY+W1E1/aPt00o0j+lqkLQ8jKB f01l1QCZVxw+F2NgeSsoBTbR5P4d+08K32xUSt4MaMW//YT+daQ7nj2PxBwh/Kz7ZRgF F8Zg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711910448; x=1712515248; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=1yfhIIjV5KftXJc/x1fJiH2W5Fg5Yo7Bqz+w211JW94=; b=wrX8wH/uQAgKIMV3vi88pS/k+CBS5igZVHuBd3mytTr7DJDjdceeED/PejKmIvWhgS tS1HPlbtz5QZBCnEtn1PnQO8leCGpbOS8rQ9rkrC65Xs3C6s9dWAnrqq6wuo5MGyWIos CwamZ/AuAKtpsPnH6SBsJ1vJeEDFBURS9Ru+QAB3Zo4AcYUUBSedK/SatzL5txXCjAcZ ALAG8EhuKnbnUnw9+TfrOZAtP07GuigAdaRbTzu0PlZlJC40YhsCM9RdqILXRo5gJ4PP b7C4NLmOoGpJllBF7eGtSLXhUidN/+/CHU8/Tvum3CM7HOmHfNiUabBB2nlPs0t3BE4t gfBQ== X-Forwarded-Encrypted: i=1; AJvYcCWONcqv5m6bxkP91CK8K0t/4xFC8YL6CueEWh7/CnIzqG7Xg0jsT50vePj+qbZtcqsXhn5j5a38STplyNBrHOm+kppnnyii X-Gm-Message-State: AOJu0Yxq28ZEAoWh8QLYZHtgIMQUYs6L3+GEYadAMNpZJCUegRPvCfqn mUV9pEbSE0i8YEzx4ZRjJAofXdd8XNsy3VZ0pWQ640pEyKj9B3R8 X-Google-Smtp-Source: AGHT+IHQbLF85LOzFSALJAXf1NzQ62WWLogst3Rk+agMbhv6tIB6g3sbksJgOT5QPDJSHvUKNKfDkA== X-Received: by 2002:a05:6830:5:b0:6e7:319f:7e93 with SMTP id c5-20020a056830000500b006e7319f7e93mr8139839otp.23.1711910448492; Sun, 31 Mar 2024 11:40:48 -0700 (PDT) Original-Received: from t530.local ([2600:8806:a821:2b00::7255]) by smtp.gmail.com with ESMTPSA id gf15-20020a056214250f00b00691873a7748sm3748782qvb.128.2024.03.31.11.40.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 31 Mar 2024 11:40:47 -0700 (PDT) In-Reply-To: (Drew Adams's message of "Sun, 31 Mar 2024 15:49:31 +0000") Received-SPF: pass client-ip=2607:f8b0:4864:20::332; envelope-from=tpeplt@gmail.com; helo=mail-ot1-x332.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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.29 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-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:146208 Archived-At: Drew Adams writes: >> > A simple function to insert a form-feed character: > > And two newline chars. > Thanks. Yes, the =E2=80=98defun=E2=80=99 is intentionally more verbose tha= n the keystroke solution you provided because: 1. The writer asked for a function 2. A function can be called in a programmatic way 3. It documents the operations that are performed >> > (defun new-page () >> > "Insert a page separator into the current buffer." >> > (interactive) >> > (newline) >> > (insert ?\f);Form feed is \f or Ctrl-l or ASCII >> 012 >> > (newline)) > > `C-q C-j C-l C-j` does the same thing. > > Get to know `C-q'. > Get to know the ASCII control chars. > Yes. Your instructions can be a little confusing to new users. Taken literally, they won=E2=80=99t work. New users should read that the key sequences are: C-j C-q C-l C-j >> It is not used so often, why and when do you use it? > > Sure it is. Separate text/code pieces, > visually and for navigation. > > See (emacs) `Pages': > > https://www.gnu.org/software/emacs/manual/html_node/emacs/Pages.html > > And customize page separator: > > https://www.emacswiki.org/emacs/PrettyControlL Thank you for writing the =E2=80=98pp-c-l=E2=80=99 library (pp-c-l.el). 1. Is this library provided as a package? If so, can you provide the name of the archive? It is not available from either https://elpa.gnu.org/packages/ or http://stable.melpa.org/packages/. 2. After downloading the file, I added "-*- lexical-binding: t; -*-" to the first line and compiled the file using Emacs 29.3. The compiler reported the following: In toplevel form: pp-c-l.el:126:23: Warning: avoid `lsh'; use `ash' instead pp-c-l.el:187:19: Warning: Unused lexical argument `symbol' pp-c-l.el:252:57: Warning: reference to free variable =E2=80=98pretty-contr= ol-l-mode=E2=80=99 pp-c-l.el:251:11: Warning: assignment to free variable =E2=80=98pretty-cont= rol-l-mode=E2=80=99 In refresh-pretty-control-l: pp-c-l.el:269:9: Warning: reference to free variable =E2=80=98pretty-contro= l-l-mode=E2=80=99 In end of data: pp-c-l.el:200:33: Warning: the function =E2=80=98pp^L-make-glyph-code=E2=80= =99 is not known to be defined. pp-c-l.el:187:34: Warning: the function =E2=80=98pretty-control-l-mode=E2= =80=99 is not known to be defined. >=20=20 >> ;; +---------------------+ >> ;; | This is not a bluff | >> ;; +---------------------+ > > See also library boxquote.el: > > https://github.com/davep/boxquote.el This library, =E2=80=98boxquote=E2=80=99 is available as package in the =E2= =80=98melpa-stable=E2=80=99 archive, listed above, so it can be easily installed, updated, or un-installed. --