From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.help Subject: RE: How to open dired bookmarks in the same window Date: Sun, 28 Oct 2012 07:52:33 -0700 Message-ID: <95564EC5677841AEA165A840AF006ED8@us.oracle.com> References: <406504998.20121028132549@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1351435977 26938 80.91.229.3 (28 Oct 2012 14:52:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 28 Oct 2012 14:52:57 +0000 (UTC) To: "'Ivanov Dmitry'" , Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Oct 28 15:53:06 2012 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 1TSUEY-0001bc-R2 for geh-help-gnu-emacs@m.gmane.org; Sun, 28 Oct 2012 15:53:02 +0100 Original-Received: from localhost ([::1]:36781 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TSUEQ-0007BV-Kx for geh-help-gnu-emacs@m.gmane.org; Sun, 28 Oct 2012 10:52:54 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:48269) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TSUEL-0007BD-KH for help-gnu-emacs@gnu.org; Sun, 28 Oct 2012 10:52:50 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TSUEK-0001w0-EP for help-gnu-emacs@gnu.org; Sun, 28 Oct 2012 10:52:49 -0400 Original-Received: from userp1040.oracle.com ([156.151.31.81]:35067) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TSUEK-0001vf-7H for help-gnu-emacs@gnu.org; Sun, 28 Oct 2012 10:52:48 -0400 Original-Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by userp1040.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id q9SEqimE020261 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 28 Oct 2012 14:52:45 GMT Original-Received: from acsmt356.oracle.com (acsmt356.oracle.com [141.146.40.156]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q9SEqi0O012547 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 28 Oct 2012 14:52:44 GMT Original-Received: from abhmt119.oracle.com (abhmt119.oracle.com [141.146.116.71]) by acsmt356.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q9SEqhwn022124; Sun, 28 Oct 2012 09:52:44 -0500 Original-Received: from dradamslap1 (/71.202.147.44) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 28 Oct 2012 07:52:43 -0700 X-Mailer: Microsoft Office Outlook 11 In-reply-to: <406504998.20121028132549@gmail.com> Thread-Index: Ac207jDydnLj8LHCSJeMx/5rzgLUGQALNaHA X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: acsinet21.oracle.com [141.146.126.237] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-Received-From: 156.151.31.81 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:87461 Archived-At: > http://stackoverflow.com/questions/13090190/emacs-how-to-open- > dired-bookmarks-in-the-same-window > > After inspecting the code of bookmark.el I came to > conclusion, that every bookmark has a handler function, that > is taken in bookmark-get-handler. I think, that I need to > attach find-alternate-file function as a handler to every > bookmark-directory. So it will be opened in the same buffer. > > But I don't know, how to do it. Any ideas? Use Bookmark+. You do not need to fiddle with the code of the bookmarks themselves (e.g. the handler function). It is the bookmark _jump_ command that says whether to use the same or another window when moving to the bookmark location. In Bookmark+: C-x j d is `bmkp-dired-jump C-x 4 j d is `bmkp-dired-jump-other-window' You apparently want to use `C-x j d'. (You can of course bind it to another key. By default, all Bookmark+ jump commands are on prefix keys `C-x j' and `C-x 4 j'.) http://www.emacswiki.org/BookmarkPlus