bug#69097: [PATCH] Add 'kill-region-or-word' command

2024-09-01 Thread Philip Kaludercic
s patch. IIRC the issue was that the notion of a word differs in Emacs and in Bash. I am still in favour of utilising Emacs's definition, as it remains more useful for some given major mode and the fact that it is easier to implement. -- Philip Kaludercic on peregrine

bug#72961: Possible documentation improvement: Clarification for package installation

2024-09-02 Thread Philip Kaludercic
e init file when Emacs was started. This call can now safely be removed. Otherwise it might also refer to the fact that user option `package-selected-packages' is saved, which by default will be stored in the default Emacs configuration file. -- Philip Kaludercic on peregrine

bug#69097: [PATCH] Add 'kill-region-or-word' command

2024-09-02 Thread Philip Kaludercic
Stefan Kangas writes: > Eli Zaretskii writes: > >>> From: Philip Kaludercic >>> Cc: Sean Whitton , j...@linkov.net, >>> r...@gnu.org, >>> 69...@debbugs.gnu.org >>> Date: Sun, 01 Sep 2024 20:06:00 + >>> >>> P

bug#69097: [PATCH] Add 'kill-region-or-word' command

2024-09-02 Thread Philip Kaludercic
Sean Whitton writes: > Hello, > > On Mon 02 Sep 2024 at 08:39pm GMT, Philip Kaludercic wrote: > >> How about this suggestion: We add a generic kill-region-or-word >> command, and a user option for a function (set to either >> `backward-kill-word' or Sean'

bug#71374: [PATCH] Simplify 'help-enable-variable-value-editing' using

2024-09-02 Thread Philip Kaludercic
Philip Kaludercic writes: > Eshel Yaron writes: > >> Philip Kaludercic writes: >> >>> Eshel Yaron writes: >>> >>>> I'm reopening this (hope you don't mind) to keep track of the minor >>>> regressions I mentioned here: >

bug#69097: [PATCH] Add 'kill-region-or-word' command

2024-09-02 Thread Philip Kaludercic
Sean Whitton writes: > Hello, > > On Mon 02 Sep 2024 at 09:42pm +01, Sean Whitton wrote: > >> Hello, >> >> On Mon 02 Sep 2024 at 08:39pm GMT, Philip Kaludercic wrote: >> >>> How about this suggestion: We add a generic kill-region-or-word >>

bug#69097: [PATCH] Add 'kill-region-or-word' command

2024-09-03 Thread Philip Kaludercic
Eli Zaretskii writes: >> From: Philip Kaludercic >> Cc: Eli Zaretskii , Stefan Kangas , >> Andrea Corallo , j...@linkov.net, r...@gnu.org, >> 69...@debbugs.gnu.org >> Date: Mon, 02 Sep 2024 21:12:01 + >> >> I had misremembered the last

bug#43086: [PATCH] Allow tags backend to not query for TAGS file

2024-09-03 Thread Philip Kaludercic
;> require some interoperation with project.el. > > Indeed. Actually, I have an old, WIP patch for tag file > auto-generation which, yes, uses project.el. I can post it again if > you're curious. Hasn't this issue been resolved by `etags-regen-mode'? -- Philip Kaludercic on peregrine

bug#69097: [PATCH] Add 'kill-region-or-word' command

2024-09-05 Thread Philip Kaludercic
Sean Whitton writes: > Hello, > > On Tue 03 Sep 2024 at 04:32pm GMT, Philip Kaludercic wrote: > >> >> +(defcustom kill-region-dwim nil >> + "Behaviour when `kill-region' is invoked without an active region. >> +If set to nil (default), then an erro

bug#73016: Potential inclusion of kbd-mode, part of kmonad, in Non-GNU ELPA

