GithubHelp home page GithubHelp logo

ashton314 / amethyst Goto Github PK

View Code? Open in Web Editor NEW
115.0 8.0 8.0 2.09 MB

An elegant Emacs setup optimized for non-technical writers

License: GNU General Public License v3.0

Emacs Lisp 100.00%
emacs markdown minimal text-editor nordic

amethyst's Introduction

About Me

I'm picky about my programming languages—I like exploring new languages and technologies and learning what kind of trade-offs they offer. More about me on my blog.

I'm a PhD student at the University of Utah advised by Ben Greenman.

What are you interested in?

Right now I'm working on pushing the boundaries of what macro systems can do. I also enjoy writing compilers in Racket and tinkering with type systems. I frequently tweak my Emacs configuration, and occasionally do some light web development with Elixir.

Where do you work?

I work as a research assistant at the University of Utah. You can see my employment history on my résumé on my blog.

What's the deal with the username?

I picked this username when I was in high school. My biggest claim to fame back then was knowing 100 digits of pi, so I appended the first three digits to my username. ¯\_(ツ)_/¯

amethyst's People

Contributors

ashton314 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

amethyst's Issues

Suggestion

Suggestion: add company-mode to the kit.
It will atract more users.
By the way, I fixed the font issue jut changing it to "Source Code Pro"
Have you seen this classic video as well?
Emacs For Writers
https://youtube.com/watch?v=FtieBc3KptU

Great job!
Congrats.

You have to provide the font

It hangs, because the font is not provided with the config file.

set-face-attribute: Font not available: #<font-spec nil nil Input\ Mono nil nil nil nil nil 14.0 nil nil nil ((:name . "Input Mono 14") (:user-spec . "Input Mono 14"))>

Prefix variables and functions

Unlike racket, ELisp doesn't have namespaces unfortunately. The top-level is typically reserved for Emacs provided functions. Unfortunately, with a top-level global namespace you can run into issues without prefixing quite quickly.

The community has a convention of prefixing their functions with namespaces; double-dash for private functions and a single dash for public one. For example, straight might expose a function like straight--private-thingy and straight-public-thingy.

Two suggestions: use command keys, check for existence of fonts

@ashton314
Love the idea. I also use Emacs for prose writing (apart from coding Elisp). I feel that this avenue you are treading is under-explored and I would love to see how your approach (and rougier's) will evolve.

I was not sure if you wished to see suggestions coming as an "Issue"; if this is not appropriate, I apologize.

Two humble suggestions, if you would like others to use emacs-writer.

1. Use command keys for Quick Links

This format works even for Org Mode (it's a discovery for me, thanks to trying your scratch buffer. Thank you).

Paste .................. \\[yank]

This way, when CUA Mode is on, "Paste" (and others) will show the correct keybinding (see an image from my scratch buffer below).

image

2. Use (x-list-fonts font) for font existence check

I do not believe Fira Mono is common for non-programmers.
x-list-fonts can be used to check existence of a font. The idea is taken from the resource linked below.
It might be a good idea to put a check. If a font does not exist in the computer, I believe writer_entry.el will fail and may discourage non-technical users.

Source: https://github.com/kjhealy/emacs-starter-kit/blob/master/init.el#L44-L66

Don't use the `*scratch*` buffer for the splash screen.

Taking a quick glance over your code, you have a hack around which is meant to wait until the scratch buffer is loaded. This is because the scratch buffer isn't really meant for a custom splash screen; there's an easier way to do that for more fine-grained control.

Here is a snippet of code which you can copy and paste into your init.el to illustrate how to use the variable.

(defvar my-splash-buffer (get-buffer-create "*my splash*"))

(defun my-splash-screen ()
  (interactive)
  ;; `with-current-buffer` means everything inside
  ;; the block happens inside `my-splash-buffer`
  (with-current-buffer my-splash-buffer
    ;; We enter a nice message :)
    (insert "Hello")
    (newline)
    (insert "World")
    (newline)
    ;; Moves it back up to the start, no kludge needed!
    (goto-char (point-min))
    ;; Usually we inherit from `special-mode`, but anything is fine. Setting it to `read-only` is probably useful here though.
    (special-mode)
    ;; We return the my-splash-buffer for the next part
    (current-buffer)))

;; Switch the users to startup using it - the #' means we point
;; towards the appropriate function
(setq initial-buffer-choice #'my-splash-screen)

The relevant docs can be found using the web here or using info-lookup-symbol , normally bound to C-h S, under the symbol initial-buffer-choice.

Font error

git clone https://github.com/ashton314/emacs-writer.git
emacs -q -l writer_entry.el
Here's the error I get after running these commands:
set-face-attribute: Font not available: #<font-spec nil nil Input\ Mono nil nil nil nil nil 14.0 nil nil nil ((:name . "Input Mono 14") (:user-spec . "Input Mono 14"))>

Don't use inline lambdas for hooks

In this bit of code here, you're using an inline quoted lambda for hooks.

The issue with that, is that it tends to be quite hard to introspect the hook variable with describe-variable, usually bound to C-h v, or remove the hook with remove-hook.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.