emacs for OS X

Tuxtrax See_my at Signature.com.invalid
Tue Apr 20 05:17:44 EDT 2004


Hi all

My editor of choice on linux for python, bar none, is xemacs. I love the 
python mode that detects a python file and handles indentation and 
coloration for me automagically.

I have been using a powerbook for a while now, and I finally found emacs 
for aqua in OS X Jaguar (10.2.8). I downloaded it from porkrind.com. The 
version of emacs is 21.3 I believe. Anyway, not only does it *not* 
detect python files automatically, but it tries to use fundamental mode 
to handle them which is a pain in the ass. I want my coloring and 
indentation back, damn it all!

I found python-mode.el in the python distribution folder, but not only 
do I have no clue as to what to do with it, I can't find an emacs folder 
or a .emac file. Just the emac program. Any help with this would be 
greatly appreciated. If you have overcome this yourself I especially 
want to hear from you.

In other news.....

I have a code question for you all. This one is a real trip. I am trying 
to use NNTPLIB to download just the message numbers and "from" fields 
for any specified number of messages I want, from 1 to 10,000. So far so 
good. But when I play by the rules, I get unpredictable results. If I 
ask for 20 from headers I get one. If I ask for 500, I get a couple. If 
I ask for 6000, one time I might get 500, the next time I might get 
2,300. It is very frustrating. Here is the code soundbite:

response, number_of_messages, first_available_message, 
last_available_message, groupname = n.group(newsgroup)

###############
# Do we need to create run time files from server download?
# This section takes care of it if it needs to be done.

if dbuild_flag == 1 or fexist(database_shelve+".db") == 0:

# Retrieve and print From: information
# The NNTPlib xhdr routine returns a list of nested sublists. Each 
# sulist contains a pair - message number, requested header in string
# form.
    
    message_request = getinput("\nHow many posts should I be interested 
in? [max 10,000]")

    if int(message_request) > int(number_of_messages):
       print "\nRequest exceeds current available message count. 
Adjusting to %s posts" % number_of_messages
       message_request = number_of_messages
    elif int(message_request) > 10000:
       print "\nRequest exceeds program capacity. Assuming max of 10,000 
posts, and continuing ...."
       message_request = "10000"      
    
      
    last_message = str(int(first_available_message) + 
int(message_request))
    
    stringrequest = first_available_message+"-"+last_message
    
    print "\nRetrieving list of first %s newsgroup participants" % 
message_request
    print "\nI'm working ..............."
    
# This is what should work reliably and is not:

response, poster = n.xhdr("from", stringrequest)

##################

Now when I make my xhdr request using the full range of messages as told 
to me by:

response, number_of_messages, first_available_message, 
last_available_message, groupname = n.group(newsgroup)

by changing:

stringrequest = first_available_message+"-"+last_message

to:

stringrequest = first_available_message+"-"+last_available_message

I get reliable results every time. Anyone care to help me on this one? 
It simply makes no sense that I should be able to get reliable results 
only when I ask for all 48,000 "from" message headers available from my 
newsgroup of choice. I have verified, by the way, that last_message is a 
properly formed string in the format needed by xhdr.

thanks, and best regards,

Mathew

-- 
ROT 13 this address to mail me:

bar jbeq abg guerr; uvtu qrfreg zna, gura nqq - ng lnubb qbg pbz.



More information about the Python-list mailing list