1

I am using spacemacs. I want to achieve similar thing to the one in question browse through bookmarks in dired.
I would like to be able to quickly choose an alternative destination from within the helm-mini-buffer:

  • a bookmarked directory
  • a directory from the current buffer list

The default option just shows all reachable destinations in the directory of the opened file.

I want to have the following behavior:

Open the copy file Helm mini-buffer with spacemacs/copy-file (just Helm copy file function). Then have some shortcut which toggles the showing of bookmark paths on and off (in addition to the default showing of files and directories in the proximity of current buffer) so I can copy the file to this destination.

This goal may be a little ambitious.

Simpler alternative in which I am also really interested is to yank the path of a certain bookmark. Then I just could use the regular copy command and insert the desired path as the copy destination. There is a list-bookmarks function in which one can see the file/directory paths, but I don't know how to grab them.

Of course I can go to the bookmarked directory, copy the path, go to the original file and then use the copy command but I find this cumbersome.

  • I found a useful custom function, which partially does what I want hotspots, only that it can't toggle the helm sources (in my case the bookmark source) on and off during the mini buffer session. I am however not sure whenever this is possible at all. And of course it doesn't copy the files, but just opens them. – Rareform Dec 6 '19 at 17:16
0

Simpler alternative in which I am also really interested is to yank the path of a certain bookmark. Then I just could use the regular copy command and insert the desired path as the copy destination. There is a list-bookmarks function in which one can see the file/directory paths, but I don't know how to grab them.

If you use Bookmark+ then, in buffer *Bookmark List*, from C-x r l (command list-bookmarks, aka bookmark-bmenu-list):

  • With the cursor on the bookmark you're interested in, use C-h RET (or C-h C-RET).

  • This shows info about the bookmark in buffer *Help*. For a bookmarked file or directory this includes an entry Directory:, which shows the directory. Just copy that text.

| improve this answer | |
  • Doesn't seem to work in spacemacs. The page Distribution ************ GNU Emacs is “free software”; this means that everyone... opens instead – Rareform Dec 6 '19 at 19:10
  • I forgot to say that this is with Bookmark+ (updated the answer now). If you use Bookmark+, and if command bmkp-bmenu-describe-this-bookmark (C-h RET) in the bookmark list doesn't do what I described, then try with emacs -Q (no init file), and load Bookmark+, to confirm that it's not something else in your context (e.g. from your init file). If it's a Spacemacs problem, then you might want to report it to Spacemacs maintainers. – Drew Dec 6 '19 at 22:40
  • Is there Bookmark+ for spacemacs? I would like to use it, but I haven't seen it as a spacemacs package. – Rareform Dec 7 '19 at 10:27
  • Bookmark+ is for Emacs. I don't see why it couldn't be used with Spacemacs (but I don't use Spacemacs). Spacemacs is just a particular customization of Emacs, right? If it changes key bindings radically then you might want to adjust some predefined Bookmark+ key bindings, but that's the only adjustment I think you might need to make. And the prebound keys are on prefix keymaps, so that should make any such adjustment easy. – Drew Dec 7 '19 at 15:26
  • According to this post it seems to be unfortunately not that simple to integrate Bookmark+ into spacemacs. – Rareform Feb 19 at 10:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.