VisEmacs

What is VisEmacs?

VisEmacs is a Visual Studio Add-In that allows Emacs to be integrated as the default text editor. It will be used instead of the Visual Studio built-in editor when you double-click on a file or press F4 after compiling (it will go to the proper line in the emacs buffer). A note: because the Visual Studio editor is not used, reverting buffers does not have to happen, as emacs is always used (which enables auto-save recovery features lost with auto-revert-mode).

Supported Platforms

Downloading:

Previous versions:

VisEmacs is distributed under the terms of the GNU Public License

Please note that this package uses gnuserv (and uses the -F option, so if your version does not support this feature, please update.

FAQ

Before E-Mailing me with problems, please read the FAQ. Also, please read the gnuserv Mini-Faq.

Installation:

  1. Copy VisEmacs.dll into a convenient directory like \Emacs\bin, \Emacs\lib, or \Emacs\Add-In; also, make sure gnuclientw.exe is in your path, as VisEmacs calls this program to load files into Emacs.
  2. If you're using VisualStudio v5.0, register the DLL using regsvr32.exe (make sure you have administrator privileges if you are in NT) ... for example:
    > cd \Emacs\Add-In
    > regsvr32 VisEmacs.dll

    VisualStudio v6.0 will register the DLL for you during the next step.
  3. Start Visual Studio and go to: Tools Customize... Add-Ins and Macro Files
  4. Click on Browse, and point Visual Studio to your VisEmacs.dll file.
  5. Click the checkbox to indicate that you want to use the Add-In, and close the Customize dialog box.
  6. You should notice the VisEmacs Toolbar with familiar Gnu Emacs icon and a new icon - an arrow pointing to an 'E' (ok, so I'm no artist...if you are, send me some new icons!) representing "Send To Emacs" which will send the active document to emacs, regardless of the "enable emacs" setting..

Compiling VisEmacs:

Two Options:

  1. Use the pre-compiled version of the DLL in the Release\ directory.
  2. Open the VisEmacs Workspace in Visual Studio and compile

Building for Embedded Visual C++

Greg Fenton (Greg.Fenton at sybase dot com) has kindly found a way for VisEmacs to support Microsoft's Embedded Visual C++. Unfortunately, this requires VisEmacs to be recompiled using the 'ObjModel' headers from the eVC include directory. Here is a summary of the changes he has made:
  • Added two project configurations: eVT Release & eVT Debug
    • Output files directory set to eRelease & eDebug directories, respectively
    • Output file name is eVisEmacs.dll
    • added _E_VISEMACS_ predefine to C/C++ Precompiler definitions & Resource Preprocessor definitions
    • turned off pre-compiled headers
    • added Additional include directory:
      C:\Program Files\Microsoft Embedded Tools\EVC\Include
      which will need to be modified if eMbedded Visual Tools are installed elsewhere

  • Modified VisEmacs.rc
    • modified wording to fit in typical Version dialog
    • updated the Version to 2.1.0.2 from 2.1.0.1
    • added #ifdef for _E_VISEMACS_
    • added eVisEmacs-specific information

A zip archive containing his changes and binaries is available for download. Note that the version for this release is 2.1.0.2. There are no other changes other than those described above compared to the 2.1.0.1 release.

Using VisEmacs:

Clicking the Gnu Toolbar will show the VisEmacs configuration dialog.

Use Visual Studio as normal, and Emacs should almost always (I'm not making any guarantees) bring Emacs to the foreground to edit the document.

Support

There is a mailing list hosted at Yahoo! Groups for discussion of VisEmacs, and an announcement list as well.
Subscribe to visemacs
Powered by groups.yahoo.com
Subscribe to visemacs-announce
Powered by groups.yahoo.com

Changes:

11 Sep 1997  Added code to allow integration into Visual Studio 
             in a non-administrator account. Version 1.0b
11 Sep 1997  Added quotes around the file name so names with spaces 
             are handled correctly. Version 1.01
23 Oct 1997  Added gnuserv-frame information to answer the FAQ of 
             "How do I load all the files into one frame?"
10 Sep 1998  Changed '==' to '=' from the default Add-In code. 
             Added Registry support for your settings. 
             Changed the icon.
16 Mar 2000  Took over as new maintainer of VisEmacs.
18 Mar 2000  Added "Send to Emacs" command button to send 
             a file to Emacs, even if Emacs integration is disabled. 
             Added "Send On Window Activate" option that 
             sends files to Emacs when they are brought to the foreground 
             in Visual Studio.
16 May 2000  Integrated a patch submittted by Guy Bolton King 
             <guyk at sqf.hp.com> to fix a crash bug. Symptoms: 
             Open a non-document window (e.g. the Workspace window---undock 
             it if necessary---or the disassembly window) using the Send 
             to Emacs button; msdev crashes with an access violation. 
             Released v2.1.0.1.

Problems:

VisEmacs works by hooks exposed by Visual Studio. Most of the functionality works from the OpenDocument (look it up in VS 5/6) hook. So...If a document is open in Visual Studio, and you double click the file in the File Browser, Emacs will NOT come to the foreground, unless "Send on Window Activate" is enabled because the OpenDocument event never occurred (since the document was open in the Visual Studio editor).

Site News

VisEmacs now has a project page at SourceForge. In light of the various problems my service provider has had lately, I decided that a better file distribution method was needed. For the time being, the VisEmacs home page will remain where it is, but may in the future move to SourceForge as well.

VisEmacs v2.9.0.13 is now available for your compiling pleasure via CVS at SourceForge. Changes include a new settings dialog with tooltip help, sending build results to emacs, path to gnuclient and gnudoit, debug logging to the 'Macro' tab of DevStudio, and several bug fixes. Let me know what you think!