Discussion:
emacs question (version 28.2 versus 27.2)
(too old to reply)
John Forkosh
2023-03-23 04:00:56 UTC
Permalink
I recently installed slackware64-current with emacs version 28.2,
versus my previous install with version 27.2. And like you already
guessed, they're behaving a little differently. My ~/.emacs file
has, among other things (the entire 64-line file is reproduced
below, just in case there's some "interaction" causing the problem),
(setq blink-matching-paren nil)
to turn off blinking matching (xxx)'s and {xxx}'s, etc.
And that had been working fine under 27.2. But now, under 28.2,
they all blink, though the other setq's seem to be continuing
to work as intended (i.e., emacs is reading my ~/.emacs file).
Also, as a further test, since my earlier slackware is still
intact on another partition, I cp'ed all its /usr/bin/emacs,
/usr/share/emacs/27.2/ and /usr/libexec/emacs/27.2/ stuff
over to my new /usr directory, and flipped the /usr/bin/emacs
symlink to emacs-27.2-with-x11. And that >>doesn't<< blink,
just like I want.

So why's version 28.2 blinking, and how can I stop it???
I tried (blink-cursor-mode 0) in ~/.emacs, but no luck.
Below's my entire 64-line (now 65 with that additional
blink-cursor-mode 0) ~/.emacs file, which pretty much just
turns off everything. I basically just found it somewhere
on the web, but don't recall where, and don't really
understand it very well (just what's easy to infer from
the syntax)...

