unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Shortcut to change buffers?
@ 2005-04-21 14:15 JS
  2005-04-21 14:25 ` Joe Corneli
                   ` (2 more replies)
  0 siblings, 3 replies; 28+ messages in thread
From: JS @ 2005-04-21 14:15 UTC (permalink / raw)


Is there a shortcut combination that lets you shift between the different
buffers?

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

* Re: Shortcut to change buffers?
  2005-04-21 14:15 Shortcut to change buffers? JS
@ 2005-04-21 14:25 ` Joe Corneli
       [not found] ` <mailman.2409.1114093596.2895.help-gnu-emacs@gnu.org>
  2005-04-21 16:33 ` Klaus Berndl
  2 siblings, 0 replies; 28+ messages in thread
From: Joe Corneli @ 2005-04-21 14:25 UTC (permalink / raw)


>From the tutorial (C-h T) -- which you should read all of --

* BUFFERS
---------

If you find a second file with C-x C-f, the first file remains
inside Emacs.  You can switch back to it by finding it again with
C-x C-f.  This way you can get quite a number of files inside Emacs.

>> Create a file named "foo" by typing  C-x C-f foo <Return>.
   Then insert some text, edit it, and save "foo" by typing  C-x C-s.
   Finally, type C-x C-f TUTORIAL <Return>
   to come back to the tutorial.

Emacs stores each file's text inside an object called a "buffer".
Finding a file makes a new buffer inside Emacs.  To see a list of the
buffers that currently exist in your Emacs job, type

	C-x C-b   List buffers

>> Try C-x C-b now.

See how each buffer has a name, and it may also have a file name for
the file whose contents it holds.  ANY text you see in an Emacs window
is always part of some buffer.

>> Type C-x 1 to get rid of the buffer list.

When you have several buffers, only one of them is "current" at any
time.  That buffer is the one you edit.  If you want to edit another
buffer, you need to "switch" to it.  If you want to switch to a buffer
that corresponds to a file, you can do it by visiting the file again
with C-x C-f.  But there is an easier way: use the C-x b command.
In that command, you have to type the buffer's name.

>> Type C-x b foo <Return> to go back to the buffer "foo" which holds
   the text of the file "foo".  Then type C-x b TUTORIAL <Return>
   to come back to this tutorial.

Most of the time, the buffer's name is the same as the file name
(without the file directory part).  However, this is not always true.
The buffer list you make with C-x C-b always shows you the name of
every buffer.

ANY text you see in an Emacs window is always part of some buffer.
Some buffers do not correspond to files.  For example, the buffer
named "*Buffer List*" does not have any file.  It is the buffer which
contains the buffer list that you made with C-x C-b.  The buffer named
"*Messages*" also does not correspond to any file; it contains the
messages that have appeared on the bottom line during your Emacs
session.

>> Type C-x b *Messages* <Return> to look at the buffer of messages.
   Then type C-x b TUTORIAL <Return> to come back to this tutorial.

If you make changes to the text of one file, then find another file,
this does not save the first file.  Its changes remain inside Emacs,
in that file's buffer.  The creation or editing of the second file's
buffer has no effect on the first file's buffer.  This is very useful,
but it also means that you need a convenient way to save the first
file's buffer.  It would be a nuisance to have to switch back to
it with C-x C-f in order to save it with C-x C-s.  So we have

	C-x s     Save some buffers

C-x s asks you about each buffer which contains changes that you have
not saved.  It asks you, for each such buffer, whether to save the
buffer.

>> Insert a line of text, then type C-x s.
   It should ask you whether to save the buffer named TUTORIAL.
   Answer yes to the question by typing "y".

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

* Re: Shortcut to change buffers?
       [not found] ` <mailman.2409.1114093596.2895.help-gnu-emacs@gnu.org>
@ 2005-04-21 14:51   ` JS
  2005-04-21 15:04     ` Slawomir Nowaczyk
                       ` (6 more replies)
  0 siblings, 7 replies; 28+ messages in thread
From: JS @ 2005-04-21 14:51 UTC (permalink / raw)


Joe Corneli wrote:

>>From the tutorial (C-h T) -- which you should read all of --


Its not quite what I meant. I know its possible to change a buffer by C-x b
<name of buffer> RET.

But I don't think its very efficient that I need to type the buffers name
(enventhough I can use TAB to auto complete).

It takes less time just to hold down ctrl and left mouse button at the same
time and then choose the buffer from that menu.

What I thought of was something like using Alt-Tab to shift between windows,
where a menu pops up and you the find the buffer you need by repeately
pressing Tab while holding down Alt.

Is that possible?

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

* Re: Shortcut to change buffers?
  2005-04-21 14:51   ` JS
