How can I make Emacs org docs more beautiful in github repository? - emacs

github supports several markup languages, one of which is Emacs org mode docs.
But it always look ugly with the default CSS file(much better than
the default one in built-in org mode, though.
Also it seems that the
source code block does not have syntax highlight either.
So is it possible to make it more beautiful with some minor changes in org files? Or can you give me some advice or good practice?

Github uses org-ruby to convert org-mode to html. It appears that recent versions of org-ruby support both lower case org-mode keywords and syntax highlighting in the source code blocks (among other nice things). Until it is upgraded in the official Github, it looks like the only options are either to use upper case BEGIN_SRC/END_SRC or export your org files to html/md in emacs with any options/css/etc you like and post the resulting files on Github.

Githubs Org-Mode support is upgraded but #+TITLE: is unsupported, like links that are mostly bugged. So it works mostly.

Related

How do TextMate grammars and themes work with VSCode?

VSCode is built on top of MonacoEditor which doesn't support Textmate grammars and themes. But somehow VSCode made it possible. I am curious how VSCode is able to do this.
I am asking because I am making a code editor (based on Monaco) with TextMate grammar and theme support. But I am unable to understand how I can achieve it.
Though there are packages like monaco-textmate to make TextMate grammars work with Monaco, syntax highlighting is still not working properly.
TextMate grammars depend on a particular regex implementation / library called Oniguruma, which is implemented in C. Monaco however is designed to run in the browser, and the JavaScript regex engine available there is not compatible with Oniguruma. All of this is explained in detail in the "Why doesn't the editor support TextMate grammars?" section of Monaco's FAQ. It also mentions the possibiliy of perhaps eventually compiling Oniguruma to WebAssembly to work around this.
VSCode itself uses vscode-textmate for its TMLanguage handling, which has the Oniguruma library as a native dependency. VSCode can have native dependencies because it doesn't run in a browser environment.
According to monaco-textmate's readme, it is actually heavily based on vscode-textmate:
99% of the code in this repository is extracted straight from vscode-textmate
And it does use the WASM approach mentioned earlier:
monaco-textmate relies on onigasm package to provide oniguruma regex engine in browsers. onigasm itself relies on WebAssembly.
As to why syntax highlighting doesn't always work as expected with monaco-textmate... I have no idea, I expect this is simply a bug in the implementation. Perhaps wait for a response from the maintainer, the issue you linked is fairly new.
At least conceptually there shouldn't be a reason why it couldn't achieve the same syntax highlighting VSCode does, since it uses the same regex flavour.

Tagging "to-do"s and colouring text in Markdown

I'm using the GitHub flavoured Markdown on the GitHub wiki, and would like to somehow "tag" paragraphs in need of rewriting or elaboration.
My first thought was to write some kind of note above the paragraph and colour that note red (or any colour besides black, really) for quick recognition, but it appears that Markdown does not support colouring text. I'm already using bold to emphasise other things, so I would like to avoid using that.
I realise a similar question (Semantic tagging in Markdown) has been asked previously, but that did not deal with to-do tags. I guess what I'm really looking for is a way of doing this based on someone else's experience as there is no specific syntax for accomplishing what I'm trying to do.
Two questions, then:
1) Why doesn't Markdown support colouring text?
2) Is there any semantically correct way of "tagging" a to-do in a Markdown wiki? If not: any suggestions?
As-is, Markdown is meant to be more of a replacement syntax for a language such as HTML and, for the most part, doesn't determine any styling for content.
If you want to "tag" something as a to-do item, you could make a line linking to an itemized task list on its own separate to-do page.
'pure' markdown is supposed to be at least fairly style-independent (as with most markup languages). It does provide the pragmatism of inline raw html/latex which if you are only targetting one of them (I'm assuming html given the github tag) are probably the easiest way to do it.
Not within markdown markdown. The closest is the class support that various flavours of markdown have added as extensions to the language (personally I use pandocs, although the link you provided offers a couple of extra options). These are obviously harder to use if you are targeting github since you can't control the variant in use.

How can I best do source code browsing inside Emacs?

I have a workflow where I use grep and other tools in a shell for searching in different projects even though my main editor is emacs. I usually work on bug fixing and minor development of source code that is often unknown to me so searching the code is important. The langages I mostly work in are php, ruby, java, perl and sometimes python.
Is there some common IDE extension in emacs that would enable me to have functionality like "goto definition" from multiple files that span all these languages? Are there some other modules that could be useful, either code browsing or indexed search?
If you want to work with lots of different languages, ctags is pretty flexible. See the EmacsWiki for instructions on integration of ctags.
Code browsing can mean a bunch of different things. The mode you mention of using grep implies to me you are looking for function definitions, or perhaps looking for uses of a particular function.
While CEDET supports all the languages you list (some with the ctags parser), starting fresh in a new source code area is something CEDEt isn't too good at until it has indexed the entire project for those tasks you listed. You can, however, use GNU Global or idutils. I think idutils supports more languages.
In CEDET, the `semantic-symref' and related commands will do a grep-like operation with grep, or global, or idutils (depending on what type of tag table you created.) Unlike grep style output, the symref output buffer shows which functions are using the command in question. You can then execute macros on the hits of the symbol you care about to do large refactoring operations.
CEDET also supports a tags like jump to function, though if you are already using something like ctags that works fine too. CEDET is better when it comes to handling polymorphism in some cases.
With CEDET, you can also get structured browsing via imenu, speedbar, and ECB (the emacs code browser). ECB is particularly good in that the methods buffer allows you to quickly navigate to different parts of a class. Particularly handy for classes where the pieces are spread around, like in C++. CEDET can even create cute UML diagrams of class inheritance structures which are connected to your code.
CEDET does take some learning, and some of the languages you list are not fully supported for all the tools, though the basic browsing discussed above should be ok.
etags-select (which you can get from ELPA) makes browsing your TAGS file nicer, in my experience, if you bind M-. to etags-select-find-tag.
As well as etags/ctags try running grep with M-x grep rather than in a shell, to get clickable links in Emacs rather than having to manually find the file and line matching the grep output.
For code browsing, you can also use M-x imenu-tree
Tags browsing, with dynamic completion, filtering (substring, regexp, fuzzy), cycling:
http://www.emacswiki.org/emacs/Icicles_-_Emacs_Tags_Enhancements

OpenOffice syntax highlighting

I have some big documentation to do that will contain pieces of code I'd like to give the conventional "coding language" syntax highlighting. I've searched the styles feature to do such a thing, but there is no way to do that (in fact I could only found a forum where people were fighting about adding this feature or not, but this is not the point).
There is an abandoned extension for OpenOffice, but using it freezes my installation of OpenOffice.
What's the easiest way to do this? Should I try to recompile the extension and debug it (although I'm already having a hard time compiling another Java project), or maybe I should use a macro? How to implement this?
One possibility is to use one of the many code to html tools out there and then include the html in your OpenOffice document (using "File..." on the Insert menu).
One possibility is highlight. Vim has a :TOhtml command that will convert the current file to syntax highlighted html using the current colour scheme. I've not tried it, but this looks promising. There are also a few online ones, such as this. I'm sure there are a great many other options.

Using MarkDown on dynamic websites?

Do any WYSIWYG editors exist that work natively in Markdown? (any Platform/Language)
...So consumers don't have to see the code behind, just work in an MS-Word like interface.
An assisted MarkDown editor where you're viewing and editing the Markdown-source (like the one I'm writing this question with) would also be okay.
There is the Wysiwym Markdown Editor (The one we're using here). It shows live-markdown though, rather than masking it. I think the great thing about Markdown is that just about anybody can understand the basics of it.
This is the only editor I know of. After doing a cursory browsing of Google it appears to be one of the few, if not the only one in wide-spread use at the moment.
A large list of Markdown implementations at the Markdown Wiki.
Perl
PHP
Python
Ruby
C
C#
Java
Javascript
Common Lisp
Lua
Haskell
And:
Blog Software
Wiki Software
Text Editor
Desktop Software
Other Tools