GNU bug report logs -
#67000
30.0.50; [PATCH] Add support for reading/writing IELM input history
Previous Next
Reported by: Simen Heggestøyl <simenheg <at> runbox.com>
Date: Wed, 8 Nov 2023 15:13:01 UTC
Severity: wishlist
Tags: patch
Found in version 30.0.50
Done: Simen Heggestøyl <simenheg <at> runbox.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 67000 in the body.
You can then email your comments to 67000 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#67000
; Package
emacs
.
(Wed, 08 Nov 2023 15:13:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Simen Heggestøyl <simenheg <at> runbox.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Wed, 08 Nov 2023 15:13:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Attached is a proposed patch that adds input history read/write
capabilities to IELM.
[0001-Add-support-for-reading-writing-IELM-input-history.patch (text/x-diff, attachment)]
[Message part 3 (text/plain, inline)]
-- Simen
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#67000
; Package
emacs
.
(Fri, 15 Dec 2023 01:07:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 67000 <at> debbugs.gnu.org (full text, mbox):
Simen Heggestøyl via "Bug reports for GNU Emacs, the Swiss army knife of
text editors" <bug-gnu-emacs <at> gnu.org> writes:
> Attached is a proposed patch that adds input history read/write
> capabilities to IELM.
Thanks. This feature makes sense to me.
- This should be called out in NEWS.
- Does it need any other documentation changes?
- Do we usually provide options to disable this stuff?
> From 190a88ae55bb4a47de64cb50f2706798a100704b Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Simen=20Heggest=C3=B8yl?= <simenheg <at> runbox.com>
> Date: Wed, 8 Nov 2023 16:08:08 +0100
> Subject: [PATCH] Add support for reading/writing IELM input history
>
> * lisp/ielm.el (inferior-emacs-lisp-mode): Add support for
> reading/writing input history.
> (ielm--history-file-name): Name of the file to read/write IELM input
> history.
> ---
> lisp/ielm.el | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/lisp/ielm.el b/lisp/ielm.el
> index e51c46054b4..618cd033055 100644
> --- a/lisp/ielm.el
> +++ b/lisp/ielm.el
> @@ -152,6 +152,10 @@ ielm-header
> \\[describe-mode] for help.\n"
> "Message to display when IELM is started.")
>
> +(defvar ielm--history-file-name
> + (locate-user-emacs-file "ielm-history.el")
Shouldn't that be .eld?
> + "Name of the file to read/write IELM input history.")
> +
> (defvaralias 'inferior-emacs-lisp-mode-map 'ielm-map)
> (defvar-keymap ielm-map
> :doc "Keymap for IELM mode."
> @@ -605,6 +609,11 @@ inferior-emacs-lisp-mode
> #'ielm-indirect-setup-hook 'append t)
> (setq comint-indirect-setup-function #'emacs-lisp-mode)
>
> + ;; Input history
> + (setq-local comint-input-ring-file-name ielm--history-file-name)
> + (setq-local kill-buffer-hook #'comint-write-input-ring)
> + (comint-read-input-ring t)
> +
> ;; A dummy process to keep comint happy. It will never get any input
> (unless (comint-check-proc (current-buffer))
> ;; Was cat, but on non-Unix platforms that might not exist, so
> @@ -631,6 +640,9 @@ inferior-emacs-lisp-mode
> (set-marker comint-last-input-start (ielm-pm))
> (set-process-filter (get-buffer-process (current-buffer)) 'comint-output-filter)))
>
> +(unless noninteractive
> + (add-hook 'kill-emacs-hook #'comint-write-input-ring))
> +
> (defun ielm-get-old-input nil
> ;; Return the previous input surrounding point
> (save-excursion
> --
> 2.39.2
>
>
> -- Simen
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#67000
; Package
emacs
.
(Thu, 04 Jan 2024 07:47:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 67000 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi Stefan, thank you for your response.
Stefan Kangas <stefankangas <at> gmail.com> writes:
> - This should be called out in NEWS.
Yup, done in the revised patch attached.
> - Does it need any other documentation changes?
I don't think so; IELM is only mentioned briefly in the Emacs manual.
> - Do we usually provide options to disable this stuff?
Not as far as I can tell.
>> +(defvar ielm--history-file-name
>> + (locate-user-emacs-file "ielm-history.el")
>
> Shouldn't that be .eld?
Hm, the file will contain actual Lisp expressions, so I'd think that .el
is fitting?
-- Simen
[0001-Add-support-for-reading-writing-IELM-input-history.patch (text/x-diff, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#67000
; Package
emacs
.
(Fri, 05 Jan 2024 20:18:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 67000 <at> debbugs.gnu.org (full text, mbox):
Simen Heggestøyl <simenheg <at> runbox.com> writes:
>>> +(defvar ielm--history-file-name
>>> + (locate-user-emacs-file "ielm-history.el")
>>
>> Shouldn't that be .eld?
>
> Hm, the file will contain actual Lisp expressions, so I'd think that .el
> is fitting?
I'm not so sure. We don't really intend for users to use it the way
you'd expect from an .el file, like byte-compiling or loading it.
So while these are, hopefully, valid Lisp expressions (barring typos,
which frequently happens at a REPL), it's not really a file containing
meaningful code either.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#67000
; Package
emacs
.
(Mon, 08 Jan 2024 07:32:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 67000 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Stefan Kangas <stefankangas <at> gmail.com> writes:
> Simen Heggestøyl <simenheg <at> runbox.com> writes:
>
>>>> +(defvar ielm--history-file-name
>>>> + (locate-user-emacs-file "ielm-history.el")
>>>
>>> Shouldn't that be .eld?
>>
>> Hm, the file will contain actual Lisp expressions, so I'd think that .el
>> is fitting?
>
> I'm not so sure. We don't really intend for users to use it the way
> you'd expect from an .el file, like byte-compiling or loading it.
>
> So while these are, hopefully, valid Lisp expressions (barring typos,
> which frequently happens at a REPL), it's not really a file containing
> meaningful code either.
Okay, fair points. Updated patch attached!
-- Simen
[0001-Add-support-for-reading-writing-IELM-input-history.patch (text/x-diff, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#67000
; Package
emacs
.
(Mon, 08 Jan 2024 19:52:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 67000 <at> debbugs.gnu.org (full text, mbox):
Simen Heggestøyl <simenheg <at> runbox.com> writes:
> From a2322770acb6bceab36224989cbbe9b777312997 Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Simen=20Heggest=C3=B8yl?= <simenheg <at> runbox.com>
> Date: Wed, 8 Nov 2023 16:08:08 +0100
> Subject: [PATCH] Add support for reading/writing IELM input history
>
> * lisp/ielm.el (inferior-emacs-lisp-mode): Add support for
> reading/writing input history.
> (ielm--history-file-name): Name of the file to read/write IELM input
> history.
> ---
> etc/NEWS | 5 +++++
> lisp/ielm.el | 12 ++++++++++++
> 2 files changed, 17 insertions(+)
>
> diff --git a/etc/NEWS b/etc/NEWS
> index c3d777b971f..b62976143d2 100644
> --- a/etc/NEWS
> +++ b/etc/NEWS
> @@ -1228,6 +1228,11 @@ chat buffers use by default.
> *** New command 'customize-dirlocals'.
> This command pops up a buffer to edit the settings in ".dir-locals.el".
>
> +** IELM
> +
> +---
> +*** IELM now remembers input history between sessions.
> +
>
> * New Modes and Packages in Emacs 30.1
>
> diff --git a/lisp/ielm.el b/lisp/ielm.el
> index 777aebb70cf..6d4a11c1c28 100644
> --- a/lisp/ielm.el
> +++ b/lisp/ielm.el
> @@ -152,6 +152,10 @@ ielm-header
> \\[describe-mode] for help.\n"
> "Message to display when IELM is started.")
>
> +(defvar ielm--history-file-name
> + (locate-user-emacs-file "ielm-history.eld")
> + "Name of the file to read/write IELM input history.")
On closer thought, I think this should be a defcustom.
See `lua-ts-inferior-history' and `sql-input-ring-file-name' for
example.
I also think nil might as well be a valid value which disables history
altogether (maybe users don't want that for some reason, let's say
privacy or whatever).
And the defcustom should be mentioned in NEWS, too.
> (defvaralias 'inferior-emacs-lisp-mode-map 'ielm-map)
> (defvar-keymap ielm-map
> :doc "Keymap for IELM mode."
> @@ -605,6 +609,11 @@ inferior-emacs-lisp-mode
> #'ielm-indirect-setup-hook 'append t)
> (setq comint-indirect-setup-function #'emacs-lisp-mode)
>
> + ;; Input history
> + (setq-local comint-input-ring-file-name ielm--history-file-name)
> + (setq-local kill-buffer-hook #'comint-write-input-ring)
> + (comint-read-input-ring t)
> +
> ;; A dummy process to keep comint happy. It will never get any input
> (unless (comint-check-proc (current-buffer))
> ;; Was cat, but on non-Unix platforms that might not exist, so
> @@ -631,6 +640,9 @@ inferior-emacs-lisp-mode
> (set-marker comint-last-input-start (ielm-pm))
> (set-process-filter (get-buffer-process (current-buffer)) 'comint-output-filter)))
>
> +(unless noninteractive
> + (add-hook 'kill-emacs-hook #'comint-write-input-ring))
> +
I'm not so sure about this part. If this is correct, why should it be
defined here, and not, say, in comint.el? It seems like a separate,
unrelated change. What am I missing?
> (defun ielm-get-old-input nil
> ;; Return the previous input surrounding point
> (save-excursion
> --
> 2.39.2
Severity set to 'wishlist' from 'normal'
Request was from
Stefan Kangas <stefankangas <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Wed, 10 Jan 2024 17:51:03 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#67000
; Package
emacs
.
(Fri, 12 Jan 2024 16:10:01 GMT)
Full text and
rfc822 format available.
Message #25 received at 67000 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Stefan Kangas <stefankangas <at> gmail.com> writes:
> On closer thought, I think this should be a defcustom.
>
> See `lua-ts-inferior-history' and `sql-input-ring-file-name' for
> example.
>
> I also think nil might as well be a valid value which disables history
> altogether (maybe users don't want that for some reason, let's say
> privacy or whatever).
>
> And the defcustom should be mentioned in NEWS, too.
Thanks, makes sense. Updated in the attached patch!
>> (defvaralias 'inferior-emacs-lisp-mode-map 'ielm-map)
>> (defvar-keymap ielm-map
>> :doc "Keymap for IELM mode."
>> @@ -605,6 +609,11 @@ inferior-emacs-lisp-mode
>> #'ielm-indirect-setup-hook 'append t)
>> (setq comint-indirect-setup-function #'emacs-lisp-mode)
>>
>> + ;; Input history
>> + (setq-local comint-input-ring-file-name ielm--history-file-name)
>> + (setq-local kill-buffer-hook #'comint-write-input-ring)
>> + (comint-read-input-ring t)
>> +
>> ;; A dummy process to keep comint happy. It will never get any input
>> (unless (comint-check-proc (current-buffer))
>> ;; Was cat, but on non-Unix platforms that might not exist, so
>> @@ -631,6 +640,9 @@ inferior-emacs-lisp-mode
>> (set-marker comint-last-input-start (ielm-pm))
>> (set-process-filter (get-buffer-process (current-buffer)) 'comint-output-filter)))
>>
>> +(unless noninteractive
>> + (add-hook 'kill-emacs-hook #'comint-write-input-ring))
>> +
>
> I'm not so sure about this part. If this is correct, why should it be
> defined here, and not, say, in comint.el? It seems like a separate,
> unrelated change. What am I missing?
Usually comint-derived modes use a process sentinel to listen to some
external process and call `comint-write-input-ring' when the process
exists, which works both the buffer is killed or Emacs itself is quit.
For IELM there is no such process to listen to, so I hook into
`kill-buffer-hook' and `kill-emacs-hook' to achieve the same things.
[0001-Add-support-for-reading-writing-IELM-input-history.patch (text/x-diff, attachment)]
[Message part 3 (text/plain, inline)]
-- Simen
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#67000
; Package
emacs
.
(Sat, 13 Jan 2024 07:09:01 GMT)
Full text and
rfc822 format available.
Message #28 received at 67000 <at> debbugs.gnu.org (full text, mbox):
Simen Heggestøyl <simenheg <at> runbox.com> writes:
>>> +(unless noninteractive
>>> + (add-hook 'kill-emacs-hook #'comint-write-input-ring))
>>
>> I'm not so sure about this part. If this is correct, why should it be
>> defined here, and not, say, in comint.el? It seems like a separate,
>> unrelated change. What am I missing?
>
> Usually comint-derived modes use a process sentinel to listen to some
> external process and call `comint-write-input-ring' when the process
> exists, which works both the buffer is killed or Emacs itself is quit.
>
> For IELM there is no such process to listen to, so I hook into
> `kill-buffer-hook' and `kill-emacs-hook' to achieve the same things.
I'm not against adding a hook to `kill-emacs-hook', but it should be
added when you start IELM and not on top-level. We want to avoid any
side effects from merely loading a file.
I don't think this will work in its current form either: AFAICT,
`comint-write-input-ring' saves it for the current buffer, and that's
not guaranteed to be the *ielm* buffer when `kill-emacs-hook' runs.
So you'd want to first switch to that buffer, I think. It could also
have been renamed meanwhile, so I think you want to save the actual
buffer and not it's name (i.e. use `get-buffer').
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#67000
; Package
emacs
.
(Fri, 19 Jan 2024 07:50:02 GMT)
Full text and
rfc822 format available.
Message #31 received at 67000 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Stefan Kangas <stefankangas <at> gmail.com> writes:
> I'm not against adding a hook to `kill-emacs-hook', but it should be
> added when you start IELM and not on top-level. We want to avoid any
> side effects from merely loading a file.
Fixed.
> I don't think this will work in its current form either: AFAICT,
> `comint-write-input-ring' saves it for the current buffer, and that's
> not guaranteed to be the *ielm* buffer when `kill-emacs-hook' runs.
>
> So you'd want to first switch to that buffer, I think. It could also
> have been renamed meanwhile, so I think you want to save the actual
> buffer and not it's name (i.e. use `get-buffer').
Right, good catch. New attempt in the attached patch!
[0001-Add-support-for-reading-writing-IELM-input-history.patch (text/x-diff, attachment)]
[Message part 3 (text/plain, inline)]
-- Simen
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#67000
; Package
emacs
.
(Sun, 28 Jan 2024 15:10:02 GMT)
Full text and
rfc822 format available.
Message #34 received at 67000 <at> debbugs.gnu.org (full text, mbox):
Simen Heggestøyl <simenheg <at> runbox.com> writes:
> Right, good catch. New attempt in the attached patch!
Thanks, please find some comments below.
> +---
> +*** IELM now remembers input history between sessions.
> +
> +---
> +*** New variable 'ielm-history-file-name'.
> +If non-nil, name of the file to read/write IELM input history. Set to
> +nil to revert IELM to the old behavior of not remembering input
> +history between sessions.
I would probably make this into one entry, like so:
*** IELM now remembers input history between sessions.
The new user option 'ielm-history-file-name' is the name of the file
where IELM input history will be saved. Customize it to nil to revert
to the old behavior of not remembering input history between sessions.
> +(defcustom ielm-history-file-name
> + (locate-user-emacs-file "ielm-history.eld")
> + "If non-nil, name of the file to read/write IELM input history."
> + :type '(choice (const :tag "nil" nil)
The tag here should be "Disable input history" or something like that.
> + file)
> + :version "30.1")
> +
> (defvaralias 'inferior-emacs-lisp-mode-hook 'ielm-mode-hook)
> (defcustom ielm-mode-hook nil
> "Hooks to be run when IELM (`inferior-emacs-lisp-mode') is started."
> @@ -503,6 +510,17 @@ ielm--expand-ellipsis
> (funcall pp-default-function beg end)
> end))
>
> +;;; Input history
> +
> +(defvar ielm--exit
This should read
(defvar ielm--exit nil
or the below docstring will instead be its value.
> + "Function to call when Emacs is killed.")
> +
> +(defun ielm--input-history-writer (buf)
> + "Return a function writing IELM input history to BUF."
> + (lambda ()
> + (with-current-buffer buf
> + (comint-write-input-ring))))
> +
> ;;; Major mode
>
> (define-derived-mode inferior-emacs-lisp-mode comint-mode "IELM"
> @@ -605,6 +623,17 @@ inferior-emacs-lisp-mode
> #'ielm-indirect-setup-hook 'append t)
> (setq comint-indirect-setup-function #'emacs-lisp-mode)
>
> + ;; Input history
> + (setq-local comint-input-ring-file-name ielm-history-file-name)
> + (setq-local ielm--exit (ielm--input-history-writer (current-buffer)))
> + (setq-local kill-buffer-hook
> + (lambda ()
> + (funcall ielm--exit)
> + (remove-hook 'kill-emacs-hook ielm--exit)))
> + (unless noninteractive
> + (add-hook 'kill-emacs-hook ielm--exit))
> + (comint-read-input-ring t)
There are some complications here:
You can get more than one IELM buffer using
M-x ielm RET
M-x rename-buffer RET foo RET
M-x ielm RET
What happens if there is more than one IELM buffer? It will save only
the history from the last one, or something like that?
Perhaps the kill-emacs-hook should look for all buffers that are using
`ielm-mode' and save the history from all of them?
> +
> ;; A dummy process to keep comint happy. It will never get any input
> (unless (comint-check-proc (current-buffer))
> ;; Was cat, but on non-Unix platforms that might not exist, so
> --
> 2.39.2
>
>
> -- Simen
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#67000
; Package
emacs
.
(Wed, 07 Feb 2024 14:04:02 GMT)
Full text and
rfc822 format available.
Message #37 received at 67000 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi Stefan, thanks for your feedback. An updated patch is attached.
Stefan Kangas <stefankangas <at> gmail.com> writes:
> Simen Heggestøyl <simenheg <at> runbox.com> writes:
>
>> +---
>> +*** IELM now remembers input history between sessions.
>> +
>> +---
>> +*** New variable 'ielm-history-file-name'.
>> +If non-nil, name of the file to read/write IELM input history. Set to
>> +nil to revert IELM to the old behavior of not remembering input
>> +history between sessions.
>
> I would probably make this into one entry, like so:
>
> *** IELM now remembers input history between sessions.
> The new user option 'ielm-history-file-name' is the name of the file
> where IELM input history will be saved. Customize it to nil to revert
> to the old behavior of not remembering input history between sessions.
Aight, changed!
>> +(defcustom ielm-history-file-name
>> + (locate-user-emacs-file "ielm-history.eld")
>> + "If non-nil, name of the file to read/write IELM input history."
>> + :type '(choice (const :tag "nil" nil)
>
> The tag here should be "Disable input history" or something like that.
Ok. Should it be updated for `comint-input-ring-file-name' too then (I
copied it from there)?
> This should read
>
> (defvar ielm--exit nil
>
> or the below docstring will instead be its value.
Of course, thanks.
>> + "Function to call when Emacs is killed.")
>> +
>> +(defun ielm--input-history-writer (buf)
>> + "Return a function writing IELM input history to BUF."
>> + (lambda ()
>> + (with-current-buffer buf
>> + (comint-write-input-ring))))
>> +
>> ;;; Major mode
>>
>> (define-derived-mode inferior-emacs-lisp-mode comint-mode "IELM"
>> @@ -605,6 +623,17 @@ inferior-emacs-lisp-mode
>> #'ielm-indirect-setup-hook 'append t)
>> (setq comint-indirect-setup-function #'emacs-lisp-mode)
>>
>> + ;; Input history
>> + (setq-local comint-input-ring-file-name ielm-history-file-name)
>> + (setq-local ielm--exit (ielm--input-history-writer (current-buffer)))
>> + (setq-local kill-buffer-hook
>> + (lambda ()
>> + (funcall ielm--exit)
>> + (remove-hook 'kill-emacs-hook ielm--exit)))
>> + (unless noninteractive
>> + (add-hook 'kill-emacs-hook ielm--exit))
>> + (comint-read-input-ring t)
>
> There are some complications here:
>
> You can get more than one IELM buffer using
>
> M-x ielm RET
> M-x rename-buffer RET foo RET
> M-x ielm RET
>
> What happens if there is more than one IELM buffer? It will save only
> the history from the last one, or something like that?
Yes. Though I think that's kind of expected; that's how Eshell for
instance also works.
> Perhaps the kill-emacs-hook should look for all buffers that are using
> `ielm-mode' and save the history from all of them?
It would also need to be handled in the kill-buffer hooks I guess,
updating the remaining buffers' histories when one buffer is
killed. Sounds kind of messy though, I think I'd prefer the more simple
approach suggested here.
-- Simen
[0001-Add-support-for-reading-writing-IELM-input-history.patch (text/x-diff, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#67000
; Package
emacs
.
(Sat, 10 Feb 2024 11:29:02 GMT)
Full text and
rfc822 format available.
Message #40 received at 67000 <at> debbugs.gnu.org (full text, mbox):
Simen Heggestøyl <simenheg <at> runbox.com> writes:
> Hi Stefan, thanks for your feedback. An updated patch is attached.
LGTM, please install. Feel free to handle the minor comments below as
you think is best, or disregard them.
Thanks!
>>> +(defcustom ielm-history-file-name
>>> + (locate-user-emacs-file "ielm-history.eld")
>>> + "If non-nil, name of the file to read/write IELM input history."
>>> + :type '(choice (const :tag "nil" nil)
>>
>> The tag here should be "Disable input history" or something like that.
>
> Ok. Should it be updated for `comint-input-ring-file-name' too then (I
> copied it from there)?
Yes, that could be improved too.
> From fe91c4f3aaefc109135c48ba26f8f21e87db465e Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Simen=20Heggest=C3=B8yl?= <simenheg <at> runbox.com>
> Date: Tue, 16 Jan 2024 08:21:41 +0100
> Subject: [PATCH] Add support for reading/writing IELM input history
>
> * lisp/ielm.el (inferior-emacs-lisp-mode): Add support for
> reading/writing input history.
How about:
"Add support for saving input history to a file"
> (ielm--history-file-name): Name of the file to read/write IELM input
> history.
Maybe:
"New variable indicating IELM input history file.
> +(defcustom ielm-history-file-name
> + (locate-user-emacs-file "ielm-history.eld")
> + "If non-nil, name of the file to read/write IELM input history."
> + :type '(choice (const :tag "Disable input history" nil)
> + file)
> + :version "30.1")
Maybe `file' should have a tag too?
Reply sent
to
Simen Heggestøyl <simenheg <at> runbox.com>
:
You have taken responsibility.
(Thu, 15 Feb 2024 07:56:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Simen Heggestøyl <simenheg <at> runbox.com>
:
bug acknowledged by developer.
(Thu, 15 Feb 2024 07:56:02 GMT)
Full text and
rfc822 format available.
Message #45 received at 67000-done <at> debbugs.gnu.org (full text, mbox):
Stefan Kangas <stefankangas <at> gmail.com> writes:
> LGTM, please install.
Done! Thanks again for reviewing.
>>>> +(defcustom ielm-history-file-name
>>>> + (locate-user-emacs-file "ielm-history.eld")
>>>> + "If non-nil, name of the file to read/write IELM input history."
>>>> + :type '(choice (const :tag "nil" nil)
>>>
>>> The tag here should be "Disable input history" or something like that.
>>
>> Ok. Should it be updated for `comint-input-ring-file-name' too then (I
>> copied it from there)?
>
> Yes, that could be improved too.
Done.
>> From fe91c4f3aaefc109135c48ba26f8f21e87db465e Mon Sep 17 00:00:00 2001
>> From: =?UTF-8?q?Simen=20Heggest=C3=B8yl?= <simenheg <at> runbox.com>
>> Date: Tue, 16 Jan 2024 08:21:41 +0100
>> Subject: [PATCH] Add support for reading/writing IELM input history
>>
>> * lisp/ielm.el (inferior-emacs-lisp-mode): Add support for
>> reading/writing input history.
>
> How about:
>
> "Add support for saving input history to a file"
Changed.
>> (ielm--history-file-name): Name of the file to read/write IELM input
>> history.
>
> Maybe:
>
> "New variable indicating IELM input history file.
Changed.
>> +(defcustom ielm-history-file-name
>> + (locate-user-emacs-file "ielm-history.eld")
>> + "If non-nil, name of the file to read/write IELM input history."
>> + :type '(choice (const :tag "Disable input history" nil)
>> + file)
>> + :version "30.1")
>
> Maybe `file' should have a tag too?
The label in the Custom menu says "File", which seems fine to me? Though
I never use Custom, so I'm not sure what's customary here. I installed
the above without changes, but please feel free to change it.
-- Simen
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 14 Mar 2024 11:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 1 year and 58 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.