Emacs help interface for languages other than emacs-lisp

I love the emacs help interface with C-h; it makes hacking emacs lisp really fast and fluid.

Is there a way to get a similar interface for other languages? Does helm support sth like this?

I use selectrum though, but I would love a workflow for other languages that is just like the emacs-lisp hacking workflow.

πŸ‘︎ 27
πŸ’¬︎
πŸ‘€︎ u/avindroth
πŸ“…︎ Jan 07 2022
🚨︎ report
plotting tools to use in emacs-lisp code

Is there a plotting tool written in emacs-lisp? Basically, I am trying to plot values generated by emacs-lisp code within an Emacs package.

πŸ‘︎ 13
πŸ’¬︎
πŸ‘€︎ u/mdarifs
πŸ“…︎ Jan 18 2022
🚨︎ report
tcl/tk support in emacs lisp script ?

I'm going to replace all my local scripts (perl, python, shell) with emacs lisp.

But I'm now getting stuck at replacing my perl tcl/tk program (Tkx library) with emacs lisp.

Any idea?

πŸ‘︎ 3
πŸ’¬︎
πŸ‘€︎ u/alphatan_ad
πŸ“…︎ Jan 19 2022
🚨︎ report
Daniils Petrovs: Creating universal Emacs Lisp packages and scripts danpetrov.xyz/emacs/lisp/…
πŸ‘︎ 27
πŸ’¬︎
πŸ‘€︎ u/iDan122
πŸ“…︎ Jan 16 2022
🚨︎ report
Work-in-progress infographic slides for Emacs Lisp Community Workshop
πŸ‘︎ 184
πŸ’¬︎
πŸ‘€︎ u/TheOfficialDTO
πŸ“…︎ Dec 10 2021
🚨︎ report
Emacs Lisp - Need help stepping through function code

Hi all, I'm butting my head against a wall here and I'm dying for some help.

I'm trying to step through the code of a lisp function. To simplify this problem, I'm just doing it with a custom hello-world function. I'm looking at these manual pages for guidance:

Entering the Debugger on a Function Call

Using the Debugger

Backtraces

So, following those pages, I:

Define the hello world function in my init.el

;; This is the ONLY thing in my init.el for now,
;; to try to remove any other possible points of failure.
(defun hello-world ()
  (message "Hello world")
  (interactive))

Open emacs and set a breakpoint on the function

M-x debug-on-entry
Debug on entry to function: hello-world

Run the hello world function

M-x hello-world

A Backtrace buffer opens up. It displays

