From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tim Landscheidt Newsgroups: gmane.emacs.help Subject: Re: Non file buffers and default-directory Date: Fri, 28 Apr 2023 02:03:48 +0000 Organization: https://www.tim-landscheidt.de/ Message-ID: <87o7n8sqyj.fsf@vagabond.tim-landscheidt.de> References: <87edohf3ip.fsf@ledu-giraud.fr> <87y1moe1aa.fsf@ledu-giraud.fr> <87v8hr6gvl.fsf@gmx.de> <874jpa611r.fsf@ledu-giraud.fr> <87v8hprb5w.fsf@mbork.pl> <87zg714qb8.fsf@gmx.de> <87pm7xplz3.fsf@ledu-giraud.fr> <87r0sc4cmv.fsf@gmx.de> <87ttx810mz.fsf@ledu-giraud.fr> <831qkb27st.fsf@gnu.org> <87pm7v256a.fsf@univ-nantes.fr> <87cz3vukop.fsf@gmx.de> <83leijyrb2.fsf@gnu.org> <87pm7u95yf.fsf@gnu.org> <83fs8qzrab.fsf@gnu.org> <87cz3r28ye.fsf@ledu-giraud.fr> <83ildjvply.fsf@gnu.org> <87bkj9ioc8.fsf@ledu-giraud.fr> <83sfclshk0.fsf@gnu.org> <87354lwmxr.fsf@vagabond.tim-landscheidt.de> <87r0s5i2cd.fsf@logand.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3777"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Apr 28 04:04:42 2023 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1psDTV-0000fz-N3 for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 28 Apr 2023 04:04:41 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1psDSm-00066Q-Hf; Thu, 27 Apr 2023 22:03:56 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1psDSk-00065v-Sh for help-gnu-emacs@gnu.org; Thu, 27 Apr 2023 22:03:54 -0400 Original-Received: from andalucia.tim-landscheidt.de ([2a01:4f8:1c1c:d4d0::1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1psDSi-0005Ky-Vp for help-gnu-emacs@gnu.org; Thu, 27 Apr 2023 22:03:54 -0400 Original-Received: from [195.226.160.202] (port=34240 helo=vagabond) by andalucia.tim-landscheidt.de with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1psDSe-00035Z-Kz for help-gnu-emacs@gnu.org; Fri, 28 Apr 2023 02:03:48 +0000 In-Reply-To: <87r0s5i2cd.fsf@logand.com> (Tomas Hlavaty's message of "Thu, 27 Apr 2023 20:53:22 +0200") Received-SPF: pass client-ip=2a01:4f8:1c1c:d4d0::1; envelope-from=tim@tim-landscheidt.de; helo=andalucia.tim-landscheidt.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:143432 Archived-At: Tomas Hlavaty wrote: >> Side note: I would love a well-maintained example of an >> "asynchronous" user interface in Emacs. > This is easy if you are writing it from scratch. > It is not easy if you are talking about existing code. Great, I'm looking for the "easy" one :-). Any pointers? >> I have a bunch of shell/Perl/Python scripts that I'd like to >> convert to Emacs Lisp for a consistent UI that can also be >> used over SSH. >> For example, I have a script that plays a podcast's audio >> file and afterwards asks me if the associated database entry >> selected from a list of suggestions should be marked as >> heard (and the file archived). I also use this as part of >> sequences, i. e. "$script file1.mp3 && $script file2.mp3". >> Now in Emacs, I obviously would want to continue to work on >> something else while the audio is playing in the background. >> I also don't want that other work to be interrupted in the >> sense of a blocking minibuffer prompt when the playback has >> finished. And I also don't want to accidentally quit Emacs >> without me being reminded, "hey, that playback has finished, >> should it be marked as heard?" And I want that "bit" to be >> usable as part of a sequence, i. e. after answering the >> question, the next statement should be executed. > Why not simply start a separate Emacs process and play the podcasts > there? Because then I wouldn't have one Emacs instance, but two (or more) that I would have to switch between either in Screen or with a window manager. I want to have one unified Emacs "control center" that I don't have to leave and where I can integrate all aspects of Emacs "life" together, e. g., start some workflow on an article's body when I read it in Gnus, queue some other processes when the first one is finished, feed the output to some other workflow/org-mode task/Gnus mail, etc. Tim