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: Sun, 26 Sep 2021 11:11:14 +0200

> Done (but not in inverse because other apps like Gimp use such order: 
All>None).

OK.

>> - In comments and strings it might be nice to advertise selecting the
>>    entire comment or string.
>
> This is a great idea.  I missed such ability for a long time
> to be able to select the entire string.  Now this is implemented
> using a new thing-at-point target 'list-or-string'.

And no such thing for comments?  Instead of

(nth 3 (save-excursion (syntax-ppss pos)

I'd use something like

(let ((state (save-excursion (syntax-ppss pos))))
  (cond
   ((nth 3 state)
    ... use (nth 8 state) and parse until end of string)
   ((nth 4 state)
    ... use (nth 8 state) and parse until end of comment)))

and thus immediately get type, start and end of the syntactic entity at
pos.

>> - Choosing All, in particular, will practically always relocate point
>>    and scroll the window.  This might be confusing - many people might
>>    not understand the combined effect of our "point is always visible"
>>    and "point is at one end of the active region" paradigms - so we
>>    should provide some way to retract that action and restore the window
>>    point and start position afterwards.  Maybe None could do that by
>>    default but where should List followed by Defun followed by None
>>    scroll to?
>
> Good idea, but not implementable.  This supposes that selecting All
> should remember the old position of point, then None could restore it.
> But what if the user selected the entire buffer with the key 'C-x h',
> then selected None?

What would be bad about that?  Anyway, you could add some variable you'd
set via 'All' or whatever causes pos to move off-screen and have 'None'
inspect that flag to tell whether it should go back.  Clearing the active
region would clear that variable too.

martin





reply via email to

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