{ "info": { "author": "Doug Hellmann", "author_email": "doug.hellmann@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Programming Language :: Python" ], "description": "=================================================\n Using Emacs Desktop Mode with Virtualenvwrapper\n=================================================\n\nEmacs desktop-mode_ lets you save the state of emacs (open buffers,\nkill rings, buffer positions, etc.) between sessions. It can also be\nused as a project file similar to other IDEs. This virtualenvwrapper_\nplugin adds a trigger to save the current desktop file and load a new\none when activating a new virtualenv using ``workon``.\n\nInstallation\n============\n\nInstall this plugin with pip::\n\n $ pip install virtualenvwrapper-emacs-desktop\n\nOr by unpacking the source distribution and running ``setup.py`` directly::\n\n $ tar zxvf virtualenvwrapper-emacs-desktop-X.Y.tar.gz\n $ cd virtualenvwrapper-emacs-desktop-X.Y\n $ python setup.py install\n\nYou may need administrator privileges to install to a global location.\n\nConfiguring Desktop Mode in Emacs\n=================================\n\nSetup of desktop-mode is straightforward:\n\n1. Run ``customize-group`` on the \"desktop\" group.\n\n2. Turn ``desktop-save-mode`` **on** to enable the minor mode.\n\n3. Optionally change the base name for desktop files in\n ``desktop-base-file-name``. For example, using \"emacs.desktop\"\n means the file will not be hidden.\n\n4. Set a default search path for the desktop file in ``desktop-path``.\n Use your home directory, or the directory where you keep your emacs\n configuration files (``~/emacs.d`` or ``~/emacs``). This value is\n the *default*. Your real desktop files will be saved into the\n virtualenv directories.\n\n5. Set ``desktop-save`` to **Always save**. There are other values\n that work, but some require interaction with the editor during the\n context move to confirm file saves.\n\nThere are a few other options that may be useful to tweak, depending\non the other features of emacs you use. For example,\n``desktop-clear-preserve-buffers`` lets you control which buffers are\nsaved when the desktop is cleared on a reload. It may be useful to\nsave the ``*Messages*``, ``*Org Agenda*``, and ``*scratch*`` buffers,\nsince those are related to emacs operation and not limited to any one\nproject.\n\nVIRTUALENVWRAPPER_EMACSCLIENT\n-----------------------------\n\nIf the ``emacsclient`` binary visible on your ``$PATH`` does not match\nthe version of emacs you are using, set\n``VIRTUALENVWRAPPER_EMACSCLIENT`` to the full path of the version to\nuse instead.\n\n::\n\n export VIRTUALENVWRAPPER_EMACSCLIENT=/Applications/Emacs.app/Contents/MacOS/bin/emacsclient\n\nEnabling the Plugin\n===================\n\nSwitching desktop sessions every time ``workon`` is used would make it\nimpossible to have two shells open and working on separate projects at\nthe same time. Therefore, the plugin must be explicitly enabled in\nthe shell where it should control the emacs session.\n\nTwo shell functions (``emacs_desktop_controller_on`` and\n``emacs_desktop_controller_off``) are provided to switch the plugin on\nand off. They do this by changing the variable\n``DESKTOP_CONTROLLER``, which the plugin examines before taking any\naction. If the variable is not set, or is defined but empty, the\nplugin makes no changes. If the variable is set to any value, the\nsession is changed.\n\nMost modern terminal programs make it easy to create custom\nconfigurations with specific settings. Use your terminal's\ncustomization feature to create a \"desktop controller\" configuration\nwith ``DESKTOP_CONTROLLER`` set, then control\nvirtualenvwrapper-emacs-desktop from a terminal using that\nconfiguration.\n\nTerminal.app\n------------\n\nThe default OS X terminal emulator Terminal.app lets you set up\nprofiles with custom configurations, including running a command when\nthe new window is opened. Create a new profile, then under the\n**Shell** tab, set:\n\n :Run command: emacs_desktop_controller_on\n :Run inside shell: Enabled\n\n\niTerm\n-----\n\nThe third-party OS X terminal emulator iTerm_ lets you set up\n\"bookmarks\" with custom configurations, including the \"Working Dir\".\nOne way to use this to control the plugin is to set up a special\nbookmark with a working directory set to ``$WORKON_HOME``, then add a\ncheck to ``~/.bashrc`` to check for that condition.\n\n :Name: emacs-control\n :Command: ``bash -l``\n :Working Dir: ``/Users/username/.virtualenvs``\n :Terminal: Default\n :Keyboard: Global\n :Display: Default\n\n~/.bashrc settings::\n\n if [ \"$(pwd)\" = \"$WORKON_HOME\" ]\n then\n emacs_desktop_controller_on\n else\n emacs_desktop_controller_off\n fi\n\n.. _iTerm: http://iterm.sourceforge.net/\n\nemacs shell\n-----------\n\nshell-mode in emacs sets ``EMACS`` and ``INSIDE_EMACS``, so you can\ntest for those environment variables.\n\nGnome Terminal\n--------------\n\n?\n\nKDE\n---\n\n?\n\n.. note::\n\n If you have suggested configuration mechanisms for other terminal\n emulators or other platforms, please post them in the comments and I\n will add them to this README file.\n\nReferences\n==========\n\n* `Saving Emacs Sessions `__\n* `Desktop Save Mode `__\n* desktop-mode_\n* virtualenvwrapper_\n\n.. _desktop-mode: http://www.emacswiki.org/emacs/DeskTop\n\n.. _virtualenvwrapper: http://www.doughellmann.com/projects/virtualenvwrapper/", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://www.doughellmann.com/projects/virtualenvwrapper-emacs-desktop/", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "virtualenvwrapper-emacs-desktop", "package_url": "https://pypi.org/project/virtualenvwrapper-emacs-desktop/", "platform": "Any", "project_url": "https://pypi.org/project/virtualenvwrapper-emacs-desktop/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://www.doughellmann.com/projects/virtualenvwrapper-emacs-desktop/" }, "release_url": "https://pypi.org/project/virtualenvwrapper-emacs-desktop/1.0.1/", "requires_dist": null, "requires_python": null, "summary": "virtualenvwrapper plugin to control emacs desktop mode", "version": "1.0.1" }, "last_serial": 801417, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "e1901addaec140fc426b68c90cff7aa4", "sha256": "02a1eecf818b330e533f0d362a27c9a0b5631f845a8ace953df63b194e2473f0" }, "downloads": -1, "filename": "virtualenvwrapper-emacs-desktop-1.0.tar.gz", "has_sig": false, "md5_digest": "e1901addaec140fc426b68c90cff7aa4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5958, "upload_time": "2011-04-24T18:24:14", "url": "https://files.pythonhosted.org/packages/9c/54/5023cc9f19338bc2db4d0fd83a800d24737b836755ea46bfe34410a81f3f/virtualenvwrapper-emacs-desktop-1.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "63a8b380fe3b3521243dae470e00d018", "sha256": "86c18361effad5f04d676bdcbc1d5f1fa2bf44787070587b0425531a3089ff15" }, "downloads": -1, "filename": "virtualenvwrapper-emacs-desktop-1.0.1.tar.gz", "has_sig": false, "md5_digest": "63a8b380fe3b3521243dae470e00d018", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10206, "upload_time": "2012-02-26T21:09:21", "url": "https://files.pythonhosted.org/packages/85/22/25f22f785066ca9b5eed6f1fdcdedc292d16efd89a6108338dd7d3db52b6/virtualenvwrapper-emacs-desktop-1.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "63a8b380fe3b3521243dae470e00d018", "sha256": "86c18361effad5f04d676bdcbc1d5f1fa2bf44787070587b0425531a3089ff15" }, "downloads": -1, "filename": "virtualenvwrapper-emacs-desktop-1.0.1.tar.gz", "has_sig": false, "md5_digest": "63a8b380fe3b3521243dae470e00d018", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10206, "upload_time": "2012-02-26T21:09:21", "url": "https://files.pythonhosted.org/packages/85/22/25f22f785066ca9b5eed6f1fdcdedc292d16efd89a6108338dd7d3db52b6/virtualenvwrapper-emacs-desktop-1.0.1.tar.gz" } ] }