unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: trunk r117960: * etc/TODO: Add a few entries, remove others, expand some
       [not found] <E1XXdr9-0005lG-Kw@vcs.savannah.gnu.org>
@ 2014-09-28  2:35 ` Dmitry Gutov
  2014-09-28 16:24   ` Stefan Monnier
  0 siblings, 1 reply; 8+ messages in thread
From: Dmitry Gutov @ 2014-09-28  2:35 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

Hi Stefan,

Any particular reason for the removal of this item?

> -** Compute the list of active keymaps *after* reading the first event.

After all, at the end of bug#10459, you've called the current solution
an ugly hack.

Cheers,
Dmitry.



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: trunk r117960: * etc/TODO: Add a few entries, remove others, expand some
  2014-09-28  2:35 ` trunk r117960: * etc/TODO: Add a few entries, remove others, expand some Dmitry Gutov
@ 2014-09-28 16:24   ` Stefan Monnier
  2014-09-29 23:47     ` Dmitry Gutov
  0 siblings, 1 reply; 8+ messages in thread
From: Stefan Monnier @ 2014-09-28 16:24 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: emacs-devel

> Any particular reason for the removal of this item?

AFAIK it is now fixed.

>> -** Compute the list of active keymaps *after* reading the first event.
> After all, at the end of bug#10459, you've called the current solution
> an ugly hack.

That was not a solution in src.keyboard.c but a workaround in Toby's
Elisp code, IIUC.  Since then the C code has been changed (see
src/keyboard.c:9310:

	  if (NILP (first_event))
	    {
	      first_event = key;
	      /* Even if first_event does not specify a particular
		 window/position, it's important to recompute the maps here
		 since a long time might have passed since we entered
		 read_key_sequence, and a timer (or process-filter or
		 special-event-map, ...) might have switched the current buffer
		 or the selected window from under us in the mean time.  */
	      if (fix_current_buffer
		  && (XBUFFER (XWINDOW (selected_window)->contents)
		      != current_buffer))
		Fset_buffer (XWINDOW (selected_window)->contents);
	      current_binding = active_maps (first_event);
	    }

-- Stefan



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: trunk r117960: * etc/TODO: Add a few entries, remove others, expand some
  2014-09-28 16:24   ` Stefan Monnier
@ 2014-09-29 23:47     ` Dmitry Gutov
  2014-09-30  0:28       ` Stefan Monnier
  0 siblings, 1 reply; 8+ messages in thread
From: Dmitry Gutov @ 2014-09-29 23:47 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

On 09/28/2014 08:24 PM, Stefan Monnier wrote:
>> Any particular reason for the removal of this item?
>
> AFAIK it is now fixed.

Oh, that's great, thanks. Should the bugs be closed, then?

And the change be mentioned in NEWS? So that ELisp coders know starting 
with which version of Emacs they don't need the workaround anymore.

