New Immissions/Updates:
boundless - educate - edutalab - empatico - es-ebooks - es16 - fr16 - fsfiles - hesperian - solidaria - wikipediaforschools
- wikipediaforschoolses - wikipediaforschoolsfr - wikipediaforschoolspt - worldmap -

See also: Liber Liber - Libro Parlato - Liber Musica  - Manuzio -  Liber Liber ISO Files - Alphabetical Order - Multivolume ZIP Complete Archive - PDF Files - OGG Music Files -

PROJECT GUTENBERG HTML: Volume I - Volume II - Volume III - Volume IV - Volume V - Volume VI - Volume VII - Volume VIII - Volume IX

Ascolta ""Volevo solo fare un audiolibro"" su Spreaker.
CLASSICISTRANIERI HOME PAGE - YOUTUBE CHANNEL
Privacy Policy Cookie Policy Terms and Conditions
Wikipedia:Wikipedia-mode.el - Wikipedia, the free encyclopedia

Wikipedia:Wikipedia-mode.el

From Wikipedia, the free encyclopedia

This article describes the installation of wikipedia-mode, an Emacs major mode for editing Wikipedia articles offline, and of the auxiliary mode longlines-mode. These tweak Emacs's behavior in several ways to make it easier to edit Wikipedia articles. In particular, wikipedia-mode provides syntax highlighting for Wikipedia markup.

For other methods of using Emacs with Wikipedia, see Wikipedia:Text editor support.

Contents

[edit] Installing wikipedia-mode

To install wikipedia-mode, save wikipedia-mode.el ([1]) to a convenient directory, preferably one in your Emacs load-path. (To see which directories are in your load-path, type C-h v load-path while in Emacs.)

Next, open your Emacs initialization file. (This is usually a file called .emacs in your home directory; to find out what it is, type C-h v user-init-file. If this is a new Windows Emacs installation, you need to choose a home directory. See Where do I put my .emacs file?) Add the following lines:

(autoload 'wikipedia-mode "wikipedia-mode.el"
  "Major mode for editing documents in Wikipedia markup." t)