2024-09-05 Thread Philip Kaludercic
mmand))) > (eq 0 (shell-command command > > (defun kbd-mode--create-kmonad-process () > "Start the kmonad demo process in a dedicated buffer." > (when (get-buffer-process "*kmonad*") > (kbd-mode--kill-demo-process)) > (start-process "kmonad-emacs" "*kmonad*" "kmonad" kbd-mode-demo-file)) > > (defun kbd-mode--kill-demo-process () > "Kill demo kmonad process, if possible." > (when (get-buffer-process "*kmonad*") > (kill-process "*kmonad*"))) There might be a race condition here. > > (defun kbd-mode--kill-kmonad () > "Kill (or suspend) a running kmonad instance. > The command used to kill kmonad is given by the > `kbd-mode-kill-kmonad' variable." > (if kbd-mode-kill-kmonad > (shell-command kbd-mode-kill-kmonad) > (error "To kill the running kmonad instance, customize the > `kbd-mode-kill-kmonad' variable!"))) > > (defun kbd-mode--start-kmonad () > "Start (or resume) a new kmonad process. > The command used to start kmonad is given by the > `kbd-mode-start-kmonad' variable." > (if kbd-mode-kill-kmonad > (call-process-shell-command >;; Force the command to be executed asynchronously. >(if (eq (aref kbd-mode-start-kmonad If you always know that you are comparing character codes, I'd use = to be more specific and trigger an error if something else occurs. > (1- (length kbd-mode-start-kmonad))) >?&) >kbd-mode-start-kmonad > (concat kbd-mode-start-kmonad "&"))) > (error "To restart kmonad, customize the `kbd-mode-start-kmonad' > variable!"))) > > (defun kbd-mode--toggle-demo (&optional _window) > "Toggle the kmonad demo process. > When the users exits the demo window, kill the demo process and > start a \"normal\" kmonad process instead. When re-entering the > demo window, do the opposite; i.e., kill the running kmonad > instance and spawn a demo process." > (cond ((kbd-mode--was-demo?) > (kbd-mode--kill-demo-process) > (kbd-mode--start-kmonad)) > ((kbd-mode--valid-config?) > (kbd-mode--kill-kmonad) > (kbd-mode--create-kmonad-process)) > (t > (kbd-mode--start-kmonad) > (kbd-mode--show-error > > (defun kbd-mode--was-demo? () > "Was the previous buffer the kmonad demo buffer?" > (equal (window-buffer (previous-window)) eq should be enough here. > (get-buffer "*kmonad-demo*"))) > > (defun kbd-mode--show-error () > "Show configuration errors in a compilation buffer." > (when kbd-mode-demo-mode > (quit-window 'kill "*kmonad-demo*")) > (compile (kbd-mode--get-config-validation-command))) > > (defun kbd-mode--get-config-validation-command () > "Get validation command for `kbd-mode-demo-file'." > (concat "kmonad -d " kbd-mode-demo-file)) > > Integration with `compilation-mode' > > (add-to-list 'compilation-error-regexp-alist 'kbd) > (add-to-list 'compilation-error-regexp-alist-alist > '(kbd "^kmonad: Parse error at \\([0-9]+\\):\\([0-9]+\\)" nil 1 > 2)) > > (provide 'kbd-mode) > > ;;; kbd-mode.el ends here All in all it looks fine, most of my superficial comments are nitpicks. -- Philip Kaludercic on siskin

bug#69097: [PATCH] Add 'kill-region-or-word' command

2024-09-05 Thread Philip Kaludercic
Eli Zaretskii writes: >> From: Philip Kaludercic >> Cc: Eli Zaretskii , stefankan...@gmail.com, >> acora...@gnu.org, j...@linkov.net, r...@gnu.org, 69...@debbugs.gnu.org >> Date: Thu, 05 Sep 2024 09:39:32 + >> >> >> I think I'm missing

bug#69097: [PATCH] Add 'kill-region-or-word' command

2024-09-05 Thread Philip Kaludercic
Eli Zaretskii writes: >> From: Philip Kaludercic >> Cc: spwhit...@spwhitton.name, stefankan...@gmail.com, acora...@gnu.org, >> j...@linkov.net, r...@gnu.org, 69...@debbugs.gnu.org >> Date: Thu, 05 Sep 2024 10:02:45 + >> >> Eli Zaretskii writes:

bug#73004: [PATCH] Make `dired-do-open' work on non GNU/Linux systems

2024-09-05 Thread Philip Kaludercic
n BSD systems, so that we don't generate an opaque error message if that is not the case? > (call-process command nil 0 nil file)) > ((memq system-type '(ms-dos)) >(shell-command (concat command " " (shell-quote-argument file > -- > 2.46.0 -- Philip Kaludercic on siskin

bug#73004: [PATCH] Make `dired-do-open' work on non GNU/Linux systems

2024-09-05 Thread Philip Kaludercic
not installed, `command' in the code above >> will be nil and nothing will happen. > > Then why do we need to condition this by system-type at all? Juri implemented the command, so perhaps he could explain. I don't understand why one doesn't just use `shell-command-guess-open' directly? -- Philip Kaludercic on siskin

bug#69097: [PATCH] Add 'kill-region-or-word' command

2024-09-05 Thread Philip Kaludercic
Sean Whitton writes: > Hello, > > On Thu 05 Sep 2024 at 09:39am GMT, Philip Kaludercic wrote: > >>>> + ((eq region 'unix-word) >>>> + (let ((end (point))) >>>> +(save-excursion

bug#69097: [PATCH] Add 'kill-region-or-word' command

2024-09-06 Thread Philip Kaludercic
t;) > + (let ((start (point))) > + (forward-unix-word (- arg)) > +(kill-region start (point Won't there be an error here if the command is invoked with a negative argument? > + > +(defun unix-filename-rubout (arg) > + "Kill ARG unix-words backwards, also treating `/' as whitespace. > +A unix-word is whitespace-delimited. > +Interactively, ARG is the numeric prefix argument, defaulting to 1. > +A negative ARG means to kill forwards. > + > +This is like `unix-word-rubout' (which see), but `/' is also considered > +whitespace. See this command's namesake in Info node > +`(readline)Commands For Killing'." > + (interactive "^p") > + (let ((start (point))) > +(forward-unix-word (- arg) "/ \f\n\r\t\v") > +(kill-region start (point > > (defcustom fill-prefix nil >"String for filling to insert at front of new line, or nil for none." -- Philip Kaludercic on siskin

bug#69097: [PATCH] Add 'kill-region-or-word' command

2024-09-07 Thread Philip Kaludercic
gt; I'd say '/' is treated as word delimiter. "Considered whitespace" > sounds strange to me. > > Should we also treat a backslash as delimiter, for MS-Windows? -- Philip Kaludercic on siskin

bug#73084: [PATCH] Include the variable name in the `setopt` warning

2024-09-07 Thread Philip Kaludercic
%S' does not match type %s" value type))) > + (warn "`%s': Value `%S' does not match type %s" variable value type))) >(put variable 'custom-check-value (list value)) >(funcall (or (get variable 'custom-set) #'set-default) variable value)) -- Philip Kaludercic on siskin

bug#69097: [PATCH] Add 'kill-region-or-word' command

2024-09-08 Thread Philip Kaludercic
Sean Whitton writes: > Hello, > > Thank you both for the feedback. Attached is an updated version. > > A few replies: > > On Fri 06 Sep 2024 at 04:32pm GMT, Philip Kaludercic wrote: > >> Won't there be an error here if the command is invoked with a negative &g

bug#73102: 29.4; `package-recompile-all' should skip packages installed by distro package manager

2024-09-08 Thread Philip Kaludercic
package-recompile' call in a `with-demoted-errors' block. That would still emit a error message, but it wouldn't break the recompilation procedure. Do you think that is enough, or should be explicitly and additionally avoid re-compiling external packages? -- Philip Kaludercic on icterid

bug#69097: [PATCH] Add 'kill-region-or-word' command

2024-09-09 Thread Philip Kaludercic
a look: >From 0f19dadb75a01873cb3f40a6addd825e63c266ce Mon Sep 17 00:00:00 2001 From: Philip Kaludercic Date: Tue, 3 Sep 2024 18:29:56 +0200 Subject: [PATCH] Allow 'kill-region' kill the last word when there is no region * etc/NEWS: Document the new user option. * lisp/simple.el (kill-region-dwim): Add new opt

bug#73102: 29.4; `package-recompile-all' should skip packages installed by distro package manager

2024-09-10 Thread Philip Kaludercic
Zhengyi Fu writes: > Philip Kaludercic writes: > >> Zhengyi Fu writes: >> >>> When I try recompiling all packages installed by package.el with `M-x >>> package-recompile-all', I got the following error: >>> >>> Debugger