>>> -** Compute the list of active keymaps *after* reading the first event.
>> After all, at the end of bug#10459, you've called the current solution
>> an ugly hack.
>
> That was not a solution in src.keyboard.c but a workaround in Toby's
> Elisp code, IIUC.  Since then the C code has been changed (see
> src/keyboard.c:9310:

I just meant that as long as the recommended approach for how to do that 
desired thing was a hack, the TODO item was still valid.

> 	  if (NILP (first_event))
> 	    {
> 	      first_event = key;
> 	      /* Even if first_event does not specify a particular
> 		 window/position, it's important to recompute the maps here
> 		 since a long time might have passed since we entered
> 		 read_key_sequence, and a timer (or process-filter or
> 		 special-event-map, ...) might have switched the current buffer
> 		 or the selected window from under us in the mean time.  */
> 	      if (fix_current_buffer
> 		  && (XBUFFER (XWINDOW (selected_window)->contents)
> 		      != current_buffer))
> 		Fset_buffer (XWINDOW (selected_window)->contents);
> 	      current_binding = active_maps (first_event);
> 	    }

Cool, it seems to have been changed right after the 24.3 release.



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: trunk r117960: * etc/TODO: Add a few entries, remove others, expand some
  2014-09-29 23:47     ` Dmitry Gutov
@ 2014-09-30  0:28       ` Stefan Monnier
  2014-10-05  1:38         ` Dmitry Gutov
  0 siblings, 1 reply; 8+ messages in thread
From: Stefan Monnier @ 2014-09-30  0:28 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: emacs-devel

>>> Any particular reason for the removal of this item?
>> AFAIK it is now fixed.
> Oh, that's great, thanks.  Should the bugs be closed, then?

I think so, tho we should double check that the corresponding bugs are
really fixed.

> And the change be mentioned in NEWS? So that ELisp coders know starting with
> which version of Emacs they don't need the workaround anymore.

I think it's too specific to merit mention in NEWS.  NEWS is already
pretty boringly detailed for the average user reading it.

> Cool, it seems to have been changed right after the 24.3 release.

Right, it might very well be that it's fixed in 24.4, indeed.


        Stefan



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: trunk r117960: * etc/TODO: Add a few entries, remove others, expand some
  2014-09-30  0:28       ` Stefan Monnier
@ 2014-10-05  1:38         ` Dmitry Gutov
  2014-10-05  1:54           ` Stefan Monnier
  0 siblings, 1 reply; 8+ messages in thread
From: Dmitry Gutov @ 2014-10-05  1:38 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

On 09/30/2014 04:28 AM, Stefan Monnier wrote:

>> And the change be mentioned in NEWS? So that ELisp coders know starting with
>> which version of Emacs they don't need the workaround anymore.
>
> I think it's too specific to merit mention in NEWS.  NEWS is already
> pretty boringly detailed for the average user reading it.

If you say so. I'm not sure the average users are supposed to read the 
"Lisp Changes" section, though.

Another change I've just found out about is that 
`condition-case-unless-debug' now works in post-command-hook functions.

I.e. if you `toggle-debug-on-error' and then trigger an error inside 
`condition-case-unless-debug', the backtrace will pop up. And the 
function does not get removed from `post-command-hook' either way. Which 
is very nice all around.

But NEWS just mentions backtraces from failing timers.



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: trunk r117960: * etc/TODO: Add a few entries, remove others, expand some
  2014-10-05  1:38         ` Dmitry Gutov
@ 2014-10-05  1:54           ` Stefan Monnier
  2014-10-05  2:03             ` Dmitry Gutov
  0 siblings, 1 reply; 8+ messages in thread
From: Stefan Monnier @ 2014-10-05  1:54 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: emacs-devel

> Another change I've just found out about is that
> `condition-case-unless-debug' now works in post-command-hook functions.
>
> I.e. if you `toggle-debug-on-error' and then trigger an error inside
> `condition-case-unless-debug', the backtrace will pop up. And the function
> does not get removed from `post-command-hook' either way. Which is very nice
> all around.

I'm not aware of such a change.


        Stefan



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: trunk r117960: * etc/TODO: Add a few entries, remove others, expand some
  2014-10-05  1:54           ` Stefan Monnier
@ 2014-10-05  2:03             ` Dmitry Gutov
  2014-10-06  0:58               ` Stefan Monnier
  0 siblings, 1 reply; 8+ messages in thread
From: Dmitry Gutov @ 2014-10-05  2:03 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

On 10/05/2014 05:54 AM, Stefan Monnier wrote:

> I'm not aware of such a change.

I thought it might have been accidental.

Try this:

(defun foo-post-command ()
   (condition-case-unless-debug err
       (error "hello")
     (error nil)))

(add-hook 'post-command-hook 'foo-post-command)

With debug-on-error disabled, it does nothing. With it enabled, it'll 
pop up backtrace after each command.



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: trunk r117960: * etc/TODO: Add a few entries, remove others, expand some
  2014-10-05  2:03             ` Dmitry Gutov
@ 2014-10-06  0:58               ` Stefan Monnier
  0 siblings, 0 replies; 8+ messages in thread
From: Stefan Monnier @ 2014-10-06  0:58 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: emacs-devel

> I thought it might have been accidental.

Yes, it's probably accidental.


        Stefan



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-10-06  0:58 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <E1XXdr9-0005lG-Kw@vcs.savannah.gnu.org>
2014-09-28  2:35 ` trunk r117960: * etc/TODO: Add a few entries, remove others, expand some Dmitry Gutov
2014-09-28 16:24   ` Stefan Monnier
2014-09-29 23:47     ` Dmitry Gutov
2014-09-30  0:28       ` Stefan Monnier
2014-10-05  1:38         ` Dmitry Gutov
2014-10-05  1:54           ` Stefan Monnier
2014-10-05  2:03             ` Dmitry Gutov
2014-10-06  0:58               ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).