Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#16 Include the name of a module's package in its buffer name.

closed-out-of-date
nobody
None
5
2005-06-04
2004-09-03
Edward Loper
No

Add an option to include a module's package name in
its buffer name. E.g. if module `module.py' is
contained in a package whose dotted name is `a.b.c',
then its buffer will be named "module.py (a.b.c)"
instead of just "module.py".

When using complex package hierarchies, this can be
useful for keeping track of where a module is in the
hierarchy. It's especially useful for keeping track of
__init__.py files.

In the patch, the option is turned on by default; but
that could be changed. See the docs for the custom
variable py-name-buffers-with-packages.

For more info about file-name-handler-alist (which is
used to implement the change), see
<http://www.gnu.org/software/emacs/elisp-
manual/html_node/elisp_403.html> ("Making Certain
File Names 'Magic'"). It should work under both
emacs and xemacs.

Discussion

  • Edward Loper
    Edward Loper
    2004-09-07

    Logged In: YES
    user_id=195958

    Attatching file, take 2.

     
  • Edward Loper
    Edward Loper
    2004-09-12

    Logged In: YES
    user_id=195958

    Fixed a bug in the patch where the rename would fail if two buffers with
    the same name were opened. (Also, used context diff instead of unified
    diff.)

     
  • Edward Loper
    Edward Loper
    2004-09-12

    context diff against python-mode.el, revision 4.62

     
  • Skip Montanaro
    Skip Montanaro
    2004-10-23

    Logged In: YES
    user_id=44345

    Looks good. Checked in as v 4.65.

     
  • Skip Montanaro
    Skip Montanaro
    2004-10-23

    • status: open --> closed-accepted
     
  • Skip Montanaro
    Skip Montanaro
    2005-01-09

    • status: closed-accepted --> open-accepted
     
  • Skip Montanaro
    Skip Montanaro
    2005-01-09

    Logged In: YES
    user_id=44345

    I backed this change out. With it in place it seems that
    buffer names are annotated with "<2>" even if they are the only
    buffer associated with a given file name.

     
  • Skip Montanaro
    Skip Montanaro
    2005-06-04

    • status: open-accepted --> closed-out-of-date
     
  • Skip Montanaro
    Skip Montanaro
    2005-06-04

    Logged In: YES
    user_id=44345

    Closing. Seems like func-menu (standard with XEmacs, probably with
    GNU Emacs as well) does something similar.