Settings

Theme

GNU Emacs Theme Generator (beta)

elpa.gnu.org

62 points by surki 15 years ago · 22 comments

Reader

kleiba 15 years ago

Interesting timing: just two days ago, I spent a good part of my afternoon making "emacs -nw" running inside GNU screen to look more or less exactly the way my standard windowed Emacs looks. That included mostly fiddling with terminal settings and finding colors that are supported by the terminal and resemble my original choices (and some other tweaking here and there).

Now clickong on my Emacs icon on the desktop will open a new gnome-terminal that runs an Emacs inside screen -- it looks pretty much the same as it did before, but I can access and take over my current session remotely from home. As a matter of fact, the shortcut will actually first check if there's a detached screen session that runs emacs and ask me in a small dialog window if I want to re-attach to that session or start a new window.

Makes me happy.

Sorry if that post is of no interest at all to anyone else on HN but me...

  • surkiOP 15 years ago

    I use a similar setup with urxvt and stumpwm. In stumpwm I have

        ;; Launch emacs
        (defcommand emacs () ()
           (run-or-raise
            "urxvt -title emacs -e screen -U -dRR -S emacs -c ~/.screenrc.emacs"
          '(:title "emacs" :instance "urxvt" :class "URxvt")))
    
    which will launch emacs (or raise it if it was already launched).

    Some of the thing you might want to consider when doing "emacs -nw"

      - Make sure your TERM is exported appropriatly.
        Otherwise you may end up with less colors (M-x list-colors-display).
        Screen fiddles with TERM and emacs may end up supporting less colors.
    
      - Copy/Paste between regular X apps and the emacs will not work.
        You would need to use something like "xsel". See here [1]
    
      - Some of the keys may not work as expected. This will be 
        apparent especially when using orgmode. You may want to 
        remap them appropriately
    
    And also I suggest you use Emacs + Wanderlust setup for email (and put it in a screen session as well).

    [1] http://hugoheden.wordpress.com/2009/03/08/copypaste-with-ema...

    • kleiba 15 years ago

      Yes, these points are exactly the ones you have to pay attention to when running -nw. For instance, I run

          gnome-terminal -x /bin/bash -c /usr/bin/screen
      
      instead of

          gnome-terminal -x /usr/bin/screen
      
      directly, or else I get less than 256 colors (although more than 8).

      Copy/Paste works fine for me in so far as that is one of the few things I use the mouse for. (I guess, in a lot of case you use the mouse anyway to select the text you'd like to copy.)

      Remapping some keys is indeed necessary. In particular, GNU screen's standard escape key sequence is C-a, which in Emacs a lot of people probably prefer to be bound to (move-beginning-of-line). But also within Emacs some keys may need to be bound using input-decode-map.

      As for your launcher, one thing I did differently is that my start script does not automatically re-attach to a detached screen session, but will show me a dialog window where I can select the one thing or the other. The reason for this is that I often keep a few Emacsen running in parallel for a long time, each of which is dedicated to a different aspect of my work. If I detach one session it is not always the case that I want to continue there the next time I open a new Emacs. Also, if more than one Emacs is detached I'd like to be able to say which one I want to re-attach to.

      I looked at wanderlust a few years ago when I was looking for an IMAP-compatible email client for Emacs but in the end I wasn't convinced by it. Can't remember, though, what I didn't like about it, perhaps I should give it another chance.

      • surkiOP 15 years ago

        Probably you are using x selection buffer for copy/paste. But if you want to pick up stuff from X "clipboard" buffer, you would need xsel or something like that.

        Wanderlust is quite usable now. I use it everyday(I have my gmail and exchange server(imap) accounts managed in it). You should give it another try sometime.

  • reedlaw 15 years ago

    That was interesting to me because today I also spent some time tweaking Emacs to make it work more like Textmate.

hexis 15 years ago

I don't see any colors other than black and white in the theme on Chrome 10 on Snow Leopard, but I do see bold, underline, italics. I see the colors on Firefox 4 beta on Snow Leopard.

sielskr 15 years ago

I would rather have an Emacs that offers fewer choices but looks good out of the box.

Example: the software supplied by Apple with a Mac does not have any themes except for the choice between Blue (colorful) and Graphite (subdued) in the Appearance system preference pane.

OTOH, I regularly have to wait for the software supplied by Apple and I almost never wait for Emacs.

  • jamesbritt 15 years ago

    "Example: the software supplied by Apple with a Mac does not have any themes except for the choice between Blue (colorful) and Graphite (subdued) in the Appearance system preference pane."

    Both of which I find strikingly unattractive. Overall, I find the OSX UI annoying to use, and the relatively lack of choices in things doesn't help.

    I like the idea of a useful out-of-the-box set of defaults, but that should prevent offering users options to tweak to their hearts' content.

  • jpr 15 years ago

    By waiting, do you mean wait for the release, or wait because the software is busy doing something?

    • sielskr 15 years ago

      Wait because the software is busy. E.g. OS X's spinning beach ball.

      (Emacs is single-threaded, but so is a Unix shell.)

nixme 15 years ago

I recommend using senny's theme-roller.el [1] to automatically apply your color theme to any new faces. Brings some sanity to the number of colors that need to be defined.

[1] https://github.com/senny/theme-roller.el

naner 15 years ago

Here's a couple more:

http://alexpogosyan.com/color-theme-creator/

http://inspiration.sweyla.com/code/

t0mas 15 years ago

There's a similar tool at http://color-theme-select.heroku.com it's also in beta, allowing to generate custom themes and select from a large collection of them. I've contacted the author to see if he's fixing the "generate emacs-lisp" feature.

Would be nice people could use that tool to create themes for emacs 24, and send them to emacs-devel.

almost 15 years ago

Here's an awesome theme: http://blog.nozav.org/post/2010/07/12/Updated-tangotango-ema...

prewett 15 years ago

Is there any cc-mode generator like this? I spent a couple days trying to tweak mine a while back, but try as I might, my comments still want to align all the way left.

jcw 15 years ago

I have a half-written xterm color scheme generator lying around. Has this also been already made, or is it worth finishing?

moondowner 15 years ago

I would like to see something like this for NetBeans.

reader5000 15 years ago

Use -nw and get your terminal's theme for free!

  • pyre 15 years ago

    What about a 256-color theme for 256-color terminals (or 88-color for 88-color terminals for that matter).

  • jrockway 15 years ago

    Not really. Seeing as how I have a terminal that's newer than 1985, Emacs displays the same colors with -nw as it does with the windowed version.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection