bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#9054: 24.0.50; show source in other window


From: martin rudalics
Subject: bug#9054: 24.0.50; show source in other window
Date: Mon, 4 Oct 2021 10:28:01 +0200

> I tried to add a new 'thing-at-point' target 'comment',
> but then discovered that it's already supported by
>
>    (thing-at-point 'comment)
>
> because it automatically calls '(forward-comment 1)' and '(forward-comment 
-1)'.
> However, it seems currently 'forward-comment' is broken -
> it does nothing inside comments.  Maybe there is a bug?

IIUC 'forward-comment' is context-agnostic - you can safely use it only
at top level.  So in the case at hand you would have to run it from the
8th element of the return value of 'syntax-ppss'.  That's why I would
run 'syntax-ppss' from the current mouse position using the return value
of 'syntax-ppss' as OLDSTATE to avoid scanning text twice.

> Meanwhile, I moved Defun/List/Symbol selection items to prog-mode,
> and added Paragraph/Sentence/Word selection items to text-mode
> as well as to strings/comments in prog-mode.  Please check
> if everything is correct.

I will look as soon as I've pulled the sources again.  I have yet to
rename my "release" tree to "emacs-27", rebuild all targets there, make
emacs 28 my new release tree and rebuild all targets for it.  This
requires secure sources and I'm not yet sure what Paul's fixes have in
store for me.

BTW, I've recently seen this

Debugger entered--Lisp error: (args-out-of-range #<buffer *Help*> 1 2461677)
  parse-partial-sexp(1 2461677)
  syntax-ppss(2461677)
  context-menu-region((keymap #("Context Menu" 0 12 (hide t)) (separator-undo "--") (separator-region "--") (paste menu-item "Paste" mouse-yank-at-click :help "Paste (yank) text most recently cut/copied") (paste-from-menu menu-item "Paste from Kill Menu" 
(keymap (10 menu-item "\\" #f(compiled-function () (interactive nil) #<bytecode 0x1b8a5eddfe5537c0>)) (9 menu-item "\\" #f(compiled-function () (interactive nil) #<bytecode 0x1b8a5eddfe5537c0>)) (8 menu-item "\\" #f(compiled-function () (interactive nil) #<bytecode 
0x1b8a5eddfe5537c0>)) (7 menu-item "\\" #f(compiled-function () (interactive nil) #<bytecode 0x1b8a5eddfe5537c0>)) (6 menu-item "\\" #f(compiled-function () (interactive nil) #<bytecode 0x1b8a5eddfe5537c0>)) (5 menu-item "\\" #f(compiled-function () (interactive nil) 
#<bytecode 0x1b8a5eddfe5537c0>)) (4 menu-item "\\" #f(compiled-function () (interactive nil) #<bytecode 0x1b8a5eddfe5537c0>)) (3 menu-item "\\" #f(compiled-function () (interactive nil) #<bytecode 0x1b8a5eddfe5537c0>)) (2 menu-item "\\" #f(compiled-function () 
(interactive nil) #<bytecode 0x1b8a5eddfe5537c0>)) (1 menu-item "\\" #f(compiled-function () (interactive nil) #<bytecode 0x1b8a5eddfe5537c0>)) "Paste from Kill Menu") :help "Choose a string from the kill ring and paste it")) 98)
  #f(compiled-function (fun) #<bytecode 
-0x1ee96643fef4ee80>)(context-menu-region)
  run-hook-wrapped(#f(compiled-function (fun) #<bytecode -0x1ee96643fef4ee80>) 
context-menu-region)
  context-menu-map()
  (lambda (_) (context-menu-map))(ignore)
  lookup-key(((down-mouse-3 menu-item "Context Menu" ignore :filter (lambda (_) 
(context-menu-map))) (mouse-3)) [down-mouse-3] t)
  describe-map((keymap (menu) (down-mouse-3 menu-item "Context Menu" ignore 
:filter (lambda (_) (context-menu-map))) (mouse-3)) [] nil t ((keymap (M-f4 . 
kill-frame-or-emacs) (C-M-S-down . window-delete-or-split-down) (C-M-S-right . 
window-delete-or-split-right) (C-M-S-up . window-delete-or-split-up) (C-M-S-left . 
window-delete-or-split-left) (M-S-down . windows-clock-down) (M-S-right . 
windows-clock-right) (M-S-up . windows-clock-up) (M-S-left . windows-clock-left) (M-down 
. window-delete-or-split-down) (M-up . window-delete-or-split-up) (M-right . 
my-bury-buffer) (M-left . my-unbury-buffer))) t nil)
  describe-map-tree((keymap (menu) (down-mouse-3 menu-item "Context Menu" ignore :filter 
(lambda (_) (context-menu-map))) (mouse-3)) t ((keymap (M-f4 . kill-frame-or-emacs) (C-M-S-down . 
window-delete-or-split-down) (C-M-S-right . window-delete-or-split-right) (C-M-S-up . 
window-delete-or-split-up) (C-M-S-left . window-delete-or-split-left) (M-S-down . 
windows-clock-down) (M-S-right . windows-clock-right) (M-S-up . windows-clock-up) (M-S-left . 
windows-clock-left) (M-down . window-delete-or-split-down) (M-up . window-delete-or-split-up) 
(M-right . my-bury-buffer) (M-left . my-unbury-buffer))) nil "\f\n`context-menu-mode' Minor 
Mode Bindings" t nil nil nil)
  describe-buffer-bindings(#<buffer *info*> nil)
  describe-bindings()
  funcall-interactively(describe-bindings)
  call-interactively(describe-bindings nil nil)
  command-execute(describe-bindings)

Any ideas as to what could have happened here?  I must have been hitting
C-h b by accident - as a rule I never call 'describe-bindings' - but
2461677 looks slightly preposterous ...

martin

reply via email to

[Prev in Thread] Current Thread [Next in Thread]