From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Emanuel Berg Newsgroups: gmane.emacs.help Subject: Re: Feeling lost without tabs Date: Sun, 20 Jul 2014 20:28:43 +0200 Organization: Aioe.org NNTP Server Message-ID: <87k377ubok.fsf@debian.uxu> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1405881025 3083 80.91.229.3 (20 Jul 2014 18:30:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 20 Jul 2014 18:30:25 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jul 20 20:30:19 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1X8vsH-0000ai-Nf for geh-help-gnu-emacs@m.gmane.org; Sun, 20 Jul 2014 20:30:17 +0200 Original-Received: from localhost ([::1]:58641 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X8vsH-0000Ef-Ba for geh-help-gnu-emacs@m.gmane.org; Sun, 20 Jul 2014 14:30:17 -0400 Original-Path: usenet.stanford.edu!goblin3!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 110 Original-NNTP-Posting-Host: SIvZRMPqRkkTHAHL6NkRuw.user.speranza.aioe.org Original-X-Complaints-To: abuse@aioe.org User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-Notice: Filtered by postfilter v. 0.8.2 Cancel-Lock: sha1:WhRcCRLojxkjA5Gr765SpWfDgPg= Mail-Copies-To: never Original-Xref: usenet.stanford.edu gnu.emacs.help:206559 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:98831 Archived-At: Sampath Weerasinghe writes: > I'm slowly migrating from notepad++ to emacs. > > I feel a bit lost because emacs doesn't show tabs. You are not the first to experience this. A lot of people got used to tabs from Firefox (or if it was called Mozilla back then) and then it suddenly was a common feature everywhere. (It would be interesting who came up with it first though.) In the Emacs world, I only have tabs in w3m (screenshot: [1]), though in function names, commands, etc. sometimes what I intuitively think of as tabs, they refer to as buffers... > 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. `buffer-menu' would help you with that, as the most recently used buffers are topmost. > I know C-x C-b pops it up, but involves multiple keys You can define your own shortcut. For example, I have bring up the `buffer-menu'. Specifically, I use this defun: (defun buffer-menu-files-only () (interactive) (buffer-menu (not Buffer-menu-files-only)) ) It means, if I hit it again while the buffer menu is shown, I get a new buffer menu, this time not only showing "file buffers" but also buffers of w3m, Gnus, and so on. > and it also takes a a lot of screen real estate. Yes, for this, `buffer-menu' is even worse than `list-buffers' (the one you get with `C-x C-b') because `buffer-menu' uses the whole window. On the other hand, that makes it impossible to use as a poor-man's substitute for tabs, so you just go there to switch buffer. If you really like tabs, neither of these methods are good. You need to find a tab package for Emacs. The `buffer-menu' solution is good for simple switches, but for more ambitious projects, and files that occur regularly, I have a system that is based on keystrokes and prefixes. `C-j e' is my "Emacs prefix", so `C-j e e' is ~/.emacs, `C-j e f' is a file where I keep all everything related to reaching files (f) from Emacs, `C-j g g' is configurations/extentions for Gnus groups, `C-j t' is ~/todo.txt, and so on. For a programming project, I employ the same system, but with different prefixes and/or keys, of course. Every single file I setup this way. It is time consuming in the early phase but then it is so fast it is not a loss of time, on the contrary. But the main advantage isn't speed, but workflow. When you have achieved a high degree of focus then it really sucks to jump back and forth between files writing long paths or searching for them in nested files trees. With is system, I'm one keystroke away from any other file, wherever I am in Emacs. [2] Earlier, I used registers, like this: (set-register ?l (cons 'file "/sudo::/etc/rc.local")) And then I setup a shortcut to `jump-to-register' (`C-j' actually, short, and doesn't require you to move you hands from typing positions). That was a good idea but there aren't enough registers, which is why I thought of the prefix solution. (The prefix way is also mnemonic/intuitive as it can be made to mirror the tree structure of a filesystem, so you get more familiar/comfortable with that just by jumping between files.) There are also bookmarks, and many, many other attempts to solve this file problem, which a very important problem for programmers and all computer people. We all think the approach of "small, modular files, use the filesystem to express purpose and association as well as to encapsulate" is the best. But do that all day long, and moving between all those soon-to-be zillion files is a real pest! So to jump between them in the close-to-speed-of-thought must be solved somehow, otherwise all that overhead typing paths and navigating the filesystem will just make for crappy workflow, frustration and loss of focus, which is (as said) much more important than the time loss, which is important in itself. So the Emacs "pros" should really put their minds to this problem even more as it is an annoyance to many veterans as well as an obstacle to many newcomers. [1] http://user.it.uu.se/~embe8573/dumps/w3m-tabs.png [2] http://user.it.uu.se/~embe8573/conf/emacs-init/global-keys.el -- underground experts united