gruenerBogen / MediaWiki-Mode

A simple Emacs major mode for editing Wikibooks' MediaWiki. This is optimised for https://de.wikibooks.org/wiki/Mathe_f%C3%BCr_Nicht-Freaks
GNU General Public License v3.0
1 stars 0 forks source link

Add command to insert links #5

Open gruenerBogen opened 4 years ago

gruenerBogen commented 4 years ago

As there are two notations for inserting links which have subtle differences in notation but completely different purposes, there should be command to insert links.

As links on web pages serve the purpose of citations and references in books, the command for inserting internal links should coincide with AucTeX's command for inserting references C-c ), and the one for inserting external links should be the same as AucTeX's command for inserting citations C-[.

In addition to support Mathe für Nicht-Freaks reference creation setup AucTeX's command for inserting a label should be used to insert an "Anker" which can be referenced later. To allow more flexibility these Ankers could be included using the emacs minor mode yasnipped.

gruenerBogen commented 4 years ago

It's probably useful to set the default for the link name as the current selection, if there is any. Then the selection will be replaced by the link.