@ 2005-04-21 15:04     ` Slawomir Nowaczyk
       [not found]     ` <mailman.2416.1114096435.2895.help-gnu-emacs@gnu.org>
                       ` (5 subsequent siblings)
  6 siblings, 0 replies; 28+ messages in thread
From: Slawomir Nowaczyk @ 2005-04-21 15:04 UTC (permalink / raw)


On Thu, 21 Apr 2005 16:51:28 +0200
JS <d44sf@44ada.com> wrote:

#> What I thought of was something like using Alt-Tab to shift between windows,
#> where a menu pops up and you the find the buffer you need by repeately
#> pressing Tab while holding down Alt.

I use iswitchb, and it allows me to do C-x b and then C-s and C-r to
move back and forth through the list.

-- 
 Best wishes,
   Slawomir Nowaczyk
     ( Slawomir.Nowaczyk@cs.lth.se )

Lord, make my words as sweet as honey, for one day I may have to eat them.

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

* Re: Shortcut to change buffers?
       [not found]     ` <mailman.2416.1114096435.2895.help-gnu-emacs@gnu.org>
@ 2005-04-21 15:24       ` JS
  2005-04-21 15:56         ` Slawomir Nowaczyk
  0 siblings, 1 reply; 28+ messages in thread
From: JS @ 2005-04-21 15:24 UTC (permalink / raw)


Slawomir Nowaczyk wrote:

> On Thu, 21 Apr 2005 16:51:28 +0200
> JS <d44sf@44ada.com> wrote:
> 
> #> What I thought of was something like using Alt-Tab to shift between
> #> windows, where a menu pops up and you the find the buffer you need by
> #> repeately pressing Tab while holding down Alt.
> 
> I use iswitchb, and it allows me to do C-x b and then C-s and C-r to
> move back and forth through the list.
> 


What is iswitchb?

If I press C-x b followed by C-s it just enters search mode and wait for me
to enter a search string.

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

* Re: Shortcut to change buffers?
  2005-04-21 14:51   ` JS
  2005-04-21 15:04     ` Slawomir Nowaczyk
       [not found]     ` <mailman.2416.1114096435.2895.help-gnu-emacs@gnu.org>
@ 2005-04-21 15:39     ` Kevin Rodgers
  2005-04-21 16:33     ` Drew Adams
                       ` (3 subsequent siblings)
  6 siblings, 0 replies; 28+ messages in thread
From: Kevin Rodgers @ 2005-04-21 15:39 UTC (permalink / raw)


JS wrote:
 > Joe Corneli wrote:
 > > From the tutorial (C-h T) -- which you should read all of --
 >
 > Its not quite what I meant. I know its possible to change a buffer by 
C-x b
 > <name of buffer> RET.
 >
 > But I don't think its very efficient that I need to type the buffers name
 > (enventhough I can use TAB to auto complete).
 >
 > It takes less time just to hold down ctrl and left mouse button at 
the same
 > time and then choose the buffer from that menu.
 >
 > What I thought of was something like using Alt-Tab to shift between 
windows,
 > where a menu pops up and you the find the buffer you need by repeately
 > pressing Tab while holding down Alt.

