Re: python-mode.el doesn't associate python-mode with .PY files

2006-12-31 Thread Lennart Borgman (gmail)
Juanma Barranquero wrote: On 12/31/06, Lennart Borgman <[EMAIL PROTECTED]> wrote: Would it perhaps be better to have default t on systems where file name case does not matter? You should've read the docstring... Yes, or I should have just understood it probably had been made this way ;-)

Re: python-mode.el doesn't associate python-mode with .PY files

2006-12-31 Thread Juanma Barranquero
On 12/31/06, Lennart Borgman <[EMAIL PROTECTED]> wrote: Would it perhaps be better to have default t on systems where file name case does not matter? You should've read the docstring... (defcustom auto-mode-case-fold nil "Non-nil means to try second pass through `auto-mode-alist'. This means

Re: python-mode.el doesn't associate python-mode with .PY files

2006-12-30 Thread Lennart Borgman
Kim F. Storm wrote: Done. The new option is called auto-mode-case-fold -- defaulting to nil. Would it perhaps be better to have default t on systems where file name case does not matter? ___ emacs-pretest-bug mailing list emacs-pretest-bug@gnu.

Re: python-mode.el doesn't associate python-mode with .PY files

2006-12-30 Thread Kim F. Storm
Stefan Monnier <[EMAIL PROTECTED]> writes: >>> What was the conclusion on how to associate .PY files with python-mode? >>> And what about .TXT files, .HTM files, .TAR files, and so on? >>> >>> I think it is a mistake to do that, in general. >>> I would not object to a user option to enable such m

Re: python-mode.el doesn't associate python-mode with .PY files

2006-12-30 Thread Stefan Monnier
>> What was the conclusion on how to associate .PY files with python-mode? >> And what about .TXT files, .HTM files, .TAR files, and so on? >> >> I think it is a mistake to do that, in general. >> I would not object to a user option to enable such matching, >> but it should not be enabled by defau

Re: python-mode.el doesn't associate python-mode with .PY files

2006-12-30 Thread Stefan Monnier
> What was the conclusion on how to associate .PY files with python-mode? > And what about .TXT files, .HTM files, .TAR files, and so on? > I think it is a mistake to do that, in general. I'm still waiting for an explanation of this thought. Can't you come up with one anecdotal/hypothetica

Re: python-mode.el doesn't associate python-mode with .PY files

2006-12-30 Thread Kim F. Storm
Richard Stallman <[EMAIL PROTECTED]> writes: > What was the conclusion on how to associate .PY files with python-mode? > And what about .TXT files, .HTM files, .TAR files, and so on? > > I think it is a mistake to do that, in general. > I would not object to a user option to enable such ma

Re: python-mode.el doesn't associate python-mode with .PY files

2006-12-30 Thread Richard Stallman
What was the conclusion on how to associate .PY files with python-mode? And what about .TXT files, .HTM files, .TAR files, and so on? I think it is a mistake to do that, in general. I would not object to a user option to enable such matching, but it should not be enabled by default.

Re: python-mode.el doesn't associate python-mode with .PY files

2006-12-29 Thread Juanma Barranquero
On 12/29/06, Richard Stallman <[EMAIL PROTECTED]> wrote: This change is ok. OK, I've installed it. Kim, you talked about auto-detecting only JPEG image files. If you think it is better to do that right now (I really don't have an opinion), just set the values of the other image types to nil i

Re: python-mode.el doesn't associate python-mode with .PY files

2006-12-29 Thread Kim F. Storm
Stefan Monnier <[EMAIL PROTECTED]> writes: >> I am not going to approve this change. It is basically not correct. > > It's still not clear to me why fundamental-mode is more correct than > a major-mode derived from case-insensitive matching. But I'll just wait > a couple years and hope you'll se

Re: python-mode.el doesn't associate python-mode with .PY files

2006-12-29 Thread Stefan Monnier
> I am not going to approve this change. It is basically not correct. It's still not clear to me why fundamental-mode is more correct than a major-mode derived from case-insensitive matching. But I'll just wait a couple years and hope you'll see the light in the mean time, Stefan ___

Re: python-mode.el doesn't associate python-mode with .PY files

2006-12-29 Thread Richard Stallman
> I am not going to approve this change. It is basically not correct. Which one? The change for case-insensitive checking, or the other? I was responding to the change for case-insensitive checking. ___ emacs-pretest-bug mailing list emacs-pr

Re: python-mode.el doesn't associate python-mode with .PY files

