I’m a new emacs user and I’ve been using doom emacs for a while now and i’m willing to learn Elisp, but found out that it might not be as easy as it might seem at first, because as i found out, lisp is quite different from other programming languages that i’m used to, especially knowing that i’m not a programmer by any means and my programming knowledge is very little, not mentioning that elisp is pretty old so the learning resources might not be as much as other more popular programming languages

so my question is, Is it worth it?

like what is the level of mastery do i need to achieve to start implementing custom elisp in my configs to enhance my emacs experience?

and how exactly can i improve my emacs experience if i learned elisp?

in other words, how rewarding it would be

  • WatermellonSugar@alien.topB
    link
    fedilink
    English
    arrow-up
    3
    ·
    1 year ago

    Lisp and Scheme are marvelous 60s-70s hippie acid-head languages. “Hey, let’s use a small set of primitives and treat code and data the same and we can run huge worlds with a tiny, recursive interpreter!”

    By the time you get to Emacs though, many huge worlds have been built, and navigating the huge world(s) that small set of primitives has created can be…uh…daunting – both because of 1000s of people’s contributions and because of the weight of history (e.g. booleans are “predicates” – from calculus – thus all the “_p” names).

    That said, at it’s core, it’s elegant and lovely.

    https://preview.redd.it/g641rtwx502c1.jpeg?width=640&format=pjpg&auto=webp&s=1d6fe005a93830eb624d5fd0324ae97c84135f86

  • 7890yuiop@alien.topB
    link
    fedilink
    English
    arrow-up
    2
    ·
    1 year ago

    If you’re sold on sticking with Emacs, then learning elisp will unquestionably pay dividends, and the more you learn the more you’ll be able to do (but you don’t need to understand everything in order to do anything).

    and how exactly can i improve my emacs experience if i learned elisp?

    That’s the thing – it’s up to you. The ability to “scratch any itch” is what elisp give you. That doesn’t mean any given thing is easy to do (although it might be) but, to a significant extent, if you can identify a problem then implementing a solution is also a possibility.

  • nv-elisp@alien.topB
    link
    fedilink
    English
    arrow-up
    2
    ·
    1 year ago

    so my question is, Is it worth it?

    It’s worth more than a bunch of other people’s opinions.

  • chris_thoughtcatch@alien.topB
    link
    fedilink
    English
    arrow-up
    2
    ·
    1 year ago

    “i’m not a programmer by any means” what do you use Emacs for? (sincere question, I know non-programers use Emacs)

  • MitchellMarquez42@alien.topB
    link
    fedilink
    English
    arrow-up
    2
    ·
    1 year ago

    Yes. It’s worth it.

    If you’ve ever tweaked your Doom config, you’re already writing elisp. Going from setting options to writing new modes will certainly take time, but lisp is a language that builds on itself.

    In fact, Emacs+elisp is one of the best systems for learning by doing. C-h f, C-h v, C-x C-e, etc will get you far. The built in tutorial is absolutely worth going thru, and understanding lisp will improve your understanding of other languages as well.

    • _Lycea_@alien.topB
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      There is a buildin tutorial ? where can I find it , since I also would love to get started learning more elisp!

      • spauldo@lemmy.ml
        link
        fedilink
        English
        arrow-up
        1
        ·
        edit-2
        1 year ago

        There’s a tutorial for using Emacs - the key combination to enter the tutorial is on the welcome screen (I think it’s “CTRL-h t” but I don’t have it in front of me). It doesn’t cover elisp.

        There are two elisp manuals available via the info system (CTRL-h i), a reference manual and an introductory text. They’re also available in other formats and are online as well. The reference manual is kept current with every release. I’m not sure about the introductory text, but the core of elisp hasn’t changed (I think) since lexical scoping was made the default several years ago.

        Edit: added availability of manuals in non-info formats.

  • sleekelite@alien.topB
    link
    fedilink
    English
    arrow-up
    2
    ·
    1 year ago

    It’s sort of a silly question.

    To customise emacs beyond clicking around in ‘customise’ you need to write elisp. If you learn little elisp then you can only customise it using other people’s code, if you learn a lot of it then you can write an mua.

    You decide where you want to be on that spectrum.

  • codemuncher@alien.topB
    link
    fedilink
    English
    arrow-up
    2
    ·
    1 year ago

    Elisp isn’t just a programming language it’s an execution environment and it doesn’t make a lot of sense to consider them separately.

    For example the largest abstraction in elisp is the buffer. A lot of core language features revolve around and are greatly modified by the buffer. For example variable bindings can typically be overrides in buffer-local variables.

    Furthermore there’s a lot of editor specifics that are interesting. Text properties are the least of which. Buffer narrowing is another. But what about… fields? Judicious use of fields limits where you can type into a buffer. Consider the customize user interface for example.

    Basically emacs is a complete tui development environment.

  • SlowValue@alien.topB
    link
    fedilink
    English
    arrow-up
    2
    ·
    1 year ago

    Let me cite RMS to answer that:

    The editor itself was written entirely in Lisp. Multics Emacs proved to be a great success—programming new editing commands was so convenient that even the secretaries in his office started learning how to use it. They used a manual someone had written which showed how to extend Emacs, but didn’t say it was a programming. So the secretaries, who believed they couldn’t do programming, weren’t scared off. They read the manual, discovered they could do useful things and they learned to program.

    source: https://www.gnu.org/gnu/rms-lisp.html

    Programming in elisp is fun, too. Since it’s (typical for Lisp!) interactive programming features.

  • stepbroImstuck_in_SU@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    You can get a lot done with very basic knowledge. Much of the packages offer example configuration, and as emacs-lisp is self-documenting (through docstrings), being able to read and write basic hooks, functions and setting variables is enough for most configuration.

    I personally think after that the challenge becomes emacs, not lisp. For example understanding startup, MIME-types, faces and window/frame rules is a lot to learn - and those are independent of the language

  • arensb@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    Learning a new programming language is like learning a new spoken language: not only does it give you additional skills, but it gives you perspective on your “native” language. The usual way of doing things in C++ is not the best way to do things in Python or Lisp, and vice versa.

    One cool feature of Lisp is that the code is the parse tree.

  • ClerkOfCopmanhurst@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    When I want to add an automatic garage door, I don’t go on r/ElectricalEngineering and ask how rewarding learning EE can be. I decide wtf I want to have happen, then google accordingly.

  • void_linux@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    You need surprisingly little if you already have general lisp knowledge to actually be able to write your own configs. Hell, you don’t need any knowledge just work with it as if it’s some config file grammar. I started with doom and after a year or so took a step into vanilla Emacs. My Emacs config is exactly how I want it now. Don’t get me wrong it’s not life changing compared to Doom but if you have a weekend spare and you are feeling up the challenge, give it a shot.

  • unix_hacker@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    Emacs Lisp is probably one of my favorite and most used programming languages outside of work. Emacs is a very pleasant environment to program in, because it’s a Lisp image that you can poke and prod. I literally will do everyday math in Emacs Lisp now if I am at my computer.

    Also, helpful tip: since Emacs Lisp is so old and LLMs are often based on old data, I find that tools like ChatGPT are very good at producing working Emacs Lisp.

    This is helpful because I find that many Emacs functions and macros are not named in a way that is easy to search by.

  • chandaliergalaxy@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    It was for me.

    After reading Paul Graham wax lyrical about lisp ( see essay Beating the Averages), I wanted to learn a lisp. Emacs is the most practical lisp in the sense that even a small amount of it can do something immediately useful (for emacs), and I wasn’t going to replace R / Python / Fortran with Common Lisp or Scheme for my scientific computing needs.

    Not sure it expanded my mind like I had expected in the end. Apart from the homoiconicity and macros, most major ideas introduced by lisp has made its way into other mainstream languages.

    But it’s a beautiful language and at least I know now that I’m not missing out on something huge, and that gives me piece of mind (maybe macros are huge and I’m toying with them in Julia at the moment).