1

wl-summary-goto-folder (keybinding g in Summary mode), permits to jump to a folder whose name is entered interactively.

What I'd like is to pass it the folder name by argument, in order to call it at emacs startup time, with something like

emacsclient -c --eval "(wl-folder-goto-folder 'folder_name)"

Is there a way I can do that ?

Nikana Reklawyks
  • 322
  • 4
  • 15
  • 1
    I use this `(wl-summary-goto-folder-subr "%inbox" nil nil nil t)` or `(wl-summary-goto-folder-subr "%INBOX.Sent" nil nil nil t)`, but I also have some functions that check to see whether `wl` has been initialized and I toggle the plug on at the beginning to download any new mail and then I turn the plug off when I'm done. – lawlist Feb 02 '17 at 16:15
  • Thanks, I didn't think of it - why not make it an answer ? A variation on it works for me now. – Nikana Reklawyks Feb 03 '17 at 05:35

1 Answers1

1

Thanks to lawlist comment, the answer is to call the internal function wl-summary-goto-folder-subr with the right parameters.

What ends up working for me is :

emacsclient -c --eval "(wl-summary-goto-folder-subr '\".INBOX\" t nil nil t)"

The last t is the INTERACTIVE parameter and without it, it "seems to do nothing" (someone more knowledgeable at elisp please explain). The first t is the SCAN-TYPE parameter, and prevents a prompt (Range (update):) at start time. No, I have no idea what I'm doing.

Nikana Reklawyks
  • 322
  • 4
  • 15
  • and for the sake of completeness, that gives `awful.client.run_or_raise('emacsclient -c --eval "(wl-summary-goto-folder-subr \\\".Inbox\\\" t nil nil t)"', function(c) return awful.rules.match(c, {name = "Summary:%.Inbox"} ) end)` in the awesome config. – Nikana Reklawyks Feb 03 '17 at 07:58
  • The code contemplates the following `scan-type` arguents: `nil`; `'all`; `'no-sync`; `'rescan`; `'force-update`; `'update`. The usage of `t` for `scan-type` has the effect of `'no-sync`. The code does not recognize `t` when determining whether to execute `wl-summary-sync`, `wl-summary-rescan` or `wl-summary-sync-force-update`. The `interactive` argument has a bearing on scoring and displaying the buffer with a possible recenter command (rather than just working on the summary buffer behind the scenes). – lawlist Mar 05 '17 at 18:11