(setq major-mode 'text-mode)
(setq auto-mode-alist '(("." . text-mode)))
(setq make-backup-files nil) ;;; no backup files
(setq auto-save-default nil) ;;; no auto saving

(setq scroll-step 1)
(setq scroll-margin 0)
(setq scroll-preserve-screen-position 't) ;;; scroll without moving cursor
(setq scroll-conservatively 10000) ;;; (0 or 10000 seems same)
(setq auto-window-vscroll nil)
(setq scroll-up nil)
(setq scroll-down nil)
(setq scroll-up-aggressively nil) ;;; used to be .01
(setq scroll-down-aggressively nil) ;;; used to be .01
;;; (setq track-eol nil) ;;; cursor doesn't track end-of-line
(setq next-screen-context-lines 0)
(mouse-wheel-mode 't) ;;; mouse-wheel enabled
;;; (setq mouse-wheel-scroll-amount '(1 ((shift) . 1))) ;;; 1 line at a time
(setq mouse-wheel-scroll-amount '(1 ((shift) . 1) ((control) . nil)))
;;; (setq mouse-wheel-progressive-speed nil)
(setq mouse-wheel-follow-mouse 't) ;;; scroll window under mouse
;;;;; -- <mouse-4> and <mouse-5> commented to permit line-by-line scrolling
;; (global-set-key (kbd "<mouse-4>") 'scroll-down-command)
;; (global-set-key (kbd "<mouse-5>") 'scroll-up-command)
;;; (scroll-bar-mode -1) ;;; no scroll bar displayed at all
(setq indent-tabs-mode nil)
;;; see http://emacs.stackexchange.com/questions/
;;; 14297/completely-disable-all-auto-indentation
(global-set-key "\C-j" 'newline) ;;; disable auto-indent? emacs <=24.3
(electric-indent-mode 0) ;;; disable auto-indent? emacs >=24.4
(setq blink-matching-paren nil)
(blink-cursor-mode 0)
(setq column-number-mode 't)
(setq size-indication-mode 't)

;;; open with single window
(setq inhibit-startup-screen 't)
(add-hook 'emacs-startup-hook 'delete-other-windows)

;;; initial frame width,height,position
(set-frame-width (selected-frame) 80) ; #chars wide
(set-frame-height (selected-frame) 52) ; #lines ling
(set-frame-position (selected-frame) 10 10 ) ; x y from upper-left

;;; insert tab character
(defun insert-tab ()
(interactive)
(insert "\t"))
;;; (insert " "))
(global-unset-key [tab])
(global-set-key (kbd "TAB") 'insert-tab)
;;; --- end-of-file ---
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(column-number-mode t)
'(size-indication-mode t))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(default ((t (:family "DejaVu Sans Mono" :foundry "unknown" :slant normal :weight normal :height 120 :width normal)))))
--
John Forkosh ( mailto: ***@f.com where j=john and f=forkosh )
Javier
2023-03-23 17:00:18 UTC
Permalink
Post by John Forkosh
So why's version 28.2 blinking, and how can I stop it???
I tried (blink-cursor-mode 0) in ~/.emacs, but no luck.
Below's my entire 64-line (now 65 with that additional
blink-cursor-mode 0) ~/.emacs file, which pretty much just
turns off everything. I basically just found it somewhere
on the web, but don't recall where, and don't really
understand it very well (just what's easy to infer from
the syntax)...
Are you having the problem in X11 or in terminal (ie. emacs -nw)?

If the problem happens in graphical mode it would also good to know
the toolkit and the options at compilation-time

C-h v system-configuration-options
John Forkosh
2023-03-25 04:19:48 UTC
Permalink
Post by Javier
Post by John Forkosh
So why's version 28.2 blinking, and how can I stop it???
I tried (blink-cursor-mode 0) in ~/.emacs, but no luck.
Below's my entire 64-line (now 65 with that additional
blink-cursor-mode 0) ~/.emacs file, which pretty much just
turns off everything. I basically just found it somewhere
on the web, but don't recall where, and don't really
understand it very well (just what's easy to infer from
the syntax)...
Are you having the problem in X11 or in terminal (ie. emacs -nw)?
Thanks for the reply, Javier... In X11. I'd never used terminal,
but since you mentioned it, I tried: 28.2 -nw blinks matching {}
braces, but doesn't blink matching () parens, whereas X11 blinks
both. Weird. Go figure.
Post by Javier
If the problem happens in graphical mode it would also good to know
the toolkit and the options at compilation-time
C-h v system-configuration-options
I have both 27.2 and 28.2 running, i.e., /usr/bin/ has
emacs -> emacs-with-x11
emacs-27.2-no-x11
emacs-27.2-with-x11
emacs-28.2-no-x11
emacs-28.2-with-x11
emacs-no-x11 -> emacs-28.2-no-x11
emacs-with-x11 -> emacs-28.2-with-x11
(and /usr/share/emacs/ and /usr/libexec/emacs/ have both
27.2 and 28.2 subdirectories)
and I just flip the /usr/bin/emacs-with-x11 symlink to 27.2
to stop the bleeping blinking ("bleeping" being a euphemism:).

So I ran C-h v system-configuration-options for both...
--------------------------------------------------------------------
27.2
--------------------------------------------------------------------
system-configuration-options is a variable defined in 'C source code'.
Its value is
"--prefix=/usr --sysconfdir=/etc --localstatedir=/var
--program-prefix= --program-suffix= --mandir=/usr/man
--infodir=/usr/info --without-gconf --without-gsettings
--with-modules --with-x --with-x-toolkit=gtk3 --with-pdumper=no
--with-dumping=unexec --build=x86_64-slackware-linux 'CFLAGS=-O2 -fPIC'"
Documentation:
String containing the configuration options Emacs was built with.
--------------------------------------------------------------------
28.2
--------------------------------------------------------------------
system-configuration-options is a variable defined in 'C source code'.
Its value is
"--prefix=/usr --sysconfdir=/etc --localstatedir=/var
--program-prefix= --program-suffix= --mandir=/usr/man
--infodir=/usr/info --without-gconf --without-gsettings
--with-modules --with-x --with-x-toolkit=gtk3 --with-pdumper=no
--with-dumping=unexec --build=x86_64-slackware-linux 'CFLAGS=-O2 -fPIC'"
String containing the configuration options Emacs was built with.

I inserted some linebreaks for readability, and they look identical,
save the little penultimate "Documentation:" line in 27.2 that seems
to have been removed in 28.2.
--
John Forkosh ( mailto: ***@f.com where j=john and f=forkosh )
John Forkosh
2023-03-25 10:04:04 UTC
Permalink
Post by John Forkosh
Post by Javier
Are you having the problem in X11 or in terminal (ie. emacs -nw)?
Thanks for the reply, Javier... In X11. I'd never used terminal,
but since you mentioned it, I tried: 28.2 -nw blinks matching {}
braces, but doesn't blink matching () parens, whereas X11 blinks
both. Weird. Go figure.
Post by Javier
If the problem happens in graphical mode it would also good to know
the toolkit and the options at compilation-time
C-h v system-configuration-options
I have both 27.2 and 28.2 running, i.e., /usr/bin/ has
emacs -> emacs-with-x11
emacs-27.2-no-x11
emacs-27.2-with-x11
emacs-28.2-no-x11
emacs-28.2-with-x11
emacs-no-x11 -> emacs-28.2-no-x11
emacs-with-x11 -> emacs-28.2-with-x11
(and /usr/share/emacs/ and /usr/libexec/emacs/ have both
27.2 and 28.2 subdirectories)
and I just flip the /usr/bin/emacs-with-x11 symlink to 27.2
to stop the bleeping blinking ("bleeping" being a euphemism:).
I tried another test to see whether any of the many elisp
files used by emacs has any effect (it apparently doesn't).
In /usr/share/emacs/ I now have
27.2 -> 27.2_dir/
27.2_dir
28.2 -> 28.2_dir/
28.2_dir
site-lisp -> site-lisp-28.2_dir/
site-lisp-27.2_dir
site-lisp-28.2_dir
where the _dir's contain the actual files for 27.2 and 28.2,
and I can flip the symlinks any which way I like. So I pointed
those to 28.2 as shown, and similarly for the subdirectories
under /usr/libexec/emacs/. But in /usr/bin/ I have
emacs-with-x11 -> emacs-27.2-with-x11
whereby I'm running 27.2 with all the 28.2 elisp stuff.
And the result is ... no blinking. So any differences
in the elisp stuff between 27.2 and 28.2 is apparently
not responsible for the behavior.
--
John Forkosh ( mailto: ***@f.com where j=john and f=forkosh )
Javier
2023-03-26 17:51:26 UTC
Permalink
Post by John Forkosh
And the result is ... no blinking. So any differences
in the elisp stuff between 27.2 and 28.2 is apparently
not responsible for the behavior.
Very clever. You have demonstrated that the bug is harcoded in C.

This disables the feature for me in emacs 28.0

(setq blink-matching-paren-distance 0)

Also see:

M-: (info "(emacs) Matching")


Also:

The blinking paren feature is useful. It prevents syntax errors.
I keep the feature enabled myself.

BTW I don't recomend gtk3 toolkit. Use lucid instead, it matches
better the Slackware philosophy. gtk3 toolkit changes appearance too
offen and has more bugs. But that is unrelated to blinking parens.

./configure --with-x-toolkit=lucid --prefix=${HOME}/local ; make ; make install
John Forkosh
2023-03-27 04:51:03 UTC
Permalink
Post by John Forkosh
And the result is ... no blinking. So any differences
in the elisp stuff between 27.2 and 28.2 is apparently
not responsible for the behavior.
Very clever. You have demonstrated that the bug is harcoded in C.
Yeah, and I apparently posted the question in the wrong newsgroup
to begin with. I'd originally figured any such source code bug
would have quickly been detected (I'd thought lots of people would
notice they couldn't disable blinking) and then quickly fixed.
So I naively guessed the problem's some kind of slackware
configuration issue. That did seem a bit odd, but so did
everything else I could think of -- a possible elisp issue only
occurred to me after googling mentioned it, which was after I'd
already posted the question here.
This disables the feature for me in emacs 28.0
(setq blink-matching-paren-distance 0)
Thanks so much, Javier. That immediately stopped the blinking.
Don't know emacs internals all that well, and never would have
thought of that myself.
M-: (info "(emacs) Matching")
And thanks for the pointer to additional documentation.
The blinking paren feature is useful. It prevents syntax errors.
I keep the feature enabled myself.
Yeah, and sometimes my own C code has lots of nested {{{...}}}'s
which I sometimes have to stop and stare at to keep straight.
But the blinking is just way too distracting for me, personally.
And that inconvenience is way worse that the offsetting convenience,
at least for me.
BTW I don't recomend gtk3 toolkit. Use lucid instead, it matches
better the Slackware philosophy. gtk3 toolkit changes appearance too
offen and has more bugs. But that is unrelated to blinking parens.
./configure --with-x-toolkit=lucid --prefix=${HOME}/local ; make ; make install
Haven't (yet) noticed any other problems, but I'll give it
a try, building it that way. Then I'll have three targets
for my emacs-with-x11 symlink: -27.2, -28.2, and -28.2-lucid :
"You can never be too rich or too thin, or have too many
versions of emacs."
--
John Forkosh ( mailto: ***@f.com where j=john and f=forkosh )
Javier
2023-03-27 11:47:53 UTC
Permalink
Post by John Forkosh
Yeah, and I apparently posted the question in the wrong newsgroup
to begin with.
comp.emacs and gnu.emacs.help tend to be a wasteland nowadays. They
disconnected the mailing list from Usenet. The mailing list is
accessible through NNTP only through the Gmane server.
Post by John Forkosh
I'd originally figured any such source code bug
would have quickly been detected (I'd thought lots of people would
notice they couldn't disable blinking) and then quickly fixed.
Most likely no emacs dev noticed it because it's a useful feature and
nobody tries to disable it. But the bug exists and it is hardcoded in C
as you demonstrated.
Post by John Forkosh
So I naively guessed the problem's some kind of slackware
configuration issue. That did seem a bit odd, but so did
everything else I could think of -- a possible elisp issue only
occurred to me after googling mentioned it, which was after I'd
already posted the question here.
I doubt that Pat does any kind of patching to emacs. In my experience
emacs compiles out of the box everywhere and needs no patching.

What Pat should do is to give the possiblility to use emacs-lucid with
the lucid toolkit instead of GTK. It has less bugs, and is more
consistent through versions than GTK.
Eric Pozharski
2023-03-28 08:24:31 UTC
Permalink
*SKIP*
Post by Javier
Post by John Forkosh
So I naively guessed the problem's some kind of slackware
configuration issue. That did seem a bit odd, but so did everything
else I could think of -- a possible elisp issue only occurred to me
after googling mentioned it, which was after I'd already posted the
question here.
I doubt that Pat does any kind of patching to emacs. In my experience
emacs compiles out of the box everywhere and needs no patching.
That's not correct (at time of posting) emacs.SlackBuild contains this
(twice):

90
91 zcat $CWD/d48bb4874bc6cd3e69c7a15fc3c91cc141025c51.patch.gz | patch -p1 --verbose ||
exit 1
92

And another instance of "zczt | patch" a bit later.
Post by Javier
What Pat should do is to give the possiblility to use emacs-lucid with
the lucid toolkit instead of GTK. It has less bugs, and is more
consistent through versions than GTK.
Consider breaking free:

117 --with-x \
118 --with-x-toolkit=${X_TOOLKIT:-gtk3} \
119 $PDUMPER \
--
Torvalds' goal for Linux is very simple: World Domination
Stallman's goal for GNU is even simpler: Freedom
Javier
2023-03-28 22:39:30 UTC
Permalink
Post by Eric Pozharski
Post by Javier
I doubt that Pat does any kind of patching to emacs. In my experience
emacs compiles out of the box everywhere and needs no patching.
That's not correct (at time of posting) emacs.SlackBuild contains this
91 zcat $CWD/d48bb4874bc6cd3e69c7a15fc3c91cc141025c51.patch.gz | patch -p1 --verbose ||
exit 1
You are right. It's a security patch, for some bug that allowed shell execution from ctags.
Good that Patrick cares about those things.

https://mirrors.slackware.com/slackware/slackware64-current/source/e/emacs/d48bb4874bc6cd3e69c7a15fc3c91cc141025c51.patch.gz

From d48bb4874bc6cd3e69c7a15fc3c91cc141025c51 Mon Sep 17 00:00:00 2001
From: lu4nx <***@shellcodes.org>
Date: Fri, 25 Nov 2022 14:38:29 +0800
Subject: Fixed ctags local command execute vulnerability

Loading...