Emacs

368 readers
1 users here now

A community for the timeless and infinitely powerful editor. Want to see what Emacs is capable of?!

Get Emacs

Rules

  1. Posts should be emacs related
  2. Be kind please
  3. Yes, we already know: Google results for "emacs" and "vi" link to each other. We good.

Emacs Resources

Emacs Tutorials

Useful Emacs configuration files and distributions

Quick pain-saver tip

founded 2 years ago
MODERATORS
501
502
 
 

Some time ago I mentioned a very peculiar type of TODOs I’d like to implement. These are things I’d like to do from time to time, but not necessarily on a regular basis...

503
504
505
506
507
508
509
 
 

Hello everyone! My first post in this new forum.

I read a lot for research, and to keep track of the read books I am experimenting with a combination of bibtex and org mode column view. I have list of my books in an org-file, which then is exported to a bib-file to be able to use org-cite-insert.

Now, to filter the list of books to show I need to set the :match criteria in the column view dynamic block. This works well for all exact matches. But for instance, if I want to match all the books I have read in a certain year (I have a field in the per-book-heading like: DATE_FINISHED), I cannot filter them out. If the value is, say, 2023-08-26, how can I filter that when I am looking only for the year?

It seems to me, :match is always looking at the whole entry, I cannot use:

:match "DATE_FINISHED=\"2023\"

I would have to use:

:match "DATE_FINISHED=\"2023-08-26\"

But I want all the books of 2023, not only those of the 26th of August. How could I solve this? Thank you very much for any hint!

Titus

510
511
 
 

I mentioned in a previous post that one of the things that I'm doing to bootstrap the content on this community was to get submissions from reddit and place them here.

I couldn't resist and decided to play with Reddit's and Lemmy's API to see if I could automate some of this job (not on Elisp, I will shamefully admit) and after some time I got a Python script that I checks the date of the last submission and grabs the url of all new (non-self) submissions and posts them here.

I was wondering what the community thinks of the idea of me running this script every hour or so? This would basically mean that every post from reddit would be synchonized here.

There are some other things that I'd like to do as well:

  • avoid posting links from people who are already here (to let them make the Lemmy post themselves)
  • Lots of posts on /r/emacs are "self" posts from people describing or summarizing their project/blog posts, and with a link inside it. I'd like to add a (interactive) step to look at "self" submissions and see if there is a link that can be submitted.
  • While checking for "self" submissions, possibly send a DM to the poster inviting them to join this community

What do you think? Should I go forward with these ideas?

512
513
514
515
 
 
516
517
518
519
520
0
submitted 2 years ago* (last edited 2 years ago) by rglullis@communick.news to c/emacs@communick.news
 
 

b'\n \n

\n

\n Triton Famme logo\n \n \n

\n

\n

\n

\n

\n \n \n

\n

\n \n \n

Compiling GNU Emacs 30 on Debian 12

\n \n \n

\n

\n

\n

\n \n

\n

\n \n \n

Prologue

\n\t

\n\t In this blog, I'll show you how to compile Emacs on\nGNU/Linux Debian 12. But the procedure is of course easily adaptable\nto any GNU/Linux OS, since we'll only be installing a few packages\nusing their package manager. To make everything tutti , we will also\n\t add a native compiler and tree-sitter.\n
\n

Native compilation

\na€¦in Emacs is the process of translating and converting Emacs Lisp source code to machine code, which allows Emacs Lisp to run more efficiently and faster each time it is run.\n
\nNative compilation in Emacs is not a new feature; it was introduced in version 28.1.\n
\nThe result of native compilation is a binary blob that (can) be subsequently loaded when Emacs starts.\n
\n
\n

Tree-sitter

