Function: embark-history-remove

embark-history-remove is an interactive and byte-compiled function defined in embark.el.

Signature

(embark-history-remove STR)

Documentation

Remove STR from minibuffer-history-variable.

Many completion UIs sort by history position. This command can be used to remove entries from the history, such that they are not sorted closer to the top.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/embark-20260610.302/embark.el
(defun embark-history-remove (str)
  "Remove STR from `minibuffer-history-variable'.
Many completion UIs sort by history position.  This command can be used
to remove entries from the history, such that they are not sorted closer
to the top."
  (interactive (list (embark--read-from-history
                      "Remove history item: "
                      (if (eq minibuffer-history-variable t)
                          (user-error "No minibuffer history")
                        (symbol-value minibuffer-history-variable)))))
  (unless (eq minibuffer-history-variable t)
    (set minibuffer-history-variable
         (delete str (symbol-value minibuffer-history-variable)))))