Wikipedia talk:Wikipedia-mode.el
From Wikipedia, the free encyclopedia
Contents |
[edit] Math/TeX handling
It would be useful to have some sort of processing of math environment. I see some of form of that is on your todo list. --CSTAR 01:54, 19 Sep 2004 (UTC)
[edit] Wrong place for wikipedia-mode.el
Why on earth is the text about Wikipedia-mode.el in the namespace "Image"? I tried to move this from Image:Wikipedia-mode.el to Wikipedia:Wikipedia-mode.el but the system does not let me. --Oleg Alexandrov 23:23, 7 Jan 2005 (UTC)
[edit] XEmacs compatibility
I'm using XEmacs version 21.5.22 of February 2005 (+CVS-20050913). Wikipedia mode seems to mostly work, except that whenever it is loaded, I get the following error:
(1) (file-mode-spec/warning) Error in File mode specification: Symbol's value as variable is void: menu-bar-mode
Backtrace follows:
(if menu-bar-mode (progn (set (make-local-variable (quote imenu-generic-expression)) wikipedia-imenu-generic-expression) (imenu-add-to-menubar "Contents")))
(when menu-bar-mode (set (make-local-variable (quote imenu-generic-expression)) wikipedia-imenu-generic-expression) (imenu-add-to-menubar "Contents"))
# bind (delay-mode-hooks)
(let ((delay-mode-hooks t)) (text-mode) (setq major-mode (quote wikipedia-mode)) (setq mode-name "Wikipedia") (progn (if (get (quote text-mode) (quote mode-class)) (put (quote wikipedia-mode) (quote mode-class) (get (quote text-mode) (quote mode-class)))) (unless (keymap-parent wikipedia-mode-map) (set-keymap-parents wikipedia-mode-map (list (current-local-map)))) (derived-mode-merge-syntax-tables (syntax-table) wikipedia-mode-syntax-table)) (use-local-map wikipedia-mode-map) (set-syntax-table wikipedia-mode-syntax-table) (setq local-abbrev-table wikipedia-mode-abbrev-table) (set (make-local-variable (quote adaptive-fill-regexp)) "[ ]*") (set (make-local-variable (quote comment-start-skip)) "\\(?:<!\\)?-- *") (set (make-local-variable (quote comment-end-skip)) " *--\\([ \n]*>\\)?") (set (make-local-variable (quote comment-start)) "<!-- ") (set (make-local-variable (quote comment-end)) " -->") (set (make-local-variable (quote paragraph-start)) "\\*\\| \\|#\\|;\\|:\\||\\|!\\|$") (set (make-local-variable (quote sentence-end-double-space)) nil) (set (make-local-variable (quote font-lock-multiline)) t) (set (make-local-variable (quote font-lock-defaults)) (quote (wikipedia-font-lock-keywords t nil nil nil))) (set (make-local-variable (quote fill-nobreak-predicate)) (quote wikipedia-link-fill-nobreak-p)) (set (make-local-variable (quote auto-fill-inhibit-regexp)) "^[ *#:|;]") (set (make-local-variable (quote outline-regexp)) "==+") (set (make-local-variable (quote outline-minor-mode-prefix)) "�") (when menu-bar-mode (set (make-local-variable (quote imenu-generic-expression)) wikipedia-imenu-generic-expression) (imenu-add-to-menubar "Contents")) (modify-syntax-entry ?< "(>" wikipedia-mode-syntax-table) (modify-syntax-entry ?> ")<" wikipedia-mode-syntax-table) (define-key wikipedia-mode-map "î" (quote wikipedia-next-header)) (define-key wikipedia-mode-map "ð" (quote wikipedia-prev-header)) (define-key wikipedia-mode-map [M-down] (quote wikipedia-next-header)) (define-key wikipedia-mode-map [M-up] (quote wikipedia-prev-header)) (define-key wikipedia-mode-map "\n" (quote wikipedia-terminate-paragraph)) (define-key wikipedia-mode-map [(control return)] (quote wikipedia-terminate-paragraph)) (let ((map (make-sparse-keymap "Wikipedia"))) (define-key wikipedia-mode-map [menu-bar wikipedia] (cons "Wikipedia" map)) (define-key map [unfill-article] (quote ("Unfill article" . wikipedia-unfill-article))) (define-key map [fill-article] (quote ("Fill article" . wikipedia-fill-article))) (define-key map [separator-fill] (quote ("--"))) (define-key map [next-header] (quote ("Next header" . wikipedia-next-header))) (define-key map [prev-header] (quote ("Previous header" . wikipedia-prev-header))) (define-key map [separator-header] (quote ("--"))) (define-key map [outline] (quote ("Toggle Outline Mode..." . outline-minor-mode)))) (define-key wikipedia-mode-map "��" (quote wikipedia-unfill-article)) (define-key wikipedia-mode-map "�ñ" (quote wikipedia-fill-article)) (make-local-variable (quote change-major-mode-hook)))
(progn (make-local-variable (quote delay-mode-hooks)) (let ((delay-mode-hooks t)) (text-mode) (setq major-mode (quote wikipedia-mode)) (setq mode-name "Wikipedia") (progn (if (get (quote text-mode) (quote mode-class)) (put (quote wikipedia-mode) (quote mode-class) (get (quote text-mode) (quote mode-class)))) (unless (keymap-parent wikipedia-mode-map) (set-keymap-parents wikipedia-mode-map (list (current-local-map)))) (derived-mode-merge-syntax-tables (syntax-table) wikipedia-mode-syntax-table)) (use-local-map wikipedia-mode-map) (set-syntax-table wikipedia-mode-syntax-table) (setq local-abbrev-table wikipedia-mode-abbrev-table) (set (make-local-variable (quote adaptive-fill-regexp)) "[ ]*") (set (make-local-variable (quote comment-start-skip)) "\\(?:<!\\)?-- *") (set (make-local-variable (quote comment-end-skip)) " *--\\([ \n]*>\\)?") (set (make-local-variable (quote comment-start)) "<!-- ") (set (make-local-variable (quote comment-end)) " -->") (set (make-local-variable (quote paragraph-start)) "\\*\\| \\|#\\|;\\|:\\||\\|!\\|$") (set (make-local-variable (quote sentence-end-double-space)) nil) (set (make-local-variable (quote font-lock-multiline)) t) (set (make-local-variable (quote font-lock-defaults)) (quote (wikipedia-font-lock-keywords t nil nil nil))) (set (make-local-variable (quote fill-nobreak-predicate)) (quote wikipedia-link-fill-nobreak-p)) (set (make-local-variable (quote auto-fill-inhibit-regexp)) "^[ *#:|;]") (set (make-local-variable (quote outline-regexp)) "==+") (set (make-local-variable (quote outline-minor-mode-prefix)) "�") (when menu-bar-mode (set (make-local-variable (quote imenu-generic-expression)) wikipedia-imenu-generic-expression) (imenu-add-to-menubar "Contents")) (modify-syntax-entry ?< "(>" wikipedia-mode-syntax-table) (modify-syntax-entry ?> ")<" wikipedia-mode-syntax-table) (define-key wikipedia-mode-map "î" (quote wikipedia-next-header)) (define-key wikipedia-mode-map "ð" (quote wikipedia-prev-header)) (define-key wikipedia-mode-map [M-down] (quote wikipedia-next-header)) (define-key wikipedia-mode-map [M-up] (quote wikipedia-prev-header)) (define-key wikipedia-mode-map "\n" (quote wikipedia-terminate-paragraph)) (define-key wikipedia-mode-map [(control return)] (quote wikipedia-terminate-paragraph)) (let ((map (make-sparse-keymap "Wikipedia"))) (define-key wikipedia-mode-map [menu-bar wikipedia] (cons "Wikipedia" map)) (define-key map [unfill-article] (quote ("Unfill article" . wikipedia-unfill-article))) (define-key map [fill-article] (quote ("Fill article" . wikipedia-fill-article))) (define-key map [separator-fill] (quote ("--"))) (define-key map [next-header] (quote ("Next header" . wikipedia-next-header))) (define-key map [prev-header] (quote ("Previous header" . wikipedia-prev-header))) (define-key map [separator-header] (quote ("--"))) (define-key map [outline] (quote ("Toggle Outline Mode..." . outline-minor-mode)))) (define-key wikipedia-mode-map "��" (quote wikipedia-unfill-article)) (define-key wikipedia-mode-map "�ñ" (quote wikipedia-fill-article)) (make-local-variable (quote change-major-mode-hook))))
(delay-mode-hooks (text-mode) (setq major-mode (quote wikipedia-mode)) (setq mode-name "Wikipedia") (progn (if (get (quote text-mode) (quote mode-class)) (put (quote wikipedia-mode) (quote mode-class) (get (quote text-mode) (quote mode-class)))) (unless (keymap-parent wikipedia-mode-map) (set-keymap-parents wikipedia-mode-map (list (current-local-map)))) (derived-mode-merge-syntax-tables (syntax-table) wikipedia-mode-syntax-table)) (use-local-map wikipedia-mode-map) (set-syntax-table wikipedia-mode-syntax-table) (setq local-abbrev-table wikipedia-mode-abbrev-table) (set (make-local-variable (quote adaptive-fill-regexp)) "[ ]*") (set (make-local-variable (quote comment-start-skip)) "\\(?:<!\\)?-- *") (set (make-local-variable (quote comment-end-skip)) " *--\\([ \n]*>\\)?") (set (make-local-variable (quote comment-start)) "<!-- ") (set (make-local-variable (quote comment-end)) " -->") (set (make-local-variable (quote paragraph-start)) "\\*\\| \\|#\\|;\\|:\\||\\|!\\|$") (set (make-local-variable (quote sentence-end-double-space)) nil) (set (make-local-variable (quote font-lock-multiline)) t) (set (make-local-variable (quote font-lock-defaults)) (quote (wikipedia-font-lock-keywords t nil nil nil))) (set (make-local-variable (quote fill-nobreak-predicate)) (quote wikipedia-link-fill-nobreak-p)) (set (make-local-variable (quote auto-fill-inhibit-regexp)) "^[ *#:|;]") (set (make-local-variable (quote outline-regexp)) "==+") (set (make-local-variable (quote outline-minor-mode-prefix)) "�") (when menu-bar-mode (set (make-local-variable (quote imenu-generic-expression)) wikipedia-imenu-generic-expression) (imenu-add-to-menubar "Contents")) (modify-syntax-entry ?< "(>" wikipedia-mode-syntax-table) (modify-syntax-entry ?> ")<" wikipedia-mode-syntax-table) (define-key wikipedia-mode-map "î" (quote wikipedia-next-header)) (define-key wikipedia-mode-map "ð" (quote wikipedia-prev-header)) (define-key wikipedia-mode-map [M-down] (quote wikipedia-next-header)) (define-key wikipedia-mode-map [M-up] (quote wikipedia-prev-header)) (define-key wikipedia-mode-map "\n" (quote wikipedia-terminate-paragraph)) (define-key wikipedia-mode-map [(control return)] (quote wikipedia-terminate-paragraph)) (let ((map (make-sparse-keymap "Wikipedia"))) (define-key wikipedia-mode-map [menu-bar wikipedia] (cons "Wikipedia" map)) (define-key map [unfill-article] (quote ("Unfill article" . wikipedia-unfill-article))) (define-key map [fill-article] (quote ("Fill article" . wikipedia-fill-article))) (define-key map [separator-fill] (quote ("--"))) (define-key map [next-header] (quote ("Next header" . wikipedia-next-header))) (define-key map [prev-header] (quote ("Previous header" . wikipedia-prev-header))) (define-key map [separator-header] (quote ("--"))) (define-key map [outline] (quote ("Toggle Outline Mode..." . outline-minor-mode)))) (define-key wikipedia-mode-map "��" (quote wikipedia-unfill-article)) (define-key wikipedia-mode-map "�ñ" (quote wikipedia-fill-article)) (make-local-variable (quote change-major-mode-hook)))
wikipedia-mode()
# bind (alist mode name keep-going)
# (unwind-protect ...)
# bind (just-from-file-name)
set-auto-mode()
#<compiled-function nil "...(5)" [set-auto-mode t] 1>()
# (unwind-protect ...)
call-with-condition-handler(#<compiled-function (__call_trapping_errors_arg__) "...(17)" [__call_trapping_errors_arg__ errstr error-message-string lwarn file-mode-spec warning "Error in %s: %s\n\nBacktrace follows:\n\n%s" "File mode specification" backtrace-in-condition-handler-eliminating-handler] 8> #<compiled-function nil "...(5)" [set-auto-mode t] 1>)
# (condition-case ... . ((error)))
# bind (find-file)
normal-mode(t)
# bind (nomodes after-find-file-from-revert-buffer noauto warn error)
after-find-file(nil t)
# (unwind-protect ...)
# bind (inhibit-read-only error number truename rawfile nowarn filename buf)
find-file-noselect-1(#<buffer "mozex.textarea.f91fdc0e92e74accb55f53036b9cf0ac.txt"> "/tmp/mozex.textarea.f91fdc0e92e74accb55f53036b9cf0ac.txt" nil nil "/tmp/mozex.textarea.f91fdc0e92e74accb55f53036b9cf0ac.txt" (293465 771))
byte-code("..." [number truename rawfile nowarn filename buf set-buffer-major-mode find-file-noselect-1] 7)
# (condition-case ... . ((t (byte-code "Ã�!Âà @ A\"Â" [buf data kill-buffer signal] 3))))
# bind (number truename buf wildcards rawfile nowarn filename)
find-file-noselect("/tmp/mozex.textarea.f91fdc0e92e74accb55f53036b9cf0ac.txt" nil nil nil)
# bind (wildcards codesys filename)
find-file("/tmp/mozex.textarea.f91fdc0e92e74accb55f53036b9cf0ac.txt")
(progn (raise-frame) (find-file "/tmp/mozex.textarea.f91fdc0e92e74accb55f53036b9cf0ac.txt"))
(progn (progn (raise-frame) (find-file "/tmp/mozex.textarea.f91fdc0e92e74accb55f53036b9cf0ac.txt")))
eval((progn (progn (raise-frame) (find-file "/tmp/mozex.textarea.f91fdc0e92e74accb55f53036b9cf0ac.txt"))))
# bind (form)
gnuserv-eval-quickly((progn (progn (raise-frame) (find-file "/tmp/mozex.textarea.f91fdc0e92e74accb55f53036b9cf0ac.txt"))))
eval((gnuserv-eval-quickly (quote (progn (progn (raise-frame) (find-file "/tmp/mozex.textarea.f91fdc0e92e74accb55f53036b9cf0ac.txt"))))))
byte-code("..." [header gnuserv-string eval read-from-string] 4)
# (condition-case ... . ((error (byte-code "Ã�\n«Â
Ã\n \"ÂÃ
�à @ A\"Â" [gnuserv-string oops gnuserv-current-client "" gnuserv-write-to-client nil signal] 3)) (quit (byte-code "Ã�\n«Â
Ã\n�\"ÂÃ
�ÃÃÃ
\"Â" [oops gnuserv-string gnuserv-current-client "" gnuserv-write-to-client nil signal quit] 3))))
# bind (header string proc)
gnuserv-process-filter(#<process "gnuserv" pid 31680 state:run> "5 (gnuserv-eval-quickly '(progn (progn (raise-frame) (find-file \"/tmp/mozex.textarea.f91fdc0e92e74accb55f53036b9cf0ac.txt\"))))�")
# (condition-case ... . error)
# (catch top-level ...)
Does anyone know how to fix this? Are there any plans on making wikipedia-mode XEmacs-compatible? —Psychonaut 13:43, 26 November 2005 (UTC)
- Well, I guess you have to comment out "menubar-mode" which is causing the trouble. Wikipedia-mode was made to work for Emacs, so this is to be expected. Luckily, it is a small lisp code, and at least for myself, I managed to hack it into compliance.
- Please note though that XEmacs does not support Unicode (beyond accented Latin), and it will make a mess of Unicode-containing articles. Oleg Alexandrov (talk) 23:39, 26 November 2005 (UTC)
-
- This is news to me, as I've been successfully using XEmacs with Unicode for some time now. Unicode support is provided by MULE. —Psychonaut 23:30, 11 December 2005 (UTC)
- Good to know. I will investigate. However, it seems that Mule is already well-integrated in Emacs, but not in XEmacs (so one may need to get it separately or something.) Oleg Alexandrov (talk) 00:31, 12 December 2005 (UTC)
- This is news to me, as I've been successfully using XEmacs with Unicode for some time now. Unicode support is provided by MULE. —Psychonaut 23:30, 11 December 2005 (UTC)
[edit] Page name
Would it not be better called wikimedia-mode.el? —Preceding unsigned comment added by 62.255.64.5 (talk • contribs)
- Even better would be
mediawiki-mode.elbecause it's not necessarily limited to MediaWiki installations owned by Wikimedia Foundation. --Damian Yerrick (☎) 08:00, 5 February 2006 (UTC)
-
- Well, ask the creator of this software to rename it, then we may also rename the page. Oleg Alexandrov (talk) 16:18, 5 February 2006 (UTC)
[edit] w3
Emacs also has an internal w3 browser... --Jidanni 2006-04-15

