all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* expand/collapse{} in c++
@ 2005-08-23 20:00 Baloff
  2005-08-23 20:31 ` Gnus threading (was: expand/collapse{} in c++) Jason Dufair
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Baloff @ 2005-08-23 20:00 UTC (permalink / raw)


Hello
I tried to find out how to do this expand/collapse the code into {...}
from the info docs but it is not there. could someone help please.

another point:
M-x gnus or even M-x 5 2 gnus, the frame or both frames freeze till it
finishes downloading the articles, then I can use emacs, is that the
way it is?

thanks

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

* Gnus threading (was: expand/collapse{} in c++)
  2005-08-23 20:00 expand/collapse{} in c++ Baloff
@ 2005-08-23 20:31 ` Jason Dufair
  2005-08-24 17:36   ` Baloff
  2005-08-23 20:47 ` expand/collapse{} in c++ Sébastien Kirche
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 12+ messages in thread
From: Jason Dufair @ 2005-08-23 20:31 UTC (permalink / raw)


Baloff <washdc@xxx> writes:

> M-x gnus or even M-x 5 2 gnus, the frame or both frames freeze till it
> finishes downloading the articles, then I can use emacs, is that the
> way it is?

I believe this is indeed the way it is.  I understand from previous
newsgroup discussions this is due to the fact that at least some parts
of Emacs are not multi-threaded and so other internal processes are
blocking on I/O of some sort.

I have gotten around this process by simply running Gnus in a separate
Emacs process (and another frame, obviously).  Not the most elegant, but
it does the trick.
-- 
Jason Dufair - jase@dufair.org
http://www.dufair.org/
***The above does not represent the views of my employer(s),
except for the bit about the cows.

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

* Re: expand/collapse{} in c++
  2005-08-23 20:00 expand/collapse{} in c++ Baloff
  2005-08-23 20:31 ` Gnus threading (was: expand/collapse{} in c++) Jason Dufair
@ 2005-08-23 20:47 ` Sébastien Kirche
  2005-08-23 21:59 ` Alan Mackenzie
  2005-08-24  3:32 ` Eli Zaretskii
  3 siblings, 0 replies; 12+ messages in thread
From: Sébastien Kirche @ 2005-08-23 20:47 UTC (permalink / raw)


At 22:08 on aoû 23 2005, Baloff said :

> I tried to find out how to do this expand/collapse the code into {...}
> from the info docs but it is not there. could someone help please.

Look at "FoldingMode" in the wiki : 
http://www.emacswiki.org/cgi-bin/wiki/CategoryOutline

FoldingMode does exactly what you  need but it needs some modification of
the file to add some delimiters for the folds.
Fold-mode prototype from Marcus Breiing does without modification of the
file.

HTH.
-- 
Sébastien Kirche

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

* Re: expand/collapse{} in c++
  2005-08-23 20:00 expand/collapse{} in c++ Baloff
  2005-08-23 20:31 ` Gnus threading (was: expand/collapse{} in c++) Jason Dufair
  2005-08-23 20:47 ` expand/collapse{} in c++ Sébastien Kirche