Try `C-x C-b' (M-x list-buffers).

Try `M-x electric-buffer-list', which I like enough to override that key
binding: (global-set-key "\C-x\C-b" 'electric-buffer-list) ; was 
list-buffers

Try `C-x b ?', but with TAB and M-TAB bound to cycle through the
completions: http://www.emacswiki.org/elisp/minibuffer-complete-cycle.el

-- 
Kevin Rodgers

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

* Re: Shortcut to change buffers?
  2005-04-21 15:24       ` JS
@ 2005-04-21 15:56         ` Slawomir Nowaczyk
  0 siblings, 0 replies; 28+ messages in thread
From: Slawomir Nowaczyk @ 2005-04-21 15:56 UTC (permalink / raw)


On Thu, 21 Apr 2005 17:24:31 +0200
JS <d44sf@44ada.com> wrote:

#> Slawomir Nowaczyk wrote:

#> > I use iswitchb, and it allows me to do C-x b and then C-s and C-r to
#> > move back and forth through the list.

#> What is iswitchb?

http://www.emacswiki.org/cgi-bin/wiki/IswitchBuffers

-- 
 Best wishes,
   Slawomir Nowaczyk
     ( Slawomir.Nowaczyk@cs.lth.se )

THE GOLDEN RULE:
    "He who has the gold makes the rules."

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

* RE: Shortcut to change buffers?
  2005-04-21 14:51   ` JS
                       ` (2 preceding siblings ...)
  2005-04-21 15:39     ` Kevin Rodgers
@ 2005-04-21 16:33     ` Drew Adams
  2005-04-22 15:41       ` Drew Adams
       [not found]     ` <mailman.2417.1114098305.2895.help-gnu-emacs@gnu.org>
                       ` (2 subsequent siblings)
  6 siblings, 1 reply; 28+ messages in thread
From: Drew Adams @ 2005-04-21 16:33 UTC (permalink / raw)


See http://www.emacswiki.org/cgi-bin/wiki/CategoryBufferSwitching for plenty
of info and discussion on different quick ways to switch buffers.

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

* Re: Shortcut to change buffers?
  2005-04-21 14:15 Shortcut to change buffers? JS
  2005-04-21 14:25 ` Joe Corneli
       [not found] ` <mailman.2409.1114093596.2895.help-gnu-emacs@gnu.org>
@ 2005-04-21 16:33 ` Klaus Berndl
  2005-04-21 18:09   ` JS
  2 siblings, 1 reply; 28+ messages in thread
From: Klaus Berndl @ 2005-04-21 16:33 UTC (permalink / raw)


On Thu, 21 Apr 2005, d44sf@44ada.com wrote:

Try ido.el which is IMHO the very fastest and smartest way to switch between
buffers...

Klaus

>  Is there a shortcut combination that lets you shift between the different
>  buffers?

-- 
Klaus Berndl			mailto: klaus.berndl@sdm.de
sd&m AG				http://www.sdm.de
software design & management	
Carl-Wery-Str. 42, 81739 Muenchen, Germany
Tel +49 89 63812-392, Fax -220

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

* Re: Shortcut to change buffers?
  2005-04-21 16:33 ` Klaus Berndl
@ 2005-04-21 18:09   ` JS
  0 siblings, 0 replies; 28+ messages in thread
From: JS @ 2005-04-21 18:09 UTC (permalink / raw)


Klaus Berndl wrote:

> On Thu, 21 Apr 2005, d44sf@44ada.com wrote:
> 
> Try ido.el which is IMHO the very fastest and smartest way to switch
> between buffers...
> 
> Klaus
> 
>>  Is there a shortcut combination that lets you shift between the
>>  different buffers?
> 

It basically works like iswitchb.el. What I am looking for is something like
the Alt-Tab function that is used for shifting between regular windows.

Would it be possible to make a function in emacs just like Alt-Tab to shift
between buffers?

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

* Re: Shortcut to change buffers?
       [not found]     ` <mailman.2417.1114098305.2895.help-gnu-emacs@gnu.org>
@ 2005-04-21 18:20       ` JS
  0 siblings, 0 replies; 28+ messages in thread
From: JS @ 2005-04-21 18:20 UTC (permalink / raw)


Kevin Rodgers wrote:

> JS wrote:
>  > Joe Corneli wrote:
>  > > From the tutorial (C-h T) -- which you should read all of --
>  >
>  > Its not quite what I meant. I know its possible to change a buffer by
> C-x b
>  > <name of buffer> RET.
>  >
>  > But I don't think its very efficient that I need to type the buffers
>  > name (enventhough I can use TAB to auto complete).
>  >
>  > It takes less time just to hold down ctrl and left mouse button at
> the same
>  > time and then choose the buffer from that menu.
>  >
>  > What I thought of was something like using Alt-Tab to shift between
> windows,
>  > where a menu pops up and you the find the buffer you need by repeately
>  > pressing Tab while holding down Alt.
> 
> Try `C-x C-b' (M-x list-buffers).
> 
> Try `M-x electric-buffer-list', which I like enough to override that key
> binding: (global-set-key "\C-x\C-b" 'electric-buffer-list) ; was
> list-buffers
> 
> Try `C-x b ?', but with TAB and M-TAB bound to cycle through the
> completions: http://www.emacswiki.org/elisp/minibuffer-complete-cycle.el


I have put this file in my load path but I would like to make it a standard
option in my .emacs file. How do I do that?

In the comments it says that:

;; highlighting it in the *Completions* buffer.  As before, the window
;; displaying the possible completions is scrolled if necessary.  This
;; feature is enabled by loading this file and setting the
;; `minibuffer-complete-cycle' option to t with `M-x customize-variable'
;; or `M-x set-variable'; it is disabled by unsetting the option (to
;; nil).  Besides t, the special value `auto' enables the feature and
;; also causes the first completion to be selected immediately.

But I don't know how to set a value to "t".

I have tried: M-x customize-variable-t

but that gives no match.




> 

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

* Re: Shortcut to change buffers?
@ 2005-04-21 18:35 Ryan Bowman
  0 siblings, 0 replies; 28+ messages in thread
From: Ryan Bowman @ 2005-04-21 18:35 UTC (permalink / raw)


> >>  Is there a shortcut combination that lets you
> shift between the
> >>  different buffers?
> > 
> 
> It basically works like iswitchb.el. What I am
> looking for is something like
> the Alt-Tab function that is used for shifting
> between regular windows.
> 
> Would it be possible to make a function in emacs
> just like Alt-Tab to shift
> between buffers?

I use bs-cycle-next and bs-cycle-previous, bound
thusly:
(global-set-key "\M-n" 'bs-cycle-next)
(global-set-key "\M-p" 'bs-cycle-previous)
from bs.el which is part of emacs (at least cvs-emacs).

----
Ryan Bowman

While any text editor can save your files, only Emacs can save your soul. -- Per Abrahamsen

Emacs is not built by hate of vi. vi is irrelevant - it is no more than a strange punishment that the unbelievers submit themselves to. -- Matan Ninio
----

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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

* Re: Shortcut to change buffers?
  2005-04-21 14:51   ` JS
                       ` (4 preceding siblings ...)
       [not found]     ` <mailman.2417.1114098305.2895.help-gnu-emacs@gnu.org>
@ 2005-04-21 21:54     ` Joe Corneli
  2005-04-22 10:21     ` Steinar Børmer
  6 siblings, 0 replies; 28+ messages in thread
From: Joe Corneli @ 2005-04-21 21:54 UTC (permalink / raw)



   But I don't think its very efficient that I need to type the buffers name
   (enventhough I can use TAB to auto complete).

I'm not so sure about that.  Of course, in general your mileage may
vary, depending on the actual names of your buffers & their order in
the buffer list.

But I think that in the worst case for typing/autocompleting, tabbing
doesn't save any keypresses (anyone care to confirm or deny that
statement?), whereas in the best case for typing, tabbing is
arbitrarily bad in comparison.

Moveover, displaying the buffers you're tabbing through, or even just
their names, can be distracting.  With typing, you don't see anything
you don't have to see.

But hey, whatever works for you.  Personally I just use one buffer for
everything (and no font lock).  J/K :)

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

* Re: Shortcut to change buffers?
       [not found] <mailman.2447.1114108880.2895.help-gnu-emacs@gnu.org>
@ 2005-04-22  1:25 ` Quokka
  2005-04-22  9:54   ` JS
  0 siblings, 1 reply; 28+ messages in thread
From: Quokka @ 2005-04-22  1:25 UTC (permalink / raw)


Ryan Bowman wrote:
>>>> Is there a shortcut combination that lets you
>>
>>shift between the
>>
>>>> different buffers?
>>>

I use tabbar mode, this provides a nice graphical display
of the buffers and provides functions for next buffer
and prev buffer.

link: http://sourceforge.net/projects/emhacks/


Paul

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

* Re: Shortcut to change buffers?
  2005-04-22  1:25 ` Quokka
@ 2005-04-22  9:54   ` JS
  2005-04-22 10:34     ` Tim X
  0 siblings, 1 reply; 28+ messages in thread
From: JS @ 2005-04-22  9:54 UTC (permalink / raw)


Quokka wrote:

> Ryan Bowman wrote:
>>>>> Is there a shortcut combination that lets you
>>>
>>>shift between the
>>>
>>>>> different buffers?
>>>>
> 
> I use tabbar mode, this provides a nice graphical display
> of the buffers and provides functions for next buffer
> and prev buffer.
> 
> link: http://sourceforge.net/projects/emhacks/
> 
> 
> Paul


Could you give a short explanation on how to make it work?
I have made this in my .emacs file:

(require 'tabbar)

But when I restart emacs I get this error:



An error has occurred while loading `/home/johs/.emacs':

File error: "Cannot open load file", "tabbar"

To ensure normal operation, you should investigate the cause
of the error in your initialization file and remove it.  Start
Emacs with the `--debug-init' option to view a complete error
backtrace

------------------------

I have placed the tabbar.el file in my load path.

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

* Re: Shortcut to change buffers?
  2005-04-21 14:51   ` JS
                       ` (5 preceding siblings ...)
  2005-04-21 21:54     ` Joe Corneli
@ 2005-04-22 10:21     ` Steinar Børmer
  2005-04-22 11:54       ` JS
  6 siblings, 1 reply; 28+ messages in thread
From: Steinar Børmer @ 2005-04-22 10:21 UTC (permalink / raw)


JS wrote:

| What I thought of was something like using Alt-Tab to shift between
| windows, where a menu pops up and you the find the buffer you need by
| repeately pressing Tab while holding down Alt.
| 
| Is that possible?

Indeed.  I've searched for the ideal buffer switching mechanism for a
few years now, and several good alternatives have been tested.  So far,
I'm most happy with swbuff-x, an extension to the swbuff library.  They
can both be downloaded from the EmacsWiki at:

<URL: http://www.emacswiki.org/cgi-bin/wiki/SwBuff >

swbuff-x might not be the quickest to master, but has a number of
configuration possibilities, and exactly the functionality that you
mention.

It's also worth checking this page out:

<URL: http://www.emacswiki.org/cgi-bin/wiki/SwitchingBuffers >

-- 
SB

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

* Re: Shortcut to change buffers?
  2005-04-22  9:54   ` JS
@ 2005-04-22 10:34     ` Tim X
  2005-04-22 10:56       ` JS
  2005-04-22 11:24       ` JS
  0 siblings, 2 replies; 28+ messages in thread
From: Tim X @ 2005-04-22 10:34 UTC (permalink / raw)


JS <d44sf@44ada.com> writes:

> Quokka wrote:
>
>> Ryan Bowman wrote:
>>>>>> Is there a shortcut combination that lets you
>>>>
>>>>shift between the
>>>>
>>>>>> different buffers?
>>>>>
>> 
>> I use tabbar mode, this provides a nice graphical display
>> of the buffers and provides functions for next buffer
>> and prev buffer.
>> 
>> link: http://sourceforge.net/projects/emhacks/
>> 
>> 
>> Paul
>
>
> Could you give a short explanation on how to make it work?
> I have made this in my .emacs file:
>
> (require 'tabbar)
>
> But when I restart emacs I get this error:
>
>
>
> An error has occurred while loading `/home/johs/.emacs':
>
> File error: "Cannot open load file", "tabbar"
>
> To ensure normal operation, you should investigate the cause
> of the error in your initialization file and remove it.  Start
> Emacs with the `--debug-init' option to view a complete error
> backtrace
>
> ------------------------
>
> I have placed the tabbar.el file in my load path.
>

check your load-path variable is correct. C-h load-path <ret>
check you have the correct read mode/permissions on the file

Tim
-- 
Tim Cross
The e-mail address on this message is FALSE (obviously!). My real e-mail is
to a company in Australia called rapttech and my login is tcross - if you 
really need to send mail, you should be able to work it out!

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

* Re: Shortcut to change buffers?
  2005-04-22 10:34     ` Tim X
@ 2005-04-22 10:56       ` JS
  2005-04-23  5:04         ` Tim X
  2005-04-22 11:24       ` JS
  1 sibling, 1 reply; 28+ messages in thread
From: JS @ 2005-04-22 10:56 UTC (permalink / raw)


Tim X wrote:

> JS <d44sf@44ada.com> writes:
> 
>> Quokka wrote:
>>
>>> Ryan Bowman wrote:
>>>>>>> Is there a shortcut combination that lets you
>>>>>
>>>>>shift between the
>>>>>
>>>>>>> different buffers?
>>>>>>
>>> 
>>> I use tabbar mode, this provides a nice graphical display
>>> of the buffers and provides functions for next buffer
>>> and prev buffer.
>>> 
>>> link: http://sourceforge.net/projects/emhacks/
>>> 
>>> 
>>> Paul
>>
>>
>> Could you give a short explanation on how to make it work?
>> I have made this in my .emacs file:
>>
>> (require 'tabbar)
>>
>> But when I restart emacs I get this error:
>>
>>
>>
>> An error has occurred while loading `/home/johs/.emacs':
>>
>> File error: "Cannot open load file", "tabbar"
>>
>> To ensure normal operation, you should investigate the cause
>> of the error in your initialization file and remove it.  Start
>> Emacs with the `--debug-init' option to view a complete error
>> backtrace
>>
>> ------------------------
>>
>> I have placed the tabbar.el file in my load path.
>>
> 
> check your load-path variable is correct. C-h load-path <ret>
> check you have the correct read mode/permissions on the file
> 
> Tim


When I press C-h I just get a *Help* buffer and I cannot type anything.

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

* Re: Shortcut to change buffers?
  2005-04-22 10:34     ` Tim X
  2005-04-22 10:56       ` JS
@ 2005-04-22 11:24       ` JS
  2005-04-22 14:45         ` Mathias Dahl
  2005-04-23  5:08         ` Tim X
  1 sibling, 2 replies; 28+ messages in thread
From: JS @ 2005-04-22 11:24 UTC (permalink / raw)


Tim X wrote:

> JS <d44sf@44ada.com> writes:
> 
>> Quokka wrote:
>>
>>> Ryan Bowman wrote:
>>>>>>> Is there a shortcut combination that lets you
>>>>>
>>>>>shift between the
>>>>>
>>>>>>> different buffers?
>>>>>>
>>> 
>>> I use tabbar mode, this provides a nice graphical display
>>> of the buffers and provides functions for next buffer
>>> and prev buffer.
>>> 
>>> link: http://sourceforge.net/projects/emhacks/
>>> 
>>> 
>>> Paul
>>
>>
>> Could you give a short explanation on how to make it work?
>> I have made this in my .emacs file:
>>
>> (require 'tabbar)
>>
>> But when I restart emacs I get this error:
>>
>>
>>
>> An error has occurred while loading `/home/johs/.emacs':
>>
>> File error: "Cannot open load file", "tabbar"
>>
>> To ensure normal operation, you should investigate the cause
>> of the error in your initialization file and remove it.  Start
>> Emacs with the `--debug-init' option to view a complete error
>> backtrace
>>
>> ------------------------
>>
>> I have placed the tabbar.el file in my load path.
>>
> 
> check your load-path variable is correct. C-h load-path <ret>
> check you have the correct read mode/permissions on the file
> 
> Tim


Ok I found out that I needed to press C-h v "load-path". I get a big list of
all my load-paths and all my .el files are in one of them sp that should be
ok.

As I wrote before my setnu.el mode is working so I compared the permissions
with that for tabbar and they are the same.

So its in my load path and the permissions should be ok...what could else be
the problem?

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

* Re: Shortcut to change buffers?
  2005-04-22 10:21     ` Steinar Børmer
@ 2005-04-22 11:54       ` JS
  2005-04-25 21:57         ` Steinar Børmer
  0 siblings, 1 reply; 28+ messages in thread
From: JS @ 2005-04-22 11:54 UTC (permalink / raw)


Steinar Børmer wrote:

> JS wrote:
> 
> | What I thought of was something like using Alt-Tab to shift between
> | windows, where a menu pops up and you the find the buffer you need by
> | repeately pressing Tab while holding down Alt.
> | 
> | Is that possible?
> 
> Indeed.  I've searched for the ideal buffer switching mechanism for a
> few years now, and several good alternatives have been tested.  So far,
> I'm most happy with swbuff-x, an extension to the swbuff library.  They
> can both be downloaded from the EmacsWiki at:
> 
> <URL: http://www.emacswiki.org/cgi-bin/wiki/SwBuff >


I have just downloaded swbuff.el and put it in my load-path. When I open the
file in an editor it says that I should just put:

(require 'swbuff)

in my .emacs file.

When I do that I get this error:

An error has occurred while loading `/home/johs/.emacs':

File error: "Cannot open load file", "swbuff"

To ensure normal operation, you should investigate the cause
of the error in your initialization file and remove it.  Start
Emacs with the `--debug-init' option to view a complete error
backtrace



-----------------------

I have instead tried to write:

(provide 'swbuff)

then I emacs restarts without error but I don't know if is read at all.

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

* Re: Shortcut to change buffers?
  2005-04-22 11:24       ` JS
@ 2005-04-22 14:45         ` Mathias Dahl
  2005-04-22 15:18           ` JS
  2005-04-23  5:08         ` Tim X
  1 sibling, 1 reply; 28+ messages in thread
From: Mathias Dahl @ 2005-04-22 14:45 UTC (permalink / raw)


JS <d44sf@44ada.com> writes:

> As I wrote before my setnu.el mode is working so I compared the
> permissions with that for tabbar and they are the same.
>
> So its in my load path and the permissions should be ok...what could
> else be the problem?

That sounds really strange... Anyway, you could load it more directly,
like this in your .emacs:

 (load-file "/home/js/mylispfile.el")

If you don't want to wrestle with the load-path problem now.

/Mathias

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

* Re: Shortcut to change buffers?
  2005-04-22 14:45         ` Mathias Dahl
@ 2005-04-22 15:18           ` JS
  2005-04-22 15:23             ` David Kastrup
  0 siblings, 1 reply; 28+ messages in thread
From: JS @ 2005-04-22 15:18 UTC (permalink / raw)


Mathias Dahl wrote:

> JS <d44sf@44ada.com> writes:
> 
>> As I wrote before my setnu.el mode is working so I compared the
>> permissions with that for tabbar and they are the same.
>>
>> So its in my load path and the permissions should be ok...what could
>> else be the problem?
> 
> That sounds really strange... Anyway, you could load it more directly,
> like this in your .emacs:
> 
>  (load-file "/home/js/mylispfile.el")


It keeps getting wierder and wierder. I have now writtin this in my .emacs
file:

(load-file "/home/johs/sml-mode/swbuff.el")
(require 'swbuff)
(global-set-key '[C-tab]   'swbuff-switch-to-next-buffer)





I get this error when I restart emacs:

An error has occurred while loading `/home/johs/.emacs':

Symbol's function definition is void: load-file 

To ensure normal operation, you should investigate the cause
of the error in your initialization file and remove it.  Start
Emacs with the `--debug-init' option to view a complete error
backtrace


I have also tried to outcomment (require 'swbuff) but it still gives the
same error.

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

* Re: Shortcut to change buffers?
  2005-04-22 15:18           ` JS
@ 2005-04-22 15:23             ` David Kastrup
  2005-04-25  7:04               ` Mathias Dahl
  0 siblings, 1 reply; 28+ messages in thread
From: David Kastrup @ 2005-04-22 15:23 UTC (permalink / raw)


JS <d44sf@44ada.com> writes:

> Mathias Dahl wrote:
>
>> JS <d44sf@44ada.com> writes:
>> 
>>> As I wrote before my setnu.el mode is working so I compared the
>>> permissions with that for tabbar and they are the same.
>>>
>>> So its in my load path and the permissions should be ok...what could
>>> else be the problem?
>> 
>> That sounds really strange... Anyway, you could load it more directly,
>> like this in your .emacs:
>> 
>>  (load-file "/home/js/mylispfile.el")
>
>
> It keeps getting wierder and wierder. I have now writtin this in my .emacs
> file:
>
> (load-file "/home/johs/sml-mode/swbuff.el")
            ^ non-breakable space

> (require 'swbuff)
> (global-set-key '[C-tab]   'swbuff-switch-to-next-buffer)
>
> I get this error when I restart emacs:
>
> An error has occurred while loading `/home/johs/.emacs':
>
> Symbol's function definition is void: load-file 
                                                 ^non-breakable space
>

Why don't you get yourself a reasonable Newsreader instead of this
Knode crap?  If you are using Emacs anyway, Gnus is an obvious choice.

You can't cut&paste from Knode windows: it will deliver crap for
spaces and possibly also hyphens.  So don't copy&paste: type the stuff
carefully new.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

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

* RE: Shortcut to change buffers?
  2005-04-21 16:33     ` Drew Adams
@ 2005-04-22 15:41       ` Drew Adams
  0 siblings, 0 replies; 28+ messages in thread
From: Drew Adams @ 2005-04-22 15:41 UTC (permalink / raw)


I sent this yesterday, but I guess it didn't go through:

    See http://www.emacswiki.org/cgi-bin/wiki/CategoryBufferSwitching
    for plenty of info and discussion on different quick ways to
    switch buffers.

Everything mentioned here so far is discussed there, with, I think, the
exception of tabbars.

HTH,

  Drew

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

* Re: Shortcut to change buffers?
  2005-04-22 10:56       ` JS
@ 2005-04-23  5:04         ` Tim X
  0 siblings, 0 replies; 28+ messages in thread
From: Tim X @ 2005-04-23  5:04 UTC (permalink / raw)


JS <d44sf@44ada.com> writes:

> Tim X wrote:
>
>> 
>> check your load-path variable is correct. C-h load-path <ret>
>> check you have the correct read mode/permissions on the file
>> 
>> Tim
>
>
> When I press C-h I just get a *Help* buffer and I cannot type anything.

Should have been C-h v load-path <ret>

and BTW, stop trying to cut corners - read the bloody manual and stop
trying to work it out with such a hit and miss approach. You are just
adding bits and pieces without any evidence you are making the
slightest effort to understand what you are doing. 

For example, when you hit C-h, a message appears in the mini-buffer
instructing you to hit ? for more information. Did you try doing that?
It doesn't appear so because if you had, you would have recieved a
whole menu of options of how you can get help - including a
description of the 'v' option, which is what you needed. 

Tim

-- 
Tim Cross
The e-mail address on this message is FALSE (obviously!). My real e-mail is
to a company in Australia called rapttech and my login is tcross - if you 
really need to send mail, you should be able to work it out!

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

* Re: Shortcut to change buffers?
  2005-04-22 11:24       ` JS
  2005-04-22 14:45         ` Mathias Dahl
@ 2005-04-23  5:08         ` Tim X
  1 sibling, 0 replies; 28+ messages in thread
From: Tim X @ 2005-04-23  5:08 UTC (permalink / raw)


JS <d44sf@44ada.com> writes:

> Tim X wrote:
>
>> JS <d44sf@44ada.com> writes:
>> 
>>> Quokka wrote:
>>>
>>>> Ryan Bowman wrote:
>>>>>>>> Is there a shortcut combination that lets you
>>>>>>
>>>>>>shift between the
>>>>>>
>>>>>>>> different buffers?
>>>>>>>
>>>> 
>>>> I use tabbar mode, this provides a nice graphical display
>>>> of the buffers and provides functions for next buffer
>>>> and prev buffer.
>>>> 
>>>> link: http://sourceforge.net/projects/emhacks/
>>>> 
>>>> 
>>>> Paul
>>>
>>>
>>> Could you give a short explanation on how to make it work?
>>> I have made this in my .emacs file:
>>>
>>> (require 'tabbar)
>>>
>>> But when I restart emacs I get this error:
>>>
>>>
>>>
>>> An error has occurred while loading `/home/johs/.emacs':
>>>
>>> File error: "Cannot open load file", "tabbar"
>>>
>>> To ensure normal operation, you should investigate the cause
>>> of the error in your initialization file and remove it.  Start
>>> Emacs with the `--debug-init' option to view a complete error
>>> backtrace
>>>
>>> ------------------------
>>>
>>> I have placed the tabbar.el file in my load path.
>>>
>> 
>> check your load-path variable is correct. C-h load-path <ret>
>> check you have the correct read mode/permissions on the file
>> 
>> Tim
>
>
> Ok I found out that I needed to press C-h v "load-path". I get a big list of
> all my load-paths and all my .el files are in one of them sp that should be
> ok.
>
> As I wrote before my setnu.el mode is working so I compared the permissions
> with that for tabbar and they are the same.
>
> So its in my load path and the permissions should be ok...what could else be
> the problem?

OK, then try loading the file by hand. Type M-x load-file <ret>
/path/to/file.el <ret> and see if you get any errors. 

Tim

-- 
Tim Cross
The e-mail address on this message is FALSE (obviously!). My real e-mail is
to a company in Australia called rapttech and my login is tcross - if you 
really need to send mail, you should be able to work it out!

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

* Re: Shortcut to change buffers?
  2005-04-22 15:23             ` David Kastrup
@ 2005-04-25  7:04               ` Mathias Dahl
  0 siblings, 0 replies; 28+ messages in thread
From: Mathias Dahl @ 2005-04-25  7:04 UTC (permalink / raw)


David Kastrup <dak@gnu.org> writes:

>> It keeps getting wierder and wierder. I have now writtin this in my .emacs
>> file:
>>
>> (load-file "/home/johs/sml-mode/swbuff.el")
>             ^ non-breakable space
>
>> (require 'swbuff)
>> (global-set-key '[C-tab]   'swbuff-switch-to-next-buffer)
>>
>> I get this error when I restart emacs:
>>
>> An error has occurred while loading `/home/johs/.emacs':
>>
>> Symbol's function definition is void: load-file 
>                                                  ^non-breakable space
>>

>...

> You can't cut&paste from Knode windows: it will deliver crap for
> spaces and possibly also hyphens.  So don't copy&paste: type the
> stuff carefully new.

Maybe we can help this guy replacing all those non-breaking spaces
with normal spaces? I could not find out how to enter that character
without (like with C-q ... ) pasting it into a call to replace-string.

/Mathias

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

* Re: Shortcut to change buffers?
  2005-04-22 11:54       ` JS
@ 2005-04-25 21:57         ` Steinar Børmer
  0 siblings, 0 replies; 28+ messages in thread
From: Steinar Børmer @ 2005-04-25 21:57 UTC (permalink / raw)


JS wrote:

| I have just downloaded swbuff.el and put it in my load-path. When I
| open the file in an editor it says that I should just put:
| 
| (require 'swbuff)
| 
| in my .emacs file.
| 
| When I do that I get this error:
| 
| An error has occurred while loading `/home/johs/.emacs':
| 
| File error: "Cannot open load file", "swbuff"

That means that swbuff.el is not loaded.  Something is wrong, and I'm
not able to tell you what based on the information you supply.

Like I said, I use swbuff-x (downloaded from the same URL), and I simply
use a (require 'swbuff-x).  Works for me.

| I have instead tried to write:
| 
| (provide 'swbuff)
| 
| then I emacs restarts without error but I don't know if is read at
| all.

No, it certainly isn't.  `provide' is put at the end of a file (elisp
library) so that that file/library may be loaded with `require', just as
you're attempting.  Putting it in ~/.emacs is like saying that ~/.emacs
contains the swbuff code, which is clearly wrong.

-- 
SB

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

end of thread, other threads:[~2005-04-25 21:57 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-21 14:15 Shortcut to change buffers? JS
2005-04-21 14:25 ` Joe Corneli
     [not found] ` <mailman.2409.1114093596.2895.help-gnu-emacs@gnu.org>
2005-04-21 14:51   ` JS
2005-04-21 15:04     ` Slawomir Nowaczyk
     [not found]     ` <mailman.2416.1114096435.2895.help-gnu-emacs@gnu.org>
2005-04-21 15:24       ` JS
2005-04-21 15:56         ` Slawomir Nowaczyk
2005-04-21 15:39     ` Kevin Rodgers
2005-04-21 16:33     ` Drew Adams
2005-04-22 15:41       ` Drew Adams
     [not found]     ` <mailman.2417.1114098305.2895.help-gnu-emacs@gnu.org>
2005-04-21 18:20       ` JS
2005-04-21 21:54     ` Joe Corneli
2005-04-22 10:21     ` Steinar Børmer
2005-04-22 11:54       ` JS
2005-04-25 21:57         ` Steinar Børmer
2005-04-21 16:33 ` Klaus Berndl
2005-04-21 18:09   ` JS
  -- strict thread matches above, loose matches on Subject: below --
2005-04-21 18:35 Ryan Bowman
     [not found] <mailman.2447.1114108880.2895.help-gnu-emacs@gnu.org>
2005-04-22  1:25 ` Quokka
2005-04-22  9:54   ` JS
2005-04-22 10:34     ` Tim X
2005-04-22 10:56       ` JS
2005-04-23  5:04         ` Tim X
2005-04-22 11:24       ` JS
2005-04-22 14:45         ` Mathias Dahl
2005-04-22 15:18           ` JS
2005-04-22 15:23             ` David Kastrup
2005-04-25  7:04               ` Mathias Dahl
2005-04-23  5:08         ` Tim X

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