This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: mhlib does not obey MHCONTEXT env var
Type: enhancement Stage: resolved
Components: Library (Lib) Versions: Python 3.2
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: BreamoreBoy, ajaksu2, akuchling, nnorwitz, r.david.murray, sjoerd
Priority: normal Keywords: patch

Created on 2003-01-28 09:16 by sjoerd, last changed 2022-04-10 16:06 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
mhlib.patch sjoerd, 2003-02-13 09:48 patch for mhlib adding the use of MHCONTEXT
mhlib.patch sjoerd, 2007-01-13 21:14 new patch for mhlib adding MHCONTEXT support review
Messages (8)
msg42560 - (view) Author: Sjoerd Mullender (sjoerd) * (Python committer) Date: 2003-01-28 09:16
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.
msg42561 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2003-02-13 03:02
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. :-( )
msg42562 - (view) Author: Sjoerd Mullender (sjoerd) * (Python committer) Date: 2003-02-13 09:48
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.
msg42563 - (view) Author: A.M. Kuchling (akuchling) * (Python committer) Date: 2006-12-22 18:00
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.
msg42564 - (view) Author: Sjoerd Mullender (sjoerd) * (Python committer) Date: 2007-01-13 21:14
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
msg84693 - (view) Author: Daniel Diniz (ajaksu2) * (Python triager) Date: 2009-03-30 22:36
If it's a new feature, it should have a test.
msg114214 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2010-08-18 12:27
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.
msg182841 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2013-02-24 00:38
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.
History
Date User Action Args
2022-04-10 16:06:13adminsetgithub: 37851
2013-02-24 00:38:38r.david.murraysetstatus: open -> closed

nosy: + r.david.murray
messages: + msg182841

resolution: out of date
stage: test needed -> resolved
2010-08-18 12:27:00BreamoreBoysetnosy: + BreamoreBoy

messages: + msg114214
versions: + Python 3.2, - Python 2.7
2009-03-30 22:36:44ajaksu2setversions: + Python 2.7, - Python 2.6
nosy: + ajaksu2

messages: + msg84693

type: enhancement
stage: test needed
2003-01-28 09:16:14sjoerdcreate