unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* window--dump-frame
@ 2014-05-22  6:27 Glenn Morris
  2014-05-22  7:07 ` window--dump-frame martin rudalics
  0 siblings, 1 reply; 11+ messages in thread
From: Glenn Morris @ 2014-05-22  6:27 UTC (permalink / raw)
  To: martin rudalics; +Cc: emacs-devel


Is window--dump-frame supposed to be interactive?



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

* Re: window--dump-frame
  2014-05-22  6:27 window--dump-frame Glenn Morris
@ 2014-05-22  7:07 ` martin rudalics
  2014-05-22 15:55   ` window--dump-frame Glenn Morris
  0 siblings, 1 reply; 11+ messages in thread
From: martin rudalics @ 2014-05-22  7:07 UTC (permalink / raw)
  To: Glenn Morris; +Cc: emacs-devel

 > Is window--dump-frame supposed to be interactive?

For getting more information from a bug reporter it's slightly easier to
say "do M-x window--dump-frame" than "do M-: (window--dump-frame)".

That's all.  If you think it should be changed, please do that.

martin



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

* Re: window--dump-frame
  2014-05-22  7:07 ` window--dump-frame martin rudalics
@ 2014-05-22 15:55   ` Glenn Morris
  2014-05-22 16:18     ` window--dump-frame Thien-Thi Nguyen
  0 siblings, 1 reply; 11+ messages in thread
From: Glenn Morris @ 2014-05-22 15:55 UTC (permalink / raw)
  To: martin rudalics; +Cc: emacs-devel

martin rudalics wrote:

>> Is window--dump-frame supposed to be interactive?
>
> For getting more information from a bug reporter it's slightly easier to
> say "do M-x window--dump-frame" than "do M-: (window--dump-frame)".
>
> That's all.  If you think it should be changed, please do that.

I just found it weird to see the "--" prefix on an interactive command,
but maybe it's not a contradiction?



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

* Re: window--dump-frame
  2014-05-22 15:55   ` window--dump-frame Glenn Morris
@ 2014-05-22 16:18     ` Thien-Thi Nguyen
  2014-05-22 21:06       ` window--dump-frame Stefan Monnier
  0 siblings, 1 reply; 11+ messages in thread
From: Thien-Thi Nguyen @ 2014-05-22 16:18 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 788 bytes --]

() Glenn Morris <rgm@gnu.org>
() Thu, 22 May 2014 11:55:25 -0400

   I just found it weird to see the "--" prefix on an interactive
   command, but maybe it's not a contradiction?

I think it's bad policy to leak "--" elements to interactive land.
Users will sooner or later use the command in a keyboard macro, which
then gets saved into ~/.emacs, which then breaks (some time) later,
mysteriously, when the element changes or disappears.  Then, cue the
bug report(s), finger-pointing, witch hunts (er, coding style audits),
and soul-searching...

-- 
Thien-Thi Nguyen
   GPG key: 4C807502
   (if you're human and you know it)
      read my lisp: (responsep (questions 'technical)
                               (not (via 'mailing-list)))
                     => nil

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

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

* Re: window--dump-frame
  2014-05-22 16:18     ` window--dump-frame Thien-Thi Nguyen
@ 2014-05-22 21:06       ` Stefan Monnier
  2014-05-23  7:32         ` window--dump-frame Thien-Thi Nguyen
  0 siblings, 1 reply; 11+ messages in thread
From: Stefan Monnier @ 2014-05-22 21:06 UTC (permalink / raw)
  To: emacs-devel

> I think it's bad policy to leak "--" elements to interactive land.

No, "--" means it's "internal", but it's perfectly OK to have commands
designed solely for debugging purposes, i.e. "internal use".


        Stefan



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

* Re: window--dump-frame
  2014-05-22 21:06       ` window--dump-frame Stefan Monnier
@ 2014-05-23  7:32         ` Thien-Thi Nguyen
  2014-05-23 13:30           ` window--dump-frame Stefan Monnier
  0 siblings, 1 reply; 11+ messages in thread
From: Thien-Thi Nguyen @ 2014-05-23  7:32 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1241 bytes --]

() Stefan Monnier <monnier@IRO.UMontreal.CA>
() Thu, 22 May 2014 17:06:09 -0400

   No, "--" means it's "internal", but it's perfectly OK to have
   commands designed solely for debugging purposes, i.e. "internal use".

Sure, for the programmer.  Unfortunately, the distinction is not readily
comprehensible (and more to the point, respected) by the non-programmer.
If it shows up in ‘apropos-command’, it will be tried and maybe trusted.
Betraying the trust, for reasons even justifiable, is Not Cool.

I stand by my gut feelings: Best to avoid "don't do that" in a future
mailing list post by not making "that" doable.  Next best would be to
add hugely fearsome disclaimers in the docstring, i suppose.  Then
"don't do that" becomes "RTFM", which is only slightly more mellifluous.

(In times past, i would have optimistically imagined another message:
"read the source, luke!".  Maybe that optimism will return, who knows.
No man is an island, but the puddles are damnably prevalent...)

-- 
Thien-Thi Nguyen
   GPG key: 4C807502
   (if you're human and you know it)
      read my lisp: (responsep (questions 'technical)
                               (not (via 'mailing-list)))
                     => nil

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

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

* Re: window--dump-frame
  2014-05-23  7:32         ` window--dump-frame Thien-Thi Nguyen