If you did not save wikipedia-mode.el in a `load-path' directory, replace "wikipedia-mode.el" with the full pathname. On Windows, remember to use forward slashes ("/") rather than back slashes ("\") to indicate the directory. For example,

(autoload 'wikipedia-mode "C:/Documents and Settings/USERNAME/.emacs.d/Wikipedia-mode.el"
  "Major mode for editing documents in Wikipedia markup." t)

It is often convenient to associate wikipedia-mode with certain filenames, so that Emacs will enter wikipedia-mode automatically whenever such files are opened. In order to associate filenames ending in ".wiki" with wikipedia-mode, add the following to your initialization file:

(add-to-list 'auto-mode-alist 
   '("\\.wiki\\'" . wikipedia-mode))

To use this mode automatically with the Firefox extensions ViewSource, add:

(add-to-list 'auto-mode-alist
  '("en\\.wikipedia\\.org" . wikipedia-mode))

Still further customizations can be added; suppose one wants Emacs to spellcheck files opened up in wikipedia-mode using the FlySpell program? One could add some elisp like this:

 (setq text-mode-hook (quote (#[nil "\300\301!\207" [flyspell-mode 1] 2] flyspell-buffer text-mode-hook-identify)))  

[edit] Installing longlines-mode

Wikipedia articles don't use line breaks, which means that paragraphs are not separated into lines by return characters. By default, Emacs sees such documents as a bunch of super-long lines. There are several solutions to this problem: you can use toggle-truncate-lines to fold long lines on the screen (if they are truncated) or you can use longlines-mode to "word wrap" text using "soft" newlines.

If you decide to use the first approach you are likely need to download a third-party package—screen-lines.el—which redefines movement commands to work in terms of screen lines, as opposed to text lines (that is if you use next-line it moves cursor vertically down to the next line on the screen, whereas traditionally it moves cursor to the next text line).

The second approach requires longlines-mode which is included in recent versions of Emacs. If your version does not include it you need to do the following:

Download longlines.el to your load-path and add these lines to your Emacs initialization file (typically .emacs or .emacs.el):

 (autoload 'longlines-mode "longlines.el"
   "Minor mode for editing long lines." t)

[edit] Usage

You can enter wikipedia-mode at any time by typing M-x wikipedia-mode. While in wikipedia-mode, you can view a description of the mode by typing C-h m, which runs the command describe-mode.

There are two ways to use wikipedia-mode. The first is to copy articles between Emacs and your web browser's text box. The second way to use wikipedia-mode is with the MozEx plugin for the Mozilla and Mozilla Firefox web browsers, which allows you to call Emacs for editing text boxes, or the more recent and still-supported ViewSource plugin for Firefox, which provides similar functionality vis-a-vis the text editing.

If you mostly edit Wikipedia articles using the MozEx plugin, it might be worthwhile to associate MozEx editing sessions with wikipedia-mode. This is done in a similar way:

(add-to-list 'auto-mode-alist '("mozex.\\.*" . wikipedia-mode))

Another Firefox plugin that may be used with wikipedia-mode is ViewSourceWith. To associate its files with Emacs add this line:

(add-to-list 'auto-mode-alist '("index.\\.*" . wikipedia-mode))

[edit] Licensing

The packages wikipedia-mode.el and longlines.el are released under the GNU General Public License.

[edit] External links

In other languages

Static Wikipedia (no images)

aa - ab - af - ak - als - am - an - ang - ar - arc - as - ast - av - ay - az - ba - bar - bat_smg - bcl - be - be_x_old - bg - bh - bi - bm - bn - bo - bpy - br - bs - bug - bxr - ca - cbk_zam - cdo - ce - ceb - ch - cho - chr - chy - co - cr - crh - cs - csb - cu - cv - cy - da - de - diq - dsb - dv - dz - ee - el - eml - en - eo - es - et - eu - ext - fa - ff - fi - fiu_vro - fj - fo - fr - frp - fur - fy - ga - gan - gd - gl - glk - gn - got - gu - gv - ha - hak - haw - he - hi - hif - ho - hr - hsb - ht - hu - hy - hz - ia - id - ie - ig - ii - ik - ilo - io - is - it - iu - ja - jbo - jv - ka - kaa - kab - kg - ki - kj - kk - kl - km - kn - ko - kr - ks - ksh - ku - kv - kw - ky - la - lad - lb - lbe - lg - li - lij - lmo - ln - lo - lt - lv - map_bms - mdf - mg - mh - mi - mk - ml - mn - mo - mr - mt - mus - my - myv - mzn - na - nah - nap - nds - nds_nl - ne - new - ng - nl - nn - no - nov - nrm - nv - ny - oc - om - or - os - pa - pag - pam - pap - pdc - pi - pih - pl - pms - ps - pt - qu - quality - rm - rmy - rn - ro - roa_rup - roa_tara - ru - rw - sa - sah - sc - scn - sco - sd - se - sg - sh - si - simple - sk - sl - sm - sn - so - sr - srn - ss - st - stq - su - sv - sw - szl - ta - te - tet - tg - th - ti - tk - tl - tlh - tn - to - tpi - tr - ts - tt - tum - tw - ty - udm - ug - uk - ur - uz - ve - vec - vi - vls - vo - wa - war - wo - wuu - xal - xh - yi - yo - za - zea - zh - zh_classical - zh_min_nan - zh_yue - zu -

Static Wikipedia 2007 (no images)

aa - ab - af - ak - als - am - an - ang - ar - arc - as - ast - av - ay - az - ba - bar - bat_smg - bcl - be - be_x_old - bg - bh - bi - bm - bn - bo - bpy - br - bs - bug - bxr - ca - cbk_zam - cdo - ce - ceb - ch - cho - chr - chy - co - cr - crh - cs - csb - cu - cv - cy - da - de - diq - dsb - dv - dz - ee - el - eml - en - eo - es - et - eu - ext - fa - ff - fi - fiu_vro - fj - fo - fr - frp - fur - fy - ga - gan - gd - gl - glk - gn - got - gu - gv - ha - hak - haw - he - hi - hif - ho - hr - hsb - ht - hu - hy - hz - ia - id - ie - ig - ii - ik - ilo - io - is - it - iu - ja - jbo - jv - ka - kaa - kab - kg - ki - kj - kk - kl - km - kn - ko - kr - ks - ksh - ku - kv - kw - ky - la - lad - lb - lbe - lg - li - lij - lmo - ln - lo - lt - lv - map_bms - mdf - mg - mh - mi - mk - ml - mn - mo - mr - mt - mus - my - myv - mzn - na - nah - nap - nds - nds_nl - ne - new - ng - nl - nn - no - nov - nrm - nv - ny - oc - om - or - os - pa - pag - pam - pap - pdc - pi - pih - pl - pms - ps - pt - qu - quality - rm - rmy - rn - ro - roa_rup - roa_tara - ru - rw - sa - sah - sc - scn - sco - sd - se - sg - sh - si - simple - sk - sl - sm - sn - so - sr - srn - ss - st - stq - su - sv - sw - szl - ta - te - tet - tg - th - ti - tk - tl - tlh - tn - to - tpi - tr - ts - tt - tum - tw - ty - udm - ug - uk - ur - uz - ve - vec - vi - vls - vo - wa - war - wo - wuu - xal - xh - yi - yo - za - zea - zh - zh_classical - zh_min_nan - zh_yue - zu -

Static Wikipedia 2006 (no images)

aa - ab - af - ak - als - am - an - ang - ar - arc - as - ast - av - ay - az - ba - bar - bat_smg - bcl - be - be_x_old - bg - bh - bi - bm - bn - bo - bpy - br - bs - bug - bxr - ca - cbk_zam - cdo - ce - ceb - ch - cho - chr - chy - co - cr - crh - cs - csb - cu - cv - cy - da - de - diq - dsb - dv - dz - ee - el - eml - eo - es - et - eu - ext - fa - ff - fi - fiu_vro - fj - fo - fr - frp - fur - fy - ga - gan - gd - gl - glk - gn - got - gu - gv - ha - hak - haw - he - hi - hif - ho - hr - hsb - ht - hu - hy - hz - ia - id - ie - ig - ii - ik - ilo - io - is - it - iu - ja - jbo - jv - ka - kaa - kab - kg - ki - kj - kk - kl - km - kn - ko - kr - ks - ksh - ku - kv - kw - ky - la - lad - lb - lbe - lg - li - lij - lmo - ln - lo - lt - lv - map_bms - mdf - mg - mh - mi - mk - ml - mn - mo - mr - mt - mus - my - myv - mzn - na - nah - nap - nds - nds_nl - ne - new - ng - nl - nn - no - nov - nrm - nv - ny - oc - om - or - os - pa - pag - pam - pap - pdc - pi - pih - pl - pms - ps - pt - qu - quality - rm - rmy - rn - ro - roa_rup - roa_tara - ru - rw - sa - sah - sc - scn - sco - sd - se - sg - sh - si - simple - sk - sl - sm - sn - so - sr - srn - ss - st - stq - su - sv - sw - szl - ta - te - tet - tg - th - ti - tk - tl - tlh - tn - to - tpi - tr - ts - tt - tum - tw - ty - udm - ug - uk - ur - uz - ve - vec - vi - vls - vo - wa - war - wo - wuu - xal - xh - yi - yo - za - zea - zh - zh_classical - zh_min_nan - zh_yue - zu

Static Wikipedia February 2008 (no images)

aa - ab - af - ak - als - am - an - ang - ar - arc - as - ast - av - ay - az - ba - bar - bat_smg - bcl - be - be_x_old - bg - bh - bi - bm - bn - bo - bpy - br - bs - bug - bxr - ca - cbk_zam - cdo - ce - ceb - ch - cho - chr - chy - co - cr - crh - cs - csb - cu - cv - cy - da - de - diq - dsb - dv - dz - ee - el - eml - en - eo - es - et - eu - ext - fa - ff - fi - fiu_vro - fj - fo - fr - frp - fur - fy - ga - gan - gd - gl - glk - gn - got - gu - gv - ha - hak - haw - he - hi - hif - ho - hr - hsb - ht - hu - hy - hz - ia - id - ie - ig - ii - ik - ilo - io - is - it - iu - ja - jbo - jv - ka - kaa - kab - kg - ki - kj - kk - kl - km - kn - ko - kr - ks - ksh - ku - kv - kw - ky - la - lad - lb - lbe - lg - li - lij - lmo - ln - lo - lt - lv - map_bms - mdf - mg - mh - mi - mk - ml - mn - mo - mr - mt - mus - my - myv - mzn - na - nah - nap - nds - nds_nl - ne - new - ng - nl - nn - no - nov - nrm - nv - ny - oc - om - or - os - pa - pag - pam - pap - pdc - pi - pih - pl - pms - ps - pt - qu - quality - rm - rmy - rn - ro - roa_rup - roa_tara - ru - rw - sa - sah - sc - scn - sco - sd - se - sg - sh - si - simple - sk - sl - sm - sn - so - sr - srn - ss - st - stq - su - sv - sw - szl - ta - te - tet - tg - th - ti - tk - tl - tlh - tn - to - tpi - tr - ts - tt - tum - tw - ty - udm - ug - uk - ur - uz - ve - vec - vi - vls - vo - wa - war - wo - wuu - xal - xh - yi - yo - za - zea - zh - zh_classical - zh_min_nan - zh_yue - zu