Ken Manheimer [Fri, 12 Feb 2016 09:05:54 +0000 (04:05 -0500)]
multishell - Suppress trivial duplicates in completions list presentation.
The duplicates are useful in minibuffer, distinguishing active shells,
but not useful in multishell listing, where active shells are sorted
early and with "+" signs before them.
Ken Manheimer [Thu, 11 Feb 2016 06:19:39 +0000 (01:19 -0500)]
multishell - method to conclude minibuffer interaction from multishell-list
Use throw-catch facility for non-local minibuffer exit. Originally
implemented for invoking and passing control to the minibuffer-list from
the minibuffer, it proves to be much more tidy than the non-local
minibuffer exit provisions in, eg, buff-menu.
For now, the most crucial binding in this context is the
mouse-click. The keyboard cases are also handled, but generally
switching the *Completions* buffer to the target one.
Ken Manheimer [Tue, 9 Feb 2016 18:52:25 +0000 (13:52 -0500)]
multishell - roughly working draft using multishell-list for completions
Workable, need to resolve pending issues:
- depends on flet - what do i need to do about that?
- adaptation of multishell-list to purpose needs doc update, maybe rethink
- likewise hacking of multishell-list-entries
- inhibit duplicates from organized listing, preferring detailed one
- get mouse click so it ~properly concludes minibuffer activity
Ken Manheimer [Tue, 9 Feb 2016 11:02:26 +0000 (06:02 -0500)]
Rough stab at using tabulated-list-mode for minibuffer-completion-help
A few big problems with what's implemented here:
- looks like tabulated-list-mode is incongruous with temp display
operation.
- using flet is no good - it's deprecated - but cl-flet lexical scoping
doesn't have needed effect.
Ken Manheimer [Sat, 30 Jan 2016 18:30:16 +0000 (13:30 -0500)]
multishell - shake out some initial multishell-list glitches
- (Offer to) delete shell buffer, if present, when deleting an entry.
Rely on the default active-shell deletion prompting for confirmation,
supplementing with our own confirmation for inactive shell buffers.
- Set recency (numeric rank) as initial sort field, get closer to
stable sort - still needs work.
- Recompute list on any operation that affects it, and try to
preserve stability. Also needs more work.
- multishell-list.el based on tabulated-list
- refactor multishell-pop-to-shell so users can activate multishell-list
from universal-arg prompt in minibuffer, via throw/catch
- ensure pivotal multishell-name-from-entry reliability
- remove unnecessary complications from multishell-all-entries
Ken Manheimer [Fri, 29 Jan 2016 05:47:02 +0000 (00:47 -0500)]
multishell - include active shell buffers names along with history entries.
The effect is that existing shell buffers will complete as both the bare
names and the name/path forms, while purely history entries will
complete as just the name/path forms. The difference will provide a cue,
a kind of lubrication for completing existing buffers.
Ken Manheimer [Tue, 26 Jan 2016 16:50:42 +0000 (11:50 -0500)]
multishell - reduce multishell-primary-name savehist extra fuss
I'm finding that preserving multishell-primary-name across sessions
isn't so desirable, and thinking that the idea about including the value
of savehist-additional-variables on savehist-additional-variables may
not be either effective or necessarily useful, so removing the note
about it.
Ken Manheimer [Sun, 24 Jan 2016 22:07:27 +0000 (17:07 -0500)]
multishell - update features list, remove change log and todo
Use multishell code commentary for change log and todo, and refer to
that from here.
(The commentary has the advantage in informing people viewing the
package via the emacs package management system, while repository
visitors also have access.)
Ken Manheimer [Sun, 24 Jan 2016 22:04:17 +0000 (17:04 -0500)]
multishell - work around remote+sudo+homedir problem, tidy shell resolution
- Work around the shell/tramp mishandling of remote+sudo+homedir problem!
The work around is clean and simple, basically using high-level `cd'
API and not messing with the low-level default-directory setting.
(Turns out the problem was not in my local config. Good riddance to the
awkward failure handler!)
- Clean up code resolving the destination shell, starting to document the
decision tree in the process. See getting-to-a-shell.md in the
multishell repository, https://github.com/kenmanheimer/EmacsMultishell
Ken Manheimer [Sat, 23 Jan 2016 22:47:06 +0000 (17:47 -0500)]
multishell - Remove notes about tramp remote+sudo+homedir+sudo prob
Apparently it's due to something in my local site configuration. The
problem happens reliably in emacs started with -q, but I can't get it to
happen if emacs was started with -Q.
Unfortunately, I don't get a traceback, even with tramp-verbose=6, when
the problem occurs, only "Selecting deleted buffer", and in *Messages*,
"byte-code: Selecting deleted buffer". Nothing more happens if
debug-on-error and debug-on-signal are set. This seems to suggest that
something is swallowing the signal, yet still returning to
top-level. Elusive.
Ken Manheimer [Sat, 23 Jan 2016 01:29:53 +0000 (20:29 -0500)]
multishell - bump to 1.0.6, support primary name savehist, tweak docstrings
- Refine commentary and docstrings
- With name/path handling rectified in last commit, users can now add
assigned primary name to savehist.
- We can't just assign that, however. See code comments below
multishell-primary-name.
Ken Manheimer [Sat, 23 Jan 2016 01:25:54 +0000 (20:25 -0500)]
multishell - revamp name and path resolution for clarity
- Simplify multishell-resolve-target-name-and-path
- Fix conduct when assigned primary name is associated with a path
- Use multishell-split-entry instead of duplicating the code
- Regularize application of asterisk bracketing/unbracketing (generally)
- Post messages to *Messages* when errors occur in condition-case
wrapped hook functions, so there's an unobtrusive trail.
- "multishell-split-entry" instead of
"multishell-split-entry-name-and-tramp"
- "multishell-resolve-target-name-and-path" instead of
"multishell-derive-target-name-and-path"
Ken Manheimer [Sun, 17 Jan 2016 00:39:20 +0000 (19:39 -0500)]
multishell - flesh out history provisions, including deletion.
Users are offered the option to delete a history entry for a shell
buffer when the buffer is killed.
Note that repair of a multishell bug, so tramp homedir syntax
(`/example.com:') is now recognized, seems to expose a tramp bug. Tramp
sometimes fails to open remote shells with the homedir syntax,
especially for remote+sudo. The failure is accompanied by a "Selecting
deleted buffer" error.
Ken Manheimer [Sat, 16 Jan 2016 18:44:48 +0000 (13:44 -0500)]
multishell - recognize homedir tramp paths, and update docstring.
My original path stuff, with name after the path, inadvertently
prevented addressing the user's homedir by requiring a trailing
slash. Both the premise and the (also inadvertent) excessive residue of
that broke the homedir syntax. Fixed!
Ken Manheimer [Mon, 11 Jan 2016 20:54:38 +0000 (15:54 -0500)]
multishell - integrate names and paths, allowing for distinct completions
Currently, the completions list includes both. It would be nice to be
able to have completions candidates list just the names - easier on the
eye - but actual completion include the path (when available), so the
user can reuse and adjust.
Multishell should only be concerned with shell-mode and shell-mode
derived buffers. Clarify that, and remove obsoleted
multishell-non-interactive-process-buffers (which wasn't used, anyway -
the residual var non-interactive-process-buffers was mistakenly left in).
Ken Manheimer [Mon, 4 Jan 2016 16:09:19 +0000 (11:09 -0500)]
multishell - Change to name preceding path, rather than following.
* This will be simpler for completion on shell choices, persistence.
* We can make typing of the initial "/" be a cue to delineate a distinct field
* We may be leverage field distinction for tramp remote path completion
* ... and use editing of the fields for editing of the historical records.