all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: tpeplt <tpeplt@gmail.com>
To: Drew Adams <drew.adams@oracle.com>
Cc: Emanuel Berg <incal@dataswamp.org>,
	 "help-gnu-emacs@gnu.org" <help-gnu-emacs@gnu.org>
Subject: Re: [External] : Re: Commands to insert a heading and a new page
Date: Sun, 31 Mar 2024 14:40:46 -0400	[thread overview]
Message-ID: <87msqe9rdd.fsf@gmail.com> (raw)
In-Reply-To: <SJ0PR10MB54881B24C2DC44A841A27A9AF3382@SJ0PR10MB5488.namprd10.prod.outlook.com> (Drew Adams's message of "Sun, 31 Mar 2024 15:49:31 +0000")

Drew Adams <drew.adams@oracle.com> writes:

>> > A simple function to insert a form-feed character:
>
> And two newline chars.
>

Thanks.  Yes, the ‘defun’ is intentionally more verbose than 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’t 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 ‘pp-c-l’ 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 ‘pretty-control-l-mode’
pp-c-l.el:251:11: Warning: assignment to free variable ‘pretty-control-l-mode’

In refresh-pretty-control-l:
pp-c-l.el:269:9: Warning: reference to free variable ‘pretty-control-l-mode’

In end of data:
pp-c-l.el:200:33: Warning: the function ‘pp^L-make-glyph-code’ is not known to
    be defined.
pp-c-l.el:187:34: Warning: the function ‘pretty-control-l-mode’ is not known
    to be defined.

>  
>> ;; +---------------------+
>> ;; | This is not a bluff |
>> ;; +---------------------+
>
> See also library boxquote.el:
>
> https://github.com/davep/boxquote.el

This library, ‘boxquote’ is available as package in the ‘melpa-stable’
archive, listed above, so it can be easily installed, updated, or
un-installed.

--



  reply	other threads:[~2024-03-31 18:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-26  9:16 Commands to insert a heading and a new page Heime
2024-03-27 22:48 ` tpeplt
2024-03-28  3:12   ` Emanuel Berg
2024-03-31 15:49     ` [External] : " Drew Adams
2024-03-31 18:40       ` tpeplt [this message]
2024-03-31 20:32         ` Drew Adams
2024-04-01  2:07           ` Emanuel Berg
2024-04-01 16:53             ` Drew Adams
2024-04-01  1:20       ` Emanuel Berg
2024-03-28  9:42   ` Heime

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87msqe9rdd.fsf@gmail.com \
    --to=tpeplt@gmail.com \
    --cc=drew.adams@oracle.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=incal@dataswamp.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.