Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mhlib does not obey MHCONTEXT env var #37851

Closed
sjoerdmullender opened this issue Jan 28, 2003 · 8 comments
Closed

mhlib does not obey MHCONTEXT env var #37851

sjoerdmullender opened this issue Jan 28, 2003 · 8 comments
Labels
stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@sjoerdmullender
Copy link
Member

BPO 675976
Nosy @sjoerdmullender, @akuchling, @devdanzin, @bitdancer
Files
  • mhlib.patch: patch for mhlib adding the use of MHCONTEXT
  • mhlib.patch: new patch for mhlib adding MHCONTEXT support
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2013-02-24.00:38:38.698>
    created_at = <Date 2003-01-28.09:16:14.000>
    labels = ['type-feature', 'library']
    title = 'mhlib does not obey MHCONTEXT env var'
    updated_at = <Date 2013-02-24.00:38:38.696>
    user = 'https://github.com/sjoerdmullender'

    bugs.python.org fields:

    activity = <Date 2013-02-24.00:38:38.696>
    actor = 'r.david.murray'
    assignee = 'none'
    closed = True
    closed_date = <Date 2013-02-24.00:38:38.698>
    closer = 'r.david.murray'
    components = ['Library (Lib)']
    creation = <Date 2003-01-28.09:16:14.000>
    creator = 'sjoerd'
    dependencies = []
    files = ['4965', '4966']
    hgrepos = []
    issue_num = 675976
    keywords = ['patch']
    message_count = 8.0
    messages = ['42560', '42561', '42562', '42563', '42564', '84693', '114214', '182841']
    nosy_count = 6.0
    nosy_names = ['sjoerd', 'akuchling', 'nnorwitz', 'ajaksu2', 'r.david.murray', 'BreamoreBoy']
    pr_nums = []
    priority = 'normal'
    resolution = 'out of date'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue675976'
    versions = ['Python 3.2']

    @sjoerdmullender
    Copy link
    Member Author

    All programs in the (N)MH suite of programs use the
    MHCONTEXT environment variable to find the so-called
    context file where the current folder is remembered.
    mhlib should do the same, so that it can be used in
    combination with the standard (N)MH programs.

    Also, when writing the context file, mhlib should
    replace the Current-Folder line but keep the other
    lines in tact.

    The attached patch fixes both problems. It introduces a
    new method for the class MH called getcontextfile which
    uses the MHCONTEXT environment variable to find the
    context file, and it uses the already existing function
    updateline to update the context file.

    Some questions concerning this patch:

    • should I document the new method or should it be an
      internal method only?
    • should the fix be ported to older Python versions?
      With the patch it does behave differently if you have
      an MHCONTEXT environment variable.

    @sjoerdmullender sjoerdmullender added stdlib Python modules in the Lib dir labels Jan 28, 2003
    @nnorwitz
    Copy link
    Mannequin

    nnorwitz mannequin commented Feb 13, 2003

    Logged In: YES
    user_id=33168

    There's no uploaded file! You have to check the
    checkbox labeled "Check to Upload & Attach File"
    when you upload a file.

    Please try again.

    (This is a SourceForge annoyance that we can do
    nothing about. :-( )

    @sjoerdmullender
    Copy link
    Member Author

    Logged In: YES
    user_id=43607

    I can assure you that I did check that checkmark. Maybe
    it's my browser in combination with SF. We'll see if it
    works this time.

    @akuchling
    Copy link
    Member

    The patch looks OK.

    Regarding your questions: 1) I think the method should be documented; it might be useful to subclasses of MH. 2) New feature, so 2.6 only.

    @sjoerdmullender
    Copy link
    Member Author

    I have added a line to the docstring and I have added a method description to the library reference. Other than those changes, the new patch is identical to the old.

    I can check this in if you want.
    File Added: mhlib.patch

    @devdanzin
    Copy link
    Mannequin

    devdanzin mannequin commented Mar 30, 2009

    If it's a new feature, it should have a test.

    @devdanzin devdanzin mannequin added type-feature A feature request or enhancement labels Mar 30, 2009
    @BreamoreBoy
    Copy link
    Mannequin

    BreamoreBoy mannequin commented Aug 18, 2010

    This won't happen directly as mhlib has been removed from py3k, but presumably the patch could be reworked to apply to the mailbox module where the MH class now lives.

    @bitdancer
    Copy link
    Member

    The mailbox module provides tools for accessing an MH folder, but it does not do anything itself about folder management. That would be the province of a program using the mailbox module to implement an MUA. So, since mhlib is no more, this enhancement request is no longer valid.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 9, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    stdlib Python modules in the Lib dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants