From: Jean Louis <bugs@gnu.support>
To: carlmarcos@tutanota.com
Cc: Help Gnu Emacs <help-gnu-emacs@gnu.org>
Subject: Re: Operating the HIST feature of completing-read
Date: Tue, 12 Jul 2022 11:52:07 +0300 [thread overview]
Message-ID: <Ys02N0Nj/L/o61an@protected.localdomain> (raw)
In-Reply-To: <N6jkEGr--3-2@tutanota.com>
* carlmarcos--- via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> [2022-07-12 03:14]:
> Jul 11, 2022, 22:43 by bugs@gnu.support:
>
> > * carlmarcos--- via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> [2022-07-11 03:23]:
> >
> >> How does HIST work when using completing-read? Any examples that
> >> would help me with this?
> >>
> >
> > I find HIST variables a waste in coding, so I am automating it by
> > automatically assigning HIST variable to every call to the function.
> >
> I found your elaboration difficult to follow. I just need a summary
> on what it is, how to use it, and how it works. Without wrappers
> and clever stuff.
Here is practically how history works:
1) First you define history variable:
(defvar my-history nil "This is to remember my previous inputs.") ⇒ my-history
2) You use the history variable:
(completing-read "Input: " '("One" "Two" "Three") nil nil nil 'my-history) ⇒ "One"
3) Now you may inspect history variable:
my-history ⇒ ("One")
4) Now you may inspect the file (find-file "~/.emacs.d/history") as
that is the file where history variable will be recorded so that
history works over Emacs sessions
5) You may browse through history by using M-n and M-p as to easy
selection of your previously recorded choices (history).
--
Jean
Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns
In support of Richard M. Stallman
https://stallmansupport.org/
next prev parent reply other threads:[~2022-07-12 8:52 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-11 0:22 Operating the HIST feature of completing-read carlmarcos--- via Users list for the GNU Emacs text editor
2022-07-11 22:43 ` Jean Louis
[not found] ` <YsynnWwOd/93Lz5Q@protected.localdomain-N6jRHVs----2>
2022-07-12 0:13 ` carlmarcos--- via Users list for the GNU Emacs text editor
2022-07-12 8:52 ` Jean Louis [this message]
2022-07-12 14:28 ` [External] : " Drew Adams
2022-07-12 16:20 ` carlmarcos--- via Users list for the GNU Emacs text editor
2022-07-12 16:40 ` Drew Adams
[not found] ` <SJ0PR10MB5488AF0AFC27B5DDA0FD6937F3869@SJ0PR10MB5488.namprd10.prod.outlook.com-N6nHMGc--3-2>
2022-07-12 17:00 ` carlmarcos--- via Users list for the GNU Emacs text editor
2022-07-13 1:16 ` carlmarcos--- via Users list for the GNU Emacs text editor
2022-07-13 2:04 ` Jean Louis
2022-07-13 6:52 ` Yuri Khan
[not found] ` <Ys4oPraxx7rSD+OQ@protected.localdomain-N6qVVuQ----2>
2022-07-13 8:01 ` carlmarcos--- via Users list for the GNU Emacs text editor
2022-07-13 15:11 ` Drew Adams
[not found] ` <SJ0PR10MB5488F286DDB15D2F9DC59981F3869@SJ0PR10MB5488.namprd10.prod.outlook.com-N6n2IGP--7-2>
2022-07-13 0:41 ` carlmarcos--- via Users list for the GNU Emacs text editor
2022-07-13 15:09 ` Drew Adams
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Ys02N0Nj/L/o61an@protected.localdomain \
--to=bugs@gnu.support \
--cc=carlmarcos@tutanota.com \
--cc=help-gnu-emacs@gnu.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).