srečanje emacs.si skupnosti #49

Table of Contents

Čas: [2026-11-02 pon 19:00]

Prisotni: g1smo, čukec,

1. Novo opozorilo v Emacsu po nadgradnji na 31.1

⛔ Warning (files): Missing ‘lexical-binding’ cookie in "~/.config/emacs/init.el". You can add one with ‘M-x elisp-enable-lexical-binding RET’. See ‘(elisp)Selecting Lisp Dialect’ and ‘(elisp)Converting to Lexical Binding’ for more information.

Možna začasna rešitev v initu, če tega nočeš gledati:

(add-to-list 'warning-suppress-types '(files missing-lexbind-cookie))

Druga možnost je dodati

;; -*- lexical-binding: nil; -*-

vsem datotekam, ki sprožijo opozorilo (nil je zaenkrat default). (Ali se pritožiti vzdrževalcem, zakaj tega še niso uredili…)

Iz NEWS za izdajo 31.1

Lexical binding

You can change the default value of 'lexical-binding'.

While the default is still the use of dynamic binding dialect of Emacs Lisp in those places that don't explicitly set 'lexical-binding', you can change it globally with:

(set-default-toplevel-value 'lexical-binding t)

Loading a file displays a warning if there is no 'lexical-binding' cookie.

Emacsu se pozna 50 let:

(defvar x -99)

(defun getx ()
  x)            ; ‘x’ is used free in this function.

(let ((x 1))    ; ‘x’ is lexically bound.
  (getx))       ; BUT because its defined as defvar its still dynamically bound!
(setq y -99)

(defun gety ()
  y)            ; ‘y’ is used free in this function.

(let ((y 1))    ; ‘y’ is lexically bound.
  (gety))
(setq y -99)

(defun gety ()
  y)            ; ‘y’ is used free in this function.

(let ((y 1))    ; ‘y’ is dynamically bound.
  (gety))

Razlog:

Even when lexical binding is enabled, certain variables will continue to be dynamically bound. These are called “special variables”. Every variable that has been defined with ‘defvar’, ‘defcustom’ or ‘defconst’ is a special variable (*note Defining Variables::). All other variables are subject to lexical binding.

Vsekakor pa: vse najboljše, emacs! 🎂

1.1. od-definiranje vrednosti

Definirano vrednost lahko razveljavimo z makunbound. Bralec naj bo pozoren na črkovanje besede mak(e).

(defvar x 1)
(makunbound 'x)
x

(Če gre za definicijo funkcije vidi fmakunbound)

Ali se da unboundat emacs-lisp?

(fmakunbound 'emacs-lisp)
emacs-lisp

2. Emacsconf 12.-13. december

Bi ponovili gledanje v živo na RŠ? Lahko rezerviramo desk. Enkrat se še prej dobimo sicer.

3. zgodovinski arhiv emacsa

4. CRDT

M-x crdt-version

5. tipkovnica

Fun fact: tipka, ki je tipično na laptopu desno od alt gr odpre kontekstualni meni (kot desni klik na fajl recimo v file managerju). V emacsu pa odpre M-x.

Izražen je bil interes za nadaljevanje delavnice izdelave tipkovnic; https://wiki.ljudmila.org/Tipkovnica_dactyl

5.1. projicirana tipkovnica

5.1.1. nekoliko podobno

Dynamicland, potopitveno sodelovalno komputiranje: https://dynamicland.org/2024/Intro/

6. input method v emacs

M-x set-input-method slovenian

M-x describe-input-method slovenian

C'  Ć	 C<  Č	  D;  Đ	   S<  Š    Z<	Ž    c'	 ć    c<  č    d;  đ	s<  š	 z<  ž

Nazaj na privzeti input method: C-\

M-x insert-char

LATIN SMALL LETTER E WITH DOT BELOW

ẹ

Хаха Океј. Пиšем српско!

Дивно!

set-input-method emoji 💩

beseda : == nek emoji!

😃 😛 😞 😛😛😛😛😛😛😛😛😛 🎦

😄 🏩 🏨

🫃

🫃 🏖

(sicer je za emojije vnašat zelo uporaben M-x insert-char)

Primer konfiguracije novega input methoda: Christianov način za angleško prečrkovanje arabščine.

(require 'quail)

(quail-define-package "arabic-translit" "Arabic transliteration" "Ar-Trl>" t
"This is an input method for Arabic transliteration and Western
European characters.  Basically, you type first the required diacritic
and then the letter (as in [.] [d] to get ḍ, [_] [h] to get ḫ.).  After typing the
diacritic, a list of possible letters is shown in the echo area."
nil nil nil nil nil nil nil nil nil nil t)

(quail-define-rules

 ("<<" "ʿ") ; 'ayn / modifier left half ring
 (">>" "ʾ") ; hamza 

 ("Aa" "Ā")
 ("aa" "ā")
 ("Ii" "Ī")
 ("ii" "ī")
 ("Uu" "Ū")
 ("uu" "ū")

 (".D" "Ḍ")
 (".d" "ḍ")

 (".H" "Ḥ")
 (".h" "ḥ")
 ("_H" "Ḫ") ; breve below
 ("_h" "ḫ")

 (".K" "Ḳ") ; for EI2-style qa'
 (".k" "ḳ")

 (".T" "Ṭ")
 (".t" "ṭ")

 ;; ("'s" "ś")
 ;; ("'S" "Ś")
 (".S" "Ṣ")  
 (".s" "ṣ")

 (".Z" "Ẓ")
 (".z" "ẓ")
 )

(provide 'arabic-translit)

Author: Yuri

Created: 2026-11-03 tor 01:02

Validate