From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Rusi Newsgroups: gmane.emacs.help Subject: Re: emacs <--> file-browser as coroutines Date: Mon, 27 Jun 2016 02:14:29 -0700 (PDT) Message-ID: <7997232e-00f4-43f4-a1fc-54eb000470ff@googlegroups.com> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1467019934 9713 80.91.229.3 (27 Jun 2016 09:32:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 27 Jun 2016 09:32:14 +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 Jun 27 11:32:14 2016 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 1bHStm-0002tw-W7 for geh-help-gnu-emacs@m.gmane.org; Mon, 27 Jun 2016 11:32:11 +0200 Original-Received: from localhost ([::1]:57364 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHSiW-0004PQ-GB for geh-help-gnu-emacs@m.gmane.org; Mon, 27 Jun 2016 05:20:32 -0400 X-Received: by 10.176.3.20 with SMTP id 20mr16082460uat.1.1467018870583; Mon, 27 Jun 2016 02:14:30 -0700 (PDT) X-Received: by 10.36.105.74 with SMTP id e71mr187031itc.5.1467018870532; Mon, 27 Jun 2016 02:14:30 -0700 (PDT) Original-Path: usenet.stanford.edu!goblin2!goblin1!goblin.stu.neva.ru!w59no1358736qtd.1!news-out.google.com!d62ni20606ith.0!nntp.google.com!r1no3730220ige.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=123.201.72.188; posting-account=mBpa7woAAAAGLEWUUKpmbxm-Quu5D8ui Original-NNTP-Posting-Host: 123.201.72.188 User-Agent: G2/1.0 Injection-Date: Mon, 27 Jun 2016 09:14:30 +0000 Original-Xref: usenet.stanford.edu gnu.emacs.help:218297 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.help:110606 Archived-At: On Monday, June 27, 2016 at 1:48:40 PM UTC+5:30, Yuri Khan wrote: > On Mon, Jun 27, 2016 at 1:09 PM, Rustom Mody wrote: > > > The second (needs first) is more experimental -- its about emacs not using > > its usual C-x C-f method of opening files but calling out to the file > > browser > > [In my experiments that's nautilus] > > Similar on other gnu-linux-variants should be much the same > > If you pull down the File menu and select the Open File item there or > click on the Open File button on the toolbar, you will be presented > with an Open File dialog that is specific to and appropriate for your > desktop environment. > > runs the command > menu-find-file-existing, which is an interactive compiled Lisp > function in `menu-bar.el'. > > The actual code that decides whether to ask for a file name in the > minibuffer or to pop up a dialog is in read-file-name-default and > next-read-file-uses-dialog-p. The latter returns t if the current > frame is graphical, the variables use_file_dialog and use_dialog box > are non-nil, and the command was invoked with the mouse. > > You might be able to circumvent that last condition and get > read-file-name-default to use the dialog even if invoked from the > keyboard. Thanks Yuri for pointing out the open-file entry in that dialog > > > The file manager as such is usually not an appropriate method of > asking for a file name in response to an Open File command; that calls > for a modal dialog. The question (at least the 2nd part) could well be: Why are we stuck on Open File being modal? Think ecb/speedbar etc -- the file-browser exists, it can be used... Or ignored and one can keep working on/with other things. It does not need to go away or come in the way -- almost the definition of 'modal dialog' > However, the file manager can invoke Emacs or > emacsclient in response to a double-click on a file of a suitable > type, to a menu or context menu command, or a drag-and-drop of a file > into an Emacs window or on an Emacs launcher button or icon. (All of > the above actually works for me in Thunar, provided that I set up file > type associations.) Hey Thanks for that -- Ive added it to the writeup This mode of working -- drag-n-drop -- is sufficiently alien to me that I did not think of trying to drop a file in (or is it on?) to emacs. Just strengthens the alternative model I was suggesting: - Keep both emacs and file browser open - Navigate to files one desires to view/edit in the browser - Drag-n-drop into emacs as required The one thing I miss is an option to ensure that only one browser window opens There seems to have been one such in the past but now cant find it