Debugger entered--entering a function:
* hello-world()
  funcall-interactively(hello-world)
  call-interactively(hello-world record nil)
  command-execute(hello-world record)
  execute-extended-command(nil "hello-world" "hello-world")
  funcall-interactively(execute-extended-command nil "hello-world" "hello-world")
  call-interactively(execute-extended-command nil nil)
  command-execute(execute-extended-command

I would expect to run the commands from Backtraces manual page, like 'n' in order to advance to the next line. But I'm getting an 'n is undefined'. What am I missing here exactly?

πŸ‘︎ 3
πŸ’¬︎
πŸ‘€︎ u/brisk187
πŸ“…︎ Jan 10 2022
🚨︎ report
Emacs Lisp Community Workshop, Videos 1 and 2

The first two sessions are now ready as videos on YouTube:

In each session we go over the basics of Emacs Lisp and work toward solving day to day problems. More to come!

πŸ‘︎ 21
πŸ’¬︎
πŸ‘€︎ u/TheOfficialDTO
πŸ“…︎ Jan 23 2022
🚨︎ report
Eoops: An Object-Oriented Programming System for Emacs-Lisp (1992) [PDF] 3e8.org/pub/scheme/doc/li…
πŸ‘︎ 14
πŸ’¬︎
πŸ‘€︎ u/dharmatech
πŸ“…︎ Dec 22 2021
🚨︎ report
I've finally started using Emacs Lisp!

I have been using Emacs for many years. Thanks to the fantastic introduction to ELisp, I knew enough to "configure" Emacs. For some reason only recently have I started actually thinking about how I can make my computer-life easier; and Emacs is the one tool which poses least resistence when I try to.

I am kinda mad at myself for not doing this sooner, but also very happy that I finally did. I didn't know where else to share this :-)

In last few days, I have written 2 small bits of Elisp code (which took me embarassingly long to write, but the exercise was very rewarding).

  1. First was publishing org subtrees as github issues; so I can stay in org-mode where I am very comfortable thinking and documenting my thoughts, and also push them to Github for colleagues. I can mark an issue as "DONE" and it closes the github issue, or change its content, or labels.
  2. And a few minutes ago I wrote a little code to insert my org-roam notes as rust documentation comments

It's not much, but it is honest work and I am happy I am finally doing it.

Quick demo of #2

πŸ‘︎ 100
πŸ’¬︎
πŸ‘€︎ u/verticaleyes
πŸ“…︎ Dec 09 2021
🚨︎ report
I've ported enough of Coalton to Emacs Lisp to be able to execute #'id asciinema.org/a/T2WxxijLz…
πŸ‘︎ 9
πŸ’¬︎
πŸ“…︎ Jan 03 2022
🚨︎ report
Emacs Lisp book is finished mbork.pl/2021-11-06_The_E…
πŸ‘︎ 224
πŸ’¬︎
πŸ‘€︎ u/filipoi
πŸ“…︎ Nov 09 2021
🚨︎ report
compile-media: Emacs Lisp functions for compiling media files using ffmpeg github.com/sachac/compile…
πŸ‘︎ 3
πŸ’¬︎
πŸ‘€︎ u/fakecreditcard
πŸ“…︎ Jan 30 2022
🚨︎ report
How to install org-mode now that Org Emacs lisp Package Archive is deprecated?

I paradox-upgrade-packages yesterday and now my I'm constantly getting the message:

 IMPORTANT: please install Org from GNU ELPA as Org ELPA will close before Org 9.6

The startup is insanely long, because I suppose for each single open org-mode file it tries to communicate with the server and all I get is that IMPORTANT message.

https://orgmode.org/elpa.html says the archive will be deprecated, but not what is the proper replacement.

My current year-long setup is:

(add-to-list 'package-archives '("org" . "http://orgmode.org/elpa/") t)
    (use-package org
  :ensure org-plus-contrib :pin org
  :commands (org-mode org-capture org-agenda orgbl-mode)
  :bind ("C-c l" . org-store-link)
  :init
  ;; (package-initialize 'org)
  ;; org settings
  (load "~/.emacs.d/settings/settings-org.el"))

Thank you.

πŸ‘︎ 28
πŸ’¬︎
πŸ‘€︎ u/suhrob
πŸ“…︎ Nov 24 2021
🚨︎ report
Daniils Petrovs: Creating universal Emacs Lisp packages and scripts danpetrov.xyz/emacs/lisp/…
πŸ‘︎ 15
πŸ’¬︎
πŸ‘€︎ u/fakecreditcard
πŸ“…︎ Jan 15 2022
🚨︎ report
Emacs Lisp Community Workshop youtube.com/watch?v=VkNe-…
πŸ‘︎ 3
πŸ’¬︎
πŸ‘€︎ u/fakecreditcard
πŸ“…︎ Jan 25 2022
🚨︎ report
Advent of Code 2021 with Emacs Lisp

Hey all!

>Advent of Code is an Advent calendar of small programming puzzles for a variety of skill sets and skill levels that can be solved in any programming language you like. People use them as a speed contest, interview prep, company training, university coursework, practice problems, or to challenge each other.

It would be a good way to practice your Elisp Skills.

=== Leaderboard Join Code ===

1542671-a358c365

πŸ‘︎ 20
πŸ’¬︎
πŸ“…︎ Nov 30 2021
🚨︎ report
Emacs TIL: Idea: Get AI to write lisp! emacstil.com/til/2022/01/…
πŸ‘︎ 4
πŸ’¬︎
πŸ‘€︎ u/fakecreditcard
πŸ“…︎ Jan 16 2022
🚨︎ report
Building an Emacs lisp virtual machine in Rust coredumped.dev/2021/10/21…
πŸ‘︎ 99
πŸ’¬︎
πŸ‘€︎ u/celeritasCelery
πŸ“…︎ Oct 21 2021
🚨︎ report
emacs-lisp: Exercism exercises in Emacs Lisp. github.com/exercism/emacs…
πŸ‘︎ 3
πŸ’¬︎
πŸ‘€︎ u/fakecreditcard
πŸ“…︎ Jan 09 2022
🚨︎ report
Common lisp format in emacs lisp

Is there an equivalent of cl's format specifiers in emacs lisp?
I haven't found anything like `cl-format` in `cl-lib`?

Is this just not implemented or is it planned to be done at some point?

πŸ‘︎ 6
πŸ’¬︎
πŸ‘€︎ u/elgalloitaliano
πŸ“…︎ Dec 14 2021
🚨︎ report
Emacs Lisp on Exercism exercism.org/tracks/emacs…
πŸ‘︎ 17
πŸ’¬︎
πŸ‘€︎ u/fakecreditcard
πŸ“…︎ Jan 09 2022
🚨︎ report
My major-mode for PHP, phps-mode, now has a built-in PHP 8.0 Parser written entirely in Emacs-Lisp

First I tried generating a LALR(1) parser via Wisent parser generator but it lacks support for some of the features of the PHP grammar so then I started reading books about parsing and constructed a parser-generator library for Emacs. I used this to automatically parse the official PHP YACC grammar and convert into into a format supported by my parser-generator library and export a Canonical LR(1) Parser in Emacs-Lisp for phps-mode.

In the future I have planned to use this parser to build semantic data, bookkeeping of symbols and build the imenu index. It would be pretty easy to use the parser to transpile PHP to almost anything. My major-mode is in GNU ELPA

https://github.com/cjohansson/emacs-phps-mode

πŸ‘︎ 45
πŸ’¬︎
πŸ‘€︎ u/chrinto
πŸ“…︎ Nov 02 2021
🚨︎ report
Marcin Borkowski: The Emacs Lisp book - looking back and into the future mbork.pl/2022-01-03_The_E…
πŸ‘︎ 7
πŸ’¬︎
πŸ‘€︎ u/fakecreditcard
πŸ“…︎ Jan 03 2022
🚨︎ report
Sacha Chua: Defining generic and mode-specific Emacs Lisp functions with cl-defmethod sachachua.com/blog/2022/0…
πŸ‘︎ 5
πŸ’¬︎
πŸ‘€︎ u/fakecreditcard
πŸ“…︎ Jan 02 2022
🚨︎ report
Help me translate this Python/C# code to Emacs Lisp

Hello all! I'm learning emacs lisp and getting used to the language. Yesterday I was trying to write a function to build and execute a shell command that I type frequently, to backup some of my files to google drive. I could make it work by hardcoding the commands, but as a learning exercise, I decided to try some fancy, overengineered stuff, to see if I can incorporate what I'm thinking in Elisp.

Well, I couldn't. I still get confused with the function/var namespace separation, and the multiple ways I can declare things (let, letf, flet, defalias, ...). When to use lambda functions or just quoted expressions. If I should use partial application or just macros (like the threading ones). Etc.

What I wanted to write is something like this:

Given a list of file paths:

  1. "Duplicate" each

  2. Prepend the local root directory to one part

  3. Prepend the remote root directory to the other

  4. If the remote (second) path is a file, transform it to its directory name*

  5. Build the shell command for each file rclone copy local_path remote_dir_path

  6. Concatenate all commands with ;

  7. Execute (print) them

*because rclone's copy command requires a directory as destination.

In Python, I could write something like this:

  from os import path

  files = ['org/', 'pictures/image1.png', 'pictures/image2.png', 'readme.md']

  build_prepend_function = lambda prefix: lambda str: prefix + str
  prepend_local_root = build_prepend_function('~/')
  prepend_remote_root = build_prepend_function('d:macbook/')
  extract_dir_path = lambda file: \
      file if file.endswith(path.sep) else path.dirname(file)

  build_move_to_remote_shell_command = lambda file: \
      'rclone copy {} {}'.format(prepend_local_root(file),
                                extract_dir_path(prepend_remote_root(file)))

  commands = (build_move_to_remote_shell_command(file) for file in files)
  script = ';'.join(commands)

  print(script)

I can even translate it to C#:

  using System.IO;

  var files = new List<string> {
      "org/", "pictures/image1.png", "pictures/image2.png", "readme.md"
  };

  Func<string, Func<string, string>> buildPrependFunction = prefix => str => $"{prefix}{str}";
  Func<string, string> prependLocalRoot = buildPrependFunction("~/");
  Func<string, string> prependRemoteRoot = buildPrependFunction("d:macbook/");
  Func<string, stri
... keep reading on reddit ➑

πŸ‘︎ 8
πŸ’¬︎
πŸ‘€︎ u/kromobrn
πŸ“…︎ Nov 23 2021
🚨︎ report
Is there an "Emacs Lisp Exercise of the Day" or equivalent?

I'd like to get very good at emacs lisp, but I'm usually at a loss about what I can do when I want to practice Elisp. What I've been doing so far definitely hasn't been working (implementing a function here or there, going through the EINTR and emacs list manual, looking up things online.)

What's worked well for my learning style is to have a "question of the day" programming challenge, where the poster posts their own implementation of a programming problem the next day.

Does anyone know of something like this for elisp?

Thanks

πŸ‘︎ 47
πŸ’¬︎
πŸ‘€︎ u/gollyned
πŸ“…︎ Oct 07 2021
🚨︎ report
Sacha Chua: Defining generic and mode-specific Emacs Lisp functions with cl-defmethod sachachua.com/blog/
πŸ‘︎ 3
πŸ’¬︎
πŸ‘€︎ u/fakecreditcard
πŸ“…︎ Jan 02 2022
🚨︎ report
Testing on the Emacs Lisp track | Exercism's Docs exercism.org/docs/tracks/…
πŸ‘︎ 4
πŸ’¬︎
πŸ‘€︎ u/fakecreditcard
πŸ“…︎ Jan 09 2022
🚨︎ report
TAONAW: Learning Emacs Lisp helpdeskheadesk.net/help-…
πŸ‘︎ 6
πŸ’¬︎
πŸ‘€︎ u/fakecreditcard
πŸ“…︎ Dec 21 2021
🚨︎ report
My zoo of Lisps: Emacs Lisp, Chicken, ECL, Hy, newLISP, Janet, Joker
πŸ‘︎ 100
πŸ’¬︎
πŸ‘€︎ u/zabolekar
πŸ“…︎ Sep 12 2021
🚨︎ report
[pdf] Eoops: An Object-Oriented Programming System for Emacs-Lisp 3e8.org/pub/scheme/doc/li…
πŸ‘︎ 3
πŸ’¬︎
πŸ‘€︎ u/fakecreditcard
πŸ“…︎ Dec 23 2021
🚨︎ report
Have always fantasized about writing an Emacs-like editor. What would be a good language (apart from LISP)?

I have always wanted to write a completely hackable text editor which can be changed on the fly. I feel Emacs is the best when it comes to that.

While I may start someday, what would be a good language to write it in? In my limited knowledge, the language should have the following properties:

  1. It should be interpreted, not compiled
  2. It should have fast execution speed
  3. It should have good GUI-building capabilities
  4. It should be backward compatible

While many may suggest python, would that be good enough? I've heard it has slow execution speed and is not af all backward compatible. I could be wrong.

Also, I believe the first step to writing such an editor would be writing an interpreter for the language in C/C++ and then writing the editor in that interpreted language? Isn't that how Emacs is written?

I would really like your inputs. I know the question is really broad but I guessed Emacs veterans on this sub would be best qualified to answer my questions. BTW what do you guys think of TCL/TK?

Edit: thank you guys for all your suggestions. When (and if) I start this project, I will definitely keep your suggestions in mind. Thank you!

πŸ‘︎ 16
πŸ’¬︎
πŸ“…︎ Oct 16 2021
🚨︎ report
A Novel Common Lisp Emacs Configuration

Has anyone ever tried programming their Emacs configuration purely in Common Lisp?

Perhaps by using an ad-hoc Common Lisp -> Emacs Lisp transpiler?

Are there any tools that relate to something like this?

Or is there nothing interesting to be seen about an idea such as this?

πŸ‘︎ 8
πŸ’¬︎
πŸ“…︎ Dec 12 2021
🚨︎ report
Emacs with Nyxt: extend your editor with the power of a Lisp browser nyxt.atlas.engineer/artic…
πŸ‘︎ 16
πŸ’¬︎
πŸ‘€︎ u/jmercouris
πŸ“…︎ Dec 01 2021
🚨︎ report
Emacs Lisp native compiler, current status and future developments - Andrea Corallo | EmacsConf 2021 toobnix.org/w/aCnFuNEzX1k…
πŸ‘︎ 15
πŸ’¬︎
πŸ‘€︎ u/fakecreditcard
πŸ“…︎ Dec 09 2021
🚨︎ report
Emacs with Nyxt: extend your editor with the power of a Lisp browser - Andrea | EmacsConf 2021 toobnix.org/w/qBpVxaayFez…
πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/fakecreditcard
πŸ“…︎ Dec 11 2021
🚨︎ report
Watching a Model Train (Lisp, neural networks, Emacs. And low-tech) lisp-univ-etc.blogspot.co…
πŸ‘︎ 40
πŸ’¬︎
πŸ‘€︎ u/dzecniv
πŸ“…︎ Oct 15 2021
🚨︎ report
Mattias EngdegΓ₯rd makes an interesting discovery about the Emacs Lisp bytecode interpreter, and ERT tests lists.gnu.org/archive/htm…
πŸ‘︎ 63
πŸ’¬︎
πŸ‘€︎ u/github-alphapapa
πŸ“…︎ Sep 20 2021
🚨︎ report
Old McCarthy Had a Form: A discussion of EIEIO, and learn how it can help you write more modular, flexible Emacs Lisp. - Ian Eure | EmacsConf 2021 toobnix.org/w/mcyaNMBE1Qp…
πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/fakecreditcard
πŸ“…︎ Dec 08 2021
🚨︎ report
Setting Up Emacs for Lisp (SBCL)

Hi all,

  1. I have got slime working and can write basic programs such as the following:

https://preview.redd.it/7wpqwnplv3m71.png?width=1810&format=png&auto=webp&s=269dd8aeb31d2c7751687f861a3bb5cebd3ffe2b

However, I want to be able to compile and run .lisp files like I can with python (for example: python main.py).

As good as the repl is, I want to just write my test cases in a file and just execute the functions as many times as I want.

  1. What other stuff can I add to emacs to jazz up the lisp development experience. At the moment it is sorely lacking. Paredit is but syntax highlighting in my basic setup is minimal.
πŸ‘︎ 24
πŸ’¬︎
πŸ‘€︎ u/mythical_synth
πŸ“…︎ Sep 07 2021
🚨︎ report
Teaser: A php parser and company backend in emacs lisp

Hey emacsers. Yesterday I finished a first prototype of phpinspect.el. It's a project of mine that has been sitting unfinished in my dotfile repo for years. This weekend I decided to see if I could get it in a working state as I have to write a lot of PHP in the near future.

My problem with LSP mode and php language servers has been that they try to parse and cache every single file in your entire project. I have had php-language-server die on me with memory leaks from indexing an enterprise application with 1000s of classes and trying to keep it all in memory. phpinspect.el only parses files on an as-needed basis, kind of like the php autoloader, and keeps its cache in a global variable which you can unset to purge it.

If enough people are interested I intend to do some cleanup, write some tests and release the code somewhere for anyone to use and contribute to. Let me know what you think :).

Demo vid: https://www.youtube.com/watch?v=pz7N2hTbLYw

( don't mind the log buffer on the right, it's not auto-scrolling)

What works:

  • Parsing php code and creating a syntax tree
  • lexing that syntax tree into datastructures that represent classes and their attributes
  • Detection of variable types through phpdoc or derived from assignment return types
  • Detection of function parameter types from typehints or phpdoc
  • Detection of function return types from typehints or phpdoc
  • Detection of derived class attributes from extending classes or implementing interfaces
  • Detection and completion of class methods and variables
  • Detection and completion of variable names in the current code block

What doesn't work (yet):

  • Functions outside of classes can be parsed, but aren't used for anything yet.
  • traits
  • Anonymous classes (but why though)
  • parsing mixed php/html templates.
  • php 8 class attribute typehints
  • fancy assignment syntax like list ($var1, $var2) =
  • probably more edge cases I haven't thought of yet

edits: formatting

edit: Parsing mixed php/html templates actually works. It's been a while since I looked at the parser logic so I didn't remember, but it's in there and it seems to work from what I have been able to test out :).

edit (15 sep 2021) : I have just now posted link to the source repository here: https://www.reddit.com/r/emacs/comments/popk83/update_phpinspectel_php_parsercompletion/

πŸ‘︎ 30
πŸ’¬︎
πŸ‘€︎ u/hugotty1
πŸ“…︎ Aug 30 2021
🚨︎ report
ap.el: A simple, Emacs Lisp-focused Emacs config github.com/alphapapa/ap.e…
πŸ‘︎ 13
πŸ’¬︎
πŸ‘€︎ u/github-alphapapa
πŸ“…︎ Sep 22 2021
🚨︎ report
A lightweight systemd replacement written in Emacs lisp github.com/a-schaefers/sy…
πŸ‘︎ 51
πŸ’¬︎
πŸ‘€︎ u/nixcraft
πŸ“…︎ Sep 07 2021
🚨︎ report
Can you embed Emacs Lisp in other projects?

Is it possible?

Is any project doing it?

Are there any case studies or repositories to look at?

πŸ‘︎ 5
πŸ’¬︎
πŸ‘€︎ u/BlessedXChilde
πŸ“…︎ Sep 23 2021
🚨︎ report
Inspector for Emacs Lisp (WIP) github.com/mmontone/emacs…
πŸ‘︎ 39
πŸ’¬︎
πŸ‘€︎ u/mmontone
πŸ“…︎ Aug 16 2021
🚨︎ report
An Introduction to Emacs Lisp youtube.com/watch?v=2z-YB…
πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/fakecreditcard
πŸ“…︎ Dec 02 2021
🚨︎ report
Building an Emacs lisp VM in Rust coredumped.dev/2021/10/21…
πŸ‘︎ 31
πŸ’¬︎
πŸ‘€︎ u/_oats
πŸ“…︎ Oct 21 2021
🚨︎ report

Please note that this site uses cookies to personalise content and adverts, to provide social media features, and to analyse web traffic. Click here for more information.