From: martin rudalics <rudalics@gmx.at>
To: Daniel Koning <dk@danielkoning.com>, busk <busk@lysator.liu.se>
Cc: 6130@debbugs.gnu.org
Subject: bug#6130: 23.1; artist-mode spray-can malfunction
Date: Sat, 17 Jan 2015 14:56:26 +0100 [thread overview]
Message-ID: <54BA6A0A.4080408@gmx.at> (raw)
In-Reply-To: <m2a91i0yj6.fsf@danielkoning.com>
Thank you very much, especially for the detailed explanation.
> Here's a patch that handles 1 through 3.
I think your patch should go into Emacs 24.5. Have you signed a FSF
copyright form? If not, please do that as soon as possible.
> The extra explanatory material
> in the docs might be an inelegant half measure, though, considering the
> function and variable names still refer to the object as a window
> regardless of its actual type.
We could rename it to `posn-window-or-frame' and provide an alias.
> I also went ahead and searched the lisp/ tree for other places that
> looked risky -- that is, where a position object was assumed to hold a
> window in a context where there was no such guarantee. Nothing jumped
> out at me, but there could be any number of issues with third-party
> code.
`posnp' also looks strange in this regard.
> +the second element of any mouse event in the same way. However, the
^
Please always use two spaces after the end of a sentence.
> +drag event may end outside the boundaries of the selected frame. In
> +that case, the third element's position list contains the selected
> +frame in place of a window.
I'd expect it to be the selected frame but are we 100% sure? Could this
frame not still be the frame selected at the time mouse dragging started
while the selected frame has changed under our feet? Think of weird
things like `focus-follows-mouse' and `mouse-autoselect-window'. (This
remark might be silly but I was too lazy to test its validity right now.)
> +location outside the boundaries of the selected frame, in which case
> +the list contains the selected frame in place of a window.
Same as before.
> +Return the window that @var{position} is in. If the frame with input
> +focus does not have any window at @var{position}, return the frame
> +instead.
Hmmm... here you use "frame with input focus". This looks better but
I'm still not entirely convinced.
> + (window (if (windowp frame-or-window)
> + frame-or-window
> + nil))
Please use either
(and (windowp frame-or-window) frame-or-window)
or
(when (windowp frame-or-window) frame-or-window)
here.
> + (let* ((spacing (when (display-graphic-p frame)
> + (or (with-current-buffer (window-buffer window)
Here `window' is the selected window. IMHO
(frame-selected-window frame)
sounds more accurate, given what I said about the selected frame above.
> diff --git a/lisp/textmodes/artist.el b/lisp/textmodes/artist.el
I didn't look into these but just trust your experience here.
Thanks again, martin
next prev parent reply other threads:[~2015-01-17 13:56 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-07 12:17 bug#6130: 23.1; artist-mode spray-can malfunction busk
2015-01-17 5:25 ` Daniel Koning
2015-01-17 13:56 ` martin rudalics [this message]
2015-01-18 5:47 ` Daniel Koning
2015-01-18 9:57 ` martin rudalics
2015-01-21 0:26 ` Daniel Koning
2015-01-21 8:22 ` martin rudalics
2015-01-21 15:22 ` Stefan Monnier
2015-01-21 16:54 ` martin rudalics
2015-01-22 17:02 ` Stefan Monnier
2015-01-22 18:23 ` martin rudalics
2015-01-22 23:08 ` Stefan Monnier
2015-01-23 8:26 ` martin rudalics
2015-01-23 9:43 ` Eli Zaretskii
2015-01-23 16:54 ` martin rudalics
2015-01-23 21:05 ` Stefan Monnier
2015-01-23 21:26 ` Eli Zaretskii
2015-01-23 21:52 ` Daniel Koning
2015-01-24 8:12 ` Eli Zaretskii
2015-01-24 9:08 ` martin rudalics
2015-01-24 9:49 ` Eli Zaretskii
2016-04-06 9:17 ` Johan Busk Eriksson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54BA6A0A.4080408@gmx.at \
--to=rudalics@gmx.at \
--cc=6130@debbugs.gnu.org \
--cc=busk@lysator.liu.se \
--cc=dk@danielkoning.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).