all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Feeling lost without tabs
@ 2014-07-20  1:47 Sampath Weerasinghe
  2014-07-20  4:08 ` Yuri Khan
                   ` (5 more replies)
  0 siblings, 6 replies; 42+ messages in thread
From: Sampath Weerasinghe @ 2014-07-20  1:47 UTC (permalink / raw)
  To: help-gnu-emacs

Hi,

I'm slowly migrating from notepad++ to emacs.

I feel a bit lost because emacs doesn't show
tabs. I work on multiple projects, I get distracted by various things,
but when I come back to the seat it is the tabs that
remind me which project I was last working on.

I know C-x C-b pops it up, but involves multiple keys and it also
takes a a lot of screen real estate.

I'm wondering how others overcame this.

-Sam


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

* Re: Feeling lost without tabs
  2014-07-20  1:47 Feeling lost without tabs Sampath Weerasinghe
@ 2014-07-20  4:08 ` Yuri Khan
  2014-07-20  4:27   ` Eli Zaretskii
                     ` (2 more replies)
  2014-07-20  6:25 ` Filipp Gunbin
                   ` (4 subsequent siblings)
  5 siblings, 3 replies; 42+ messages in thread
From: Yuri Khan @ 2014-07-20  4:08 UTC (permalink / raw)
  To: Sampath Weerasinghe; +Cc: help-gnu-emacs@gnu.org

On Sun, Jul 20, 2014 at 8:47 AM, Sampath Weerasinghe <swe20144@gmail.com> wrote:

> I'm slowly migrating from notepad++ to emacs.
>
> I feel a bit lost because emacs doesn't show
> tabs. I work on multiple projects, I get distracted by various things,
> but when I come back to the seat it is the tabs that
> remind me which project I was last working on.
>
> I know C-x C-b pops it up, but involves multiple keys and it also
> takes a a lot of screen real estate.
>
> I'm wondering how others overcame this.

You might want to have a look at tabbar-mode.



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

* Re: Feeling lost without tabs
  2014-07-20  4:08 ` Yuri Khan
@ 2014-07-20  4:27   ` Eli Zaretskii
  2014-07-20  5:12     ` Yuri Khan
  2014-07-20  5:22   ` Feeling lost without tabs Tak Kunihiro
       [not found]   ` <mailman.5729.1405830475.1147.help-gnu-emacs@gnu.org>
  2 siblings, 1 reply; 42+ messages in thread
From: Eli Zaretskii @ 2014-07-20  4:27 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Sun, 20 Jul 2014 11:08:06 +0700
> From: Yuri Khan <yuri.v.khan@gmail.com>
> Cc: "help-gnu-emacs@gnu.org" <help-gnu-emacs@gnu.org>
> 
> > I feel a bit lost because emacs doesn't show
> > tabs. I work on multiple projects, I get distracted by various things,
> > but when I come back to the seat it is the tabs that
> > remind me which project I was last working on.
> >
> > I know C-x C-b pops it up, but involves multiple keys and it also
> > takes a a lot of screen real estate.
> >
> > I'm wondering how others overcame this.
> 
> You might want to have a look at tabbar-mode.

That's one way.  Another one is to have separate frames dedicated to
different projects/activities.  You switch to a frame when you need to
get back to the project/activity specific to that frame.  Each frame
in Emacs "prefers" the buffers used in that frame, so switching
between buffers within a frame is likely to be easy, without mixing
buffers from other frames.



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

* Re: Feeling lost without tabs
  2014-07-20  4:27   ` Eli Zaretskii
@ 2014-07-20  5:12     ` Yuri Khan
  2014-07-20  6:09       ` Eli Zaretskii
                         ` (2 more replies)
  0 siblings, 3 replies; 42+ messages in thread
From: Yuri Khan @ 2014-07-20  5:12 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: help-gnu-emacs@gnu.org

On Sun, Jul 20, 2014 at 11:27 AM, Eli Zaretskii <eliz@gnu.org> wrote:

>> You might want to have a look at tabbar-mode.
>
> That's one way.  Another one is to have separate frames dedicated to
> different projects/activities.  You switch to a frame when you need to
> get back to the project/activity specific to that frame.  Each frame
> in Emacs "prefers" the buffers used in that frame, so switching
> between buffers within a frame is likely to be easy, without mixing
> buffers from other frames.

How do *you* switch buffers preferred by the current frame?


In plain uncustomized Emacs, the ways of switching buffers are:

* C-x <left> and C-x <right>. For me, these conveniently work for up
to two buffers. After that, I start forgetting which way to each of
the buffers, and after three, it gets tedious just to repeat
keystrokes.
* C-x b, followed by typing a buffer name, possibly using completion.
This requires holding buffer names or at least their prefixes in one’s
head. Additionally, completion does not honor frame boundaries.
* C-x C-f with a file path/name of an existing buffer, assuming the
target is a file buffer. Roughly the same inconveniences as above.
* C-x C-b, followed by choosing a buffer from the list. This also
ignores frame boundaries and involves switching to an intermediate
buffer that occupies the whole window.


To switch buffers efficiently, I need a visual representation of their
relative order so that I can roughly estimate the number of times I
need to press a switching key combo; tabbar-mode gives me that
concisely and unobtrusively and, with a suitable grouping function,
also relevantly to the frame. (Alternatively, I could do with numbered
buffers with tabbar showing the numbers and Alt+[1-9] switching to the
indicated buffer.) I assume OP feels similarly.



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

* Re: Feeling lost without tabs
  2014-07-20  4:08 ` Yuri Khan
  2014-07-20  4:27   ` Eli Zaretskii
@ 2014-07-20  5:22   ` Tak Kunihiro
       [not found]   ` <mailman.5729.1405830475.1147.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 42+ messages in thread
From: Tak Kunihiro @ 2014-07-20  5:22 UTC (permalink / raw)
  To: help-gnu-emacs; +Cc: tak.kunihiro

> I know C-x C-b pops it up, but involves multiple keys and it also
> takes a a lot of screen real estate.

I make a narrow window on left-hand side and have buffer-menu.  I
recommend to make the window dedicated and remember, the window is
dedicated by you.

(defun buffer-menu-left ()
  "Open buffer-menu at the left-hand side"
  (interactive)
  (split-window-horizontally 30)
  (buffer-menu t)
  (set-window-dedicated-p (selected-window) t))



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

* Re: Feeling lost without tabs
  2014-07-20  5:12     ` Yuri Khan
@ 2014-07-20  6:09       ` Eli Zaretskii
  2014-07-20 16:48         ` Yuri Khan
       [not found]         ` <mailman.5771.1405874938.1147.help-gnu-emacs@gnu.org>
  2014-07-20  7:19       ` Bob Proulx
       [not found]       ` <mailman.5741.1405840784.1147.help-gnu-emacs@gnu.org>
  2 siblings, 2 replies; 42+ messages in thread
From: Eli Zaretskii @ 2014-07-20  6:09 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Sun, 20 Jul 2014 12:12:41 +0700
> From: Yuri Khan <yuri.v.khan@gmail.com>
> Cc: "help-gnu-emacs@gnu.org" <help-gnu-emacs@gnu.org>
> 
> How do *you* switch buffers preferred by the current frame?

"C-x b".  The preference thing is automatic.

> To switch buffers efficiently, I need a visual representation of their
> relative order

AFAIK, each frame orders the buffers separately, so I don't see why
you would have a problem here.



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