\n\nTree-sitter is a syntax tree analysis library used to parse code as it\nis manipulated. It is a tool that allows you to analyze the syntax\nstructure of a programming language and provides an interface to\nperform various operations such as code refactoring, dependency\nvisualization, or documentation generation.\n\nTree-sitter supports different programming languages and allows users\nto define their own "recipes".\n\nNormally, when working with code (meaning highlighting it, folding it,\nmoving it to definitions,a€¦) some kind of parser working with regular\nexpressions was used.\n\nTree-sitter (supposedly) provides better parsing than a regular\nexpression parser. Regular expressions work with characters or a group\nof characters, and these must appear in the displayed text in a\ndefined order. However, a tree-sitter is capable of parsing and\nrecognizing more complex patterns of structured language, including\nsyntax.\n\nThe regular expression parser requires that the entire input text be\nread and processed at once, which is memory and computing power\nintensive when dealing with large files. Tree-sitter works\nincrementally and performs parsing without the need to load the entire\ntext at once.\n\nThe regular expression parser only works with the linear structure of\nthe text and cannot capture its hierarchy. Tree-sitter is able to\nunderstand the hierarchical structure of the text and provide\ninformation about different levels of structure - such as nested code\nblocks and so on.\n
\n
\n

Installation

\n
\n

Installing the necessary tools and libraries

\n\nTo successfully compile GNU Emacs, we will need some additional tools\nand libraries that may not be present in a normal OS installation.\n\n \n\nThese are:\n\n

\n| git              | tool for storing, managing and tracking changes to project source code                                |\n| autoconf         | (simplified) used to generate a Makefile file for compilation                                         |\n| texinfo          | tool for working with and converting documentation                                                    |\n| gnutls-bin       | libraries for using SSL/TLS protocols (if we want to use Emacs as a mail client)                      |\n| libgccjit-12-dev | library containing the language independent JIT (Just-In-Time) compiler needed for native compilation |\n| gcc              | is probably not necessary to introduce the C compiler                                                 |\n| libgtk2.0-dev    | GTK libraries if Emacs is to run in its own rendered window and not in the terminal                   |\n| libgnutls28-dev  | libraries for compiling for gnutls-bin                                                                |\n| libxpm-dev       | libraries to support xpm graphics filesknižnice pre podporu xpm grafických súborov                    |\n| libgif-dev       | a€¦ and detto for gif                                                                                   |\n| libtinfo-dev     | transition package for libncurses                                                                     |\n

\n
\nWithout hesitation or second thoughts 😏, we copy the command:\n

\n  sudo apt install git autoconf make texinfo gnutls-bin libgccjit-12-dev gcc libgtk2.0-dev libgnutls28-dev lib libxpm-dev libgif-dev

\n

\n\n

Tree-sitter

