From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.devel Subject: RE: Friendlier dired experience [CODE INCLUDED] Date: Sun, 8 Nov 2020 08:48:51 -0800 (PST) Message-ID: References: <20201104183228.xf7w4yf3fw3427y5@E15-2016.optimum.net> <20201105092232.fk4r5dexnay3eyln@E15-2016.optimum.net> <20201105143800.7vt5jfr4gg2wigyb@E15-2016.optimum.net> <20201106091525.mzkxrssm7o43jvff@E15-2016.optimum.net> <20201108093604.rb3lpyqw4mvmwtdt@E15-2016.optimum.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27214"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Stefan Monnier , Arthur Miller , Emacs-Devel List To: Boruch Baum Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Nov 08 17:49:38 2020 Return-path: Envelope-to: ged-emacs-devel@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 1kbnsn-0006xu-SW for ged-emacs-devel@m.gmane-mx.org; Sun, 08 Nov 2020 17:49:37 +0100 Original-Received: from localhost ([::1]:42724 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kbnsm-0007hZ-V6 for ged-emacs-devel@m.gmane-mx.org; Sun, 08 Nov 2020 11:49:36 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48326) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kbnsE-00072O-1h for emacs-devel@gnu.org; Sun, 08 Nov 2020 11:49:02 -0500 Original-Received: from aserp2120.oracle.com ([141.146.126.78]:52680) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kbnsA-0004tj-Or for emacs-devel@gnu.org; Sun, 08 Nov 2020 11:49:01 -0500 Original-Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0A8Ghonv164522; Sun, 8 Nov 2020 16:48:53 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=szW7zRYWxlW0T3zuPrUrAn5UIiuH9wDBy7GNfxpOS7I=; b=idF11/1bm+1t2wPNsD2vtyAKs9NXpp1Iv2VjEFVMuGR1gtJmq5AYo18tJdYjOAkvRbFD 5/upTjuqMTmj65sFwLYUfhIVbTt7EsXSt+nAVxipno3vigzHF9h6Ezo9JcUX68C1pBwG B9Yghc/ZRHl8V+d5wgMvQiLwPR/rjp4/bZcEJA5Ziu9zrF+gejALoJrbHcPVflgtUYAA JbVeg8btcHCc28u4OnniPOo9xJyFuL61CXNLWdPG3jUDfWTb5BEuQGGj6FawOG2sfmr6 c2xS3sf5Q3tpWXUK8/XPMYS1up4SnnqADa12FiDOJwQvahWPFYdqehSD7MvZuXixxwCj ZQ== Original-Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by aserp2120.oracle.com with ESMTP id 34nkhkjvhq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Sun, 08 Nov 2020 16:48:53 +0000 Original-Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0A8Gig4r129237; Sun, 8 Nov 2020 16:48:52 GMT Original-Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserp3020.oracle.com with ESMTP id 34p5fwqqxx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 08 Nov 2020 16:48:52 +0000 Original-Received: from abhmp0020.oracle.com (abhmp0020.oracle.com [141.146.116.26]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 0A8Gmp7Q002536; Sun, 8 Nov 2020 16:48:52 GMT In-Reply-To: <20201108093604.rb3lpyqw4mvmwtdt@E15-2016.optimum.net> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.5071.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9799 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 spamscore=0 malwarescore=0 adultscore=0 phishscore=0 bulkscore=0 mlxlogscore=999 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2011080119 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9799 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 priorityscore=1501 mlxscore=0 suspectscore=0 mlxlogscore=999 lowpriorityscore=0 spamscore=0 malwarescore=0 adultscore=0 clxscore=1015 bulkscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2011080119 Received-SPF: pass client-ip=141.146.126.78; envelope-from=drew.adams@oracle.com; helo=aserp2120.oracle.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/08 11:48:57 X-ACL-Warn: Detected OS = Linux 3.1-3.10 [fuzzy] X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:258911 Archived-At: > > > So, I suppose a way to 'hijack' the bookmark process would be to > > > advise around function bookmark-default-handler checking for the > > > current buffer's major-mode, the state of variable diredc-mode and > > > whether the bookmark is a directory. The ugly part of the 'hijack' > > > is keeping the code of the advice in sync with the underlying > > > function. > > > > Are you looking for a way to have your own bookmark-handling code do > > what you want with a vanilla bookmark for a directory? Is that it? >=20 > Don't pin this on me, Drew. I was just responding > to Stefan Monnier's proposal. Excuse me? I'm not pinning anything on anyone. I was trying to help, by suggesting that a custom bookmark handler might be an alternative to your needing to "'hijack' the bookmark process" by advising `bookmark-default-handler'". If that suggestion doesn't help, just ignore it. > > Why not instead define your own bookmark handler for directory > > bookmarks? That's what bookmark handlers are for. >=20 > Because a specific bookmark's handler is hard-coded into the > data-structure when added, so which ever function creates the bookmark, > be it ye olde function bookmark-set or the new kid diredc, that's the > function that defines the handler to be used. OK. So you don't want specific data in the bookmark itself, right? You instead want a plain vanilla bookmark, but you want it to be handled specially, right? And I guess you want _all_ plain bookmarks to be handled in the same special way (since they're plain, they presumably can't be distinguished by their data), right? If so, then another alternative might be to advise `bookmark-handle-bookmark'. Not that that would make much/any difference from advising the default handler function. > > FWIW - In Bookmark+ Dired buffers have their > > own bookmark handler. >=20 > That's very sensible and should be what function bookmark-set does > instead of what it does now which is run through a set of conditionals. The only conditionals I see in vanilla `bookmark-set' have to do with handling the arg `overwrite-or-push'. I don't see what that has to do with Dired bookmarking. But it's not very important that I understand you, especially if my comments aren't welcome. I mention that only in case you want to clarify for others. > > Bookmarking a Dired buffer records not just the directory location > > but also its `ls' switches, which files are marked, which subdirs are > > inserted, and which (sub)dirs are hidden. Jumping to a Dired bookmark > > restores all of that. >=20 > That's why I never end up actually ever using your extensions, Drew. I > think they're great and I enjoy reading them, but it always ends up > intimidating me with a sense of overkill. Sorry. Luckily, no one's forced to download or use them.