* Re: Feeling lost without tabs
  2014-07-20  1:47 Feeling lost without tabs Sampath Weerasinghe
  2014-07-20  4:08 ` Yuri Khan
@ 2014-07-20  6:25 ` Filipp Gunbin
  2014-07-20  9:20 ` Kevin Le Gouguec
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 42+ messages in thread
From: Filipp Gunbin @ 2014-07-20  6:25 UTC (permalink / raw)
  To: Sampath Weerasinghe; +Cc: help-gnu-emacs

On 20/07/2014 05:47 +0400, Sampath Weerasinghe wrote:

> I feel a bit lost because emacs doesn't show
> tabs. I work on multiple projects, I get distracted by various things,
> but when I come back to the seat it is the tabs that
> remind me which project I was last working on.

I'm using probably the simplest method: `C-x b' offers "future history"
(the sequence of suggestions when you hit `M-n' in the minibuffer) and
it's isearch-able!  So `C-x b' followed by `C-s' and a few letters from
the name of the buffer (any part of it).  The order in which the future
history is organized is the same as in *Buffer List* - recent come
first.

Other than that, if I completely forget the names, I switch to a dired
(I open each project in a dired buffer with -R ls option, so it shows
all files).  `(setq dired-isearch-filenames t)' helps to isearch there
when I see the needed file.

    Filipp



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

* Re: Feeling lost without tabs
  2014-07-20  5:12     ` Yuri Khan
  2014-07-20  6:09       ` Eli Zaretskii
@ 2014-07-20  7:19       ` Bob Proulx
       [not found]       ` <mailman.5741.1405840784.1147.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 42+ messages in thread
From: Bob Proulx @ 2014-07-20  7:19 UTC (permalink / raw)
  To: help-gnu-emacs

Yuri Khan wrote:
> How do *you* switch buffers preferred by the current frame?

I bind C-x C-b to electric-buffer-list.  I couldn't live without it
now.  In MNHO it is soooo much nicer than list-buffers.

  (global-set-key "\C-x\C-b" 'electric-buffer-list) ; originally list-buffers

Then C-x C-b C-n C-n ... C-n SPACE to select a buffer.

Bob



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

* Re: Feeling lost without tabs
  2014-07-20  1:47 Feeling lost without tabs Sampath Weerasinghe
  2014-07-20  4:08 ` Yuri Khan
  2014-07-20  6:25 ` Filipp Gunbin
@ 2014-07-20  9:20 ` Kevin Le Gouguec
  2014-07-20 17:36 ` Drew Adams
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 42+ messages in thread
From: Kevin Le Gouguec @ 2014-07-20  9:20 UTC (permalink / raw)
  To: Sampath Weerasinghe; +Cc: help-gnu-emacs

Had a similar experience. Searching for some way to manage my buffers taught me about Ibuffer:

http://emacs-fu.blogspot.fr/2010/02/dealing-with-many-buffers-ibuffer.html
http://www.emacswiki.org/emacs/IbufferMode

It basically creates a list of all your open "tabs", and you can teach it to sort stuff in meaningful categories.

- comes with Emacs since version 22
- "teaching it" simply means adding a line like ("Category Name" (filename . "dir/to/category/")) to your config file. Filters can be based on file path, editing mode, file size...
- I made C-x C-b open Ibuffer rather than buffer-menu. I don't find the two key strokes too taxing (tell Left Pinky to go sleep on Control, get Left Index and Right Index to hit X and B roughly at the same time, there, done. Touch typists will probably tell me I should use Left Middle or Left Ring to reach X)
- the screen space is replaced by the first buffer I choose to open. Admittedly, the tabs bar on Notepad++ is always present; I got used to its absence, but I think I saw others suggesting ways to get something that stays "always on"




----- Original Message -----
From: "Sampath Weerasinghe" <swe20144@gmail.com>
To: help-gnu-emacs@gnu.org
Sent: Sunday, July 20, 2014 3:47:47 AM
Subject: Feeling lost without tabs

Hi,

I'm slowly migrating from notepad++ to emacs.

I feel a bit lost because emacs doesn't show
tabs. I work on multiple projects, I get distracted by various things,
but when I come back to the seat it is the tabs that
remind me which project I was last working on.

I know C-x C-b pops it up, but involves multiple keys and it also
takes a a lot of screen real estate.

I'm wondering how others overcame this.

-Sam



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

* Re: Feeling lost without tabs
  2014-07-20  6:09       ` Eli Zaretskii
@ 2014-07-20 16:48         ` Yuri Khan
  2014-07-20 17:30           ` Eli Zaretskii
  2014-07-21 14:15           ` Stefan Monnier
       [not found]         ` <mailman.5771.1405874938.1147.help-gnu-emacs@gnu.org>
  1 sibling, 2 replies; 42+ messages in thread
From: Yuri Khan @ 2014-07-20 16:48 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: help-gnu-emacs@gnu.org

On Sun, Jul 20, 2014 at 1:09 PM, Eli Zaretskii <eliz@gnu.org> wrote:

>> To switch buffers efficiently, I need a visual representation of their
>> relative order
>
> AFAIK, each frame orders the buffers separately, so I don't see why
> you would have a problem here.

The problem here is that I need to see the list before I start pressing keys.

The workflow with tabbar is: eyes see tabs, fingers repeatedly press
M-S-<right>, eyes confirm that the desired tab is highlighted, fingers
stop pressing keys. With buffer-list, it is similar except the list is
more verbose.

The workflow with C-x b is: fingers press C-x b, eyes see the default
next buffer, brain tests if that’s the right one. It’s not, A: so
fingers press <down>, eyes read the next buffer name, brain tests if
that’s the right one, if not, repeat from A:. Finally, fingers press
RET.

The cognitive load (roughly, the number of eyes-brain-fingers
roundtrips) is much worse in the second case as the operations cannot
be done concurrently.



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

* Re: Feeling lost without tabs
  2014-07-20 16:48         ` Yuri Khan
@ 2014-07-20 17:30           ` Eli Zaretskii
  2014-07-21 14:15           ` Stefan Monnier
  1 sibling, 0 replies; 42+ messages in thread
From: Eli Zaretskii @ 2014-07-20 17:30 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Sun, 20 Jul 2014 23:48:52 +0700
> From: Yuri Khan <yuri.v.khan@gmail.com>
> Cc: "help-gnu-emacs@gnu.org" <help-gnu-emacs@gnu.org>
> 
> On Sun, Jul 20, 2014 at 1:09 PM, Eli Zaretskii <eliz@gnu.org> wrote:
> 
> >> To switch buffers efficiently, I need a visual representation of their
> >> relative order
> >
> > AFAIK, each frame orders the buffers separately, so I don't see why
> > you would have a problem here.
> 
> The problem here is that I need to see the list before I start pressing keys.

Only if there are a lot of them.  Keep your frames project-specific,
and there won't be too many of them you'll need to remember.  E.g.,
with programming projects, I normally switch to a buffer via some
tags-related command, so I don't even need to remember the buffer
name.  And if I need to switch to a buffer visiting a specific source
file, then I know that buffer's name by definition.  Etc. etc.

> The workflow with C-x b is: fingers press C-x b, eyes see the default
> next buffer, brain tests if that’s the right one.

A frame can display more than a single buffer, so you don't need to
switch buffers so frequently.  And when you do switch, even if you do
that with "C-x b", chances are it's the buffer displayed previously in
the same window, so no such complex procedure is needed.  I usually
just press "C-x b RET" without even looking.

> The cognitive load (roughly, the number of eyes-brain-fingers
> roundtrips) is much worse in the second case as the operations cannot
> be done concurrently.

Granted, you are happy with your workflow, as much as I'm happy with
mine (for many years now).  You asked me how do I manage my buffers,
and I told you.  We don't need to prove each other that the other's
workflow is worse.




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

* RE: Feeling lost without tabs
  2014-07-20  1:47 Feeling lost without tabs Sampath Weerasinghe
                   ` (2 preceding siblings ...)
  2014-07-20  9:20 ` Kevin Le Gouguec
@ 2014-07-20 17:36 ` Drew Adams
  2014-07-20 18:02 ` Robert Thorpe
  2014-08-16 21:13 ` Marcin Borkowski
  5 siblings, 0 replies; 42+ messages in thread
From: Drew Adams @ 2014-07-20 17:36 UTC (permalink / raw)
  To: Sampath Weerasinghe, help-gnu-emacs

> I'm slowly migrating from notepad++ to emacs.

Sounds good.  Come on in.  Enjoy.

> I feel a bit lost because emacs doesn't show tabs. I work on
> multiple projects, I get distracted by various things,

Who doesn't? ;-)

> but when I come back to the seat it is the tabs that
> remind me which project I was last working on.

A couple of things...

1. Many (most?) Emacs users do not quit Emacs and restart it
often.  So after they get distracted by other things or take a
break, and then come back to Emacs, they come back to the same
Emacs session and they see where they left off.

2. Beyond that, there are many ways Emacs can help you organize
and keep track of projects.  Different users use different ways,
and sometimes different ways for different sets of projects.

Emacs Wiki has info that users have offered about how they work
with projects.  It can be a good place to start.  This page in
particular links to lots of info about using Emacs with projects:
http://www.emacswiki.org/CategoryProject

Wrt sets of buffers, Eli mentioned separate frames, which is one
way to group buffers into sets.  With Emacs 24.4 you can even
save frame sets persistently (as part of saved Emacs desktops),
so you can come back to them in a later Emacs session.  (But
that won't help much with some buffers that are not associated
with files.)

Another way to define sets of buffers (or files or...) is to
use Emacs bookmarks.  Like Emacs desktops, bookmarks can be
persistent (they are by default).

If you use library Bookmark+, http://www.emacswiki.org/BookmarkPlus
then you can have desktop bookmarks, which means that by hitting
a key you can switch to a different set of frames, buffers, etc.
Bookmark+ also lets you tag bookmarks in arbitrary ways, which
defines different sets of bookmarks (hence different sets of
files, directories, projects,...).

There are really quite a few things that Emacs has to offer in
the way of organizing projects.  And for just switching among
buffers (which is where this thread started).

Start with something like `tabbar.el' if it is close to what
you are used to and what you like.  But I think you will sooner
or later try other things that offer you more features for
navigating and organizing projects.

(Oh, and try starting Emacs once and leaving it running...
Emacs is not Notepad or notepad++.)



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

* Re: Feeling lost without tabs
  2014-07-20  1:47 Feeling lost without tabs Sampath Weerasinghe
                   ` (3 preceding siblings ...)
  2014-07-20 17:36 ` Drew Adams
@ 2014-07-20 18:02 ` Robert Thorpe
  2014-08-16 21:13 ` Marcin Borkowski
  5 siblings, 0 replies; 42+ messages in thread
From: Robert Thorpe @ 2014-07-20 18:02 UTC (permalink / raw)
  To: Sampath Weerasinghe; +Cc: help-gnu-emacs

Sampath Weerasinghe <swe20144@gmail.com> writes:
...
> I know C-x C-b pops it up, but involves multiple keys and it also
> takes a a lot of screen real estate.
>
> I'm wondering how others overcame this.

There are many ways to deal with this, as others have shown.

I often leave Emacs open on a buffer list to remind myself of what I was
doing.  I remap the keys C-x LEFT and C-x RIGHT to shorter combinations
(I use C-4 & C-5).  If I know the buffer isn't one of the ones I've used
recently I use C-x b is I know it's name, if not I use C-x C-b.  I've
mapped C-x C-b to buffer-menu-other-window.  That only changes one thing
compared to the default, it makes the cursor move to the buffer-menu.  I
find that useful because the buffer-menu has useful navigation keys.
For example, "1" will make the selected buffer fill the whole frame.
"2" is useful too, do C-h m in a buffer menu and you'll find some useful
keybindings.  Like Eli I tend to use tag following when I'm navigating
code.

BR,
Robert Thorpe



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

* Re: Feeling lost without tabs
       [not found]       ` <mailman.5741.1405840784.1147.help-gnu-emacs@gnu.org>
@ 2014-07-20 18:36         ` Emanuel Berg
  2014-07-20 23:48           ` Dan Espen
                             ` (2 more replies)
  0 siblings, 3 replies; 42+ messages in thread
From: Emanuel Berg @ 2014-07-20 18:36 UTC (permalink / raw)
  To: help-gnu-emacs

Bob Proulx <bob@proulx.com> writes:

> I bind C-x C-b to electric-buffer-list.  I couldn't
> live without it now.  In MNHO it is soooo much nicer
> than list-buffers.

Could you just short say what the differences are and
how you experience them to be better? I never used
`electric-buffer-list' but it looks kind of the same at
first glance.

-- 
underground experts united


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

* Re: Feeling lost without tabs
       [not found]         ` <mailman.5771.1405874938.1147.help-gnu-emacs@gnu.org>
@ 2014-07-20 18:40           ` Emanuel Berg
  2014-07-21  3:56             ` Yuri Khan
  0 siblings, 1 reply; 42+ messages in thread
From: Emanuel Berg @ 2014-07-20 18:40 UTC (permalink / raw)
  To: help-gnu-emacs

Yuri Khan <yuri.v.khan@gmail.com> writes:

> The workflow with tabbar is: eyes see tabs, fingers
> repeatedly press M-S-<right>

You can of course reconfigure that to something that
doesn't involve reaching for the arrow keys. I had to
do that with w3m because they also had long and far
keystrokes for moving between the tabs as
default. This was even more bizarre since w3m isn't a
"type mode" - the entire keyboard (including single
keys: "a", "f", etc.) is available! I found that "j"
and "l" are good chaises for horizontal movement, and
likewise "i" and "k" for vertical. Again, where they
are on they keyboard, and where your fingers
are... With tabs, and a buffer you'd type in, you'll
need a prefix, of course, but the rest is applicable
just the same...

-- 
underground experts united


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

* Re: Feeling lost without tabs
  2014-07-20 18:36         ` Emanuel Berg
@ 2014-07-20 23:48           ` Dan Espen
  2014-07-21  0:29             ` Emanuel Berg
  2014-07-21 16:25           ` Bob Proulx
       [not found]           ` <mailman.5823.1405959942.1147.help-gnu-emacs@gnu.org>
  2 siblings, 1 reply; 42+ messages in thread
From: Dan Espen @ 2014-07-20 23:48 UTC (permalink / raw)
  To: help-gnu-emacs

Emanuel Berg <embe8573@student.uu.se> writes:

> Bob Proulx <bob@proulx.com> writes:
>
>> I bind C-x C-b to electric-buffer-list.  I couldn't
>> live without it now.  In MNHO it is soooo much nicer
>> than list-buffers.
>
> Could you just short say what the differences are and
> how you experience them to be better? I never used
> `electric-buffer-list' but it looks kind of the same at
> first glance.

Yes, it does, but in each way it differs, it's better.
It's been so long since I switched that I can't enumerate
the differences.

Space selects.
You can mark multiple buffers for deletion.

-- 
Dan Espen


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

* Re: Feeling lost without tabs
  2014-07-20 23:48           ` Dan Espen
@ 2014-07-21  0:29             ` Emanuel Berg
  2014-07-21  1:08               ` Charles Philip Chan
  2014-07-21  2:25               ` Dan Espen
  0 siblings, 2 replies; 42+ messages in thread
From: Emanuel Berg @ 2014-07-21  0:29 UTC (permalink / raw)
  To: help-gnu-emacs

Dan Espen <despen@verizon.net> writes:

>> Could you just short say what the differences are
>> and how you experience them to be better? I never
>> used `electric-buffer-list' but it looks kind of the
>> same at first glance.
>
> Yes, it does, but in each way it differs, it's
> better.  It's been so long since I switched that I
> can't enumerate the differences.

OK, I like `buffer-menu' because it replaces the whole
window where the command is given. (But I take it that
can be configured for `list-buffers' and the
`electric-buffer-list' as well.) But I've spent some
time configuring the `buffer-menu', and I have no
complaints, so I won't switch, but it is interesting
that at least three so alike solutions to do more or
less the same thing are shipped with Emacs. Not that I
mind, let a thousand flowers bloom... But normally you
don't see that.

-- 
underground experts united


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

* Re: Feeling lost without tabs
  2014-07-21  0:29             ` Emanuel Berg
@ 2014-07-21  1:08               ` Charles Philip Chan
  2014-07-21  2:25               ` Dan Espen
  1 sibling, 0 replies; 42+ messages in thread
From: Charles Philip Chan @ 2014-07-21  1:08 UTC (permalink / raw)
  To: help-gnu-emacs

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

Emanuel Berg <embe8573@student.uu.se> writes:

> but it is interesting that at least three so alike solutions to do
> more or less the same thing are shipped with Emacs. Not that I mind,
> let a thousand flowers bloom... But normally you don't see that.

Not part of Emacs, but after trying many options, I have happily settled
on using Helm[1] (formally Anything) for completions. For buffers there
is helm-buffers-list[2]. Here is a wiki to show you what Helm can do[3].

Charles


Footnotes: 
[1] https://github.com/emacs-helm/helm 

[2] https://github.com/emacs-helm/helm/wiki#helmforbuffers 

[3] https://github.com/emacs-helm/helm/wiki 

-- 
"Whip me.  Beat me.  Make me maintain AIX."
(By Stephan Zielinski)

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

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

* Re: Feeling lost without tabs
  2014-07-21  0:29             ` Emanuel Berg
  2014-07-21  1:08               ` Charles Philip Chan
@ 2014-07-21  2:25               ` Dan Espen
  1 sibling, 0 replies; 42+ messages in thread
From: Dan Espen @ 2014-07-21  2:25 UTC (permalink / raw)
  To: help-gnu-emacs

Emanuel Berg <embe8573@student.uu.se> writes:

> Dan Espen <despen@verizon.net> writes:
>
>>> Could you just short say what the differences are
>>> and how you experience them to be better? I never
>>> used `electric-buffer-list' but it looks kind of the
>>> same at first glance.
>>
>> Yes, it does, but in each way it differs, it's
>> better.  It's been so long since I switched that I
>> can't enumerate the differences.
>
> OK, I like `buffer-menu' because it replaces the whole
> window where the command is given.

electric will take as much room as it needs, but looks
like it will leave 3 lines visible.  It's been so
long, but it's one of the things I liked.

> (But I take it that
> can be configured for `list-buffers' and the
> `electric-buffer-list' as well.) But I've spent some
> time configuring the `buffer-menu',

On the wiki I wrote up how to font-lock the electric
buffer list.



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

* Re: Feeling lost without tabs
  2014-07-20 18:40           ` Emanuel Berg
@ 2014-07-21  3:56             ` Yuri Khan
  0 siblings, 0 replies; 42+ messages in thread
From: Yuri Khan @ 2014-07-21  3:56 UTC (permalink / raw)
  To: Emanuel Berg; +Cc: help-gnu-emacs@gnu.org

On Mon, Jul 21, 2014 at 1:40 AM, Emanuel Berg <embe8573@student.uu.se> wrote:

>> The workflow with tabbar is: eyes see tabs, fingers
>> repeatedly press M-S-<right>
>
> You can of course reconfigure that to something that
> doesn't involve reaching for the arrow keys.

I don’t need to — on my keyboard the arrow keys are a good deal closer
to the home row than on conventional PC keyboard. In fact, I can press
<right> with a two-row curl of the right pinky. Search for “Truly
Ergonomic” if interested.



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

* Re: Feeling lost without tabs
  2014-07-20 16:48         ` Yuri Khan
  2014-07-20 17:30           ` Eli Zaretskii
@ 2014-07-21 14:15           ` Stefan Monnier
  2014-07-22  3:51             ` Yuri Khan
  1 sibling, 1 reply; 42+ messages in thread
From: Stefan Monnier @ 2014-07-21 14:15 UTC (permalink / raw)
  To: help-gnu-emacs

> The workflow with C-x b is: fingers press C-x b, eyes see the default
> next buffer, brain tests if that’s the right one. It’s not, A: so
> fingers press <down>, eyes read the next buffer name, brain tests if
> that’s the right one, if not, repeat from A:. Finally, fingers press
> RET.

You might like to try icomplete-mode.
And you might like to M-x report-emacs-bug requesting that the list of
completions in icomplete-mode (for C-x b) sort buffers "for the current
frame" before others.


        Stefan




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

* Re: Feeling lost without tabs
  2014-07-20 18:36         ` Emanuel Berg
  2014-07-20 23:48           ` Dan Espen
@ 2014-07-21 16:25           ` Bob Proulx
  2014-07-22  0:57             ` Robert Thorpe
       [not found]           ` <mailman.5823.1405959942.1147.help-gnu-emacs@gnu.org>
  2 siblings, 1 reply; 42+ messages in thread
From: Bob Proulx @ 2014-07-21 16:25 UTC (permalink / raw)
  To: help-gnu-emacs

Emanuel Berg wrote:
> Bob Proulx writes:
> > I bind C-x C-b to electric-buffer-list.  I couldn't
> > live without it now.  In MNHO it is soooo much nicer
> > than list-buffers.
> 
> Could you just short say what the differences are and
> how you experience them to be better? I never used
> `electric-buffer-list' but it looks kind of the same at
> first glance.

As others have said it opens a buffer window, places the point at the
first file in that buffer window.  This shows me a buffer window list
and focuses there.  I can review my buffer windows.  Hitting SPACE
selects a buffer window.  If I hit SPACE immediately then I return to
the same buffer window I left.  Otherwise I can n, n, n down to the
buffer window I want and SPACE to select it.  The newly selected
buffer now replaces the previously selected buffer window.  The new
emacs window configuration with regard to split windows is the same
for all other windows but the currently focused window only is changed
to another buffer.

I had previously said C-n C-p to move through the menu list.  But of
course n and p also work.  I usually already have my finger on the
control so had not really taken notice of the flexibility.

With list-buffers the buffer list splits the current frame into two
windows and puts the buffer window list into the other window.
Whatever buffer I had in the other split window is now gone.  In order
to focus on the buffer list I need to either C-x 0 or C-x o.  Then in
the *Buffer list* window I use n or p to position on the desired
buffer.  Then press f or o or any of a variety of keys to select that
buffer in either the current window or the other window.

The result is that with list-buffers it is disruptive to the window
layout that I have active at the moment I want to switch one of the
windows to a different buffer.  Plus there are more steps needed to
perform the same function.

With electric-buffer-list bound: C-x C-b n n SPACE

With buffer-list bound: C-x C-b C-o n n f C-x 4 b C-x 4 b C-x 4 b

The C-x 4 b times three is the finger memory way I rotate through two
windows in order to swap their contents.  Because using list-buffers
splits the current frame or replaces the other window in the frame it
causes order of windows to be reversed from the previous arrangement.
That requires a window buffer swap in order to restore the desired
ordering.  For example I prefer a code window above and a gdb debugger
window below and not the other way around.  Maybe there is a better
way to use list-buffers that avoids that problem but I just looked
again and I didn't see it.  The window order issue is completely
avoided by using electric-buffer-list since that only affects the
current window and does not modify any others.

I hadn't been aware of buffer-menu.  Playing with it now shows that it
works very similarly to electric-buffer-list.  I think anyone using
either buffer-menu or electric-buffer-list are in the same group and
want the same thing and could use either of those almost
interchangeably.  I assume electric-buffer-list came first and
buffer-menu duplicated the behavior since I have been using
electric-buffer-list for a very many years and had not ever heard of
buffer-menu before?  That is my assumption until I learn otherwise.

Bob



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

* Re: Feeling lost without tabs
       [not found]           ` <mailman.5823.1405959942.1147.help-gnu-emacs@gnu.org>
@ 2014-07-21 18:04             ` Dan Espen
  2014-07-21 21:05               ` Bob Proulx
                                 ` (2 more replies)
  2014-07-21 21:40             ` have new Gnus message not always fullscreened (was: [gnu.emacs.help] Re: Feeling lost without tabs) Emanuel Berg
  1 sibling, 3 replies; 42+ messages in thread
From: Dan Espen @ 2014-07-21 18:04 UTC (permalink / raw)
  To: help-gnu-emacs

Bob Proulx <bob@proulx.com> writes:

> Emanuel Berg wrote:
>> Bob Proulx writes:
>> > I bind C-x C-b to electric-buffer-list.  I couldn't
>> > live without it now.  In MNHO it is soooo much nicer
>> > than list-buffers.
>> 
>> Could you just short say what the differences are and
>> how you experience them to be better? I never used
>> `electric-buffer-list' but it looks kind of the same at
>> first glance.
>
> As others have said it opens a buffer window, places the point at the
> first file in that buffer window.  This shows me a buffer window list
> and focuses there.  I can review my buffer windows.  Hitting SPACE
> selects a buffer window.  If I hit SPACE immediately then I return to
> the same buffer window I left.  Otherwise I can n, n, n down to the
> buffer window I want and SPACE to select it.  The newly selected
> buffer now replaces the previously selected buffer window.  The new
> emacs window configuration with regard to split windows is the same
> for all other windows but the currently focused window only is changed
> to another buffer.
>
> I had previously said C-n C-p to move through the menu list.  But of
> course n and p also work.  I usually already have my finger on the
> control so had not really taken notice of the flexibility.
>
> With list-buffers the buffer list splits the current frame into two
> windows and puts the buffer window list into the other window.
> Whatever buffer I had in the other split window is now gone.  In order
> to focus on the buffer list I need to either C-x 0 or C-x o.  Then in
> the *Buffer list* window I use n or p to position on the desired
> buffer.  Then press f or o or any of a variety of keys to select that
> buffer in either the current window or the other window.
>
> The result is that with list-buffers it is disruptive to the window
> layout that I have active at the moment I want to switch one of the
> windows to a different buffer.  Plus there are more steps needed to
> perform the same function.
>
> With electric-buffer-list bound: C-x C-b n n SPACE
>
> With buffer-list bound: C-x C-b C-o n n f C-x 4 b C-x 4 b C-x 4 b
>
> The C-x 4 b times three is the finger memory way I rotate through two
> windows in order to swap their contents.  Because using list-buffers
> splits the current frame or replaces the other window in the frame it
> causes order of windows to be reversed from the previous arrangement.
> That requires a window buffer swap in order to restore the desired
> ordering.  For example I prefer a code window above and a gdb debugger
> window below and not the other way around.  Maybe there is a better
> way to use list-buffers that avoids that problem but I just looked
> again and I didn't see it.  The window order issue is completely
> avoided by using electric-buffer-list since that only affects the
> current window and does not modify any others.
>
> I hadn't been aware of buffer-menu.  Playing with it now shows that it
> works very similarly to electric-buffer-list.  I think anyone using
> either buffer-menu or electric-buffer-list are in the same group and
> want the same thing and could use either of those almost
> interchangeably.  I assume electric-buffer-list came first and
> buffer-menu duplicated the behavior since I have been using
> electric-buffer-list for a very many years and had not ever heard of
> buffer-menu before?  That is my assumption until I learn otherwise.

buffer menu first.
I think you'll find it's the default binding.
Something that should have changed a long time ago.



-- 
Dan Espen


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

* Re: Feeling lost without tabs
  2014-07-21 18:04             ` Dan Espen
@ 2014-07-21 21:05               ` Bob Proulx
       [not found]               ` <mailman.5831.1405976742.1147.help-gnu-emacs@gnu.org>
  2014-07-21 21:43               ` Emanuel Berg
  2 siblings, 0 replies; 42+ messages in thread
From: Bob Proulx @ 2014-07-21 21:05 UTC (permalink / raw)
  To: help-gnu-emacs

Dan Espen wrote:
> Bob Proulx writes:
> > I assume electric-buffer-list came first and buffer-menu
> > duplicated the behavior since I have been using
> > electric-buffer-list for a very many years and had not ever heard
> > of buffer-menu before?  That is my assumption until I learn
> > otherwise.
> 
> buffer menu first.

Hmm...  I remain cautiously suspicious.  :-)

> I think you'll find it's the default binding.

No.  The default binding for C-x C-b is list-buffers.  I am using the
current Debian Sid Unstable version.  The GNU upstream may have
changed it very recently but if so that hasn't trickled down yet.

  emacs -Q
  C-h c C-x C-b
  C-x C-b runs the command list-buffers

  M-x emacs-version
  GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.12.2) of 2014-06-06 on barber, modified by Debian

> Something that should have changed a long time ago.

I would agree but as far as I can see it hasn't changed.

Bob



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

* Re: Feeling lost without tabs
       [not found]               ` <mailman.5831.1405976742.1147.help-gnu-emacs@gnu.org>
@ 2014-07-21 21:22                 ` Dan Espen
  2014-07-21 21:54                   ` Emanuel Berg
  2014-07-21 21:47                 ` Emanuel Berg
  1 sibling, 1 reply; 42+ messages in thread
From: Dan Espen @ 2014-07-21 21:22 UTC (permalink / raw)
  To: help-gnu-emacs

Bob Proulx <bob@proulx.com> writes:

> Dan Espen wrote:
>> Bob Proulx writes:
>> > I assume electric-buffer-list came first and buffer-menu
>> > duplicated the behavior since I have been using
>> > electric-buffer-list for a very many years and had not ever heard
>> > of buffer-menu before?  That is my assumption until I learn
>> > otherwise.
>> 
>> buffer menu first.
>
> Hmm...  I remain cautiously suspicious.  :-)
>
>> I think you'll find it's the default binding.
>
> No.  The default binding for C-x C-b is list-buffers.  I am using the
> current Debian Sid Unstable version.  The GNU upstream may have
> changed it very recently but if so that hasn't trickled down yet.
>
>   emacs -Q
>   C-h c C-x C-b
>   C-x C-b runs the command list-buffers

Oops, sure are a lot of buffer showers.

I THINK whatever has the default binding is what
came first.

I just feel the best one should be the default.
Could be ibuffer or some other xbuffer is the best,
but electric is better than the default (IMO).

-- 
Dan Espen


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

* have new Gnus message not always fullscreened (was: [gnu.emacs.help] Re: Feeling lost without tabs)
       [not found]           ` <mailman.5823.1405959942.1147.help-gnu-emacs@gnu.org>
  2014-07-21 18:04             ` Dan Espen
@ 2014-07-21 21:40             ` Emanuel Berg
  1 sibling, 0 replies; 42+ messages in thread
From: Emanuel Berg @ 2014-07-21 21:40 UTC (permalink / raw)
  To: help-gnu-emacs

Bob Proulx <bob@proulx.com> writes:

> I hadn't been aware of buffer-menu.  Playing with it
> now shows that it works very similarly to
> electric-buffer-list.  I think anyone using either
> buffer-menu or electric-buffer-list are in the same
> group and want the same thing and could use either of
> those almost interchangeably.  I assume
> electric-buffer-list came first and buffer-menu
> duplicated the behavior since I have been using
> electric-buffer-list for a very many years and had
> not ever heard of buffer-menu before?  That is my
> assumption until I learn otherwise.

Well, I don't know (what was first).

Yeah, it is interesting, I didn't know of either
electric or buffer-list. I knew of the command `C-x
C-b' but I thought that was a buffer-menu command, as
another of the do-something and then
do-something-other-window (or perhaps
do-something-split-window). So it was interesting to
learn there were so many ways to do (superficially at
least) the same thing.

I didn't manage to follow the description of keys, but
that much I understood that you don't like changes to
the window configuration. Here I agree 100%... I have
managed to rid my Emacs of some of those cases which
are, as you say, disruptive, but one in particular
remains...

To create a new message from anywhere in Emacs, I have
`C-o m' bound to a function that looks for the Gnus
group buffer - the assumption is that it exists if and
only if Gnus runs... (Otherwise it starts Gnus and
tries again.) If Gnus runs, it uses

(gnus-post-news 'post "")

to open an empty buffer, with the headers and so on as
configured, in message-mode. However, it doesn't
respect what is currently displayed - it is always
fullscreened.

Anyone knows how to not make that happen?

The entire defun:

(defun new-message ()
  (interactive)
  (if (get-buffer "*Group*") (gnus-post-news 'post "")
    (progn
      (gnus)
      (new-message) )))

-- 
underground experts united


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

* Re: Feeling lost without tabs
  2014-07-21 18:04             ` Dan Espen
  2014-07-21 21:05               ` Bob Proulx
       [not found]               ` <mailman.5831.1405976742.1147.help-gnu-emacs@gnu.org>
@ 2014-07-21 21:43               ` Emanuel Berg
  2 siblings, 0 replies; 42+ messages in thread
From: Emanuel Berg @ 2014-07-21 21:43 UTC (permalink / raw)
  To: help-gnu-emacs

Dan Espen <despen@verizon.net> writes:

> buffer menu first.  I think you'll find it's the
> default binding.  Something that should have changed
> a long time ago.

See: as always, I'm the techno-archeologist...

Do you also happen to know why buffer-menu was
"forked", if that is the term in the Emacs world as
well? I use it, so I'd be interested in hearing its
real and/or perceived drawbacks.

-- 
underground experts united


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

* Re: Feeling lost without tabs
       [not found]               ` <mailman.5831.1405976742.1147.help-gnu-emacs@gnu.org>
  2014-07-21 21:22                 ` Dan Espen
@ 2014-07-21 21:47                 ` Emanuel Berg
  1 sibling, 0 replies; 42+ messages in thread
From: Emanuel Berg @ 2014-07-21 21:47 UTC (permalink / raw)
  To: help-gnu-emacs

Bob Proulx <bob@proulx.com> writes:

> No.  The default binding for C-x C-b is list-buffers.
> I am using the current Debian Sid Unstable version.
> The GNU upstream may have changed it very recently
> but if so that hasn't trickled down yet.

Yes, the same for Jessie. No, I think list-buffers is
it (the default for `C-x C-b' now and then and probably
won't change).

-- 
underground experts united


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

* Re: Feeling lost without tabs
  2014-07-21 21:22                 ` Dan Espen
@ 2014-07-21 21:54                   ` Emanuel Berg
  2014-07-21 23:57                     ` Robert Thorpe
  2014-07-22  2:33                     ` Dan Espen
  0 siblings, 2 replies; 42+ messages in thread
From: Emanuel Berg @ 2014-07-21 21:54 UTC (permalink / raw)
  To: help-gnu-emacs

Dan Espen <despen@verizon.net> writes:

> I just feel the best one should be the default.
> Could be ibuffer or some other xbuffer is the best,
> but electric is better than the default (IMO).

Perhaps it would make sense to merge some or many of
those projects if they are so similar. In principle I
don't mind lots of stuff doing more or less the same
thing, and especially if it is very ambitious projects
such as web browsers, mail clients, and so on, they
don't have to be different even in principle because
the complexity will add so many big and subtle
differences anyway. However, for seemingly small
projects like this one has to wonder if there isn't
reinvention of the wheel going on. It wouldn't be far
fetched for the users of one to miss out the features
of another, and being oblivious to this as this perhaps
isn't discussed so often - it is such a low profile
thing, look the same, do seemingly the same things -
not likely to stir controversy or be the focus of the
discussion particularly often.

-- 
underground experts united


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

* Re: Feeling lost without tabs
  2014-07-21 21:54                   ` Emanuel Berg
@ 2014-07-21 23:57                     ` Robert Thorpe
  2014-07-22  2:33                     ` Dan Espen
  1 sibling, 0 replies; 42+ messages in thread
From: Robert Thorpe @ 2014-07-21 23:57 UTC (permalink / raw)
  To: Emanuel Berg; +Cc: help-gnu-emacs

Emanuel Berg <embe8573@student.uu.se> writes:

> Dan Espen <despen@verizon.net> writes:
>
>> I just feel the best one should be the default.
>> Could be ibuffer or some other xbuffer is the best,
>> but electric is better than the default (IMO).
>
> Perhaps it would make sense to merge some or many of
> those projects if they are so similar.

There's much more reuse than you think.  The normal Emacs buffer list,
the one tied to C-x C-b is 'list-buffers'.

Here is the code for list-buffers with the docstring removed:
(defun list-buffers (&optional arg)
  (interactive "P")
  (display-buffer (list-buffers-noselect arg)))

Here is the code for buffer-menu with the docstring removed:
(defun buffer-menu (&optional arg)
  (interactive "P")
  (switch-to-buffer (list-buffers-noselect arg))
  (message
   "Commands: d, s, x, u; f, o, 1, 2, m, v; ~, %%; q to quit; ? for
   help."))

The one I use is buffer-menu-other-window:
(defun buffer-menu-other-window (&optional arg)
  (interactive "P")
  (switch-to-buffer-other-window (list-buffers-noselect arg))
  (message
   "Commands: d, s, x, u; f, o, 1, 2, m, v; ~, %%; q to quit; ? for
   help."))

So, all of them use the same underlying function:
'list-buffers-noselect', also all are in the same file: buff-menu.el.
Once you're in the menu buffer they all behave exactly the same.

The only major difference with electric-buffer-list is the keymap.  The
buffer menu is made by calling list-buffer-noselect as usual then
changing the keymaps.  Electric-buffer-menu-mode is derived from
Buffer-menu-mode using ~300 lines of code in ebuff-menu.el.

There is another buffer menu packaged with Emacs that's entirely
different: ibuffer.  I understand a lot of people use that, I tried to
once but I've got too used to the default.

BR,
Robert Thorpe



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

* Re: Feeling lost without tabs
  2014-07-21 16:25           ` Bob Proulx
@ 2014-07-22  0:57             ` Robert Thorpe
  0 siblings, 0 replies; 42+ messages in thread
From: Robert Thorpe @ 2014-07-22  0:57 UTC (permalink / raw)
  To: Bob Proulx; +Cc: help-gnu-emacs

Bob Proulx <bob@proulx.com> writes:
...
> I hadn't been aware of buffer-menu.  Playing with it now shows that it
> works very similarly to electric-buffer-list.

It behaves exactly the same as list-buffers except for how the windows
are arranged when it's opened.  As I was saying to Emanuel they use the
same code internally.

BR,
Robert Thorpe



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

* Re: Feeling lost without tabs
  2014-07-21 21:54                   ` Emanuel Berg
  2014-07-21 23:57                     ` Robert Thorpe
@ 2014-07-22  2:33                     ` Dan Espen
  2014-07-22 21:28                       ` Emanuel Berg
  1 sibling, 1 reply; 42+ messages in thread
From: Dan Espen @ 2014-07-22  2:33 UTC (permalink / raw)
  To: help-gnu-emacs

Emanuel Berg <embe8573@student.uu.se> writes:

> Dan Espen <despen@verizon.net> writes:
>
>> I just feel the best one should be the default.
>> Could be ibuffer or some other xbuffer is the best,
>> but electric is better than the default (IMO).
>
> Perhaps it would make sense to merge some or many of
> those projects if they are so similar. In principle I
> don't mind lots of stuff doing more or less the same
> thing, and especially if it is very ambitious projects
> such as web browsers, mail clients, and so on, they
> don't have to be different even in principle because
> the complexity will add so many big and subtle
> differences anyway. However, for seemingly small
> projects like this one has to wonder if there isn't
> reinvention of the wheel going on. It wouldn't be far
> fetched for the users of one to miss out the features
> of another, and being oblivious to this as this perhaps
> isn't discussed so often - it is such a low profile
> thing, look the same, do seemingly the same things -
> not likely to stir controversy or be the focus of the
> discussion particularly often.

I agree.  Way too many buffer thingies.
It's like each time someone comes up with an improvement
we get a new one instead of the original gaining the new
features and everyone benefiting.

-- 
Dan Espen


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

* Re: Feeling lost without tabs
  2014-07-21 14:15           ` Stefan Monnier
@ 2014-07-22  3:51             ` Yuri Khan
  0 siblings, 0 replies; 42+ messages in thread
From: Yuri Khan @ 2014-07-22  3:51 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: help-gnu-emacs@gnu.org

On Mon, Jul 21, 2014 at 9:15 PM, Stefan Monnier
<monnier@iro.umontreal.ca> wrote:

> You might like to try icomplete-mode.
> And you might like to M-x report-emacs-bug requesting that the list of
> completions in icomplete-mode (for C-x b) sort buffers "for the current
> frame" before others.


What I actually do is three things.

* First, there is tabbar-mode with a grouping function that assigns a
single group to each window (not frame) and groups buffers by the
window they were last seen in. (The “last seen in” information is
tracked by a hook.) I use M-S-<left>/<right> to switch tabs and never
switch groups.

* Second, M-S-<down> calls ibuffer (in the current window), allowing
me to select a buffer if it’s too far away or bring a buffer from a
different window.

* Third, M-S-<up> is bound to dired-jump, letting me navigate buffers
according to the filesystem-based relationships.



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

* Re: Feeling lost without tabs
       [not found]   ` <mailman.5729.1405830475.1147.help-gnu-emacs@gnu.org>
@ 2014-07-22 15:14     ` Javier
  2014-07-22 15:32       ` Ken Goldman
                         ` (2 more replies)
       [not found]     ` <<lqlv3t$hog$1@speranza.aioe.org>
  1 sibling, 3 replies; 42+ messages in thread
From: Javier @ 2014-07-22 15:14 UTC (permalink / raw)
  To: help-gnu-emacs

I think dealing with frames in windows/mac is much more difficult than
in linux.  In windows, having multiple frames open will overfill the
taskbar.  Window managers in Linux are more powerful and have better
ways of dealing with multiple frames by virtual desktops or iconifying
windows.

Some usefuld keybindings for dealing with frames:

(global-set-key [f4] 'delete-frame)  ;originally bound to call-kbd-macro (also accessible with C-x e)
(global-set-key [C-f4] 'delete-frame)

;; navigate frames with Shift + arrow left/right
(defun other-frame-dec () "" (interactive) (other-frame '+1))
(defun other-frame-inc () "" (interactive) (other-frame '-1))
(global-set-key [S-left] 'other-frame-dec)
(global-set-key [S-right] 'other-frame-inc)

If you like frames you can make almost evertyhing pop up in a new
frame and not have the default screen splitting-in-2 behaviour

(setq pop-up-frames t)   ;;; everything is opened in a new frame.

You will never again see a split screen unless you ask explicitly for
it with C-x 2.  That has its drawbacks, like completition buffers
popping up in a new frame.  Sometimes the frames will remain in the
background and it seems that nothing has been opened, specially in
console mode.

(setq frame-auto-hide-function 'delete-frame)
;;; Kill frames instead of hiding them by pressing q (in completition buffers)



Eli Zaretskii <eliz@gnu.org> wrote:
>> Date: Sun, 20 Jul 2014 11:08:06 +0700
>> From: Yuri Khan <yuri.v.khan@gmail.com>
>> Cc: "help-gnu-emacs@gnu.org" <help-gnu-emacs@gnu.org>
>> 
>> > I feel a bit lost because emacs doesn't show
>> > tabs. I work on multiple projects, I get distracted by various things,
>> > but when I come back to the seat it is the tabs that
>> > remind me which project I was last working on.
>> >
>> > I know C-x C-b pops it up, but involves multiple keys and it also
>> > takes a a lot of screen real estate.
>> >
>> > I'm wondering how others overcame this.
>> 
>> You might want to have a look at tabbar-mode.
> 
> That's one way.  Another one is to have separate frames dedicated to
> different projects/activities.  You switch to a frame when you need to
> get back to the project/activity specific to that frame.  Each frame
> in Emacs "prefers" the buffers used in that frame, so switching
> between buffers within a frame is likely to be easy, without mixing
> buffers from other frames.
> 


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

* Re: Feeling lost without tabs
  2014-07-22 15:14     ` Javier
@ 2014-07-22 15:32       ` Ken Goldman
  2014-07-22 21:01       ` Emanuel Berg
       [not found]       ` <mailman.5871.1406043177.1147.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 42+ messages in thread
From: Ken Goldman @ 2014-07-22 15:32 UTC (permalink / raw)
  To: help-gnu-emacs

On 7/22/2014 11:14 AM, Javier wrote:
> I think dealing with frames in windows/mac is much more difficult than
> in linux.  In windows, having multiple frames open will overfill the
> taskbar.  Window managers in Linux are more powerful and have better
> ways of dealing with multiple frames by virtual desktops or iconifying
> windows.

Windows works fine if you put the taskbar on the left rather than the 
bottom.  There's far more space, and you can read the text.  Windows 
will also group applications if the taskbar fills and, hovering expands 
them menu-like.

OTOH, the Linux taskbar on the side is broken, at least for gnome, since 
the vertical size grows as the horizontal size grows.






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

* RE: Feeling lost without tabs
       [not found]     ` <<lqlv3t$hog$1@speranza.aioe.org>
@ 2014-07-22 17:03       ` Drew Adams
  0 siblings, 0 replies; 42+ messages in thread
From: Drew Adams @ 2014-07-22 17:03 UTC (permalink / raw)
  To: Javier, help-gnu-emacs

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

> I think dealing with frames in windows/mac is much more difficult than
> in linux.  In windows, having multiple frames open will overfill the
> taskbar.

I'm using MS Windows 7, before that I used Windows XP, and in both
cases all of my Emacs frames are iconified to the same, single Emacs
icon in the task bar.  I have one such icon per Emacs session.

This is controlled by this Windows setting:

Right-click the task bar > Properties > Taskbar buttons:
                                        "Always combine, hide labels"

> Window managers in Linux are more powerful and have better ways of
> dealing with multiple frames by virtual desktops or iconifying
> windows.

I assume you mean iconifying to the desktop (rather than what Windows
does, which is iconify to the task bar).  OT1H, you complain that
Windows iconification fills up the task bar, and OTOH you tout other
managers filling up the desktop.  Hmm.  (Granted, there is more space
on the desktop than on the taskbar.)

FWIW, on both MS Windows and GNU/Linux I iconify frames to the desktop
whenever I want, using `C-z' (which also deiconifies).  And I can make
those icons any size I want.  And those icons are actually miniature,
functioning Emacs frames - thumbnail frames.  (They are not
window-manager icons.)  I can search in them, watch log messages stream
through them, scroll them,...

But mainly I just use them to organize the frames I am currently working
with the most.  Attached are images of (a) a thumbnail frame and (b) the
same, stretched to show more of the buffer.  (From the size and position
of the scroll-bar thumb you can tell that this is a large file.)
(http://www.emacswiki.org/FisheyeWithThumbs)

> Some usefuld keybindings for dealing with frames:
> (global-set-key [f4] 'delete-frame)  ;originally bound to call-kbd-macro
> (global-set-key [C-f4] 'delete-frame)

Suggestion: don't waste a repeatable key on an operation that you won't
repeat (i.e., hold the key down for).  Just use the predefined `C-x 5 0'.

> If you like frames you can make almost evertyhing pop up in a new
> frame and not have the default screen splitting-in-2 behaviour
>
> (setq pop-up-frames t)   ;;; everything is opened in a new frame.
>
> You will never again see a split screen unless you ask explicitly for
> it with C-x 2.

Yes; `pop-up-frames' is good.  Unfortunately, Emacs Dev considers
this simple user convenience to be obsolete, and invites you to
instead jump through the gymnastic, labyrinthine hoops of the
epicyclic option `display-buffer-alist'.  Fortunately, `pop-up-frames'
still works fine, for the time being...

And if you use non-nil `pop-up-frames' then you might prefer to let
`C-x 0' delete the frame when the frame has only one window.  That is
what the advised version of `delete-window' in `frame-cmds.el' does:
(http://www.emacswiki.org/emacs-en/download/frame-cmds.el)

(defadvice delete-window (around delete-frame-if-one-win activate)
  "If WINDOW is the only one in its frame, then `delete-frame' too."
  (save-current-buffer
    (select-window (or (ad-get-arg 0)  (selected-window)))
    (if (one-window-p t) (delete-frame) ad-do-it)))

> That has its drawbacks, like completition buffers popping up in
> a new frame.

The main problem with that is that the `*Completions*' frame needs
to have its input focus redirected to the frame with the current
minibuffer.  Library `oneonone.el' optionally does that, and it
optionally uses a standalone minibuffer frame.
(http://www.emacswiki.org/emacs-en/download/oneonone.el)

In addition, vanilla Emacs is still pretty poor at removing the
display of `*Completions*' when it is no longer useful.  Icicles
takes care of this, whether or not the display is in its own frame.
(http://www.emacswiki.org/Icicles)

> (setq frame-auto-hide-function 'delete-frame)

Yes, again.  That's my choice too.

[-- Attachment #2: throw-thumbnail-frame.png --]
[-- Type: image/png, Size: 9724 bytes --]

[-- Attachment #3: throw-thumbnail-frame-stretched.png --]
[-- Type: image/png, Size: 48098 bytes --]

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

* Re: Feeling lost without tabs
  2014-07-22 15:14     ` Javier
  2014-07-22 15:32       ` Ken Goldman
@ 2014-07-22 21:01       ` Emanuel Berg
  2014-07-23  0:57         ` Javier
       [not found]       ` <mailman.5871.1406043177.1147.help-gnu-emacs@gnu.org>
  2 siblings, 1 reply; 42+ messages in thread
From: Emanuel Berg @ 2014-07-22 21:01 UTC (permalink / raw)
  To: help-gnu-emacs

Javier <nospam@nospam.com> writes:

> I think dealing with frames in windows/mac is much
> more difficult than in linux.  In windows, having
> multiple frames open will overfill the taskbar.
> Window managers in Linux are more powerful and have
> better ways of dealing with multiple frames by
> virtual desktops or iconifying windows.

I didn't know Emacs frames were shown separately in the
taskbar of GUIs. I don't use a WM, and in X I use
Openbox which doesn't come with a taskbar, I think (if
it does, I never saw it, and I'm happy with
that). Perhaps some Gnome or KDE piece of software
synch with Emacs to display not just Emacs, but is
reactive to the state of Emacs as well. If so, it would
be interesting to know how they do that? Is this kept
in a file or otherwise made available to the outside
world?

> Some usefuld keybindings for dealing with frames ...

I don't like your taste in keys (the function and arrow
keys) because of the reach thing I've talked about many
times, but cred for not only writing Elisp but also
sharing it for everyone to see/use!

> (setq pop-up-frames t)

That didn't work for me. Or perhaps I want something
else. I want everything to pop up in the same window,
as it were when the command was invoked, and I don't
that window to change in size.

My case,

(defun new-message ()
  (interactive)
  (if (get-buffer "*Group*") (gnus-post-news 'post "")
    (progn
      (gnus)
      (new-message) )))
      
still (with `pop-up-frames') destroys my two-pane
layout. I guess I need something like (setq
keep-window-layout t)?
      
> You will never again see a split screen unless you
> ask explicitly for it with C-x 2.

I do that so often I have my own shortcut for that:
M-o. And it is DWIM: with one window open, M-o splits
it (and does `other-window'); with two windows open,
M-o is just `other-window':

(defun other-window-or-split ()
  (interactive)
  (if (= 1 (count-windows)) (split-window-vertically))
  (other-window 1) )

I have M-p `delete-other-window' - "o" and "p" are next
to each other, and require minimal hand/finger
movements.

> That has its drawbacks, like completition buffers
> popping up in a new frame.  Sometimes the frames will
> remain in the background and it seems that nothing
> has been opened, specially in console mode.

Completions may be a special case since you are typing
in the minibuffer. I think completion should be avoided
but sometimes I use it as a reference. For that usage,
I suppose the minibuffer and the completion of an
actual command is just in the way. Perhaps the
`apropos' command is better for that usage.

-- 
underground experts united


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

* Re: Feeling lost without tabs
       [not found]       ` <mailman.5871.1406043177.1147.help-gnu-emacs@gnu.org>
@ 2014-07-22 21:03         ` Emanuel Berg
  0 siblings, 0 replies; 42+ messages in thread
From: Emanuel Berg @ 2014-07-22 21:03 UTC (permalink / raw)
  To: help-gnu-emacs

Ken Goldman <kgoldman@us.ibm.com> writes:

> OTOH, the Linux taskbar on the side is broken, at
> least for gnome ...

Yes, there should be many, many taskbars for Linux
systems... some should be highly configurable as
well. I can't name one (or any) that behaves
differently though.

-- 
underground experts united


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

* Re: Feeling lost without tabs
  2014-07-22  2:33                     ` Dan Espen
@ 2014-07-22 21:28                       ` Emanuel Berg
  0 siblings, 0 replies; 42+ messages in thread
From: Emanuel Berg @ 2014-07-22 21:28 UTC (permalink / raw)
  To: help-gnu-emacs

Dan Espen <despen@verizon.net> writes:

> I agree.  Way too many buffer thingies.  It's like
> each time someone comes up with an improvement we get
> a new one instead of the original gaining the new
> features and everyone benefiting.

Exactly! Here I think the Unix philosophy applies
100%. For complicated and insanely big (and
super-interactive) software like text editors, e-mail
clients, shells, and so on, it is OK to have Emacs,
vim, Gnus, Rmail, bash, zsh and what have you but for a
small piece of software that does a limited range of
things - it shouldn't be encouraged, put it that way.

-- 
underground experts united


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

* Re: Feeling lost without tabs
  2014-07-22 21:01       ` Emanuel Berg
@ 2014-07-23  0:57         ` Javier
  2014-07-23  2:21           ` Emanuel Berg
  0 siblings, 1 reply; 42+ messages in thread
From: Javier @ 2014-07-23  0:57 UTC (permalink / raw)
  To: help-gnu-emacs

> I don't like your taste in keys (the function and arrow
> keys) because of the reach thing I've talked about many
> times, but cred for not only writing Elisp but also
> sharing it for everyone to see/use!

[Shift+left/right arrows] is just analogous with the way you move
between virtual ttys in Linux: [Alt+Left/right arrow].  In the window
manager I use [WindowsKey+arrows] to move between virtual desktops.

C-Tab and C-S-Tab are another obvious choice; they would move
between emacs frames in the same way as you move between firefox tabs.

;; navigate frames
(defun other-frame-dec () "" (interactive) (other-frame '+1))
(defun other-frame-inc () "" (interactive) (other-frame '-1))
(global-set-key [C-iso-lefttab] 'other-frame-inc)
(global-set-key [C-S-iso-lefttab] 'other-frame-dec)


> still (with `pop-up-frames') destroys my two-pane
> layout. I guess I need something like (setq
> keep-window-layout t)?

(setq pop-up-frames t) is for never having the frame split in two
windows.  Having two windows in the same frame is the default emacs
behaviour and may be ok for very big screens, but for a small screen
with a big font is not good.

In any case, all these things are a matter of personal taste, and
fortunately emacs gives a lot of freedom to the user to configure
them.  No other program out there gets even close to give the freedom
emacs gives.




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

* Re: Feeling lost without tabs
  2014-07-23  0:57         ` Javier
@ 2014-07-23  2:21           ` Emanuel Berg
  0 siblings, 0 replies; 42+ messages in thread
From: Emanuel Berg @ 2014-07-23  2:21 UTC (permalink / raw)
  To: help-gnu-emacs

Javier <nospam@nospam.com> writes:

>> I don't like your taste in keys (the function and
>> arrow keys) because of the reach thing I've talked
>> about many times, but cred for not only writing
>> Elisp but also sharing it for everyone to see/use!
>
> [Shift+left/right arrows] is just analogous with the
> way you move between virtual ttys in Linux:
> [Alt+Left/right arrow].  In the window manager I use
> [WindowsKey+arrows] to move between virtual desktops.

I still don't think it is good. I have changed that for
the ttys to M-j and M-l (using the Emacs notation), and
set it up in X as well (by way of .xbindkeysrc) - check
it out:

http://user.it.uu.se/~embe8573/conf/remap.inc

> C-Tab and C-S-Tab are another obvious choice; they
> would move between emacs frames in the same way as
> you move between firefox tabs.

TAB is good but your keys are bulky. TAB alone, M-TAB,
and S-TAB (backtab) are good.

> (setq pop-up-frames t) is for never having the frame
> split in two windows.  Having two windows in the same
> frame is the default emacs behaviour and may be ok
> for very big screens, but for a small screen with a
> big font is not good.

What? I restrict my use to two windows because I have
very few lines and very few columns compared to modern
users (27 $LINES and 72 $COLUMNS). "Normal" people with
desktops with huge widescreens and minimal fonts
usually have like ten windows at the same time.

> In any case, all these things are a matter of
> personal taste, and fortunately emacs gives a lot of
> freedom to the user to configure them.  No other
> program out there gets even close to give the freedom
> emacs gives.

I don't know if it is a matter of giving freedom, but
the Emacs architecture with Lisp and all, the result is
what you indicate. Yes, all software should be like
that...

-- 
underground experts united


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

* Re: Feeling lost without tabs
  2014-07-20  1:47 Feeling lost without tabs Sampath Weerasinghe
                   ` (4 preceding siblings ...)
  2014-07-20 18:02 ` Robert Thorpe
@ 2014-08-16 21:13 ` Marcin Borkowski
  5 siblings, 0 replies; 42+ messages in thread
From: Marcin Borkowski @ 2014-08-16 21:13 UTC (permalink / raw)
  To: help-gnu-emacs

Dnia 2014-07-19, o godz. 18:47:47
Sampath Weerasinghe <swe20144@gmail.com> napisał(a):

> Hi,
> 
> I'm slowly migrating from notepad++ to emacs.
> 
> I feel a bit lost because emacs doesn't show
> tabs. I work on multiple projects, I get distracted by various things,
> but when I come back to the seat it is the tabs that
> remind me which project I was last working on.
> 
> I know C-x C-b pops it up, but involves multiple keys and it also
> takes a a lot of screen real estate.
> 
> I'm wondering how others overcame this.

Just my 2cents:
http://mbork.pl/2014-04-04_Fast_buffer_switching_and_friends
and C-z C-b and/or C-u C-z C-b are surprisingly useful for me.

> -Sam

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University



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

end of thread, other threads:[~2014-08-16 21:13 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-20  1:47 Feeling lost without tabs Sampath Weerasinghe
2014-07-20  4:08 ` Yuri Khan
2014-07-20  4:27   ` Eli Zaretskii
2014-07-20  5:12     ` Yuri Khan
2014-07-20  6:09       ` Eli Zaretskii
2014-07-20 16:48         ` Yuri Khan
2014-07-20 17:30           ` Eli Zaretskii
2014-07-21 14:15           ` Stefan Monnier
2014-07-22  3:51             ` Yuri Khan
     [not found]         ` <mailman.5771.1405874938.1147.help-gnu-emacs@gnu.org>
2014-07-20 18:40           ` Emanuel Berg
2014-07-21  3:56             ` Yuri Khan
2014-07-20  7:19       ` Bob Proulx
     [not found]       ` <mailman.5741.1405840784.1147.help-gnu-emacs@gnu.org>
2014-07-20 18:36         ` Emanuel Berg
2014-07-20 23:48           ` Dan Espen
2014-07-21  0:29             ` Emanuel Berg
2014-07-21  1:08               ` Charles Philip Chan
2014-07-21  2:25               ` Dan Espen
2014-07-21 16:25           ` Bob Proulx
2014-07-22  0:57             ` Robert Thorpe
     [not found]           ` <mailman.5823.1405959942.1147.help-gnu-emacs@gnu.org>
2014-07-21 18:04             ` Dan Espen
2014-07-21 21:05               ` Bob Proulx
     [not found]               ` <mailman.5831.1405976742.1147.help-gnu-emacs@gnu.org>
2014-07-21 21:22                 ` Dan Espen
2014-07-21 21:54                   ` Emanuel Berg
2014-07-21 23:57                     ` Robert Thorpe
2014-07-22  2:33                     ` Dan Espen
2014-07-22 21:28                       ` Emanuel Berg
2014-07-21 21:47                 ` Emanuel Berg
2014-07-21 21:43               ` Emanuel Berg
2014-07-21 21:40             ` have new Gnus message not always fullscreened (was: [gnu.emacs.help] Re: Feeling lost without tabs) Emanuel Berg
2014-07-20  5:22   ` Feeling lost without tabs Tak Kunihiro
     [not found]   ` <mailman.5729.1405830475.1147.help-gnu-emacs@gnu.org>
2014-07-22 15:14     ` Javier
2014-07-22 15:32       ` Ken Goldman
2014-07-22 21:01       ` Emanuel Berg
2014-07-23  0:57         ` Javier
2014-07-23  2:21           ` Emanuel Berg
     [not found]       ` <mailman.5871.1406043177.1147.help-gnu-emacs@gnu.org>
2014-07-22 21:03         ` Emanuel Berg
     [not found]     ` <<lqlv3t$hog$1@speranza.aioe.org>
2014-07-22 17:03       ` Drew Adams
2014-07-20  6:25 ` Filipp Gunbin
2014-07-20  9:20 ` Kevin Le Gouguec
2014-07-20 17:36 ` Drew Adams
2014-07-20 18:02 ` Robert Thorpe
2014-08-16 21:13 ` Marcin Borkowski

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.