Comments on EmacsAsDaemon

It’s really tedious having that massive code block in there. Maybe we should implement some form of hiding? I’d like to be able to run text alongside a big code block like that actually. That would be cool.

NicFerrier 2013-02-23 00:22 UTC

I’ve added a text formatting rule that passes <div class="..."> and <div style="..."> and </div> through without checking for correct nesting. Incorrect nesting makes me unhappy but I don’t have a good solution at hand and I’ll leave it to you to get the CSS right. If you have something that you think will work as a generic solution, we can add it as a class to the standard CSS file.

AlexSchroeder 2013-02-23 10:15 UTC

I hate the idea of passing through HTML. I think we should eradicate HTML from the Wiki (it would make the job of elwiki a lot easier).

So I’d revert that, personally.

(the nesting is one of the reasons I don’t believe in using HTML btw)

I think a better solution will involve changing the renderer for pre-formatted sections to:

  1. guess the content a bit better (look for start magic, other patterns?)
  2. look at length and truncate it in CSS if it’s too long (overflow)
  3. shade the background

I’m going to make tickets in elwiki and creole referencing this page.

NicFerrier 2013-02-23 11:51 UTC

If you paste the code to a separate page, all these issues are moot.

As for #1, you mean just like what you get when pasting files onto separate pages? Maybe ^\( means use Lisp highlighting? Perhaps you’d be better of using Gists?

Do you have an example for #2?

As for #3, something that looks like this? If not, can you provide some CSS?

AlexSchroeder 2013-02-23 12:08 UTC

I agree about pasting the code to a separate page and perhaps that’s the best way… but it’s more complex to the author.

  1. no, I mean when rendering the content in the page… note that creole does syntax rendering and stuff by guessing content type (well, currently by being told content type) - I think more guessing could be done. I don’t want to use gists, particularly, for the wiki. It’s another binding on another service.
  2. Setting “overflow: auto” on a pre and giving it a fixed height or width restricts the pre so it never gets bigger than that and you get scroll bars. It’s not ideal so doing it only for long shell scripts or things like that would be best.
  3. yes. just like that.

NicFerrier 2013-02-23 13:02 UTC

I added

.content pre {
    border: #777777 1px solid;
    padding: 0.5em;
    margin-left: 1em;
    margin-right: 2em;
    white-space: pre;
    background-color: #e6e6e6;
    color: black;
    overflow: auto;
    font-size: smaller;
    width: 120ex;

AlexSchroeder 2013-02-23 14:57 UTC

That looks better, still requires lots of scrolling but at least you can easily see where the scrolling stops.

NicFerrier 2013-02-23 15:02 UTC

I’m open to suggestions. I just don’t want to spend time on fiddling with this myself. I’m sure there’s a height-max or -moz-height-max or whatever. Try it, post it.

AlexSchroeder 2013-02-23 15:13 UTC

Hi, a suggestion for this page. Start with the big picture – why would one want to run emacs in a daemon? I landed on this page first in google trying to answer that question, and couldn’t find it here. I suggest putting an intro with something along the lines of:

Shawn shawn (at) weirdness (dot) com

– realscrappy 2014-05-12 18:58 UTC

“After that, using emacsclient (or emacsclient -t) will automatically start an emacs in daemon mode and connect to it if one is not found running, and sane programs will know to run emacsclient to start an editor.”

This point is debatable, and so makes the “Simple setup” misleading:

If the emacs daemon isn’t started, either by `emacs --daemon`, or by `M-x server-start` in emacs, then plenty of sane programs – for instance, most bash shells – will not start an editor. They will output, `emacsclient: can’t find socket; have you started the server?`.

– joseph8th 2016-01-19 03:43 UTC

Please make sure you contribute only your own work. IP numbers are made available via the page history. If you want to keep it a secret, you need to use Tor. See TextFormattingRules for how to format text. See StyleGuide for the suggested writing style on this wiki.

To save this page you must answer this question:

What is the greatest editor out there?