tvl-depot/tools/eaglemode/commands/emacsclient.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
389 B
Nix
Raw Normal View History

{ depot, pkgs, ... }:
depot.tools.eaglemode.mkCommand {
name = "Emacsclient";
hotkey = "Ctrl+E";
description = ''
Open target in Emacsclient.
Emacs server must be running already for this to have any effect.
'';
code = ''
ErrorIfNotSingleTarget();
my @tgt=GetTgt();
my $dir=$tgt[0];
ExecOrError('${pkgs.emacs}/bin/emacsclient', '-n', $dir);
'';
}