From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Douglas Lewan Newsgroups: gmane.emacs.help Subject: Re: Return values of (find-file-noselect), etc. Date: Tue, 8 Jan 2019 14:12:27 -0500 Message-ID: References: <71340fe0-7373-f407-3bc7-7a2dcaf6b3b3@gmail.com> <375db42e-f62d-c3c7-518a-627190b30617@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1546974696 14489 195.159.176.226 (8 Jan 2019 19:11:36 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 8 Jan 2019 19:11:36 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Icedove/52.9.1 To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jan 08 20:11:32 2019 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ggwmh-0003fi-RB for geh-help-gnu-emacs@m.gmane.org; Tue, 08 Jan 2019 20:11:31 +0100 Original-Received: from localhost ([127.0.0.1]:45381 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ggwon-0004Rr-Kk for geh-help-gnu-emacs@m.gmane.org; Tue, 08 Jan 2019 14:13:41 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:39426) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ggwo1-0004QO-EU for help-gnu-emacs@gnu.org; Tue, 08 Jan 2019 14:12:56 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ggwnx-0006cA-VB for help-gnu-emacs@gnu.org; Tue, 08 Jan 2019 14:12:51 -0500 Original-Received: from mail-qt1-x82d.google.com ([2607:f8b0:4864:20::82d]:36084) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ggwnv-0006B4-Pe for help-gnu-emacs@gnu.org; Tue, 08 Jan 2019 14:12:48 -0500 Original-Received: by mail-qt1-x82d.google.com with SMTP id t13so5651421qtn.3 for ; Tue, 08 Jan 2019 11:12:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=0kIIksW+3Iw9niUkkluKtADxZuMmmIM05z/ejsRM9TM=; b=BXIaqirdSWvU9o2U7uQ6XjdtgujwGIA3TFcHW0mtP+QCpcj0bZ/A2v97RtpYi9rglF zI7FzQtVzzfLZ1lNmQKgg0fsYn7HOxsEpbiNr59FKAb3GEwZu3tGxynlQ5qMobZIrSaT cPcjsjd+XYqxlvNz7gHcHWc9twx7lNR9Ks9ABtIEVVH8xSZhaD/KTXugCbB2rcVPsUbS KHkhAFHoNbJa29PHswsvWcFYAKXbx5Jk4epZ2KWOvokL5L6v4Egi7Z/CFNe5bTY+sJBE v9a/LONRXOJ65pEXWsBvBbZ7Y8INCdIoF4k6WP90NAmXNCY9+e3XXsPOpDYd1lIvrnOe vxcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=0kIIksW+3Iw9niUkkluKtADxZuMmmIM05z/ejsRM9TM=; b=uPL7mvRBeb3mbbaeFjN7UP14+SnUxnq3RCNzMaRaIshWK+ih8pc//Tvnlg8Pi0x75E 081P/QxRvTrAI2v5WEtU3O2lOEmZGci0xCMISUEa2DIrOoGjHd47swO5uxnCIvVAc5NZ XkIOiVFLDDW5N5cgmqXGzUhRwKaNfsUzhaMS5TUXpTg3Yb0L6w+O9lOjjfA3jWQKY2eU CZ+Y3C62ZjZQ5XODelJDL4FMEu3zIm4IDguWQ0P1zOX5W5kw6GkmDYcjugcEp5K7sNdM ii5feblVM17esITLZaysU/ztFBZvyj7skQhPMBmJhhp+30jL82oIQ8ySnWAY4u22kCR0 2m1w== X-Gm-Message-State: AJcUukcGfFbqiKm+mdVWow0yjyOP5tZWD74VtkSwvP53H+lzmJmnFAn7 NaKWiALyi/uNRIJf9QoVhYTVkXw= X-Google-Smtp-Source: ALg8bN5Yah+LMTj1aZZUfgXNv3YbEvXYy0bUWG0L90W1q8um/hb0rE9J8h2ztwOgsVm6T9h0v7meBQ== X-Received: by 2002:a0c:8ae3:: with SMTP id 32mr2922516qvw.27.1546974756029; Tue, 08 Jan 2019 11:12:36 -0800 (PST) Original-Received: from [0.0.0.0] ([81.17.27.141]) by smtp.gmail.com with ESMTPSA id d85sm3301095qkb.89.2019.01.08.11.12.33 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Jan 2019 11:12:35 -0800 (PST) In-Reply-To: Content-Language: en-GB X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::82d 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:119092 Archived-At: Ok. I'll look into it. Don't expect this immediately though. (One problem I see right away is that associating an entry contents buffer correctly might require a different mechanism. On 01/08/2019 01:07 PM, Stefan Monnier wrote: >>>> Either way, that's not what I'm seeing. Should this be recorded as a bug? >>> I think it's a bug for a major mode function to change the current >>> buffer, so what you're seeing is likely the result of find-file-noselect >>> not protecting itself against such misbehaving major modes ;-) >> Hmmm. I suppose I could make (cpio-mode) a function instead of a mode, > I think using buffer-swap-text, you should be able to fairly easily make > it so that cpio-mode is a proper major mode (e.g. doesn't change > current-buffer) and yet moves the current buffer's contents to some > auxiliary buffer and puts the dired-style interface in the current buffer. > (and setup a change-major-mode-hook to reverse this if the user decides > to change the major mode to something else like fundamental-mode). > > > Stefan > > -- ,Doug Douglas Lewan +1 (908) 720-7908 Give me "assloads of config" over "some other person thought they could decide what I like" any day. - Szmo, on reddit, 2017 Sep 05