@liushihao456/pi-emacs 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.ts +12 -1
  2. package/package.json +1 -1
package/index.ts CHANGED
@@ -84,7 +84,18 @@ function findFileExpression(path: string) {
84
84
  }
85
85
 
86
86
  function diredExpression(cwd: string) {
87
- return withTerminalMouse(`(dired ${JSON.stringify(cwd)})`);
87
+ return withTerminalMouse(
88
+ [
89
+ `(let* ((dir ${JSON.stringify(cwd)})`,
90
+ "(buf (dired-find-buffer-nocreate dir)))",
91
+ "(if buf",
92
+ "(progn",
93
+ "(with-current-buffer buf",
94
+ "(revert-buffer :ignore-auto :noconfirm))",
95
+ "(switch-to-buffer buf))",
96
+ "(dired dir)))",
97
+ ].join(" "),
98
+ );
88
99
  }
89
100
 
90
101
  function emacsClientArgs(cwd: string) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@liushihao456/pi-emacs",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Pi extension that opens emacsclient in a popup terminal and tracks recently edited files.",
5
5
  "type": "module",
6
6
  "keywords": [