@ 2014-05-23 13:30           ` Stefan Monnier
  2014-05-23 17:12             ` window--dump-frame Thien-Thi Nguyen
  0 siblings, 1 reply; 11+ messages in thread
From: Stefan Monnier @ 2014-05-23 13:30 UTC (permalink / raw)
  To: emacs-devel

> Sure, for the programmer.  Unfortunately, the distinction is not readily
> comprehensible (and more to the point, respected) by the non-programmer.
> If it shows up in ‘apropos-command’, it will be tried and maybe trusted.
> Betraying the trust, for reasons even justifiable, is Not Cool.

Right, so we should make sure such internal commands only work when
called interactively, so that noone will be tempted to call them from
their little Elisp hack.


        Stefan



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

* Re: window--dump-frame
  2014-05-23 13:30           ` window--dump-frame Stefan Monnier
@ 2014-05-23 17:12             ` Thien-Thi Nguyen
  2014-05-23 20:49               ` window--dump-frame Stefan Monnier
  0 siblings, 1 reply; 11+ messages in thread
From: Thien-Thi Nguyen @ 2014-05-23 17:12 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 759 bytes --]

() Stefan Monnier <monnier@iro.umontreal.ca>
() Fri, 23 May 2014 09:30:01 -0400

   we should make sure such internal commands only work when
   called interactively

How can that be done?  Something w/ ‘called-interactively-p’?

 (defun fail-unless-called-interactively ()
   (interactive)
   (unless (called-interactively-p 'interactive)
     (error "Not for non-interactive use!"))
   (message "OK"))

That's gross (and doesn't fit the ‘called-interactively-p’
docstring admonition)!  What am i missing?

-- 
Thien-Thi Nguyen
   GPG key: 4C807502
   (if you're human and you know it)
      read my lisp: (responsep (questions 'technical)
                               (not (via 'mailing-list)))
                     => nil

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

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

* Re: window--dump-frame
  2014-05-23 17:12             ` window--dump-frame Thien-Thi Nguyen
@ 2014-05-23 20:49               ` Stefan Monnier
  2014-05-25  9:28                 ` window--dump-frame Thien-Thi Nguyen
  0 siblings, 1 reply; 11+ messages in thread
From: Stefan Monnier @ 2014-05-23 20:49 UTC (permalink / raw)
  To: emacs-devel

>    we should make sure such internal commands only work when
>    called interactively
> How can that be done?

E.g. output the result via `message' rather than returning it as
a value.


        Stefan



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

* Re: window--dump-frame
  2014-05-23 20:49               ` window--dump-frame Stefan Monnier
@ 2014-05-25  9:28                 ` Thien-Thi Nguyen
  2014-05-25 10:09                   ` window--dump-frame martin rudalics
  0 siblings, 1 reply; 11+ messages in thread
From: Thien-Thi Nguyen @ 2014-05-25  9:28 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 624 bytes --]

() Stefan Monnier <monnier@iro.umontreal.ca>
() Fri, 23 May 2014 16:49:44 -0400

   E.g. output the result via `message' rather than
   returning it as a value.

Right, then we get the reverse-engineer questions...

Anyway, i've said my piece.  I hope the function author
reconsiders things, and promise not to say "i told you so"
should things veer weird w/ those pesky users...  :-D

-- 
Thien-Thi Nguyen
   GPG key: 4C807502
   (if you're human and you know it)
      read my lisp: (responsep (questions 'technical)
                               (not (via 'mailing-list)))
                     => nil

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

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

* Re: window--dump-frame
  2014-05-25  9:28                 ` window--dump-frame Thien-Thi Nguyen
@ 2014-05-25 10:09                   ` martin rudalics
  0 siblings, 0 replies; 11+ messages in thread
From: martin rudalics @ 2014-05-25 10:09 UTC (permalink / raw)
  To: emacs-devel

> Anyway, i've said my piece.  I hope the function author
> reconsiders things, and promise not to say "i told you so"
> should things veer weird w/ those pesky users...  :-D

Since I have no opinion I removed the specification now.

martin




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

end of thread, other threads:[~2014-05-25 10:09 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-22  6:27 window--dump-frame Glenn Morris
2014-05-22  7:07 ` window--dump-frame martin rudalics
2014-05-22 15:55   ` window--dump-frame Glenn Morris
2014-05-22 16:18     ` window--dump-frame Thien-Thi Nguyen
2014-05-22 21:06       ` window--dump-frame Stefan Monnier
2014-05-23  7:32         ` window--dump-frame Thien-Thi Nguyen
2014-05-23 13:30           ` window--dump-frame Stefan Monnier
2014-05-23 17:12             ` window--dump-frame Thien-Thi Nguyen
2014-05-23 20:49               ` window--dump-frame Stefan Monnier
2014-05-25  9:28                 ` window--dump-frame Thien-Thi Nguyen
2014-05-25 10:09                   ` window--dump-frame martin rudalics

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).