2006-12-29 Thread Richard Stallman
It uses a separate `image-type-auto-detectable' alist (which makes more sense IMO) and a new `image-type-auto-detected-p' function for `magic-mode-alist'. (I'm not particularly fond of the names, BTW.) This change is ok. ___ emacs-pretest-b

Re: python-mode.el doesn't associate python-mode with .PY files

2006-12-29 Thread Richard Stallman
> - Adding `image-type-from-buffer' to `magic-mode-alist'. That's not > good because there is one type of file (postscript) whose > interpretation is ambiguous under that function. It isn't ambiguous. This works correctly now. ___ emacs-

Re: python-mode.el doesn't associate python-mode with .PY files

2006-12-28 Thread Juanma Barranquero
On 12/28/06, Richard Stallman <[EMAIL PROTECTED]> wrote: I am not going to approve this change. It is basically not correct. Which one? The change for case-insensitive checking, or the other? /L/e/k/t/u ___ emacs-pretest-bug ma

Re: python-mode.el doesn't associate python-mode with .PY files

2006-12-28 Thread Richard Stallman
I am not going to approve this change. It is basically not correct. ___ emacs-pretest-bug mailing list emacs-pretest-bug@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug

Re: python-mode.el doesn't associate python-mode with .PY files

2006-12-28 Thread Juanma Barranquero
On 12/28/06, Kim F. Storm <[EMAIL PROTECTED]> wrote: Sure, but if we had just added Stefan patch now, the rest of the patches would not have been needed "before the release". BTW, wasn't the approach in Stefan's patch more-or-less vetoed by Richard (even if most of us find this fix good and no

Re: python-mode.el doesn't associate python-mode with .PY files

2006-12-28 Thread Juanma Barranquero
On 12/28/06, Kim F. Storm <[EMAIL PROTECTED]> wrote: Sure, but if we had just added Stefan patch now, the rest of the patches would not have been needed "before the release". Yes, of course. (BTW, I'm not particularly interested in this stuff, or in getting it "in", just trying to be helpful.)

Re: python-mode.el doesn't associate python-mode with .PY files

2006-12-28 Thread Kim F. Storm
"Juanma Barranquero" <[EMAIL PROTECTED]> writes: > On 12/27/06, Kim F. Storm <[EMAIL PROTECTED]> wrote: > >> In contrast, the "recognize images by file contents" approach has already >> required three rounds of bug-fixing ... and there's no guarantee that there >> are not more "surprises"... > > W

Re: python-mode.el doesn't associate python-mode with .PY files

2006-12-28 Thread Juanma Barranquero
On 12/28/06, Juanma Barranquero <[EMAIL PROTECTED]> wrote: I think a good approach would be to add Stefan patch, remove the NOT-ALWAYS stuff and fix `magic-mode-alist' to use a function specifically designed to detect image types. (I should've said "to detect image files"). The following is a

Re: python-mode.el doesn't associate python-mode with .PY files

2006-12-27 Thread Juanma Barranquero
On 12/27/06, Kim F. Storm <[EMAIL PROTECTED]> wrote: In contrast, the "recognize images by file contents" approach has already required three rounds of bug-fixing ... and there's no guarantee that there are not more "surprises"... Well, I think that's not entirely fair. Patches for that approa

Re: python-mode.el doesn't associate python-mode with .PY files

2006-12-27 Thread Kim F. Storm
Stefan Monnier <[EMAIL PROTECTED]> writes: > It's at the very best a misfeature. Far from a feature. > See sample patch below to fix this problem. This code is exactly what we need! It is simple, localized, easy to document, and have no really severe effects if it guesses wrong - as the worst e

Re: python-mode.el doesn't associate python-mode with .PY files

2006-12-27 Thread Stefan Monnier
>> I'm browsing some old Python sources on a CD, and they're all opening >> in fundamental-mode instead of python-mode. >> >> All the filenames on the CD are in uppercase. >> >> Perhaps python-mode.el could be modified to recognise .PY files as >> well as .py files as containing Python code? > T

Re: python-mode.el doesn't associate python-mode with .PY files

2006-12-26 Thread Kevin Rodgers
Chris Moore wrote: I'm browsing some old Python sources on a CD, and they're all opening in fundamental-mode instead of python-mode. All the filenames on the CD are in uppercase. Perhaps python-mode.el could be modified to recognise .PY files as well as .py files as containing Python code? Th

python-mode.el doesn't associate python-mode with .PY files

2006-12-22 Thread Chris Moore
I'm browsing some old Python sources on a CD, and they're all opening in fundamental-mode instead of python-mode. All the filenames on the CD are in uppercase. Perhaps python-mode.el could be modified to recognise .PY files as well as .py files as containing Python code? I've not tried opening