unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* hide-show messages
@ 2010-10-21  7:24 Andreas Röhler
  2010-10-21 13:45 ` Thien-Thi Nguyen
  0 siblings, 1 reply; 4+ messages in thread
From: Andreas Röhler @ 2010-10-21  7:24 UTC (permalink / raw)
  To: Emacs developers; +Cc: Thien-Thi Nguyen

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


Hi,

hide-show mode is part of my daily configuration, thanks a lot.

A problem occurs when testing: as every time a new
test-buffer is inaugurated, messages are unleashed, thus
cluttering the display of test-results.

Well, can disable hs-mode expressingly when testing.

More generic will be if messages depend on
interactive-mode.  As interactive-p forms seem not
compatible throughout Emacs versions, suggest a basic solution for this.

Patch against latest source attached.

Thanks!

Andreas

--
https://code.launchpad.net/~a-roehler/python-mode/python-mode-components
https://code.launchpad.net/s-x-emacs-werkstatt/

[-- Attachment #2: hs-show-all.patch --]
[-- Type: text/x-patch, Size: 848 bytes --]

diff --git a/lisp/progmodes/hideshow.el b/lisp/progmodes/hideshow.el
index 4883150..5e718bf 100644
--- a/lisp/progmodes/hideshow.el
+++ b/lisp/progmodes/hideshow.el
@@ -811,14 +811,14 @@ If `hs-hide-comments-when-hiding-all' is non-nil, also hide the comments."
    (beginning-of-line)
    (run-hooks 'hs-hide-hook)))
 
-(defun hs-show-all ()
+(defun hs-show-all (&optional arg)
   "Show everything then run `hs-show-hook'.  See `run-hooks'."
-  (interactive)
+  (interactive "p")
   (hs-life-goes-on
-   (message "Showing all blocks ...")
+   (when arg (message "Showing all blocks ..."))
    (let ((hs-allow-nesting nil))
      (hs-discard-overlays (point-min) (point-max)))
-   (message "Showing all blocks ... done")
+   (when arg (message "Showing all blocks ... done"))
    (run-hooks 'hs-show-hook)))
 
 (defun hs-hide-block (&optional end)

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

* Re: hide-show messages
  2010-10-21  7:24 hide-show messages Andreas Röhler
@ 2010-10-21 13:45 ` Thien-Thi Nguyen
  2010-10-21 17:39   ` Andreas Röhler
  0 siblings, 1 reply; 4+ messages in thread
From: Thien-Thi Nguyen @ 2010-10-21 13:45 UTC (permalink / raw)
  To: Andreas Röhler; +Cc: Emacs developers

() Andreas Röhler <andreas.roehler@online.de>
() Thu, 21 Oct 2010 09:24:43 +0200

   Patch against latest source attached.

Unfortunately, the patch does not document the changed interface.
Fortunately, this is an opportunity to revisit the need for those
messages.  When hideshow.el was originally written, computers were
slower and such a message was reassuring when waiting for a big buffer
to be processed.  Nowadays, i think it is better to completely remove
those messages as they have become more annoying than reassuring.



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

* Re: hide-show messages
  2010-10-21 13:45 ` Thien-Thi Nguyen
@ 2010-10-21 17:39   ` Andreas Röhler
  2010-10-21 21:18     ` Thien-Thi Nguyen
  0 siblings, 1 reply; 4+ messages in thread
From: Andreas Röhler @ 2010-10-21 17:39 UTC (permalink / raw)
  To: Thien-Thi Nguyen; +Cc: Emacs developers

Am 21.10.2010 15:45, schrieb Thien-Thi Nguyen:
> () Andreas Röhler<andreas.roehler@online.de>
> () Thu, 21 Oct 2010 09:24:43 +0200
>
>     Patch against latest source attached.
>
> Unfortunately, the patch does not document the changed interface.

Hi Thi,

got it from

git://repo.or.cz/emacs.git

BTW your mail address there seems wrong.
Received:

A message that you sent could not be delivered to one or more of
its recipients. The following addresses failed:

   <ttn@gnu.org>


Andreas


> Fortunately, this is an opportunity to revisit the need for those
> messages.  When hideshow.el was originally written, computers were
> slower and such a message was reassuring when waiting for a big buffer
> to be processed.  Nowadays, i think it is better to completely remove
> those messages as they have become more annoying than reassuring.


>
>





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

* Re: hide-show messages
  2010-10-21 17:39   ` Andreas Röhler
@ 2010-10-21 21:18     ` Thien-Thi Nguyen
  0 siblings, 0 replies; 4+ messages in thread
From: Thien-Thi Nguyen @ 2010-10-21 21:18 UTC (permalink / raw)
  To: Andreas Röhler; +Cc: Emacs developers

() Andreas Röhler <andreas.roehler@online.de>
() Thu, 21 Oct 2010 19:39:17 +0200

   >     Patch against latest source attached.
   >
   > Unfortunately, the patch does not document the changed interface.

   got it from

   git://repo.or.cz/emacs.git

Sorry, i was not clear.  Here is a verbose explanation of that
sentence's intended meaning: A function's arglist is its interface.
Before, ‘hs-show-all’ took no args; your patch introduces an (optional)
arg; thus, there was a change in the interface.  Two accompanying pieces
of documentation are customary in cases like this:

 - that of the interface
 - that of the change in both interface and functionality

A preferable patch would include some modifcation to the docstring
describing the optional arg as well as a suitable ChangeLog entry,
but as it turned out, these were missing.

   BTW your mail address there seems wrong.

Yes, it has lapsed.  Please feel free to ignore it.

   > Fortunately, this is an opportunity to revisit the need for those
   > messages.  When hideshow.el was originally written, computers were
   > slower and such a message was reassuring when waiting for a big buffer
   > to be processed.  Nowadays, i think it is better to completely remove
   > those messages as they have become more annoying than reassuring.

This was my roundabout way of suggesting you post another (simpler)
patch, removing those messages altogether.  Ignoring cruft elegantly
is ok, but pruning it (elegantly or not) is better.



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

end of thread, other threads:[~2010-10-21 21:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-21  7:24 hide-show messages Andreas Röhler
2010-10-21 13:45 ` Thien-Thi Nguyen
2010-10-21 17:39   ` Andreas Röhler
2010-10-21 21:18     ` Thien-Thi Nguyen

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