syl20bnr / spacemacs

A community-driven Emacs distribution - The best editor is neither Emacs nor Vim, it's Emacs *and* Vim!
http://spacemacs.org
GNU General Public License v3.0
23.58k stars 4.9k forks source link

"No bookmark name given for record" when setting bookmark from dired buffer #16212

Closed shedatc closed 6 months ago

shedatc commented 7 months ago

Description :octocat:

Trying to set a bookmark via helm-filtered-bookmarks from a dired buffer fail due to helm-pattern being the empty string. The error message displayed is No bookmark name given for record.

The current action for helm-source-bookmark-set is:

(lambda (candidate)
  (if (string= helm-pattern "")
      (message "No bookmark name given for record")
      (bookmark-set candidate)))

The following change looks OK to me:

(lambda (candidate)
  (bookmark-set (read-string "Bookmark name: " nil nil helm-pattern)))

Reproduction guide :beetle:

Observed behaviour: :eyes: :broken_heart: It yell at me saying No bookmark name given for record!

Expected behaviour: :heart: :smile: IMHO it should either guess or ask for the bookmark name to record.

System Info :computer:

Backtrace :paw_prints:

Not relevant.

alexey0308 commented 6 months ago

Hi @shedatc, it looks like an upstream issue of helm, maybe it makes sense to create a PR with your fix there?

shedatc commented 6 months ago

OK @alexey0308, will do!

smile13241324 commented 6 months ago

Thanks guys, @shedatc please open an upstream issue and link it here. I am going to close this ticket until there is some work for us to do.