Code Monkey home page Code Monkey logo

emacs-elisp-programming's Introduction

Emacs In a Box

Emacs - Elisp Programming and Customization

Overview

Emacs doesn’t need any presentation. Emacs is a software “Lisp Machine” that provides a programmable text editor, email reader, text web browser, image viwer, calculator, shell, games, easter-eggs and more. Emacs is programmed in Elisp, an Emacs own lisp dialect that is based on MacLisp, one of oldest lisp dialects, older than Common Lisp and Scheme, created in MIT. Emacs was written in 1976 by the legendary Richard Stallman. Despite many incompatibilities with Common Lisp it has many constructs similar to it and n excellent book about Common Lisp that is also useful to understand Elisp and Scheme is On Lisp - by Paul Graham.

Repository Link

Note:

  • It is a work in progress.
  • You can see this document inside Emacs since it was converted to org-mode, see the file README.org. It can also be exported to html, pdf, github markdown and so on.

Configuration File

The user configuration file, which is executed when Emacs starts, is stored in the directory ~/.emacs.d/init.el or ~/.emacs. The first one is better because it is in the same directory of all emacs configuration files.

The Emacs scratch buffer can be used to test new features and try Emacs codes along with IELM - Emacs Lisp interactive shell.

Emacs Features

  • Run in GUI or in terminal.
  • Programmable “text editor” (Lisp Machine)
  • Support to many programming languages
  • Can run shells and interpreters inside Emacs.
  • Highly customizable
  • Easy task automation
  • Package manager
  • Multiple OS support
  • Remote file editting through ssh. (Tramp mode)
  • Keyboard macros
  • Utilities
    • Calculator
    • Eshell
    • Tramp-mode - Edit remote files and edit as super user (sudo).
    • Shells
    • File manager (dired-mode)
    • Git interface (magit)

Objectives

  • Increase Emacs API discoverability;
  • Empower Emacs users to create their own extensions and customization;
  • Provide self-contained working examples about Emacs API and Elisp programming.
  • Unleash all Emacs potentials.

Contents

Elisp Programing

Key bindings / shortcuts

Settings and Packages

Emacs Utilities

Miscellaneous

  • Eshell Eshell - Multi-platform unix shell written in Elisp highly integrated with Emacs and with several platform independent shell commands such as ls, pwd, cp, mv implemented in Elisp.
  • Bookmarks - Emacs bookmarks to Wikis, tutorials, videos, codes and etc.

Future Work

  • [ ] Comint Mode / interacting with REPLs and subprocesses
  • [ ] Network API - Interacting with servers.
  • [ ] Add cross references
  • [ ] Emacs Widget Interfaces and Emacs User Interfaces
  • [ ] Add more examples about org-mode API.
  • [X] Add a better layout.

Downloading it

Download manually

Automated download

curl -L https://github.com/caiorss/Emacs-Elisp-Programming/archive/gh-pages.zip -o elisp.zip
unzip -e elisp.zip 
rm -rf elisp.zip
mv Emacs-Elisp-Programming-gh-pages Emacs-Elisp-Programming
firefox Emacs-Elisp-Programming/index.html &

View the extracted repository contents:

$ ls Emacs-Elisp-Programming/
images/                       Elisp_Snippets2.org            index.html
theme/                        Elisp_Snippets.html            Keybindings.html
Customization.html            Elisp_Snippets.org             Keybindings.org
Customization.org             Emacs_Key_Bindings_Elisp.html  README.org
Development_Environment.html  Emacs_Key_Bindings_Elisp.org   Resources.html
Development_Environment.org   Emacs_On_Windows.html          Resources.org
Elisp_Programming.html        Emacs_On_Windows.org           Utilities.html
Elisp_Programming.org         Eshell.html                    Utilities.org
Elisp_Snippets2.html          Eshell.org

emacs-elisp-programming's People

Contributors

caiorss avatar enisozgen avatar goosetherumfoodle avatar hhnr avatar nashamri avatar rongyi avatar xuchunyang 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  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

emacs-elisp-programming's Issues

key missing?

in section
Key Bindings by Task
2-Buffers
C-x Move to next buffer
C-x Move to previous buffer

after C-x missing key LEFT/RIGHT ?

Good work

Good work :)
But, no updates?

I tried to convert Elisp_Programming.org to pdf,
But could not succeed :(

Alist example not quite right

Hi,

Yr function plist->alist creates a list of lists rather than a list of cons cells. Should be something like:

(defun plist->alist (plist)
  (if (null plist)
      '()
      (cons
       (cons (car plist) (cadr plist))
      (plist->alist (cddr plist)))))

---Fran

How to edit and return string in Emacs Lisp?


(defun buffer-out ()
  (interactive)
  (let ((buffer (current-buffer))
	(value (buffer-string)))
    (kill-buffer buffer)))

(defun buffer-string-out ()
  (interactive)
  (buffer-string))

(defun edit-string (string)
  (interactive)
  (let ((buffer "*edit-string*"))
    (get-buffer-create buffer)
    (switch-to-buffer buffer)
    (set-buffer buffer)
    (let ((inhibit-read-only nil))
      (insert string)
      (fundamental-mode)
      (local-set-key (kbd "C-c C-c") 'buffer-out))))

;;      (add-hook 'kill-buffer-hook 'buffer-string-out))))

(setq ok (edit-string "OK"))

I am trying to get this work, could you point me to a solution to edit string, and return the string back?

(position) not defined

Does (position) need to be defined by some library?

ELISP> (position 2 '(5 6 7 8))
*** Eval error ***  Symbol's function definition is void: position

I'm using emacs version 24.4.90.1

Example of "1.6.6 Functions with Property List argument" need to be corrected

(defun make-shell-interface (&rest params)
 
 ;;<snip>
  (let
       ((name   (plist-get params :name ))
        (type   (plist-get params :type))
        (path   (plist-get params :path))
        (buffer (plist-get params :buffer)))
    (list
     (cons 'name buffer) ;; <== should be (cons 'name name)
     (cons 'type type)
     (cons 'path path)
     (cons 'buffer buffer))))

Change the following line from

(cons 'name buffer)

to

(cons 'name name)

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.