To be tested, but likely, XDump stores many "XDump" in the dump file's tagline. If so, we could/should trim them.
See also @auto-xdump-file.
Recurrent acme crashes when using Auto
:
$ cat /tmp/acme.nohup.out.*
acme: text.delete: Bad file descriptor
acme: text.delete: Success
acme: text.delete: Bad file descriptor
acme: text.delete: Bad file descriptor
See /home/mb/plan9port/src/cmd/acme/text.c:/"text.delete"
.
Or at least a mechanism so that our autodump mechanism (XDump) restores it after the dump.
Existing Run outputing in a given +Buffer seems to die out of +Buffer being deleted/recreated on a Switch.
Simplest way would be to make +Buffer permanent in XLoad(/Delall), but this wouldn't solve the issue in the general case.
Another option would be that all Exec would register/tag their output windows, so that Delall wouldn't delete them. (e.g. /tmp/+Buffer -> /tmp/+Keep+Buffer).
Allow automatic reload of autodump in Acme on startup. Allow autodump period configuration Allow to disable autodump on startup. Document in README.md
Perhaps have autodump in an external script.
Have a file with two fields:
<script>
When opening a file matching regexp, append to its tagline the second field (ad-hoc script name)
Have a way to automatically create ad-hoc script and add them to the previous file. E.g.
AddButton QTests 'XPutall && Exec go test -v *.go':
- creates an ad-hoc QTests executable scripts in ~/acme.ad-hoc/,
which is added to the
E.g. Open -m static(/)
could climb up to / and open
the first occurence of it.
Rename breaks e.g. if string to rename contains [].
./Acme could wrap -l as such:
- if dump file isn't found, try to look for it in $HOME/acme.dumps/ instead
Perhaps we could store "somewhere" a special token, "xdump:" to automatically name the dump files used by XDump?
For example, a filename containing {{.tags}}
.
To be tested: "XPutall && echo ok" should fail when at least one file cannot be written to.
The ability to register a few convenient shortcuts without hacking .c code would be helpful. ^L on win(1)dows would be a good testbed.
We can retrieve current window through
9p read acme/log | awk '$2 == "focus" { print $1 }'
See https://github.com/fhs/acme-lsp/blob/v0.10.0/cmd/acmefocused/main.go, and more generally, https://github.com/fhs/acme-lsp
Could be started from gits/acme-tools/Acme, always writing last ID to some well-known location. Then we could rely on xbindkeys to actually handle the shortcut.
A LookWin command that would look for the first window matching a given pattern and select it/place the cursor on it (do-able?)
cf. acme.bin/XLoad; also XLoad -l
Currently all tools are implemented in, hopefully, portable sh(1).
Typically, sed(1) behaves differently in POSIX and Plan9.
There are some hardcored /bin/sed, e.g. in acme.bin/+.
If we have @rc-implementation, we could enforce POSIX-only in sh implementation, and Plan9-only in rc implementation.
+Errors windows are noisy (one per directory, breaks user flow, etc.). +Buffer was introduced as a mean to reduce them.
Perhaps we could also watch for events targeting a +Errors window and automatically redirect all that to +Buffer?
Current solution is mostly to prefix commands with a Exec,
e.g. Exec 9 man ls
; we barely have a need for +Errors
windows anymore.
See.c is an example of a solution, but perhaps we could experiment with other techniques.
For instance, watching for special events, or relying on plumbing rules.
Or assuming this is technically possible, a shortcut like ctrl-click that would:
- when performed in body, append selected text to window's current location
- when performed on tag, replace window's current location
Again, the goal is to reduce noise/number of opened window while keeping a fluid workflow.
Acme's Load doesn't destroy existing windows by default. We should thus be able to craft special dump files allowing scriptable windows (re)positioning, without having to alter C code.
But at that point, we may want to just use Emacs™.
E.g. on a buffer /tmp/foo/bar.c
, if /tmp/foo/
only contains
bar.c
, assuming /tmp/
contains more than just foo/
,
Rm -r
would remove:
- ``/tmp/foo/bar.c``;
- ``/tmp/foo/``.
By default, Rm on a directory only calls rmdir; we could have an option to be more efficient (Rm -f). See how it would interact with @rm-up.
We're a bit quick in Exec to avoid double cleaning. This should be practically negligible.
Happens e.g. in the case of -e foo -t bar, where both foo and bar patterns, different strings, would point to the same buffer.
In commands such as Getfn that takes an awk(1) pattern as an argument, user needs to specially quotes the pattern as a consequence. This can be unexpected.
E.g. Getfn '/home/$USER/gits/project/'
The forwarding of the pattern can be discussable to, cf. acme.bin/Rm (no quotes).
Uniform documentation was written for the command, but not yet doubled check; mistakes are likely.
We could extract documentation from script as currently done for the README.md and creates some man pages for the scripts.