[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [External] : Re: Commands to insert a heading and a new page
From: |
tpeplt |
Subject: |
Re: [External] : Re: Commands to insert a heading and a new page |
Date: |
Sun, 31 Mar 2024 14:40:46 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
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.
--