[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master f97fdf5e50e 06/12: Deprecate option erc-remove-parsed-property
From: |
F. Jason Park |
Subject: |
master f97fdf5e50e 06/12: Deprecate option erc-remove-parsed-property |
Date: |
Fri, 13 Oct 2023 10:49:36 -0400 (EDT) |
branch: master
commit f97fdf5e50ebf1aab236b4b8bbd09c203a56aac5
Author: F. Jason Park <jp@neverwas.me>
Commit: F. Jason Park <jp@neverwas.me>
Deprecate option erc-remove-parsed-property
* etc/ERC-NEWS: Add entry for `erc-remove-parsed-property'.
* lisp/erc/erc.el (erc-remove-parsed-property): Deprecate option
because the potential for inadvertent self harm outweighs the
potential benefits. Additionally, replicating this functionality via
hooks is trivial.
(erc-display-line-1): Remove quasi-deprecated `tags' property because
the preferred format for `erc-response.tags' has changed, and ERC has
never supported IRCv3 tags.
---
etc/ERC-NEWS | 8 ++++++++
lisp/erc/erc.el | 13 +++++++++++--
2 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/etc/ERC-NEWS b/etc/ERC-NEWS
index dca9fff4e65..7c287b9de23 100644
--- a/etc/ERC-NEWS
+++ b/etc/ERC-NEWS
@@ -220,6 +220,14 @@ atop any message. The new companion option
'erc-echo-timestamp-zone'
determines the default timezone when not specified with a prefix
argument.
+** Option 'erc-remove-parsed-property' deprecated.
+This option's nil behavior serves no practical purpose yet has the
+potential to degrade the user experience by competing for space with
+forthcoming features powered by next generation extensions. Anyone
+with a legitimate use for this option likely also possesses the
+knowledge to rig up a suitable analog with minimal effort. That said,
+the road to removal is long.
+
** Option 'erc-warn-about-blank-lines' is more informative.
Enabled by default, this option now produces more useful feedback
whenever ERC rejects prompt input containing whitespace-only lines.
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el
index 60cce750355..3a0337eae9a 100644
--- a/lisp/erc/erc.el
+++ b/lisp/erc/erc.el
@@ -2893,9 +2893,18 @@ I.e. any char in it has the `invisible' property set."
The default is to remove it, since it causes ERC to take up extra
memory. If you have code that relies on this property, then set
-this option to nil."
+this option to nil.
+
+Note that this option is deprecated because a value of nil is
+impractical in prolonged sessions with more than a few channels.
+Use `erc-insert-post-hook' or similar and the helper function
+`erc-find-parsed-property' and friends to stash the current
+`erc-response' object as needed. And instead of using this for
+debugging purposes, try `erc-debug-irc-protocol'."
:type 'boolean
:group 'erc)
+(make-obsolete-variable 'erc-remove-parsed-property
+ "impractical when non-nil" "30.1")
(define-inline erc--assert-input-bounds ()
(inline-quote
@@ -2972,7 +2981,7 @@ If STRING is nil, the function does nothing."
(run-hooks 'erc-insert-post-hook)
(when erc-remove-parsed-property
(remove-text-properties (point-min) (point-max)
- '(erc-parsed nil))))
+ '(erc-parsed nil tags nil))))
(erc--refresh-prompt)))))
(run-hooks 'erc-insert-done-hook)
(erc-update-undo-list (- (or (marker-position (or erc--insert-marker
- master 328a985651a 01/12: Skip post-minibuffer restore in erc-scrolltobottom-all, (continued)
- master 328a985651a 01/12: Skip post-minibuffer restore in erc-scrolltobottom-all, F. Jason Park, 2023/10/13
- master 9120d7a32ea 02/12: Honor nil values in erc--restore-initialize-priors, F. Jason Park, 2023/10/13
- master d46c016fbd0 03/12: Sort and dedupe when loading modules in erc-open, F. Jason Park, 2023/10/13
- master a4bae965e06 07/12: Easily excise list-valued text prop members in ERC, F. Jason Park, 2023/10/13
- master c68dc7786fc 08/12: Manage some text props for ERC insertion-hook members, F. Jason Park, 2023/10/13
- master f8af241192b 10/12: Treat previous/next-line specially in erc-fill-wrap, F. Jason Park, 2023/10/13
- master 5e2be1e0ba6 09/12: Swap hook positions of erc-fill and erc-match-message, F. Jason Park, 2023/10/13
- master 1950ddebacb 04/12: Allow spoofing process marker in erc-display-line-1, F. Jason Park, 2023/10/13
- master 9c2f99b7d73 05/12: Use erc-display-message instead of erc-make-notice, F. Jason Park, 2023/10/13
- master baf778c7caa 12/12: More defcustom fixes in ERC (Bug#66520), F. Jason Park, 2023/10/13
- master f97fdf5e50e 06/12: Deprecate option erc-remove-parsed-property,
F. Jason Park <=
- master 52af0a5fb97 11/12: Add command to refill buffer in erc-fill-wrap-mode, F. Jason Park, 2023/10/13