@ 2005-08-23 21:59 ` Alan Mackenzie
  2005-08-26 20:31   ` Baloff
  2005-08-24  3:32 ` Eli Zaretskii
  3 siblings, 1 reply; 12+ messages in thread
From: Alan Mackenzie @ 2005-08-23 21:59 UTC (permalink / raw)


Baloff <washdc@wash.edu> wrote on 24 Aug 2005 06:00:22 +1000:
> Hello
> I tried to find out how to do this expand/collapse the code into {...}
> from the info docs but it is not there. could someone help please.

Oh yes it is!  Or, at least, something very like it.  The node is in the
Emacs manual, and is called "Hideshow".  Briefly, enable it with "M-x
hs-minor-mode" (possibly from a hook).  Then you will have commands
available like :

  `C-c @ C-h'
       Hide the current block (`hs-hide-block').

  `C-c @ C-s'
       Show the current block (`hs-show-block').

  `C-c @ C-c'
       Either hide or show the current block (`hs-toggle-hiding')

[ .... ]

> thanks

-- 
Alan Mackenzie (Munich, Germany)
Email: aacm@muuc.dee; to decode, wherever there is a repeated letter
(like "aa"), remove half of them (leaving, say, "a").

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

* Re: expand/collapse{} in c++
  2005-08-23 20:00 expand/collapse{} in c++ Baloff
                   ` (2 preceding siblings ...)
  2005-08-23 21:59 ` Alan Mackenzie
@ 2005-08-24  3:32 ` Eli Zaretskii
  3 siblings, 0 replies; 12+ messages in thread
From: Eli Zaretskii @ 2005-08-24  3:32 UTC (permalink / raw)


> From: Baloff <washdc@wash.edu>
> Date: 24 Aug 2005 06:00:22 +1000
> 
> I tried to find out how to do this expand/collapse the code into {...}
> from the info docs but it is not there. could someone help please.

Is "C-x $" what you want?  It is described in the node "Selective
Display".

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

* Re: Gnus threading (was: expand/collapse{} in c++)
  2005-08-23 20:31 ` Gnus threading (was: expand/collapse{} in c++) Jason Dufair
@ 2005-08-24 17:36   ` Baloff
  2005-08-24 19:22     ` Gnus threading Johan Bockgård
  0 siblings, 1 reply; 12+ messages in thread
From: Baloff @ 2005-08-24 17:36 UTC (permalink / raw)


Jason Dufair <jase@dufair.org> writes:

> Baloff <washdc@xxx> writes:
> 
> > M-x gnus or even M-x 5 2 gnus, the frame or both frames freeze till it
> > finishes downloading the articles, then I can use emacs, is that the
> > way it is?
> 
> I believe this is indeed the way it is.  I understand from previous
> newsgroup discussions this is due to the fact that at least some parts
> of Emacs are not multi-threaded and so other internal processes are
> blocking on I/O of some sort.
> 
> I have gotten around this process by simply running Gnus in a separate
> Emacs process (and another frame, obviously).  Not the most elegant, but
> it does the trick.
> -- 
> Jason Dufair - jase@dufair.org


how do you start gnus inside an emacs processor right form the shell?
I $emacs& then M-x gnus every time. but even that does now show in 
$ps f
  PID TTY      STAT   TIME COMMAND
 1066 pts/0    Ss+    0:00 bash
 1574 pts/0    Sl     4:19  \_ /usr/lib/mozilla-firefox/firefox-bin -a firefox
 2402 pts/0    S      0:09  \_ emacs
 2406 pts/0    S      0:28  \_ emacs
  922 tty1     S      0:00 -bash
  923 tty1     S+     0:00  \_ /bin/sh /usr/bin/X11/startx
  934 tty1     S+     0:00      \_ xinit /usr/X11R6/lib/X11/xinit/xinitrc -- /usr/X11R6/lib/X11/xinit/xserverrc
  940 tty1     S      0:01          \_ x-session-manager
  989 tty1     S      0:00 /usr/bin/gnome-keyring-daemon
  986 tty1     S      0:03 /usr/lib/gconf2/gconfd-2 5

>  LocalWords:  PID

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

* Re: Gnus threading
  2005-08-24 17:36   ` Baloff
@ 2005-08-24 19:22     ` Johan Bockgård
  0 siblings, 0 replies; 12+ messages in thread
From: Johan Bockgård @ 2005-08-24 19:22 UTC (permalink / raw)


Baloff <washdc@wash.edu> writes:

> how do you start gnus inside an emacs processor right form the
> shell?

alias  gnus  emacs -f gnus

-- 
Johan Bockgård

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

* Re: expand/collapse{} in c++
  2005-08-23 21:59 ` Alan Mackenzie
@ 2005-08-26 20:31   ` Baloff
  2005-08-26 21:56     ` Peter Lee
  2005-08-26 22:00     ` Jason Dufair
  0 siblings, 2 replies; 12+ messages in thread
From: Baloff @ 2005-08-26 20:31 UTC (permalink / raw)


Alan Mackenzie <acm@muc.de> writes:

> Baloff <washdc@wash.edu> wrote on 24 Aug 2005 06:00:22 +1000:
> 
> > Hello
> > I tried to find out how to do this expand/collapse the code into {...}
> > from the info docs but it is not there. could someone help please.
> 
> Oh yes it is!  Or, at least, something very like it.  The node is in the
> Emacs manual, and is called "Hideshow".  Briefly, enable it with "M-x
> hs-minor-mode" (possibly from a hook).  Then you will have commands
> available like :
> 
>   `C-c @ C-h'
>        Hide the current block (`hs-hide-block').
> 
>   `C-c @ C-s'
>        Show the current block (`hs-show-block').
> 
>   `C-c @ C-c'
>        Either hide or show the current block (`hs-toggle-hiding')
> 
> [ .... ]
> 
> > thanks
> 
> -- 
> Alan Mackenzie (Munich, Germany)
> Email: aacm@muuc.dee; to decode, wherever there is a repeated letter
> (like "aa"), remove half of them (leaving, say, "a").

I did the following but I must have done something wrong because it is
still not working.
in my .emacs I put
(add-hook 'c++-mode-hook 'hs-minor-mode t) ;for block hide/show

in a .emacs-c++ file to be loaded from inside .emacs, I have
(local-set-key [f4] "\C-c @ \C-c") ;toggles block hide/show

restart emacs, when I open .cpp file, f4 does nothing.

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

* Re: expand/collapse{} in c++
  2005-08-26 20:31   ` Baloff
@ 2005-08-26 21:56     ` Peter Lee
  2005-08-26 22:00     ` Jason Dufair
  1 sibling, 0 replies; 12+ messages in thread
From: Peter Lee @ 2005-08-26 21:56 UTC (permalink / raw)


>>>> Baloff  writes:

    Baloff> (add-hook 'c++-mode-hook 'hs-minor-mode t) ;for block hide/show

Think you want:

(add-hook 'c++-mode-hook (lambda () (hs-minor-mode 1)))

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

* Re: expand/collapse{} in c++
  2005-08-26 20:31   ` Baloff
  2005-08-26 21:56     ` Peter Lee
@ 2005-08-26 22:00     ` Jason Dufair
  2005-08-26 22:39       ` Kevin Rodgers
       [not found]       ` <mailman.5188.1125098056.20277.help-gnu-emacs@gnu.org>
  1 sibling, 2 replies; 12+ messages in thread
From: Jason Dufair @ 2005-08-26 22:00 UTC (permalink / raw)


Baloff <washdc@XXX> writes:

> in a .emacs-c++ file to be loaded from inside .emacs, I have
> (local-set-key [f4] "\C-c @ \C-c") ;toggles block hide/show
>
> restart emacs, when I open .cpp file, f4 does nothing.

First, the 2nd argument to 'local-set-key should be a function
definition, not another set of key bindings.  Use C-h k to see what
function "C-c@C-c" calls and use that function name as your second
argument.


Also, local-set-key only works on the current local keymap.  If you only
want that binding available in c++-mode, you probably have set the
binding in the mode hook
-- 
Jason Dufair - jase@dufair.org
http://www.dufair.org/
***The above does not represent the views of my employer(s),
except for the bit about the cows.

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

* Re: expand/collapse{} in c++
  2005-08-26 22:00     ` Jason Dufair
@ 2005-08-26 22:39       ` Kevin Rodgers
       [not found]       ` <mailman.5188.1125098056.20277.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 12+ messages in thread
From: Kevin Rodgers @ 2005-08-26 22:39 UTC (permalink / raw)


Jason Dufair wrote:
 > Baloff <washdc@XXX> writes:
 >>in a .emacs-c++ file to be loaded from inside .emacs, I have
 >>(local-set-key [f4] "\C-c @ \C-c") ;toggles block hide/show
 >>
 >>restart emacs, when I open .cpp file, f4 does nothing.
 >
 > First, the 2nd argument to 'local-set-key should be a function
 > definition, not another set of key bindings.  Use C-h k to see what
 > function "C-c@C-c" calls and use that function name as your second
 > argument.

The 2nd argument must be a command, which can be an interactive function
or a keyboard macro, or a symbol with such a function binding -- see the
"What is a Function?" and "Command [Loop] Overview" sections of the
Emacs Lisp manual.  The proper representation of the key sequence `C-c a
C-c' as a keyboard macro is any of:

"\C-c@\C-a" ; no spaces!
[?\C-c ?@ ?\C-a]
[(control ?c) ?@ (control ?a)]
(kbd "C-c @ C-a")

(see the "Init Rebinding" node of the Emacs manual and the "Changing Key
Bindings" node of the Emacs Lisp manual)

 > Also, local-set-key only works on the current local keymap.  If you only
 > want that binding available in c++-mode, you probably have set the
 > binding in the mode hook

That's what I recommend, but some people prefer to use define-key and
specify the keymap by name:

(define-key c++-mode-map [f4] (kbd "C-c @ C-a"))

-- 
Kevin Rodgers

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

* Re: expand/collapse{} in c++
       [not found]       ` <mailman.5188.1125098056.20277.help-gnu-emacs@gnu.org>
@ 2005-08-27  8:31         ` Baloff
  0 siblings, 0 replies; 12+ messages in thread
From: Baloff @ 2005-08-27  8:31 UTC (permalink / raw)


Kevin Rodgers <ihs_4664@yahoo.com> writes:



C-h k C-c@ is undefined

(add-hook 'c++-mode-hook
          '(lambda ()
	     (turn-on-auto-fill) ;;Insert a newline if line gets to long.
             (c-toggle-auto-state 1) ;;Make ; and { and } and : all electric
	     (hs-minor-mode 1) ;for block hide/show
             (c-set-style "mc394-style")))

in .emacs-mc394 I have
(local-set-key [f4] "\C-c@\C-c") ;toggles block hide/show


> Jason Dufair wrote:
> 
>  > Baloff <washdc@XXX> writes:
>  >>in a .emacs-c++ file to be loaded from inside .emacs, I have
>  >>(local-set-key [f4] "\C-c @ \C-c") ;toggles block hide/show
>  >>
>  >>restart emacs, when I open .cpp file, f4 does nothing.
>  >
>  > First, the 2nd argument to 'local-set-key should be a function
>  > definition, not another set of key bindings.  Use C-h k to see what
>  > function "C-c@C-c" calls and use that function name as your second
>  > argument.
> 
> The 2nd argument must be a command, which can be an interactive function
> or a keyboard macro, or a symbol with such a function binding -- see the
> "What is a Function?" and "Command [Loop] Overview" sections of the
> Emacs Lisp manual.  The proper representation of the key sequence `C-c a
> C-c' as a keyboard macro is any of:
> 
> "\C-c@\C-a" ; no spaces!
> [?\C-c ?@ ?\C-a]
> [(control ?c) ?@ (control ?a)]
> (kbd "C-c @ C-a")
> 
> (see the "Init Rebinding" node of the Emacs manual and the "Changing Key
> Bindings" node of the Emacs Lisp manual)
> 
>  > Also, local-set-key only works on the current local keymap.  If you only
>  > want that binding available in c++-mode, you probably have set the
>  > binding in the mode hook
> 
> That's what I recommend, but some people prefer to use define-key and
> specify the keymap by name:
> 
> (define-key c++-mode-map [f4] (kbd "C-c @ C-a"))
> 
> -- 
> Kevin Rodgers

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

end of thread, other threads:[~2005-08-27  8:31 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-23 20:00 expand/collapse{} in c++ Baloff
2005-08-23 20:31 ` Gnus threading (was: expand/collapse{} in c++) Jason Dufair
2005-08-24 17:36   ` Baloff
2005-08-24 19:22     ` Gnus threading Johan Bockgård
2005-08-23 20:47 ` expand/collapse{} in c++ Sébastien Kirche
2005-08-23 21:59 ` Alan Mackenzie
2005-08-26 20:31   ` Baloff
2005-08-26 21:56     ` Peter Lee
2005-08-26 22:00     ` Jason Dufair
2005-08-26 22:39       ` Kevin Rodgers
     [not found]       ` <mailman.5188.1125098056.20277.help-gnu-emacs@gnu.org>
2005-08-27  8:31         ` Baloff
2005-08-24  3:32 ` Eli Zaretskii

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.