GNU bug report logs -
#16891
24.3; [PATCH] align-regexp now has a separate history for its interactive argument
Previous Next
Reported by: Dima Kogan <dima <at> secretsauce.net>
Date: Thu, 27 Feb 2014 10:55:02 UTC
Severity: wishlist
Tags: fixed, patch
Found in version 24.3
Fixed in version 26.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
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 16891 in the body.
You can then email your comments to 16891 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#16891
; Package
emacs
.
(Thu, 27 Feb 2014 10:55:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Dima Kogan <dima <at> secretsauce.net>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Thu, 27 Feb 2014 10:55: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)]
Here's a tiny patch to align-regexp. With a prefix argument several
things are read from the minibuffer using read-input, with one (the
regex) being much more complicated than the others. It's convenient to
keep that one in a separate history to make previous entries easily
selectable.
[0001-align-regexp-now-has-a-separate-history-for-its-inte.patch (text/x-diff, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#16891
; Package
emacs
.
(Wed, 24 Feb 2016 03:06:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 16891 <at> debbugs.gnu.org (full text, mbox):
Dima Kogan <dima <at> secretsauce.net> writes:
> Here's a tiny patch to align-regexp. With a prefix argument several
> things are read from the minibuffer using read-input, with one (the
> regex) being much more complicated than the others. It's convenient to
> keep that one in a separate history to make previous entries easily
> selectable.
>
[...]
> +(defvar align-regexp-history nil
> + "Input history for the full user-entered regex in `align-regexp'")
> +
> ;; Sample extension rule set, for vhdl-mode. This should properly be
> ;; in vhdl-mode.el itself.
>
> @@ -946,7 +949,7 @@ construct a rule to pass to `align-region', which does the real work."
> (list (region-beginning) (region-end))
> (if current-prefix-arg
> (list (read-string "Complex align using regexp: "
> - "\\(\\s-*\\)")
> + "\\(\\s-*\\)" 'align-regexp-history)
I think that makes sense. Could you resubmit this patch with an
etc/NEWS entry, and a possible documentation change? I'm not sure
whether we usually mention separate histories for commands or not,
though...
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#16891
; Package
emacs
.
(Sun, 28 Feb 2016 02:51:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 16891 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Lars Ingebrigtsen <larsi <at> gnus.org> writes:
> Could you resubmit this patch with an etc/NEWS entry, and a possible
> documentation change? I'm not sure whether we usually mention separate
> histories for commands or not, though...
Patch attached. I'm assuming this is going to master (NEWS entry in
25.2) and that no documentation change is necessary. This seems too
small to document
[0001-align-regexp-now-has-a-separate-history-for-its-inte.patch (text/x-diff, inline)]
From c973972cbac84e0c9e228376a547df3eddb001f3 Mon Sep 17 00:00:00 2001
From: Dima Kogan <dima <at> secretsauce.net>
Date: Thu, 27 Feb 2014 02:45:43 -0800
Subject: [PATCH] `align-regexp' now has a separate history for its interactive
argument
lisp/align.el (align-regexp-history): New variable (bug#16891)
---
etc/NEWS | 5 +++++
lisp/align.el | 5 ++++-
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/etc/NEWS b/etc/NEWS
index ec68cce..aec34c3 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -31,6 +31,11 @@ otherwise leave it unmarked.
* Changes in Emacs 25.2
+---
+** `align-regexp' has a separate history for its interactive argument
+`align-regexp' no longer shares its history with all other
+history-less functions that use `read-string'
+
+++
** The networking code has been reworked so that it's more
asynchronous than it was (when specifying :nowait t in
diff --git a/lisp/align.el b/lisp/align.el
index 7e439f3..c3389dc 100644
--- a/lisp/align.el
+++ b/lisp/align.el
@@ -802,6 +802,9 @@ align-mode-exclude-rules-list
(defvar align-highlight-overlays nil
"The current overlays highlighting the text matched by a rule.")
+(defvar align-regexp-history nil
+ "Input history for the full user-entered regex in `align-regexp'")
+
;; Sample extension rule set, for vhdl-mode. This should properly be
;; in vhdl-mode.el itself.
@@ -946,7 +949,7 @@ align-regexp
(list (region-beginning) (region-end))
(if current-prefix-arg
(list (read-string "Complex align using regexp: "
- "\\(\\s-*\\)")
+ "\\(\\s-*\\)" 'align-regexp-history)
(string-to-number
(read-string
"Parenthesis group to modify (justify if negative): " "1"))
--
2.1.4
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#16891
; Package
emacs
.
(Sun, 28 Feb 2016 04:46:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 16891 <at> debbugs.gnu.org (full text, mbox):
Dima Kogan <dima <at> secretsauce.net> writes:
> Patch attached. I'm assuming this is going to master (NEWS entry in
> 25.2) and that no documentation change is necessary. This seems too
> small to document
Thanks; applied.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Added tag(s) fixed.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Sun, 28 Feb 2016 04:47:02 GMT)
Full text and
rfc822 format available.
bug marked as fixed in version 25.2, send any further explanations to
16891 <at> debbugs.gnu.org and Dima Kogan <dima <at> secretsauce.net>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Sun, 28 Feb 2016 04:47:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 27 Mar 2016 11:24:04 GMT)
Full text and
rfc822 format available.
bug unarchived.
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Sun, 04 Dec 2016 02:50:05 GMT)
Full text and
rfc822 format available.
bug Marked as fixed in versions 26.1.
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Sun, 04 Dec 2016 02:50:05 GMT)
Full text and
rfc822 format available.
bug No longer marked as fixed in versions 25.2.
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Sun, 04 Dec 2016 02:50:05 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 01 Jan 2017 12:24:26 GMT)
Full text and
rfc822 format available.
This bug report was last modified 8 years and 172 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.