unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* M-x zone and buffer with leading space.
@ 2005-10-06 15:04 Michael Cadilhac
  2005-10-06 16:28 ` Stefan Monnier
  2005-10-06 18:26 ` Thien-Thi Nguyen
  0 siblings, 2 replies; 5+ messages in thread
From: Michael Cadilhac @ 2005-10-06 15:04 UTC (permalink / raw)



[-- Attachment #1.1: Type: text/plain, Size: 1487 bytes --]


  Hi !

  I use an IM within emacs which hides its buffer by calling them with
  a leading space (Ex: `` *Netsoul Textbox*'').

  When a zone is made in a window showing such a buffer, it leaves
  with another buffer. Reason is just that zone kills its own buffer,
  leaving the next one shown (which can't be one with a leading
  space).

  I'm wondering if a patch like the following could be applied.

*** zone.el     2005-09-18 14:32:51.000000000 +0200
--- zone-.el    2005-10-06 16:52:59.000000000 +0200
***************
*** 135,140 ****
--- 135,141 ----
  (defun zone ()
    "Zone out, completely."
    (interactive)
+   (save-window-excursion
      (let ((f (selected-frame))
          (outbuf (get-buffer-create "*zone*"))
          (text (buffer-substring (window-start) (window-end)))
***************
*** 187,193 ****
           (funcall restore)
           (ding)
           (message "Zoning...sorry")))
!       (when restore (funcall restore)))))
  
  ;;;; Zone when idle, or not.
  
--- 188,194 ----
           (funcall restore)
           (ding)
           (message "Zoning...sorry")))
!       (when restore (funcall restore))))))
  
  ;;;; Zone when idle, or not.
  

  Thanks guys !

-- 
    Michael Cadilhac, a.k.a. Micha [mika] |
                    Epita/LRDE promo 2007 |  Please note that you should
  2 rue de la Convention | 08.70.65.13.14 |  s/-@t-/@/ my mail address.
94270 Le Kremlin Bicetre | 06.23.20.31.30 |

[-- Attachment #1.2: Type: application/pgp-signature, Size: 188 bytes --]

[-- Attachment #2: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

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

* Re: M-x zone and buffer with leading space.
  2005-10-06 15:04 M-x zone and buffer with leading space Michael Cadilhac
@ 2005-10-06 16:28 ` Stefan Monnier
  2005-10-06 16:56   ` Michael Cadilhac
  2005-10-06 18:26 ` Thien-Thi Nguyen
  1 sibling, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2005-10-06 16:28 UTC (permalink / raw)
  Cc: emacs-devel

>   I use an IM within emacs which hides its buffer by calling them with
>   a leading space (Ex: `` *Netsoul Textbox*'').

Your patch to zone is probably fine (tho I really have no idea), but I just
want to point out that buffers that are shown to the user should preferable
not start with a space.  So maybe you should report also a bug to your IM
package's author.


        Stefan

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

* Re: M-x zone and buffer with leading space.
  2005-10-06 16:28 ` Stefan Monnier
@ 2005-10-06 16:56   ` Michael Cadilhac
  2005-10-11  4:58     ` Stefan Monnier
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Cadilhac @ 2005-10-06 16:56 UTC (permalink / raw)
  Cc: emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>>   I use an IM within emacs which hides its buffer by calling them with
>>   a leading space (Ex: `` *Netsoul Textbox*'').
>
> Your patch to zone is probably fine (tho I really have no idea), but I just
> want to point out that buffers that are shown to the user should preferable
> not start with a space.  So maybe you should report also a bug to your IM
> package's author.

  The point  is that this IM  has some kind of  interface, which looks
  like:

  .-----------------------------.---------------.
  |       User's picture        | Contact list: |
  |          User name          |  * Sylvia     |
  |                             |  * Tom        |
  | <Tom> Hi !                  |  * Pierre     |
  | <You> Hello.                |  * Dummy      |
  | <Tom> foo ?                 |  * bar        |
  | <You> baz.                  |               |
  |                             |               |
  |                             |               |
  |                             |               |
  |                             |               |
  |                             |               |
  |                             |               |
  |                             |               |
  |                             |               |
  |-----------------------------|               |
  | Textbox.                    |               |
  |                             |               |
  |                             |               |
  `-----------------------------°---------------'

  This interface is independent from your current window configuration
  and  can be shown/hidden  everywhere.  It  uses window-configuration
  functions to allow this.

  In order to not mess up the whole thing and not bother the user with
  a huge buffer  list, all these buffers are  hidden using the leading
  space technique.
  
  I'm doing the same with jabber buffers: all chat buffers start with
  a space, and I've made up some functions to list them.

  Is it a misuse of this technique ?

-- 
    Michael Cadilhac, a.k.a. Micha [mika] |
                    Epita/LRDE promo 2007 |  Please note that you should
  2 rue de la Convention | 08.70.65.13.14 |  s/-@t-/@/ my mail address.
94270 Le Kremlin Bicetre | 06.23.20.31.30 |

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

* Re: M-x zone and buffer with leading space.
  2005-10-06 15:04 M-x zone and buffer with leading space Michael Cadilhac
  2005-10-06 16:28 ` Stefan Monnier
@ 2005-10-06 18:26 ` Thien-Thi Nguyen
  1 sibling, 0 replies; 5+ messages in thread
From: Thien-Thi Nguyen @ 2005-10-06 18:26 UTC (permalink / raw)
  Cc: emacs-devel

Michael Cadilhac <michael.cadilhac-@t-lrde.epita.fr> writes:

>   I'm wondering if a patch like the following could be applied.

thanks for the patch.  i have applied it.

thi

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

* Re: M-x zone and buffer with leading space.
  2005-10-06 16:56   ` Michael Cadilhac
@ 2005-10-11  4:58     ` Stefan Monnier
  0 siblings, 0 replies; 5+ messages in thread
From: Stefan Monnier @ 2005-10-11  4:58 UTC (permalink / raw)
  Cc: emacs-devel

>   In order to not mess up the whole thing and not bother the user with
>   a huge buffer list, all these buffers are hidden using the leading
>   space technique.
  
I guess we should come up with a better way to do that.
But at the same time, I can't think of why/when a "huge buffer list" would
be a problem.


        Stefan

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

end of thread, other threads:[~2005-10-11  4:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-06 15:04 M-x zone and buffer with leading space Michael Cadilhac
2005-10-06 16:28 ` Stefan Monnier
2005-10-06 16:56   ` Michael Cadilhac
2005-10-11  4:58     ` Stefan Monnier
2005-10-06 18:26 ` 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).