Skip to content

discard reader symbol (#_) gets caught in Slurp Forward Sexp #2901

@blueskyonmars

Description

@blueskyonmars

noticed that Slurp Sexp Forward regards the preprocessor discard reader macro (#_) as an sexp. So starting with

(do|)
#_(def a :a)
(def b :b)

by doing Slurp Sexp Forward, I can get

(do|
#_)(def a :a)
(def b :b)

Slurping forward again a space is created after the #_.

(do|
#_ (def a :a))
(def b :b)

Something similar happens with Select Forward Sexp and with (move) Forward Sexp.

It could be argued that the discard reader should be considered natural to select the reader without the discard symbol. But other symbols (like inline function macro - #(identity) ) are considered part of the sexp they are attached to (for slurp sexp forward as well as selection and navigation). For example in (def ^:dynamic my-var 10) the ^:dynamic is considered part of my-var for selection.

Screencast.from.2025-07-23.18-28-30.webm

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions