How should I provide help for a related set of functions? - emacs

I built tfs.el to allow developers to do TFS things (checkout, checkin, etc) from within emacs.
There are 13 interactive commands in the tfs package, like tfs/checkout, tfs/rename, tfs/diff, and so on, and I'd like to be able to provide help on all of them in a single place. An overview of all the available functions.
What's the "emacs way" of doing that? I thought of defining an additional function, like tfs/help , that would invoke describe-function-1 on each of the tfs functions, and then present all that in a TFS-Help buffer.
Is there a better way?

Well, there are many "Emacs way"s.
The most polished would be to write an info page, see the page "Info for Experts", which basically says to use Texinfo and convert that into an info page. You can be as verbose as you want there, and the user can search, use hyperlinks, etc. The user can easily get there via C-h F tfs/checkout.
Another way some folks seem to do it is to write short documentation strings for each of the commands, ending with "see documentation for tfs-mode for details" and put all the common documentation in the docstring for tfs-mode.
Another way some packages document things is with a big comment at the top of the tfs.el file.
Take your pick, they all have trade-offs.

You can use
(describe-bindings "\C-xv")

You have multiple, related commands. So far, I guess, they are related only by their names.
Two possibilities come to mind:
Create a mode for this stuff. Document everything in the doc string of the command that turns the mode on/off. It could be a major mode or a minor mode. If a minor mode it could be buffer-local or global.
Create a group (defgroup) for this stuff and document everything in its doc string.
The basic idea is to somehow actually relate these commands: bundle them together in some way, so you can document them together as the doc for the bundle.
Offhand, without knowing more, my guess is that you might want to create a global minor mode.

Related

Powershell 5 PSReadLine autocompletion how to ignore batch files (.cmd/.bat)

I use auto-complete heavily...
When I invoke the auto-completion with tab key...
Powershell also includes any files from the current folder
or in the current path in the autocomplete list
How can I configure Powershell to ignore these files
(eg. auto-complete only with Powershell commands/functions)
There is no simple way to get the behavior you're looking for.
At best, you can define your own function named TabExpansion2 and either fully implement tab completion yourself (definitely not recommended) or filter the results returned from the default implementation of TabExpansion2.
I recall discussing this idea recently, I thought there might even be an open issue, but I didn't see it after a quick search here.
I don't know the exact history, but at one point we did implement the behavior you're wanting. It did break some tests, and I think some people preferred seeing effectively useless completions over no completions, perhaps it was reassuring that completions were still working.
At any rate, I think it's a reasonable feature request, I'd suggestion opening an issue if you can't find one.

Project switching in emacs

I would like to associate sets of buffers/files in emacs with different projects, and switch from one to other. This would involve closing all the buffers associated with the present project and open the files corresponding to the switched-to-project. I tried setting up desktops using bookmarks+ as suggested in https://emacs.stackexchange.com/questions/315/using-desktop-for-basic-project-management but all buffers remain open. I also tried setting up workgroups using workgroups2 (https://github.com/pashinin/workgroups2), but had similar issues. Is there an existing emacs package that could be used for this?
There is an excellent package called Projectile that does exactly what you describe and more.
Alternative suggestion
I recommend that you don't look to emacs to manage buffers, frames, and editor state separately across projects.
Instead, use a desktop manager and create separate desktops for each project. This works well because not only can you have separate emacs instances (that you can be sure are truly separated), but you can also have separate web browsers open to documentation or other project-specific applications that collectively get swapped in and out when you switch between projects.
You say, "I tried setting up desktops using bookmarks+ as suggested in using-desktop-for-basic-project-management but all buffers remain open.".
I guess you mean that switching to a desktop does not kill buffers that existed before the switch. Not by itself, it doesn't. How can it guess which such pre-existing buffers you want killed?
Clearly you do not want to kill all buffers that existed prior to the desktop switch.
To get the behavior it seems you want, you would need to somehow decide, and specify, which such buffers you would like killed. You could, for example, choose to kill all that have a certain mode (perhaps using desktop-buffer-mode-handlers).
With Bookmark+ you can have bookmarks that do more than one thing. In particular, here, you could create a sequence bookmark that chains together (1) a function bookmark that kills all of the buffers you want to kill and (2) a desktop bookmark.
Or you can perhaps make use of desktop-after-read-hook or desktop-buffer-mode-handlers to do some cleanup.
(But it sounds like you have not really thought through exactly what behavior you want with respect to buffers that you do not want to "remain open", so that you can specify it clearly. If you can specify it then you can probably implement it fairly easily, using either desktop hooks or bookmarks or both. Just a guess.)

Is there a list of Inform7 commands?

Looking for a thorough listing of Inform7 commands hasn't turned up much.
While the manual has an index of examples, the commands are not listed.
The closest I've found is an Inform7 cheat sheet, which though useful, is not complete.
The list of available commands is in the IDE's Actions tab of the Index page. It has everything except swear words and some low-level commands like UNDO and OOPS. See http://www.intfiction.org/forum/viewtopic.php?f=22&t=10412&start=10#p62633 for a copy-pasted list of the commands provided by the Standard Library.

Is there a tool to explicitly organize files in Eclipse into groups without moving them into different packages?

Is there a plugin that lets you manually add files to lists/categories? Something like Mylyn but manual and more files--kind of the way Gmail manages mail--a tagging system.
If I let mylyn manage my windows it actually closes them without any way to shut off (Something I absolutely cannot tolerate, I use my open windows to remind me of what I'm working on--my memory absolutely NEEDS the help)--on top of that it automatically adds files to lists just because that list happens to be open when I start doing something else.
I guess I'm thinking of a plugin that offers a different version of the "Package Explorer", one that is organized by task instead of by package hierarchy, and allows you to move files around at will.
...or is there a way to adapt an existing tool to do this (without actually moving the files around, of course!) Bookmarks don't seem to offer a "Grouping" but using a common first word for the description in my bookmarks may work... Any other ideas?
After messing with it a bit more, it looks like bookmarks might do what I want. It is possible to filter bookmarks by searching the subject string, so as long as I put tags in the subject string I can select a sub-filter and have it bring up all the relevant files for a given task.
I won't accept this for a while in case someone has a better answer (a plugin perhaps?)

Diff/Compare Tool That Lets Me Write Comments On Differing Lines

I'm looking for a diff/compare tool that shows differing lines from two text files, and gives me a space to comment on those files. Ideally this application would have three panes, pane one would be file A, pane two would file B and pane three would be a comment I can enter to on why the files are different.
We're going to be using this diff tool to compare test and production environments. Sometimes it'll be justifiable that the two files are different but we need to have a space to explain why. I'd rather not write those comments in the files themselves.
I've used TortosieMerge, WinDiff and Beyond Compare. I like beyond compare the most because it lets me see the whole file, just the differing lines or the differing lines in context.
Tools that sit inside Visual Studio or eclipse are fine too.
It sounds to me like you might want to use a code review tool for this (even if you're not really performing code reviews). They record diffs in a database and allow comments on those diffs.
A couple free ones are:
CodeStriker - I've used this and it works pretty well, but required more tweaking and mucking around in Perl that I'd have liked (that was a while ago, though)
Review Board - never used this, but it sure looks nice. I'm trying to get it installed at my current place of work.
I would like to suggest a high-efficiency software CodeGen to you. It's not only include TextCompare tools, but another Codec/Database tools is supported as well.
For more detail, please kindly access the Github repository.
https://github.com/work7z/CodeGen