From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Oleksandr Gavenko Newsgroups: gmane.emacs.help Subject: Re: switch to previous buffer Date: Mon, 01 Apr 2013 23:53:59 +0300 Organization: Oleksandr Gavenko , http://gavenkoa.users.sf.net Message-ID: <871uauezvc.fsf@gavenkoa.example.com> References: <382a2375-aed1-4deb-ad29-21952926c809@googlegroups.com> <0746b716-e454-402f-a46d-dafa483bdb03@googlegroups.com> <20130330065118.GA21113@hysteria.proulx.com> <6b6e3269-8a0a-4777-abe8-f2ec4596b4a8@googlegroups.com> <85bafb28-c697-4070-adc9-ab5408130550@googlegroups.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1364849665 23510 80.91.229.3 (1 Apr 2013 20:54:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 1 Apr 2013 20:54: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 Mon Apr 01 22:54:52 2013 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 1UMlkh-0002vN-Nm for geh-help-gnu-emacs@m.gmane.org; Mon, 01 Apr 2013 22:54:51 +0200 Original-Received: from localhost ([::1]:53673 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UMlkJ-0004rM-6Z for geh-help-gnu-emacs@m.gmane.org; Mon, 01 Apr 2013 16:54:27 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:49614) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UMlk8-0004pA-SY for help-gnu-emacs@gnu.org; Mon, 01 Apr 2013 16:54:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UMlk7-0003ut-3B for help-gnu-emacs@gnu.org; Mon, 01 Apr 2013 16:54:16 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:45781) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UMlk6-0003uZ-Tn for help-gnu-emacs@gnu.org; Mon, 01 Apr 2013 16:54:15 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UMlkR-0002mz-2a for help-gnu-emacs@gnu.org; Mon, 01 Apr 2013 22:54:35 +0200 Original-Received: from 5.248.35.167 ([5.248.35.167]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 01 Apr 2013 22:54:35 +0200 Original-Received: from gavenkoa by 5.248.35.167 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 01 Apr 2013 22:54:35 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 107 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 5.248.35.167 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) Cancel-Lock: sha1:0R1mqQfPGa50A0azDNGhPDN5em8= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 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:89867 Archived-At: On 2013-03-31, Rami A wrote: > Oleksandr, > Thanks for your input. > > Could you explain more how you use C-left/C-right? I am trying to figure out > also how to use your snippet of code in my dotemacs, how would I assign it > to a key combination to do the job? Apologies, I am novice in emacs and > lisp. > As novice Emacs user you MUST spend time in Emacs learning. Or leave it... You can use very popular for noobs setting from: https://github.com/technomancy/emacs-starter-kit https://github.com/bbatsov/prelude Also follow links from: http://stackoverflow.com/questions/7028055/where-i-can-find-the-most-popular-emacs-settings http://stackoverflow.com/questions/154097/whats-in-your-emacs I dislike foreign pre-build settings and collect own during 6 years: http://sourceforge.net/u/gavenkoa/dot-emacs/ci/tip/tree/.emacs-my Copy any piece of code into your .emacs, put cursor at some symbol and type: 'C-h f' (for getting function docs) 'C-h v' (for getting variable docs) Reading foreign configs is one of fast method to learn Emacs... It may be useful tips for debugging: http://gavenkoa.users.sourceforge.net/tips-html/emacs.html > On Sunday, March 31, 2013 6:01:30 AM UTC-7, Oleksandr Gavenko wrote: >> >> While I use C-LEFT / C-RIGHT I also use: Sorry I have in mind 'C-x left' and 'C-x right' key binding. From manual: (info "(emacs)Select Buffer") <<== Put cursor after close parenthesis and type 'C-x e' 19.1 Creating and Selecting Buffers =================================== `C-x b BUFFER ' Select or create a buffer named BUFFER (`switch-to-buffer'). `C-x 4 b BUFFER ' Similar, but select BUFFER in another window (`switch-to-buffer-other-window'). `C-x 5 b BUFFER ' Similar, but select BUFFER in a separate frame (`switch-to-buffer-other-frame'). `C-x ' Select the previous buffer in the buffer list (`previous-buffer'). `C-x ' Select the next buffer in the buffer list (`next-buffer'). `C-u M-g M-g' `C-u M-g g' Read a number N and move to line N in the most recently selected buffer other than the current buffer. The `C-x b' (`switch-to-buffer') command reads a buffer name using the minibuffer. Then it makes that buffer current, and displays it in the currently-selected window. An empty input specifies the buffer that was current most recently among those not now displayed in any window. >> (iswitchb-mode 1) Iswitchb mode is a global minor mode that enables switching between buffers using substrings. So you can switch to 'sys-io.lisp' file by 'C-x b sys RET' or 'C-x b io RET' or 'C-x b lisp RET'. If you have partial match use 'C-s' and 'C-r' for cycling among matches! >> (setq iswitchb-regexp t) Do regexp matching. To distinct JS file from JSP (first by 'js$', second by 'jsp'). >> (setq iswitchb-use-virtual-buffers t) If some file is not opened but previously used and this in your .emacs: (require 'recentf) (setq recentf-auto-cleanup 'never) (recentf-mode t) (setq recentf-max-saved-items 1000) (global-set-key (kbd "\e\eq") 'recentf-open-files) you can quickly switch to this file if you know part of it name... -- Best regards!