\n\nAccording to the tutorial on [Mastering Emacs: How to Get Started with Tree-Sitter](https://www.masteringemacs.org/article/how-to-get-started-tree- sitter):\n
\nDownload the latest version of tree-sitter:\n\n

\n  git clone https://github.com/tree-sitter/tree-sitter.git

\n
\nAnd compile the program using the familiar three-line magic:\n
\n

\n  cd tree-sitter/\n  make\n  sudo make install\n

\n
\nAnd (if we haven't already) if we define one more variable so that Emacs doesn't fiddle during starting up:\n

\n  export LD_LIBRARY_PATH=/usr/local/lib/\n

\n
\n\n

GNU Emacs 30

\n\nFrom the savannah repositories we'll download the Emacs source code:\n

\n  git clone -b master git://git.sv.gnu.org/emacs.git\n

\n
\nNext up:\n

\n  cd emacs\n

\n
\nRun autogen.sh , which is used to generate configuration files and scripts for compilation and installation\n
\n

\n  ./autogen.sh\n

\n
\nAnd then we run configure , with parameters\nfor tree-sitter support and native compilation. \n\n
\n

\n  ./configure --with-tree-sitter --with-native-compilation --with-mailutils --with-pop\n

\n\n( --with-pop - if we also require POP3 protocol when downloading emails)\n
\n \nFollowed by the classic:\n

\n  make\n  sudo make install\n

\n
\n

Tree-sitter setting

\n
\n\nSomewhere in the initialization file, we put a list of addresses from where the rules for that language can be downloaded:\n

\n  (setq treesit-language-source-alist\n    \'((bash "https://github.com/tree-sitter/tree-sitter-bash"))\n     (cmake "https://github.com/uyha/tree-sitter-cmake")\n     (c "https://github.com/tree-sitter/tree-sitter-c")\n     (css "https://github.com/tree-sitter/tree-sitter-css")\n     (elisp "https://github.com/Wilfred/tree-sitter-elisp")\n     (go "https://github.com/tree-sitter/tree-sitter-go")\n     (html "https://github.com/tree-sitter/tree-sitter-html")\n     (javascript "https://github.com/tree-sitter/tree-sitter-javascript" "master" "src")\n     (json "https://github.com/tree-sitter/tree-sitter-json")\n     (make "https://github.com/alemuller/tree-sitter-make")\n     (markdown "https://github.com/ikatyang/tree-sitter-markdown")\n     (python "https://github.com/tree-sitter/tree-sitter-python")\n     (toml "https://github.com/tree-sitter/tree-sitter-toml")\n     (tsx "https://github.com/tree-sitter/tree-sitter-typescript" "master" "tsx/src")\n     (typescript "https://github.com/tree-sitter/tree-sitter-typescript" "master" "typescript/src")\n     (yaml "https://github.com/ikatyang/tree-sitter-yaml")))\n

\n
\nAnd run the\n

\n  M-x treesit-install-language-grammar\n

command.\n
\n
\n\nWell, we have compiled Emacs in versiona€¦ well, last version, for me it was testing version 30.\n\nBut I haven't deployed it to full operation yet.\n\n\t

\n\t
\nA couple of pictures at the end:\n

\n

\n![Fig. 1: Installed version 30](https://famme.sk/blog- obr/emacs29/00-emacs_30.png) Fig. 1: Installed version 30 \n

\n\n![Fig. 2: ts-c-mode](https://famme.sk/blog-obr/emacs29/01-treesiter- pre-c.png) Fig. 2: ts-c-mode \n\n\n\n\t\n

\n

\n \n

\n

\n \n

\n

\n \n \n

O našej spoločnosti

\n NaÅ¡a firma TRITON FAMME s.r.o., ako nasledovník firiem TRITON\n a FAMME pôsobí na trhu od roku 2005 (firma FAMME od roku\n 1996). Orientujeme sa na predaj poľnohospodárskej, lesníckej a\n komunálnej techniky, na návrhy, realizáciu prípadne\n rekonÅ¡trukcie technologických liniek na pozberovÃ(C) spracovanie\n zemiakov spolu so skladovými technológiami na Slovensku i v\n zahraničí.
\n Vykonávame tiež servisnú činnosÅ¥ technologických liniek, nielen\n na Slovensku, ale aj v okolitých krajinách, a v krajinách\n bývalÃ(C)ho Sovietskeho zväzu. \n

\n \n

\n

  • ObchodnÃ(C) meno spoločnosti:
    \n

\n

  • IČO: \n

  • DIČ / IČ DPH \n

\n \n \n

\n

  • Triton Famme s.r.o.
    \n

\n

  • 48 320 404 \n \n

    • 2120129781 / SK2120129781 \n \n

\n \n

\n \n

\n

\n \n \n

Kontaktujte nás

\n pre viac informácií a poradenstvo \n

\n

  • Sídlo Levočská 862/28,
    \n 058 01 Poprad

\n \n

* Kancelária JilemnickÃ(C)ho\n 307/77  

\n 059 51 Veľká Lomnica

\n \n

  • E-mail triton (zav.)\n famme.sk \n

  • Telefóny Richard Fabo:\n +421 905 829 763
    \n Miroslav Fabo: +421 905 381 924

\n

\n \n

\n

\n \n

Design: TEMPLATED\n Images: Unsplash (CC0)\n

\n

\n

\n

Pocitadlo.sk

\n \n'

521
0
submitted 2 years ago* (last edited 2 years ago) by rglullis@communick.news to c/emacs@communick.news
522
 
 

What are you using to make your VHDL development faster and cleaner; eMacs configurations files / linters etc.

523
524
 
 

This is a followup on the previous call for collecting GC statistics [1].

We now got around 90 reports in the mailing list [2] and the frequency of getting new reports is fairly low now.

Thus, I would like to make one final call to submit the statistics. After a week from now, I will start bringing all the data together.

[1] https://reddit.com/r/emacs/comments/14dej62/please_help_collecting_statistics_to_optimize/

[2] https://lists.gnu.org/archive/html/emacs-gc-stats/

525
 
 

URL: https://bbb.emacsverse.org/b/iho-h7r-qg8-led Time & Date: <2023-08-09 Wed 19:00-21:00 @+03,Europe/Istanbul>

Thanks everyone who participated! We had quite a few people by Emacs meetup standards.

Here is a short summary of the main discussion points (those that I remember):

view more: ‹ prev next ›