From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tak Kunihiro Newsgroups: gmane.emacs.devel Subject: Re: Context menus and mouse-3 Date: Thu, 17 Sep 2020 11:33:18 +0900 Message-ID: <8CB7DE3D-E69F-4031-B1DF-4F8271EF8660@misasa.okayama-u.ac.jp> References: <67FBE6CE-73C5-4C14-8531-AB55ADE3CC36@misasa.okayama-u.ac.jp> <87d02lykl3.fsf@mail.linkov.net> <26336BF5-CDA2-4CED-90B9-5CCB1155CFD2@misasa.okayama-u.ac.jp> Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.15\)) Content-Type: multipart/mixed; boundary="Apple-Mail=_2B0DC5B4-D003-4D8B-AF4A-7CFA75EB4B09" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3714"; mail-complaints-to="usenet@ciao.gmane.io" Cc: =?utf-8?B?5Zu95bqD5Y2T5Lmf?= , emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Sep 17 04:34:31 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 1kIjkl-0000pU-A9 for ged-emacs-devel@m.gmane-mx.org; Thu, 17 Sep 2020 04:34:31 +0200 Original-Received: from localhost ([::1]:50864 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kIjkk-0001IA-8X for ged-emacs-devel@m.gmane-mx.org; Wed, 16 Sep 2020 22:34:30 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39968) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kIjjz-0000rx-Dk for emacs-devel@gnu.org; Wed, 16 Sep 2020 22:33:43 -0400 Original-Received: from mlsec.cc.okayama-u.ac.jp ([150.46.12.254]:25572) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kIjjv-0002iF-II for emacs-devel@gnu.org; Wed, 16 Sep 2020 22:33:42 -0400 Original-Received: from jlsv301.okayama-u.ac.jp (unknown [150.46.12.5]) by mlsec.cc.okayama-u.ac.jp with smtp id 40db_6a70_dd0b45af_b21c_4ca4_b9a8_af69d9510b69; Thu, 17 Sep 2020 11:33:19 +0900 Original-Received: from [192.168.1.53] (vesta.misasa.okayama-u.ac.jp [150.46.48.154]) by jlsv301.okayama-u.ac.jp (Postfix) with ESMTPSA id 2D3E9760003; Thu, 17 Sep 2020 11:33:19 +0900 (JST) In-Reply-To: <26336BF5-CDA2-4CED-90B9-5CCB1155CFD2@misasa.okayama-u.ac.jp> X-Mailer: Apple Mail (2.3445.104.15) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 11 X-NAI-Spam-Score: 0.1 X-NAI-Spam-Rules: 5 Rules triggered GME_TWTRE=0.1, EDT_SA_AU_PASS=0, EDT_SA_DN_PASS=0, EDT_SA_TS_TEMP_ERROR=0, RV6867=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6867> : inlines <7226> : streams <1867673> : uri <3123819> Received-SPF: pass client-ip=150.46.12.254; envelope-from=tkk@misasa.okayama-u.ac.jp; helo=mlsec.cc.okayama-u.ac.jp X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/16 22:33:31 X-ACL-Warn: Detected OS = ??? 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, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=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:255947 Archived-At: --Apple-Mail=_2B0DC5B4-D003-4D8B-AF4A-7CFA75EB4B09 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii >>> * Contextual menu is not supported yet. >>> >>> I think that depending on a thing at mouse event (file, dir, or URL), >>> choice of operation should be popped up. When there is no suggestion, >>> `Edit' menu should be popped up. Also, by click on mode-line, buffer >>> list should be popped up. >>> >>> I am using a global minor mode `poplife-mode' that puts commands on >>> mouse-3. I attach a file with poplife-mode to show the idea. >> >> Thanks, this is a good starting point for adding contextual menu. >> I tried poplife-mode, and it pops up the menu on mouse-3, >> but it seems only when there is the selection already, >> i.e. it doesn't pop up the menu when nothing is selected. >> Is this intended to work this way? I fixed it and confirm with Emacs -Q. Can you try again to see the approach to start with? --Apple-Mail=_2B0DC5B4-D003-4D8B-AF4A-7CFA75EB4B09 Content-Disposition: attachment; filename=poplife.el Content-Type: application/octet-stream; x-unix-mode=0755; name="poplife.el" Content-Transfer-Encoding: quoted-printable ;;;=20poplife.el=20---=20Pop=20choices=20up=20on=20mouse=20click=0D=0A=0D= =0A;;=20Copyright=20(C)=202017-2020=20Tak=20Kunihiro=0D=0A=0D=0A;;=20= Author:=20Tak=20Kunihiro=20=0D=0A;;=20= Package-Requires:=20((emacs=20"24.4"))=0D=0A;;=20Keywords:=20mouse=0D=0A= ;;=20Version:=201.0=0D=0A;;=20Package-Version:=2020200917.1125=0D=0A=0D=0A= ;;=20This=20file=20is=20NOT=20part=20of=20GNU=20Emacs.=0D=0A=0D=0A;;=20= This=20program=20is=20free=20software:=20you=20can=20redistribute=20it=20= and/or=20modify=0D=0A;;=20it=20under=20the=20terms=20of=20the=20GNU=20= General=20Public=20License=20as=20published=20by=0D=0A;;=20the=20Free=20= Software=20Foundation,=20either=20version=203=20of=20the=20License,=20or=0D= =0A;;=20(at=20your=20option)=20any=20later=20version.=0D=0A=0D=0A;;=20= This=20program=20is=20distributed=20in=20the=20hope=20that=20it=20will=20= be=20useful,=0D=0A;;=20but=20WITHOUT=20ANY=20WARRANTY;=20without=20even=20= the=20implied=20warranty=20of=0D=0A;;=20MERCHANTABILITY=20or=20FITNESS=20= FOR=20A=20PARTICULAR=20PURPOSE.=20=20See=20the=0D=0A;;=20GNU=20General=20= Public=20License=20for=20more=20details.=0D=0A=0D=0A;;=20You=20should=20= have=20received=20a=20copy=20of=20the=20GNU=20General=20Public=20License=0D= =0A;;=20along=20with=20this=20program.=20=20If=20not,=20see=20= .=0D=0A=0D=0A;;=20Usage:=0D=0A;;=0D=0A;;=20= To=20interactively=20toggle=20the=20mode:=0D=0A;;=0D=0A;;=20=20=20M-x=20= poplife-mode=20RET=0D=0A;;=0D=0A;;=20To=20make=20the=20mode=20permanent,=20= put=20these=20in=20your=20init=20file:=0D=0A;;=0D=0A;;=20=20=20(require=20= 'poplife)=0D=0A;;=20=20=20(poplife-mode=201)=0D=0A=0D=0A;;;=20= Commentary:=0D=0A;;=0D=0A;;=20This=20package=20pops=20context=20menu=20= triggered=20by=20right=20click.=20=20On=20a=0D=0A;;=20click,=20depending=20= on=20a=20thing=20under=20the=20mouse=20event,=20(1)=20FILE=20menu=0D=0A= ;;=20(2)=20DIR=20menu,=20(3)=20WORD=20menu,=20(4)=20URL=20menu,=20(5)=20= INFO=20menu,=20(6)=20HELP=0D=0A;;=20menu,=20or=20(7)=20EDIT=20menu=20= will=20be=20popped.=20=20The=20EDIT=20menu=20lets=20you=20copy=0D=0A;;=20= and=20paste=20only=20using=20mouse.=20=20As=20an=20option,=20the=20EDIT=20= menu=20lets=20you=0D=0A;;=20visit=20buffers,=20frames,=20bookmarks,=20= and=20files.=20=20The=20seven=20menus=0D=0A;;=20are=20detailed=20as=20= below.=0D=0A;;=0D=0A;;=20(1)=20FILE=20menu=20--=20Pop=20= how-to-open-a-file=20menu.=0D=0A;;=20(2)=20DIR=20menu=20=20--=20Pop=20= files=20in=20default-directory.=0D=0A;;=20(3)=20WORD=20menu=20--=20Pop=20= word=20candidates=20when=20word=20under=20a=20mouse=20event=20is=20not=20= correct.=0D=0A;;=20(4)=20URL=20menu=20=20--=20Pop=20how-to-open-an-url=20= menu.=0D=0A;;=20(5)=20INFO=20menu=20--=20Pop=20how-to-open-Info=20menu.=0D= =0A;;=20(6)=20HELP=20menu=20--=20Pop=20how-to-open-Help=20menu.=0D=0A;;=20= (7)=20EDIT=20menu=20--=20Pop=20basic=20edition-commands,=20optional=20= edition-commands,=0D=0A;;=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20and=20visiting=20menus.=20=20Details=20are=20shown=20below.=0D=0A= ;;=0D=0A;;=20=20Basic=20edition-commands=20are=20defined=20by=20= `poplife-mouse-edit-cmd-0'.=0D=0A;;=20=20Optional=20edition-commands=20= are=20defined=20by=0D=0A;;=20=20`poplife-mouse-edit-cmd-1'=20with=20= format=20similar=20to=0D=0A;;=20=20`recentf-menu-items-for-commands'.=0D=0A= ;;=0D=0A;;=20=20DIR=20menu=20to=20visit=20files=20in=20default-directory=20= is=20included=20by=0D=0A;;=20=20default.=20=20To=20include=20a=20series=20= of=20visiting=20menus=20in=20EDIT=20menu,=20set=0D=0A;;=20=20each=20item=20= of=20`poplife-mouse-edit-cottager'=20to=20non-nil,=20as=20listed=0D=0A;;=20= =20below.=0D=0A;;=0D=0A;;=20=20=20:buffer=20=20=20=20=20List=20buffers=20= by=20`global-buffers-menu-map'.=0D=0A;;=20=20=20:imenu=20=20=20=20=20=20= List=20table=20of=20contents=20of=20current=20buffer=20by=20iMenu.=0D=0A= ;;=20=20=20:frame=20=20=20=20=20=20List=20frames=20by=20= `global-buffers-menu-map'.=0D=0A;;=20=20=20:bookmark=20=20=20List=20= bookmarks=20by=20`bookmark-all-names'.=0D=0A;;=20=20=20:recentf=20=20=20=20= List=20recent=20files=20by=20`recentf-menu-elements'.=0D=0A;;=0D=0A;;=20=20= To=20reduce=20overhead,=20FILE=20menu=20is=20not=20shown=20when=20= file-remote-p=20is=0D=0A;;=20=20non-nil.=20=20To=20reduce=20overhead=20= by=20a=20remote=20file=20that=20was=20once=20opened=0D=0A;;=20=20by=20= Tramp=20and=20stored=20in=20the=20list=20for=20recentf,=20configure=20a=20= variable=0D=0A;;=20=20`recentf-exclude'.=0D=0A=0D=0A;;;=20References:=0D=0A= =0D=0A;;=20*=20Contextual=20menu=0D=0A;;=20= https://lists.gnu.org/archive/html/emacs-devel/2020-09/msg01277.html=0D=0A= ;;=0D=0A;;=20*=20Paste=20text=20with=20erasing=20active=20region.=0D=0A= ;;=0D=0A;;=20= http://lists.gnu.org/archive/html/bug-gnu-emacs/2017-07/msg00086.html=0D=0A= ;;=20http://lists.gnu.org/archive/html/emacs-devel/2017-07/msg00796.html=0D= =0A;;=0D=0A;;=20*=20Pop=20menu=20up=20by=20long-click=0D=0A;;=0D=0A;;=20= https://lists.gnu.org/archive/html/emacs-devel/2017-11/msg00267.html=0D=0A= ;;=0D=0A;;=20*=20Following=20codes=20from=20Emacs=20core=20are=20useful=20= for=20development.=0D=0A;;=0D=0A;;=20(define-key=20global-map=20= [mouse-3]=20menu-bar-edit-menu)=0D=0A;;=20(popup-menu=20= menu-bar-edit-menu)=0D=0A;;=20(popup-menu=20(mouse-menu-bar-map))=0D=0A= ;;=20(popup-menu=20(mouse-menu-major-mode-map))=20;=20C-mouse-3=0D=0A;;=20= (popup-menu=20menu-bar-bookmark-map)=0D=0A;;=20(popup-menu=20= global-buffers-menu-map)=0D=0A;;=20(define-key=20global-map=20[mouse-3]=20= 'mouse-buffer-menu)=0D=0A;;=20(buffer-menu-open)=0D=0A=0D=0A;;;=20= Templates=20of=20keymap:=0D=0A;;=0D=0A;;=20This=20package=20integrates=20= keymaps=20from=20imenu,=20menu-bar,=20bookmark,=20and=0D=0A;;=20recentf.=20= =20They=20are=20converted=20to=20easymenu=20from=20standard=20keymap.=0D=0A= ;;=20Typical=20easymenu=20and=20standard=20keymap=20are=20shown=20below=20= for=0D=0A;;=20convenience.=0D=0A;;=0D=0A;;=20(label=0D=0A;;=20=20[label=20= callback]=0D=0A;;=20=20(label=0D=0A;;=20=20=20[label=20callback]=0D=0A;;=20= =20=20["--"=20=20ignore]=0D=0A;;=20=20=20[label=20callback])=0D=0A;;=20=20= [label=20callback])=0D=0A;;=0D=0A;;=20(keymap=0D=0A;;=20=20label=0D=0A;;=20= =20(symbol=20menu-item=20label=20callback)=0D=0A;;=20=20[(label=20lambda=20= nil=20(interactive)=20commands)=0D=0A;;=20=20=20(label=20keymap=0D=0A;;=20= =20=20=20=20=20=20=20=20=20(symbol=20menu-item=20label=20callback)=0D=0A= ;;=20=20=20=20=20=20=20=20=20=20(symbol=20menu-item=20label=20callback))=0D= =0A;;=20=20=20(label=20lambda=20nil=20(interactive)=20commands)]=0D=0A;;=20= =20(symbol=20"--")=0D=0A;;=20=20(symbol=20menu-item=20label=0D=0A;;=20=20= =20=20=20=20=20=20=20=20(keymap=20label=0D=0A;;=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20(symbol=20menu-item=20label=20callback)=0D=0A= ;;=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(symbol=20= menu-item=20label=20callback)))=0D=0A;;=20=20(symbol=20menu-item=20label=20= callback))=0D=0A=0D=0A;;;=20Code:=0D=0A(defvar=20= poplife-context-candidates=0D=0A=20=20'(poplife-mouse-help-menu=20=20=20=20= =20=20=20=20=20=20=20=20=20;=20HELP=20menu=0D=0A=20=20=20=20= poplife-mouse-info-menu=20=20=20=20=20=20=20=20=20=20=20=20=20;=20INFO=20= menu=0D=0A=20=20=20=20poplife-mouse-file-menu=20=20=20=20=20=20=20=20=20=20= =20=20=20;=20FILE=20menu=0D=0A=20=20=20=20poplife-mouse-dir-menu=20=20=20= =20=20=20=20=20=20=20=20=20=20=20;=20DIR=20menu=0D=0A=20=20=20=20= poplife-mouse-word-menu=20=20=20=20=20=20=20=20=20=20=20=20=20;=20WORD=20= menu=0D=0A=20=20=20=20poplife-mouse-url-menu=20=20=20=20=20=20=20=20=20=20= =20=20=20=20;=20URL=20menu=0D=0A=20=20=20=20;;=20menu-bar-edit-menu=20=20= =20=20;=20EDIT=20menu=20(default)=0D=0A=20=20=20=20= poplife-mouse-edit-menu)=20=20=20=20=20=20=20=20=20=20=20=20;=20EDIT=20= menu=0D=0A=20=20"List=20of=20candidates=20for=20context=20menu.=0D=0A= Candidates=20are=20function=20or=20keymap.=20=20They=20will=20be=20= evaluated=20in=20the=0D=0Aorder=20of=20the=20list.=20=20A=20function=20= should=20accept=20mouse=20EVENT,=20and=0D=0Areturn=20keymap=20or=20nil.=20= =20The=20last=20candidate=20should=20return=20valid=0D=0Akeymap.")=0D=0A=0D= =0A(defvar=20poplife-mouse-edit-cmd-0=20'(cut=20copy=20paste=20= select-paste=20paste-from-menu=20clear=20mark-whole-buffer)=0D=0A=20=20= "Basic=20edition-commands=20in=20edit=20menu.=0D=0AItems=20must=20be=20= one=20listed=20in=20`menu-bar-edit-menu'.")=0D=0A=0D=0A(defvar=20= poplife-mouse-edit-cmd-1=0D=0A=20=20(list=0D=0A=20=20=20["Close"=0D=0A=20= =20=20=20(lambda=20()=20(interactive)=0D=0A=20=20=20=20=20=20(if=20= (one-window-p)=0D=0A=20=20=20=20=20=20=20=20=20=20(if=20(>=20(length=20= (visible-frame-list))=201)=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (call-interactively=20'delete-frame)=0D=0A=20=20=20=20=20=20=20=20=20=20=20= =20(kill-buffer=20(window-buffer)))=20;=20(quit-window)=0D=0A=20=20=20=20= =20=20=20=20(delete-window)))=0D=0A=20=20=20=20:help=20"Remove=20this=20= window=20or=20this=20frame,=20or=20kill=20this=20buffer"=0D=0A=20=20=20=20= :visible=20(not=20(region-active-p))=0D=0A=20=20=20=20:active=20t]=0D=0A=20= =20=20;;=20["Spell-Check"=0D=0A=20=20=20;;=20=20= flyspell-correct-word-before-point=0D=0A=20=20=20;;=20=20:help=20"Spell=20= check=20word=20at=20point"=0D=0A=20=20=20;;=20=20:visible=20(and=20= (fboundp=20'flyspell-correct-word-before-point)=0D=0A=20=20=20;;=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20(not=20(region-active-p)))=0D=0A=20= =20=20;;=20=20:active=20t]=0D=0A=20=20=20["Spell-Check"=0D=0A=20=20=20=20= ispell-region=0D=0A=20=20=20=20:help=20"Spell=20check=20selected=20text"=0D= =0A=20=20=20=20:visible=20(region-active-p)=0D=0A=20=20=20=20:active=20= t]=0D=0A=20=20=20;;=20["Search=20Web"=0D=0A=20=20=20;;=20=20(lambda=20()=20= (interactive)=0D=0A=20=20=20;;=20=20=20=20(let=20((keyword=20= (buffer-substring-no-properties=20(region-beginning)=20(region-end))))=0D= =0A=20=20=20;;=20=20=20=20=20=20(switch-to-buffer-other-window=20= (generate-new-buffer=20"*eww*"))=0D=0A=20=20=20;;=20=20=20=20=20=20= (eww-mode)=0D=0A=20=20=20;;=20=20=20=20=20=20(eww=20keyword)))=0D=0A=20=20= =20;;=20=20:help=20"Search=20selected=20text=20by=20online=20service"=0D=0A= =20=20=20;;=20=20:visible=20(region-active-p)=0D=0A=20=20=20;;=20=20= :active=20t]=0D=0A=20=20=20["--"=0D=0A=20=20=20=20ignore=0D=0A=20=20=20=20= :visible=20(region-active-p)=0D=0A=20=20=20=20:active=20t])=0D=0A=20=20= "List=20of=20optional=20commands=20in=20edit=20map.")=20;=20= recentf-menu-items-for-commands=0D=0A=0D=0A(defvar=20= poplife-mouse-edit-cottager=0D=0A=20=20'(:imenu=20t=20:buffer=20t=20= :frame=20t=20:bookmark=20t=20:recentf=20t)=0D=0A=20=20"Extra=20menus=20= to=20be=20included=20in=20edit=20menu=20besides=20file.")=0D=0A=0C=0D=0A= (defvar=20poplife-file-max-menu-items=2020=0D=0A=20=20"Maximum=20number=20= of=20items=20in=20DIR=20menu.=0D=0ASee=20also=20= `recentf-max-menu-items',=20`buffers-menu-max-size',=20and=0D=0A= `imenu-max-items'.")=0D=0A=0D=0A(defvar=20poplife-file-recursive=201=0D=0A= =20=20"Depth=20of=20directory=20scan=20on=20DIR=20menu.")=0D=0A=0D=0A= (defvar=20poplife-dir-do-not-scan-regexp=20"inbox"=0D=0A=20=20"Contents=20= of=20directory=20matching=20this=20regexp=20will=20not=20be=20shown=20in=20= DIR=20menu.=0D=0AInstead=20contents=20of=20home=20directory=20are=20= displayed.")=0D=0A=0D=0A(defvar=20poplife-file-do-not-show-regexp=0D=0A=20= =20= "\\`\\.\\.?$\\|\\`#\\|\\.elc\\'\\|\\.exe\\'\\|\\`\\.[^e]\\|\\.lnk\\'\\|\\~= \\'\\|\\`desktop\\.ini\\'\\|\\`\\.DS_store\\'\\|\\`\\.dropbox\\'\\|\\`auto= \\'\\|\\`ntuser\\|\\`_master_\\|\\`_region_\\|\\.aux\\'\\|\\.bbl\\'\\|\\.b= lg\\'\\|\\.fdb_latexmk\\'\\|\\.fls\\'\\|\\.lof\\'\\|\\.lot\\'\\|\\.out\\'\= \|\\.toc\\'\\|\\.synctex\\'\\|\\.ico\\'\\|\\`Thumbs\\.db\\'\\|\\`Icon"=0D= =0A=20=20"Filenames=20matching=20this=20regexp=20will=20not=20be=20= displayed=20in=20DIR=20menu.")=20;=20dired-trivial-filenames,=20= dired-omit-files=0D=0A=0D=0A(defvar=20poplife-file-do-not-open-regexp=0D=0A= =20=20= "\\.pdf\\'\\|\\.doc\\'\\|\\.docx\\'\\|\\.xls\\'\\|\\.xlsx\\'\\|\\.ppt\\'\\= |\\.pptx\\'\\|\\.jpg\\'\\|\\.png\\'\\|\\.tif\\'\\|\\.tiff\\'\\|\\.bmp\\'\\= |\\.aif\\'\\|\\.wav\\'\\|\\.7z\\'\\|\\.tar\\'\\|\\.dll\\'\\|\\.zip\\'\\|\\= .info\\'\\|\\.igpi\\'\\|\\.ttf\\'\\|\\.otf\\'\\|\\.pkg\\'\\|\\.exe\\'"=0D= =0A=20=20"Filenames=20matching=20this=20regexp=20will=20be=20displayed=20= in=20DIR=20menu=20and=20open=20by=20= `poplife-func-find-file-by-default-app'.")=0D=0A=0D=0A(defvar=20= poplife-func-find-file=20'find-file=0D=0A=20=20"Function=20to=20visit=20= a=20file,=20and=20a=20Recentf=20element.=0D=0ADepending=20on=20context,=20= this=20is=20internally=20overwritten=20by=0D=0A`find-file',=20= `find-file-other-window',=20and=0D=0A`find-file-other-frame'.=20=20This=20= is=20referred=20to=20visit=20a=20buffer,=20an=0D=0Aimenu=20element,=20= and=20a=20bookmark=20element=20via=0D=0A`poplife-func-switch-to-buffer'.=20= =20A=20buffer=20is=20visited=20by=0D=0A`menu-bar-select-buffer-function'=20= on=20`global-buffers-menu-map'.=0D=0AAn=20imenu=20element=20is=20always=20= visited=20on=20current=20buffer.=20=20A=20bookmark=0D=0Aelement=20is=20= visited=20by=20`display-func'=20on=20`bookmark-jump'.")=0D=0A=0D=0A= (defvar=20poplife-func-find-file-by-default-app=20= 'poplife-find-file-by-default-app=0D=0A=20=20"Function=20to=20visit=20= file=20by=20default=20application.")=0D=0A=0C=0D=0A(require=20'ffap)=0D=0A= (require=20'easymenu)=0D=0A(require=20'info)=0D=0A=0D=0A;;;###autoload=0D= =0A(define-minor-mode=20poplife-mode=0D=0A=20=20"A=20global=20minor-mode=20= to=20show=20context=20menu=20by=20right=20click."=0D=0A=20=20:init-value=20= nil=0D=0A=20=20:group=20'mouse=0D=0A=20=20:global=20t=0D=0A=20=20:keymap=20= (let=20((map=20(make-sparse-keymap))=0D=0A=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20(context-menu=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20`(menu-item=20"Context=20menu"=20poplife-context-menu=0D=0A=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20:filter=20,(lambda=20(_)=20(poplife-context-menu=20(aref=20= (this-command-keys)=200))))))=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20= ;;=20bug#27569=20(gnus-read-ephemeral-emacs-bug-group=2027569)=0D=0A=20=20= =20=20=20=20=20=20=20=20=20=20;;=20= https://lists.gnu.org/archive/html/bug-gnu-emacs/2017-07/msg00086.html=0D= =0A=20=20=20=20=20=20=20=20=20=20=20=20;;=20= https://lists.gnu.org/archive/html/emacs-devel/2017-07/msg00757.html=0D=0A= =20=20=20=20=20=20=20=20=20=20=20=20;;=20= https://lists.gnu.org/archive/html/emacs-devel/2017-07/msg00796.html=0D=0A= =20=20=20=20=20=20=20=20=20=20=20=20;;=20= https://lists.gnu.org/archive/html/emacs-devel/2017-07/msg00840.html=0D=0A= =20=20=20=20=20=20=20=20=20=20=20=20(define-key=20map=20[mouse-3]=20= context-menu)=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20(define-key=20map=20= [drag-mouse-3]=20context-menu)=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20= (define-key=20map=20[C-down-mouse-1]=20#'ignore)=0D=0A=20=20=20=20=20=20=20= =20=20=20=20=20(define-key=20map=20[C-mouse-1]=20context-menu)=0D=0A=20=20= =20=20=20=20=20=20=20=20=20=20(define-key=20map=20[C-double-mouse-1]=20= context-menu)=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20(define-key=20map=20= [C-triple-mouse-1]=20context-menu)=0D=0A=20=20=20=20=20=20=20=20=20=20=20= =20(define-key=20map=20[C-drag-mouse-1]=20context-menu)=0D=0A=20=20=20=20= =20=20=20=20=20=20=20=20(define-key=20map=20[remap=20buffer-menu-open]=20= #'poplife-menu-open)=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20;;=20= (define-key=20map=20[C-S-down-mouse-1]=20'mouse-buffer-menu)=0D=0A=20=20=20= =20=20=20=20=20=20=20=20=20;;=20(define-key=20map=20[C-M-mouse-1]=20= 'poplife-what-mouse-position)=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20= ;;=20(define-key=20mode-line-buffer-identification-keymap=20[mode-line=20= mouse-3]=20#'poplife-pwd-menu-open)=0D=0A=20=20=20=20=20=20=20=20=20=20=20= =20;;=20(define-key=20mode-line-buffer-identification-keymap=20= [mode-line=20mouse-1]=20#'poplife-buffer-menu-open)=0D=0A=20=20=20=20=20=20= =20=20=20=20=20=20(define-key=20map=20[remap=20= mode-line-previous-buffer]=20#'poplife-buffer-menu-open)=20;=20mouse-1=0D= =0A=20=20=20=20=20=20=20=20=20=20=20=20;;=20(define-key=20map=20[remap=20= mode-line-previous-buffer]=20#'poplife-global-mark-ring-menu-open)=20;=20= mouse-1=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20(define-key=20map=20= [remap=20mode-line-next-buffer]=20#'poplife-pwd-menu-open)=20;=20mouse-3=0D= =0A=20=20=20=20=20=20=20=20=20=20=20=20(define-key=20map=20[mode-line=20= C-mouse-1]=20#'poplife-pwd-menu-open)=0D=0A=20=20=20=20=20=20=20=20=20=20= =20=20(define-key=20map=20[mode-line=20M-mouse-1]=20= #'poplife-pwd-menu-open)=20;=20as=20if=20Mac=0D=0A=20=20=20=20=20=20=20=20= =20=20=20=20map))=0D=0A=0D=0A;;=20*=20How=20to=20implement=20into=20core=0D= =0A;;=0D=0A;;=20= https://lists.gnu.org/archive/html/emacs-devel/2017-11/msg00416.html=0D=0A= =0D=0A;;=20(defvar=20mouse-context-menu-function=20= #'mouse-default-context-menu=0D=0A;;=20=20=20"Function=20that=20builds=20= the=20context-menu.=0D=0A;;=20Takes=20one=20argument=20(the=20EVENT=20= that=20requests=20the=20menu)=20and=20should=20return=0D=0A;;=20a=20list=20= of=20menu=20items.")=0D=0A=0D=0A;;=20(defun=20mouse-default-context-menu=20= (event)=0D=0A;;=20=20=20"Return=20default=20context=20menu."=0D=0A;;=20=20= =20(interactive=20"e")=0D=0A;;=20=20=20menu-bar-edit-menu)=0D=0A=0D=0A;;=20= (defun=20mouse-context-menu=20(event)=0D=0A;;=20=20=20"Open=20up=20the=20= context=20menu."=0D=0A;;=20=20=20(interactive=20"@e")=0D=0A;;=20=20=20= (let*=20((menu-items=20(funcall=20mouse-context-menu-function=20event))=0D= =0A;;=20=20=20=20=20=20=20=20=20=20(keymap=20`(keymap=20,(apply=20= #'vector=20menu-items))))=0D=0A;;=20=20=20=20=20(popup-menu=20keymap=20= event)))=0D=0A=0D=0A;;=20(define-key=20global-map=20[mouse-3]=20= 'mouse-context-menu)=0D=0A=0D=0A(defun=20poplife-menu-open=20()=0D=0A=20=20= "Start=20key=20navigation=20of=20the=20poplife=20menu.=0D=0AThis=20is=20= the=20keyboard=20interface=20to=20\\[poplife-context-menu].=20=20This=20= is=0D=0Afork=20of=20`buffer-menu-open'."=0D=0A=20=20(interactive)=0D=0A=20= =20(popup-menu=20(poplife-context-menu=20last-nonmenu-event)=0D=0A=20=20=20= =20=20=20=20=20=20=20=20=20=20=20(posn-at-x-y=200=200=20nil=20t)))=0D=0A=0D= =0A(defun=20poplife-context-menu=20(event)=0D=0A=20=20"Return=20key's=20= definition=20depending=20on=20thing=20at=20mouse=20click=20EVENT.=0D=0A= Items=20in=20`poplife-context-candidates'=20are=20examined=20= sequentially.=0D=0ASee=20`define-key'=20for=20the=20key's=20definition"=0D= =0A=20=20;;=20~/.emacs.d/init.el=20~/.emacs.d/=20= https://www.gnu.org/software/emacs/=0D=0A=20=20(when=20(fboundp=20= 'secondary-selection-to-region)=20;=2026.1=0D=0A=20=20=20=20= (secondary-selection-to-region))=20;=20When=20there=20is=20only=20= secondary,=20turn=20it=20to=20region.=0D=0A=20=20(let=20((candidates=20= poplife-context-candidates)=0D=0A=20=20=20=20=20=20=20=20context-menu)=0D= =0A=20=20=20=20(while=20(not=20context-menu)=0D=0A=20=20=20=20=20=20(let=20= ((item=20(car=20candidates)))=0D=0A=20=20=20=20=20=20=20=20(setq=20= candidates=20(cdr=20candidates))=0D=0A=20=20=20=20=20=20=20=20;;=20See=20= how=20dired-guess-shell-alist-user=20is=20used=20in=20= dired-guess-default.=0D=0A=20=20=20=20=20=20=20=20(setq=20context-menu=20= (cond=20((fboundp=20item)=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(funcall=20= item=20event))=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20((and=20(symbolp=20item)=0D=0A= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20(keymapp=20(symbol-value=20= item)))=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20(symbol-value=20item))=0D=0A=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20(t=20=20=20=20=20;=20else=0D=0A=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20nil)))))=0D=0A=20=20=20=20context-menu))=0D=0A;;=20(let=20((foo=20= (poplife-context-menu=20last-nonmenu-event)))=20(describe-variable=20= 'foo))=0D=0A=0D=0A(defun=20poplife-what-mouse-position=20(event)=0D=0A=20= =20"Evaluate=20text=20properties=20under=20mouse=20click."=0D=0A=20=20= (interactive=20"e")=0D=0A=20=20(with-output-to-temp-buffer=20"*Result*"=0D= =0A=20=20=20=20(princ=20(format=20"Event=20was=20%S\n"=20event))=0D=0A=20= =20=20=20(princ=20(format=20"Click=20was=20on=20face=20<%S>.\n"=0D=0A=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(mouse-posn-property=20= (event-start=20event)=20'face)))=0D=0A=20=20=20=20(princ=20(format=20= "Click=20was=20on=20dired-filename=20<%S>.\n"=0D=0A=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20(mouse-posn-property=20(event-start=20= event)=20'dired-filename)))))=0D=0A=0D=0A(with-eval-after-load=20= "help-mode"=0D=0A=20=20(button-type-put=20'help-function-def=20= 'help-function=20'poplife-help-find-function))=0D=0A=0D=0A(defvar=20= poplife-help-switch-buffer-function=20'pop-to-buffer=0D=0A=20=20= "Function=20to=20display=20buffer=20in=20help-mode.=0D=0AThis=20can=20be=20= `switch-to-buffer',=20`switch-to-buffer-other-window',=0D=0Aor=20= `switch-to-buffer-other-frame'.")=0D=0A=0D=0A(defun=20= poplife-help-find-function=20(fun=20&optional=20file=20type)=0D=0A=20=20= "Find=20object=20shown=20in=20help-mode."=0D=0A=20=20;;=20This=20is=20= fork=20of=20lambda=20function=20of=20'help-function,=20that=20is=0D=0A=20= =20;;=20defined=20for=20a=20button=20type=20'help-function-def=20in=20= `help-mode.el'.=0D=0A=20=20(or=20file=0D=0A=20=20=20=20=20=20(setq=20= file=20(find-lisp-object-file-name=20fun=20type)))=0D=0A=20=20(if=20(not=20= file)=0D=0A=20=20=20=20=20=20(message=20"Unable=20to=20find=20defining=20= file")=0D=0A=20=20=20=20(require=20'find-func)=0D=0A=20=20=20=20(when=20= (eq=20file=20'C-source)=0D=0A=20=20=20=20=20=20(setq=20file=0D=0A=20=20=20= =20=20=20=20=20=20=20=20=20(help-C-file-name=20(indirect-function=20fun)=20= 'fun)))=0D=0A=20=20=20=20;;=20Don't=20use=20find-function-noselect=20= because=20it=20follows=0D=0A=20=20=20=20;;=20aliases=20(which=20fails=20= for=20built-in=20functions).=0D=0A=20=20=20=20(let=20((location=0D=0A=20=20= =20=20=20=20=20=20=20=20=20(find-function-search-for-symbol=20fun=20type=20= file)))=0D=0A=20=20=20=20=20=20;;=20(pop-to-buffer=20(car=20location))=0D= =0A=20=20=20=20=20=20(funcall=20poplife-help-switch-buffer-function=20= (car=20location))=20;=20Revised=20for=20poplife=0D=0A=20=20=20=20=20=20= (run-hooks=20'find-function-after-hook)=0D=0A=20=20=20=20=20=20(if=20= (cdr=20location)=0D=0A=20=20=20=20=20=20=20=20=20=20(goto-char=20(cdr=20= location))=0D=0A=20=20=20=20=20=20=20=20(message=20"Unable=20to=20find=20= location=20in=20file")))))=0D=0A=0D=0A(defun=20poplife-mouse-help-menu=20= (event)=0D=0A=20=20"Return=20help-menu=20when=20thing=20at=20mouse=20= click=20EVENT=20is=20button=0D=0Awith=20button=20type=20of=20= 'help-function-def."=0D=0A=20=20(and=0D=0A=20=20=20(not=20= (region-active-p))=0D=0A=20=20=20(let=20((help-easymap=0D=0A=20=20=20=20=20= =20=20=20=20=20(save-excursion=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20= (mouse-set-point=20event)=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20;;=20= (text-properties-at=20(point))=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20= ;;=20'(push-button=20= "/Applications/MacPorts/Emacs.app/Contents/Resources/lisp/button.el")=0D=0A= =20=20=20=20=20=20=20=20=20=20=20=20;;=20(push-button=20(point))=0D=0A=20= =20=20=20=20=20=20=20=20=20=20=20;;=20(help-button-action=20(button-at=20= (point)))=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20;;=20(help-do-xref=20= nil=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20;;=20=20=20=09(button-get=20= (button-at=20(point))=20'help-function)=0D=0A=20=20=20=20=20=20=20=20=20=20= =20=20;;=20=20=20=09(button-get=20(button-at=20(point))=20'help-args))=0D= =0A=20=20=20=20=20=20=20=20=20=20=20=20;;=20(button-type=20(button-at=20= (point)))=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20(let=20((button=20= (button-at=20(point))))=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (when=20(and=20button=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20(eq=20(button-type=20button)=20= 'help-function-def))=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (let*=20((button-func=20(button-get=20button=20'help-function))=0D=0A=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (button-arg=20=20(button-get=20button=20'help-args))=0D=0A=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(message=20= (replace-regexp-in-string=20"[()\"]"=20""=20(format=20"%S"=20button-arg)=20= t=20t)))=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (list=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= message=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (vector=20"Open=20Function"=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20`(let*=20((poplife-func-find-file=20= 'find-file)=20;=20switch-to-buffer=0D=0A=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (poplife-help-switch-buffer-function=20(poplife-func-switch-to-buffer)))=0D= =0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20(help-button-action=20,button))=0D=0A=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20:visible=20= t=20:active=20t=20:help=20message)=0D=0A=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20["--"=20ignore]=0D=0A=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20(vector=20"Open=20Function=20in=20Other=20= Window"=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20`(let*=20((poplife-func-find-file=20= 'find-file-other-window)=20;=20switch-to-buffer-other-window=0D=0A=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20(poplife-help-switch-buffer-function=20= (poplife-func-switch-to-buffer)))=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (help-button-action=20,button))=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20:visible=20t=20:active=20t=20= :help=20message)=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20(vector=20"Open=20Function=20in=20Frame"=0D=0A=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20`(let*=20= ((poplife-func-find-file=20'find-file-other-frame)=20;=20= switch-to-buffer-other-frame=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (poplife-help-switch-buffer-function=20(poplife-func-switch-to-buffer)))=0D= =0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20(help-button-action=20,button))=0D=0A=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20:visible=20= t=20:active=20t=20:help=20message))))))))=0D=0A=20=20=20=20=20(when=20= help-easymap=0D=0A=20=20=20=20=20=20=20(easy-menu-create-menu=20(car=20= help-easymap)=20(cdr=20help-easymap))))))=0D=0A;;=20= (poplife-mouse-help-menu=20last-nonmenu-event)=0D=0A=0D=0A(defun=20= poplife-info-node-at-point=20()=0D=0A=20=20"Return=20a=20node=20= reference=20at=20point.=0D=0AReturn=20non-nil=20if=20successful.=20=20= This=20is=20fork=20of=0D=0A`Info-try-follow-nearest-node'."=0D=0A=20=20= (let=20(file-or-node)=0D=0A=20=20=20=20(cond=0D=0A=20=20=20=20=20((setq=20= file-or-node=20(Info-get-token=20(point)=20"[hf]t?tps?://"=0D=0A=09=09=09= =09=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= "\\([hf]t?tps?://[^=20\t\n\"`=E2=80=98({<>})=E2=80=99']+\\)"))=0D=0A=20=20= =20=20=20=20;;=20(browse-url=20file-or-node)=0D=0A=20=20=20=20=20=20= (setq=20file-or-node=20nil))=0D=0A=20=20=20=20=20((setq=20file-or-node=20= (Info-get-token=20(point)=20"\\*note[=20\n\t]+"=0D=0A=09=09=09=09=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20"\\*note[=20= \n\t]+\\([^:]*\\):\\(:\\|[=20\n\t]*(\\)?")))=20;=20(system)Data=20format=20= IONML=0D=0A=20=20=20=20=20;;=20footnote=0D=0A=20=20=20=20=20((setq=20= file-or-node=20(Info-get-token=20(point)=20"("=20"\\(([0-9]+)\\)"))=0D=0A= =20=20=20=20=20=20(setq=20file-or-node=20nil))=0D=0A=20=20=20=20=20;;=20= menu=20item:=20node=20name=0D=0A=20=20=20=20=20((setq=20file-or-node=20= (Info-get-token=20(point)=20"\\*=20+"=20"\\*=20+\\([^:]*\\)::")))=20;=20= What=20is=20DREAM?=0D=0A=20=20=20=20=20;;=20menu=20item:=20node=20name=20= or=20index=20entry=0D=0A=20=20=20=20=20((Info-get-token=20(point)=20"\\*=20= +"=20"\\*=20+\\(.*\\):=20")=20;=20FAQ=0D=0A=20=20=20=20=20=20= (save-excursion=0D=0A=20=20=20=20=20=20=20=20(beginning-of-line)=0D=0A=20= =20=20=20=20=20=20=20(forward-char=202)=0D=0A=20=20=20=20=20=20=20=20= (setq=20file-or-node=20(Info-extract-menu-node-name=20nil=20= (Info-index-node)))))=20;=20(pmlfaq)=0D=0A=20=20=20=20=20((setq=20= file-or-node=20(Info-get-token=20(point)=20"File:=20"=20"File:=20= \\([^,\n\t]*\\)"))=20;=20pmlfaq.info=0D=0A=20=20=20=20=20=20(when=20= (string-match=20"\\.info\\'"=20file-or-node)=0D=0A=20=20=20=20=20=20=20=20= (string-match=20"\\`\\(.+\\)\\.info\\'"=20file-or-node)=20;=20pmlfaq=0D=0A= =20=20=20=20=20=20=20=20(setq=20file-or-node=20(format=20"(%s)=20Top"=20= (match-string=201=20file-or-node))))))=20;=20(pmlfaq)=20Top=0D=0A=20=20=20= =20(when=20(and=20file-or-node=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20(stringp=20Info-current-file)=0D=0A=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20(not=20(string-match=20"\\`(.*)"=20file-or-node)))=0D=0A=20=20= =20=20=20=20(setq=20file-or-node=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20= (format=20"(%s)=20%s"=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20(file-name-sans-extension=0D=0A=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20(file-name-nondirectory=20= Info-current-file))=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20file-or-node)))=20;=20see=20Info-copy-current-node-name=0D=0A= =20=20=20=20file-or-node))=0D=0A=0D=0A(defun=20poplife-mouse-info-menu=20= (event)=0D=0A=20=20"Return=20info-menu=20when=20thing=20at=20mouse=20= click=20EVENT=20is=20link."=0D=0A=20=20;;=20see=20= Info-try-follow-nearest-node=0D=0A=20=20(and=0D=0A=20=20=20(not=20= (region-active-p))=0D=0A=20=20=20(let=20((info-easymap=0D=0A=20=20=20=20=20= =20=20=20=20=20(save-excursion=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20= (mouse-set-point=20event)=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20(let=20= ((file-or-node=20(poplife-info-node-at-point)))=0D=0A=20=20=20=20=20=20=20= =20=20=20=20=20=20=20(when=20file-or-node=0D=0A=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20(list=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20file-or-node=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20(vector=20"Open=20Info"=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20;;=20`(info=20,file-or-node)=0D=0A=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= `(info-setup=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20,file-or-node=0D=0A=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(switch-to-buffer=20= (format=20"*info-%s*"=20,file-or-node)))=0D=0A=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20:visible=20t=20:active=20= t=20:help=20file-or-node)=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20["--"=20ignore]=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20(vector=20"Copy=20Info"=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20`(progn=20(kill-new=20,file-or-node)=20= (message=20,file-or-node))=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20:visible=20t=20:active=20t=20:help=20= file-or-node)=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (vector=20"Open=20Info=20in=20Other=20Window"=0D=0A=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20`(info-setup=0D=0A=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= ,file-or-node=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20(switch-to-buffer-other-window=20(format=20= "*info-%s*"=20,file-or-node)))=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20:visible=20t=20:active=20t=20:help=20= file-or-node)=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (vector=20"Open=20Info=20in=20Frame"=0D=0A=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20`(info-setup=0D=0A=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= ,file-or-node=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20(switch-to-buffer-other-frame=20(format=20= "*info-%s*"=20,file-or-node)))=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20:visible=20t=20:active=20t=20:help=20= file-or-node)))))))=0D=0A=20=20=20=20=20(when=20info-easymap=0D=0A=20=20=20= =20=20=20=20(easy-menu-create-menu=20(car=20info-easymap)=20(cdr=20= info-easymap))))))=0D=0A;;=20(let=20((foo=20(poplife-mouse-info-menu=20= last-nonmenu-event)))=20(describe-variable=20'foo))=0D=0A;;=20= (popup-menu=20(poplife-mouse-info-menu=20last-nonmenu-event))=0D=0A=0D=0A= (defun=20poplife-mouse-file-menu=20(event)=0D=0A=20=20"Return=20= file-menu=20when=20thing=20at=20mouse=20click=20EVENT=20is=20file.=0D=0A= The=20file=20is=20identified=20by=20`ffap-guesser'."=0D=0A=20=20(and=0D=0A= =20=20=20(not=20(region-active-p))=0D=0A=20=20=20(let=20((file-easymap=0D= =0A=20=20=20=20=20=20=20=20=20=20(save-excursion=0D=0A=20=20=20=20=20=20=20= =20=20=20=20=20(mouse-set-point=20event)=0D=0A=20=20=20=20=20=20=20=20=20= =20=20=20(if=20(equal=20major-mode=20'dired-mode)=0D=0A=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20(and=0D=0A=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20(mouse-posn-property=20(event-start=20event)=20= 'dired-filename)=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (poplife-file-easymap=20(dired-get-file-for-visit)=20t))=0D=0A=20=20=20=20= =20=20=20=20=20=20=20=20=20=20(let*=20((ffap-url-regexp=20nil)=20(file=20= (ffap-guesser)))=20;=20ffap-at-mouse=0D=0A=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20;;=20~/.emacs.d/init.el=20=20~/.emacs.d/=20=20= https://www.gnu.org/software/emacs/=0D=0A=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20;;=20ffap-guesser=20cannot=20guess=20file=20with=20= asterisk=20such=20as=20"bookmark.html*"=0D=0A=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20(when=20(and=20file=0D=0A=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(not=20= (ffap-file-remote-p=20file)))=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20(poplife-file-easymap=20file=20t)))))))=0D=0A=20=20=20=20=20= (when=20file-easymap=0D=0A=20=20=20=20=20=20=20(easy-menu-create-menu=20= (car=20file-easymap)=20(cdr=20file-easymap))))))=0D=0A=0D=0A(defun=20= poplife-mouse-dir-menu=20(event)=0D=0A=20=20"Return=20dir-menu=20when=20= thing=20under=20mouse=20cursor=20on=20EVENT=20is=20directory.=0D=0AThe=20= directory=20is=20identified=20by=20`ffap-guesser'."=0D=0A=20=20(and=0D=0A= =20=20=20(not=20(region-active-p))=0D=0A=20=20=20(if=20(equal=20= major-mode=20'dired-mode)=0D=0A=20=20=20=20=20=20=20(mouse-posn-property=20= (event-start=20event)=20'dired-filename)=0D=0A=20=20=20=20=20t)=0D=0A=20=20= =20(let=20((dir-easymap=20(save-excursion=0D=0A=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(mouse-set-point=20event)=0D= =0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= ;;=20~/.emacs.d/init.el=20=20~/.emacs.d/=20=20= https://www.gnu.org/software/emacs/=0D=0A=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20(let*=20((ffap-url-regexp=20nil)=20= (dir=20(ffap-guesser)))=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20(when=20(and=20dir=0D=0A=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20(not=20(ffap-file-remote-p=20dir)))=0D=0A=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (poplife-dir-easymap=20(file-name-as-directory=20dir)=20t))))))=0D=0A=20=20= =20=20=20(when=20dir-easymap=0D=0A=20=20=20=20=20=20=20= (easy-menu-create-menu=20(car=20dir-easymap)=20(cdr=20dir-easymap))))))=0D= =0A=0D=0A(defun=20poplife-mouse-word-menu=20(event)=0D=0A=20=20"Return=20= 'flyspell-correct-word=20when=20word=20under=20mouse=20cursor=20on=20= EVENT=20is=20incorrect."=0D=0A=20=20(and=0D=0A=20=20=20(not=20= (region-active-p))=0D=0A=20=20=20;;=20Check=20face=20by=20= (what-cursor-position=20t)=20or=20C-u=20C-x=20=3D.=0D=0A=20=20=20(let=20= ((faces-at-point=20(mapcar=20(lambda=20(xxx)=20(overlay-get=20xxx=20= 'face))=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20(overlays-at=20(posn-point=20= (event-start=20event))))))=0D=0A=20=20=20=20=20(when=20(or=20(member=20= 'flyspell-incorrect=20faces-at-point)=0D=0A=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20(member=20'flyspell-duplicate=20faces-at-point))=0D=0A=20=20= =20=20=20=20=20#'flyspell-correct-word))))=20;=20= flyspell-correct-word-before-point=0D=0A=0D=0A(defun=20= poplife-mouse-url-menu=20(event)=0D=0A=20=20"Return=20url-menu=20when=20= thing=20under=20mouse=20cursor=20on=20EVENT=20is=20url.=0D=0AThe=20url=20= is=20identified=20by=20`thing-at-point-url-at-point'."=0D=0A=20=20(and=0D= =0A=20=20=20(not=20(region-active-p))=0D=0A=20=20=20(let=20((url-easymap=0D= =0A=20=20=20=20=20=20=20=20=20=20(save-excursion=0D=0A=20=20=20=20=20=20=20= =20=20=20=20=20(mouse-set-point=20event)=0D=0A=20=20=20=20=20=20=20=20=20= =20=20=20;;=20~/.emacs.d/init.el=20=20~/.emacs.d/=20=20= https://www.gnu.org/software/emacs/=0D=0A=20=20=20=20=20=20=20=20=20=20=20= =20(let=20((url=20(or=20(thing-at-point-url-at-point=20t)=20;=20= browse-url-at-mouse=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20(get-text-property=20(point)=20= 'shr-url)=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20(get-text-property=20(point)=20'image-url))))=0D=0A=20= =20=20=20=20=20=20=20=20=20=20=20=20=20(when=20url=0D=0A=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20(list=20(let=20((url=20= (replace-regexp-in-string=20"https?://"=20""=20url))=0D=0A=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (len=2040))=20;=20Make=20URL=20short=0D=0A=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20(if=20(>=20(length=20url)=20len)=0D= =0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20(concat=20(substring=20url=200=20(1-=20len))=20"...")=0D=0A=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= url))=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20(vector=20"Open=20Link"=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20`(eww=20,url)=0D=0A=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20:visible=20t=20:active=20t=20:help=20url)=0D=0A=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20["--"=20ignore]=0D=0A=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(vector=20= "Copy=20Link"=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20`(progn=20(kill-new=20,url)=20= (message=20"Copied=20%s"=20,url))=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20:visible=20t=20= :active=20t=20:help=20url)=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20(vector=20"Open=20Link=20in=20Other=20Window"=0D=0A= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20;;=20eww-browse-url,=20eww-open-in-new-buffer=0D=0A=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20`(progn=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (switch-to-buffer-other-window=20(generate-new-buffer=20"*eww*"))=0D=0A=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20(eww-mode)=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(eww=20= ,url))=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20:visible=20t=20:active=20t=20:help=20url)=0D=0A= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (vector=20"Open=20Link=20in=20Frame"=20;=20"Open=20in=20Frame"=0D=0A=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20`(progn=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (switch-to-buffer-other-frame=20(generate-new-buffer=20"*eww*"))=0D=0A=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20(eww-mode)=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(eww=20= ,url))=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20:visible=20t=20:active=20t=20:help=20url)=0D=0A= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (vector=20"Open=20Link=20by=20Default=20App"=20;=20"Open=20Link=20using=20= browse-url"=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20`(let=20((browse-url-browser-function=20= 'browse-url-default-browser))=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(browse-url=20= ,url))=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20:visible=20t=0D=0A=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20:active=20t=0D= =0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20:help=20url)))))))=0D=0A=20=20=20=20=20(when=20= url-easymap=0D=0A=20=20=20=20=20=20=20(easy-menu-create-menu=20(car=20= url-easymap)=20(cdr=20url-easymap))))))=0D=0A=0D=0A(defun=20= poplife-mouse-edit-menu=20(event)=0D=0A=20=20"Define=20edit=20menu=20on=20= mouse=20click=20EVENT."=0D=0A=20=20;;=20initialize=0D=0A=20=20(when=20= (plist-get=20poplife-mouse-edit-cottager=20:bookmark)=0D=0A=20=20=20=20= (require=20'bookmark))=0D=0A=20=20(when=20(plist-get=20= poplife-mouse-edit-cottager=20:recentf)=0D=0A=20=20=20=20(require=20= 'recentf)=0D=0A=20=20=20=20(recentf-mode=201))=0D=0A=20=20(when=20= (plist-get=20poplife-mouse-edit-cottager=20:imenu)=0D=0A=20=20=20=20= (require=20'imenu))=0D=0A=0D=0A=20=20(save-excursion=0D=0A=20=20=20=20= (mouse-set-point=20event)=0D=0A=20=20=20=20(let=20((map=20= (make-sparse-keymap=20"Edit")))=0D=0A=20=20=20=20=20=20(unless=20= (region-active-p)=0D=0A=20=20=20=20=20=20=20=20;;=20Visit=20buffers=20= with=20iMenu=0D=0A=20=20=20=20=20=20=20=20(when=20(plist-get=20= poplife-mouse-edit-cottager=20:buffer)=0D=0A=20=20=20=20=20=20=20=20=20=20= (easy-menu-add-item=20map=20nil=20(poplife-buffer-easymap)))=0D=0A=0D=0A=20= =20=20=20=20=20=20=20;;=20Visit=20frames=0D=0A=20=20=20=20=20=20=20=20= (when=20(plist-get=20poplife-mouse-edit-cottager=20:frame)=0D=0A=20=20=20= =20=20=20=20=20=20=20(easy-menu-add-item=20map=20nil=20= (poplife-frame-easymap)))=0D=0A=0D=0A=20=20=20=20=20=20=20=20;;=20Visit=20= bookmarks=0D=0A=20=20=20=20=20=20=20=20(when=20(plist-get=20= poplife-mouse-edit-cottager=20:bookmark)=0D=0A=20=20=20=20=20=20=20=20=20= =20(easy-menu-add-item=20map=20nil=20(poplife-bookmark-easymap)))=0D=0A=0D= =0A=20=20=20=20=20=20=20=20;;=20Visit=20recent=20files=0D=0A=20=20=20=20=20= =20=20=20(when=20(plist-get=20poplife-mouse-edit-cottager=20:recentf)=0D=0A= =20=20=20=20=20=20=20=20=20=20(easy-menu-add-item=20map=20nil=20= (poplife-recentf-easymap)))=0D=0A=0D=0A=20=20=20=20=20=20=20=20;;=20= Visit=20directory=0D=0A=20=20=20=20=20=20=20=20(unless=20(file-remote-p=20= default-directory)=0D=0A=20=20=20=20=20=20=20=20=20=20(let=20((dir-map=20= (poplife-dir-easymap=20default-directory)))=0D=0A=20=20=20=20=20=20=20=20= =20=20=20=20(setcar=20dir-map=20"File")=20=20=20=20=20=20;=20instead=20= of=20".emacs.d/"=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20= (easy-menu-add-item=20map=20nil=20dir-map)))=0D=0A=0D=0A=20=20=20=20=20=20= =20=20;;=20Separator=0D=0A=20=20=20=20=20=20=20=20(define-key=20map=20= [separator-edit]=20menu-bar-separator))=0D=0A=0D=0A=20=20=20=20=20=20;;=20= Option=20--=20TODO:=20Fix=20location=20of=20item=20with=20recursive=20= structure.=0D=0A=20=20=20=20=20=20(when=20poplife-mouse-edit-cmd-1=0D=0A=20= =20=20=20=20=20=20=20(dolist=20(item=20poplife-mouse-edit-cmd-1)=0D=0A=20= =20=20=20=20=20=20=20=20=20(if=20(vectorp=20item)=0D=0A=20=20=20=20=20=20= =20=20=20=20=20=20=20=20(let*=20((item=20(append=20item=20nil))=20;=20= Convert=20vector=20to=20list.=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20(nickname=20(car=20item)))=0D=0A=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20(bindings--define-key=20map=20(vector=20= (easy-menu-make-symbol=20nickname))=0D=0A=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20(append=20(list=20'menu-item=20nickname)=20(cdr=20= item))))=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20(easy-menu-add-item=20= map=20nil=20item))))=20;=20with=20recursive=20structure=0D=0A=0D=0A=20=20= =20=20=20=20;;=20Main=0D=0A=20=20=20=20=20=20(dolist=20(item=20(reverse=20= (cdr=20menu-bar-edit-menu)))=0D=0A=20=20=20=20=20=20=20=20(when=20(and=20= (listp=20item)=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20(member=20(car=20item)=20poplife-mouse-edit-cmd-0))=20;=20pick=20some=0D= =0A=20=20=20=20=20=20=20=20=20=20(bindings--define-key=20map=20(vector=20= (car=20item))=20(cdr=20item))))=0D=0A=0D=0A=20=20=20=20=20=20map)))=0D=0A= ;;=20(let=20((foo=20(poplife-mouse-edit-menu=20last-nonmenu-event)))=20= (describe-variable=20'foo))=0D=0A=0C=0D=0A;;;=20iMenu=0D=0A(defun=20= poplife-imenu-easymap=20(&optional=20submenu)=0D=0A=20=20"Define=20= easymenu=20to=20list=20index=20by=20iMenu.=0D=0AWhen=20SUBMENU=20is=20= non-nil,=20this=20returns=20an=20easymenu=20with=20multiple=20actions."=0D= =0A=20=20;;=20TODO:=20Selection=20of=20menu=20does=20not=20move=20point=20= when=20called=20from=0D=0A=20=20;;=20click=20on=20mode-line.=0D=0A=20=20= (let*=20((imenu-max-items=20poplife-file-max-menu-items)=20;=2025=0D=0A=20= =20=20=20=20=20=20=20=20(map-0=20(ignore-errors=0D=0A=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20(imenu--split-menu=0D=0A=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20(delq=20nil=20(cdr=20= (imenu--make-index-alist=20t)))=20;=20remove=20"*Rescan*"=0D=0A=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(buffer-name))))=0D=0A=20=20= =20=20=20=20=20=20=20(map=20(poplife-imenu-alist-to-easymap=20(car=20= map-0)=20(cdr=20map-0)=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20'imenu--menubar-select)))=0D=0A=20=20=20=20(when=20(>=3D=20= (length=20map)=202)=20;=20Return=20map=20only=20when=20map=20is=20with=20= useful=20items.=0D=0A=20=20=20=20=20=20(if=20submenu=0D=0A=20=20=20=20=20= =20=20=20=20=20(poplife-imenu-submenufy-easymap=20map)=0D=0A=20=20=20=20=20= =20=20=20(let=20((map-rev=20(reverse=20map)))=0D=0A=20=20=20=20=20=20=20=20= =20=20(push=20(vector=20"More..."=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20'(popup-menu=20= (poplife-imenu-easymap=20t)=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (popup-menu-normalize-position=20last-nonmenu-event)))=0D=0A=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20map-rev)=0D=0A=20=20=20=20=20=20=20=20=20= =20(reverse=20map-rev))))))=0D=0A;;=20(let=20((foo=20= (poplife-imenu-easymap)))=20(describe-variable=20'foo))=0D=0A;;=20(let*=20= ((poplife-func-find-file=20'find-file-other-frame)=20(foo=20= (poplife-imenu-easymap)))=20(describe-variable=20'foo))=0D=0A;;=20(let=20= ((foo=20(poplife-imenu-easymap=20t)))=20(describe-variable=20'foo))=0D=0A= ;;=20(popup-menu=20(poplife-imenu-easymap))=0D=0A=0D=0A(defun=20= poplife-imenu-alist-to-easymap=20(title=20alist=20&optional=20cmd)=0D=0A=20= =20"Create=20easymenu=20from=20alist=20by=20iMenu=20to=20display=20index=20= by=20CMD.=0D=0AThis=20is=20fork=20of=20`imenu--create-keymap'."=0D=0A=20=20= (let=20(map)=0D=0A=20=20=20=20(dolist=20(item=20alist)=0D=0A=20=20=20=20=20= =20(push=20(cond=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20= ((imenu--subalist-p=20item)=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (poplife-imenu-alist-to-easymap=20(car=20item)=20(cdr=20item)=20cmd))=0D=0A= =20=20=20=20=20=20=20=20=20=20=20=20=20(t=0D=0A=20=20=20=20=20=20=20=20=20= =20=20=20=20=20(if=20cmd=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20(vector=20(car=20item)=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20(list=20'let=0D=0A=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20'((display-buffer--other-frame-action=20;=20hack=20for=20= switch-to-buffer-other-frame=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= '((display-buffer-pop-up-frame)=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (inhibit-same-window=20.=20t))))=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20`(funcall=20= (quote=20,(poplife-func-switch-to-buffer))=20,(current-buffer))=0D=0A=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20`(,cmd=20(quote=20,item))))=0D=0A=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20(list=20'quote=20item))))=0D=0A=20=20=20=20=20=20=20= =20=20=20=20=20map))=0D=0A=20=20=20=20(setq=20map=20(reverse=20map))=0D=0A= =20=20=20=20(push=20title=20map)=0D=0A=20=20=20=20map))=0D=0A=0D=0A= (defun=20poplife-imenu-submenufy-easymap=20(map)=0D=0A=20=20"Return=20= easymenu=20of=20iMenu=20MAP=20with=20recursive=20structure."=0D=0A=20=20= (let=20(map-1)=0D=0A=20=20=20=20(dolist=20(item=20map)=0D=0A=20=20=20=20=20= =20(push=20(cond=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20((listp=20= item)=20;=20when=20an=20item=20is=20a=20list=0D=0A=20=20=20=20=20=20=20=20= =20=20=20=20=20=20(poplife-imenu-submenufy-easymap=20item))=0D=0A=20=20=20= =20=20=20=20=20=20=20=20=20=20((vectorp=20item)=20;=20when=20an=20item=20= is=20vector=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (poplife-imenu-elt-easymap=20item))=0D=0A=20=20=20=20=20=20=20=20=20=20=20= =20=20(t=20item))=20;=20else=20such=20for=20"poplife.el"=0D=0A=20=20=20=20= =20=20=20=20=20=20=20=20map-1))=0D=0A=20=20=20=20(reverse=20map-1)))=0D=0A= =0D=0A(defun=20poplife-imenu-elt-easymap=20(elt)=0D=0A=20=20"Return=20= easymenu=20of=20iMenu=20ELT=20with=20submenu=20added."=0D=0A=20=20(let=20= ((label=20(aref=20elt=200))=20;=20"poplife-mouse-edit-cottager"=0D=0A=20=20= =20=20=20=20=20=20(cmd=20(nth=203=20(aref=20elt=201)))=20;=20= (imenu--menubar-select=20'("poplife-mouse-edit-cottager"=20.=20#))=0D=0A=20=20=20=20=20=20=20=20(buf=20= (current-buffer)))=20;=20#=0D=0A=20=20=20=20(list=20= label=0D=0A=20=20=20=20=20=20=20=20=20=20(vector=20"Open"=20`(progn=20= (switch-to-buffer=20,buf)=20,cmd))=0D=0A=20=20=20=20=20=20=20=20=20=20= ["--"=20ignore]=0D=0A=20=20=20=20=20=20=20=20=20=20(vector=20"Open=20in=20= Other=20Window"=20`(progn=20(switch-to-buffer-other-window=20,buf)=20= ,cmd))=0D=0A=20=20=20=20=20=20=20=20=20=20(vector=20"Open=20in=20Frame"=20= `(progn=20(pop-to-buffer=20,buf=20'((display-buffer-pop-up-frame)=20= (inhibit-same-window=20.=20t)))=20,cmd)))))=0D=0A=0C=0D=0A;;;=20Frame=0D=0A= (defun=20poplife-frame-easymap=20()=0D=0A=20=20"Define=20easymenu=20to=20= list=20frames."=0D=0A=20=20(let=20((frame-vec=20(nth=202=20(cadddr=20= (assoc=20'frames=20global-buffers-menu-map))))=0D=0A=20=20=20=20=20=20=20= =20(poplife-func-find-file=20'find-file-other-frame)=0D=0A=20=20=20=20=20= =20=20=20map)=0D=0A=20=20=20=20(dolist=20(elt=20(append=20frame-vec=20= nil))=20;=20Convert=20vector=20to=20list.=0D=0A=20=20=20=20=20=20(let*=20= ((nickname=20(car=20elt))=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20= (cmd=20(nth=204=20elt))=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20= (frame=20(cadr=20cmd)))=0D=0A=20=20=20=20=20=20=20=20(push=20(vector=20= nickname=20cmd=20:active=20(not=20(equal=20frame=20(selected-frame))))=20= map)))=0D=0A=20=20=20=20(push=20["New"=20(progn=20(make-frame-command)=20= (menu-find-file-existing))]=20map)=0D=0A=20=20=20=20(push=20["--"=20= ignore]=20map)=0D=0A=20=20=20=20(when=20(plist-get=20= poplife-mouse-edit-cottager=20:buffer)=0D=0A=20=20=20=20=20=20(push=20= (poplife-buffer-easymap)=20map))=0D=0A=20=20=20=20(when=20(plist-get=20= poplife-mouse-edit-cottager=20:bookmark)=0D=0A=20=20=20=20=20=20(push=20= (poplife-bookmark-easymap)=20map))=0D=0A=20=20=20=20(when=20(plist-get=20= poplife-mouse-edit-cottager=20:recentf)=0D=0A=20=20=20=20=20=20(push=20= (poplife-recentf-easymap)=20map))=0D=0A=20=20=20=20(unless=20= (file-remote-p=20default-directory)=0D=0A=20=20=20=20=20=20(let=20= ((dir-map=20(poplife-dir-easymap=20default-directory)))=0D=0A=20=20=20=20= =20=20=20=20(setcar=20dir-map=20"File")=20=20=20=20=20=20=20=20;=20= "Directory"=0D=0A=20=20=20=20=20=20=20=20(push=20dir-map=20map)))=0D=0A=20= =20=20=20(setq=20map=20(reverse=20map))=0D=0A=20=20=20=20(push=20= "Frames"=20map)=0D=0A=20=20=20=20map))=0D=0A;;=20(let=20((foo=20= (poplife-frame-easymap)))=20(describe-variable=20'foo))=0D=0A=0C=0D=0A= ;;;=20Buffer=0D=0A(defun=20poplife-buffer-easymap=20(&optional=20= submenu)=0D=0A=20=20"Define=20easymenu=20to=20list=20buffers.=0D=0AThis=20= extracts=20list=20of=20buffers=20from=20`global-buffers-menu-map'.=0D=0A= When=20SUBMENU=20is=20non-nil,=20this=20returns=20an=20easymenu=20with=20= multiple=20actions."=0D=0A=20=20(let=20((buffer-list=20= (poplife-buffer-list))=0D=0A=20=20=20=20=20=20=20=20;;=20= (poplife-func-find-file=20'find-file)=20;=2020190128.1647=0D=0A=20=20=20=20= =20=20=20=20(menu-bar-select-buffer-function=20= (poplife-func-switch-to-buffer))=0D=0A=20=20=20=20=20=20=20=20map)=0D=0A=0D= =0A=20=20=20=20;;=20Add=20submenu=20on=20request.=0D=0A=20=20=20=20= (dolist=20(elt=20buffer-list)=0D=0A=20=20=20=20=20=20(push=20= (poplife-buffer-elt-easymap=20elt=20submenu)=20map))=0D=0A=0D=0A=20=20=20= =20;;=20Add=20option.=0D=0A=20=20=20=20(push=20(vector=20"More..."=0D=0A=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20'(let=20= (buffer-full-map)=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20(let=20(buffers-menu-max-size)=0D=0A=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20(menu-bar-update-buffers=20t)=0D= =0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (setq=20buffer-full-map=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20(poplife-buffer-easymap=20t)))=0D= =0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (menu-bar-update-buffers=20t)=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20(popup-menu=20buffer-full-map=0D=0A=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20(popup-menu-normalize-position=20last-nonmenu-event)))=0D=0A=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20:visible=20t=0D=0A=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20:active=20(not=20submenu))=0D= =0A=20=20=20=20=20=20=20=20=20=20map)=0D=0A=0D=0A=20=20=20=20;;=20= Reverse=20map=20and=20add=20a=20key.=0D=0A=20=20=20=20(setq=20map=20= (reverse=20map))=0D=0A=20=20=20=20(push=20"Buffers"=20map)=0D=0A=0D=0A=20= =20=20=20map))=0D=0A;;=20(let=20((foo=20(poplife-buffer-easymap)))=20= (describe-variable=20'foo))=0D=0A;;=20(let=20((foo=20= (poplife-buffer-easymap=20t)))=20(describe-variable=20'foo))=0D=0A=0D=0A= (defun=20poplife-buffer-list-on-menu=20()=0D=0A=20=20"Return=20a=20list=20= of=20buffers=20on=20`global-buffers-menu-map'."=0D=0A=20=20;;=20on=20= 25.2,=20pick=204th=20out=20of=205=20items=0D=0A=20=20;;=20= ("menu-bar.el.gz=20=20"=20lambda=20nil=20(interactive)=20(funcall=20= menu-bar-select-buffer-function=20#))=0D=0A=20=20= ;;=20on=2024.5,=20pick=205th=20out=20of=206=20items=0D=0A=20=20;;=20= ("menu-bar.el.gz=20=20"=20(nil)=20lambda=20nil=20(interactive)=20= (funcall=20menu-bar-select-buffer-function=20#))=0D=0A=20=20(let=20((len245=206)=0D=0A=20=20=20=20=20=20= =20=20(nth252=204)=0D=0A=20=20=20=20=20=20=20=20(nth245=205)=0D=0A=20=20=20= =20=20=20=20=20(buffers-menu=20(nth=202=20global-buffers-menu-map))=0D=0A= =20=20=20=20=20=20=20=20;;=20nickname-list=0D=0A=20=20=20=20=20=20=20=20= buffer-list)=0D=0A=20=20=20=20(dolist=20(elt=20(append=20buffers-menu=20= nil))=20;=20Convert=20vector=20to=20list.=0D=0A=20=20=20=20=20=20;;=20= (push=20(car=20elt)=20nickname-list)=0D=0A=20=20=20=20=20=20(push=20(nth=20= 2=20(nth=20(if=20(equal=20(length=20elt)=20len245)=0D=0A=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20nth245=0D= =0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20nth252)=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20elt))=20buffer-list))=0D=0A=20=20=20=20(reverse=20= buffer-list)))=0D=0A;;=20(let=20((foo=20(poplife-buffer-list-on-menu)))=20= (describe-variable=20'foo))=0D=0A;;=20(let=20((foo=20(buffer-list)))=20= (describe-variable=20'foo))=0D=0A=0D=0A(defun=20poplife-buffer-list=20()=0D= =0A=20=20"Return=20a=20list=20of=20buffers."=0D=0A=20=20(delete-dups=20= (append=20(list=20(current-buffer))=0D=0A=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20(poplife-buffer-list-with-marks)=0D=0A= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (poplife-buffer-list-on-menu))))=0D=0A;;=20(let=20((foo=20= (poplife-buffer-list)))=20(describe-variable=20'foo))=0D=0A=0D=0A(defun=20= poplife-buffer-list-with-marks=20()=0D=0A=20=20"Return=20a=20list=20of=20= buffers=20on=20`global-mark-ring'."=0D=0A=20=20(let=20(buffer-list=20= buf)=0D=0A=20=20=20=20(dolist=20(marker=20(reverse=20global-mark-ring))=0D= =0A=20=20=20=20=20=20(when=20(setq=20buf=20(marker-buffer=20marker))=20;=20= See=20`pop-global-mark'=0D=0A=20=20=20=20=20=20=20=20(push=20buf=20= buffer-list)))=0D=0A=20=20=20=20buffer-list))=0D=0A;;=20(let=20((foo=20= (poplife-buffer-list-with-marks)))=20(describe-variable=20'foo))=0D=0A=0D= =0A(defun=20poplife-buffer-elt-easymap=20(buffer=20&optional=20submenu)=0D= =0A=20=20"Define=20easymenu=20for=20a=20BUFFER.=0D=0AWhen=20SUBMENU=20is=20= non-nil,=20this=20returns=20an=20easymenu=20with=20multiple=0D=0A= actions."=0D=0A=20=20(let=20((nickname=20(buffer-name=20buffer)))=0D=0A=20= =20=20=20(if=20(not=20submenu)=0D=0A=20=20=20=20=20=20=20=20(let=20= (imenu-map)=0D=0A=20=20=20=20=20=20=20=20=20=20(if=20(and=20(plist-get=20= poplife-mouse-edit-cottager=20:imenu)=0D=0A=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20(equal=20(current-buffer)=20buffer)=0D=0A=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(setq=20imenu-map=20= (poplife-imenu-easymap)))=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20= imenu-map=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20(vector=20nickname=20= `(funcall=20(quote=20,menu-bar-select-buffer-function)=20,buffer)=0D=0A=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20:active=20`(not=20= (equal=20,(current-buffer)=20,buffer)))))=0D=0A=20=20=20=20=20=20(list=20= nickname=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20(vector=20"Open"=20= `(switch-to-buffer=20,buffer)=20:active=20`(not=20(equal=20= ,(current-buffer)=20,buffer)))=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20= ["--"=20ignore]=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20(vector=20"Open=20= in=20Other=20Window"=20`(switch-to-buffer-other-window=20,buffer))=0D=0A=20= =20=20=20=20=20=20=20=20=20=20=20(vector=20"Open=20in=20Frame"=20= `(switch-to-buffer-other-frame=20,buffer))))))=0D=0A=0C=0D=0A;;;=20= Recentf=0D=0A(defun=20poplife-recentf-easymap=20(&optional=20submenu)=0D=0A= =20=20"Define=20easymenu=20to=20list=20recentf.=0D=0AWhen=20SUBMENU=20is=20= non-nil,=20this=20returns=20an=20easymenu=20with=20multiple=20actions."=0D= =0A=20=20(let=20(map=0D=0A=20=20=20=20=20=20=20=20= (recentf-menu-shortcuts=200)=0D=0A=20=20=20=20=20=20=20=20(elements=20= (recentf-menu-elements=20recentf-max-menu-items)))=0D=0A=20=20=20=20;;=20= See=20`recentf-make-menu-items'.=0D=0A=20=20=20=20(setq=20map=20(mapcar=20= (lambda=20(elt)=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20(funcall=20'poplife-recentf-elt-easymap=20elt=20= submenu))=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20(recentf-apply-menu-filter=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20recentf-menu-filter=0D=0A=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20elements)))=0D=0A=20= =20=20=20(let=20((map-rev=20(reverse=20map)))=0D=0A=20=20=20=20=20=20= (push=20(vector=20"More..."=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20'(let=20((recentf-max-menu-items=20= recentf-max-saved-items))=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20(popup-menu=20(poplife-recentf-easymap=20t)=0D= =0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20(popup-menu-normalize-position=20= last-nonmenu-event)))=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20:help=20"Show=20more=20Recentf"=0D=0A=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20:visible=20t=0D=0A=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20:active=20(not=20submenu))=0D=0A=20= =20=20=20=20=20=20=20=20=20=20=20map-rev)=0D=0A=20=20=20=20=20=20(push=20= ["--"=20ignore]=20map-rev)=0D=0A=20=20=20=20=20=20(push=20["Edit..."=0D=0A= =20=20=20=20=20=20=20=20=20=20=20=20=20recentf-edit-list=0D=0A=20=20=20=20= =20=20=20=20=20=20=20=20=20:help=20"Manually=20remove=20files=20from=20= the=20recent=20list"=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20:active=20= t]=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20map-rev)=0D=0A=20=20=20=20=20= =20;;=20(push=20["Save=20List=20Now"=0D=0A=20=20=20=20=20=20;;=20=20=20=20= =20=20=20=20recentf-save-list=0D=0A=20=20=20=20=20=20;;=20=20=20=20=20=20= =20=20:help=20"Save=20the=20list=20of=20recently=20opened=20files=20now"=0D= =0A=20=20=20=20=20=20;;=20=20=20=20=20=20=20=20:active=20t]=0D=0A=20=20=20= =20=20=20;;=20=20=20=20=20=20=20map-rev)=0D=0A=20=20=20=20=20=20(setq=20= map=20(reverse=20map-rev)))=0D=0A=20=20=20=20(cons=20"Recent"=20map)))=0D= =0A;;=20(let=20((foo=20(poplife-recentf-easymap)))=20(describe-variable=20= 'foo))=0D=0A=0D=0A(defun=20poplife-recentf-elt-easymap=20(elt=20= &optional=20submenu)=0D=0A=20=20"Define=20easymenu=20to=20popup=20= recentf=20item=20ELT.=0D=0AWhen=20SUBMENU=20is=20non-nil,=20this=20= returns=20an=20easymenu=20with=20multiple=20actions."=0D=0A=20=20;;=20= This=20is=20fork=20of=20`recentf-make-menu-item'.=0D=0A=20=20(let=20= ((name=20(recentf-menu-element-item=20elt))=0D=0A=20=20=20=20=20=20=20=20= (file=20(recentf-menu-element-value=20elt)))=0D=0A=20=20=20=20(if=20= (recentf-sub-menu-element-p=20elt)=0D=0A=20=20=20=20=20=20=20=20(cons=20= name=20(mapcar=20(lambda=20(elt)=20(funcall=20= 'poplife-recentf-elt-easymap=20elt))=20file))=20;=20for=20= `recentf-arrange-by-dir'=0D=0A=20=20=20=20=20=20;;=20(vector=20name=0D=0A= =20=20=20=20=20=20;;=20=20=20=20=20=20=20=20=20`(,recentf-menu-action=20= ,file)=20;=20poplife-func-find-file=0D=0A=20=20=20=20=20=20;;=20=20=20=20= =20=20=20=20=20:help=20(concat=20"Open=20"=20file)=0D=0A=20=20=20=20=20=20= ;;=20=20=20=20=20=20=20=20=20:active=20t)=0D=0A=20=20=20=20=20=20(let=20= ((map=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20(if=20= (file-directory-p=20file)=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20(poplife-dir-easymap=20file=20submenu)=20;=20directory=0D=0A=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20(poplife-file-easymap=20file=20= submenu))))=20;=20file=0D=0A=20=20=20=20=20=20=20=20(when=20(listp=20= map)=0D=0A=20=20=20=20=20=20=20=20=20=20(setcar=20map=20name))=0D=0A=20=20= =20=20=20=20=20=20map))))=0D=0A=0C=0D=0A;;;=20Bookmark=0D=0A(defun=20= poplife-bookmark-easymap=20(&optional=20submenu)=0D=0A=20=20"Define=20= easymenu=20to=20list=20bookmarks.=0D=0AWhen=20SUBMENU=20is=20non-nil,=20= this=20returns=20an=20easymenu=20with=20multiple=20actions."=0D=0A=20=20= ;;=20TODO:=20On=20emacs-27.1=20with=20smb,=20I=20see=20"tramp-error:=20= Method=20=E2=80=98smb=E2=80=99=20is=0D=0A=20=20;;=20not=20known".=0D=0A=20= =20(let=20((map=0D=0A=20=20=20=20=20=20=20=20=20(list=0D=0A=20=20=20=20=20= =20=20=20=20=20(vector=20"More..."=20'(popup-menu=20= (poplife-bookmark-easymap=20t)=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20(popup-menu-normalize-position=20last-nonmenu-event))=0D=0A=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20:visible=20t=0D=0A=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20:active=20(not=20submenu)=0D= =0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20:help=20"Set=20= a=20bookmark=20named=20inside=20a=20file.")=0D=0A=20=20=20=20=20=20=20=20= =20=20["--"=20ignore]=0D=0A=20=20=20=20=20=20=20=20=20=20["Add..."=20= bookmark-set=20:visible=20t=20:active=20(or=20(buffer-file-name)=20(eq=20= major-mode=20'dired-mode))=0D=0A=20=20=20=20=20=20=20=20=20=20=20:help=20= "Set=20a=20bookmark=20named=20inside=20a=20file."]=0D=0A=20=20=20=20=20=20= =20=20=20=20["Edit..."=20bookmark-bmenu-list=20:visible=20t=20:active=20= t=0D=0A=20=20=20=20=20=20=20=20=20=20=20:help=20"Display=20a=20list=20of=20= existing=20bookmarks"]=0D=0A=20=20=20=20=20=20=20=20=20=20;;=20["Save=20= List=20Now"=20bookmark-save=20:visible=20t=20:active=20t=0D=0A=20=20=20=20= =20=20=20=20=20=20;;=20=20:help=20"Save=20currently=20defined=20= bookmarks"]=0D=0A=20=20=20=20=20=20=20=20=20=20)))=0D=0A=20=20=20=20= (dolist=20(bookmark=20(bookmark-all-names))=0D=0A=20=20=20=20=20=20(push=20= (poplife-bookmark-elt-easymap=20bookmark=20submenu)=20map))=0D=0A=20=20=20= =20(cons=20"Bookmark"=20map)))=0D=0A;;=20(let=20((foo=20= (poplife-bookmark-easymap)))=20(describe-variable=20'foo))=0D=0A;;=20= (let=20((foo=20(poplife-bookmark-easymap=20t)))=20(describe-variable=20= 'foo))=0D=0A=0D=0A(defun=20poplife-bookmark-elt-easymap=20(bookmark=20= &optional=20submenu)=0D=0A=20=20"Define=20easymenu=20to=20list=20a=20= BOOKMARK.=0D=0AWhen=20SUBMENU=20it=20non-nil,=20this=20returns=20an=20= easymenu=20with=20multiple=20actions."=0D=0A=20=20(let=20(map)=0D=0A=20=20= =20=20(if=20(not=20submenu)=0D=0A=20=20=20=20=20=20=20=20(let=20((file=20= (bookmark-get-filename=20bookmark)))=0D=0A=20=20=20=20=20=20=20=20=20=20= (if=20(and=20(not=20(file-remote-p=20file))=20;=20when=20bookmark=20is=20= directory=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (file-exists-p=20file)=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20(file-directory-p=20file))=0D=0A=20=20=20=20=20=20=20=20=20=20= =20=20=20=20(poplife-dir-easymap=20file=20submenu)=20;=20offer=20DIR=20= menu=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20(vector=20bookmark=0D=0A=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20;;=20= `(bookmark-jump=20,bookmark=20DISPLAY-FUNC)=0D=0A=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20`(bookmark-jump=20,bookmark=20(quote=20= ,(poplife-func-switch-to-buffer)))=20;=20switch-to-buffer=0D=0A=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20:visible=20t=0D=0A=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20:active=20(not=20= (string=3D=20;=20gray=20the=20vising=20file=20out=0D=0A=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20(and=20(buffer-file-name)=20(expand-file-name=20= (buffer-file-name)))=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(expand-file-name=20= (bookmark-get-filename=20bookmark))))=0D=0A=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20:help=20(format=20"Jump=20to=20%s"=20= bookmark))))=0D=0A=0D=0A=20=20=20=20=20=20;;=20(push=20(vector=20"Show=20= Annotation..."=20`(bookmark-show-annotation=20,bookmark)=20:visible=20t=20= :active=20`(bookmark-get-annotation=20,bookmark)=20:help=20bookmark)=20= map)=0D=0A=20=20=20=20=20=20;;=20(push=20(vector=20"Edit=20= Annotation..."=20`(bookmark-edit-annotation=20,bookmark)=20:visible=20t=20= :help=20bookmark)=20map)=0D=0A=20=20=20=20=20=20(let=20((annot-map=20= (poplife-bookmark-annotation-easymap=20bookmark)))=0D=0A=20=20=20=20=20=20= =20=20(if=20(vectorp=20annot-map)=20;=20with=20no=20annotation=20and=20= with=20"Add=20Annotation..."=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20= (push=20annot-map=20map)=0D=0A=20=20=20=20=20=20=20=20=20=20(dolist=20= (annot-item=20(reverse=20(cdr=20annot-map)))=0D=0A=20=20=20=20=20=20=20=20= =20=20=20=20(push=20annot-item=20map))=0D=0A=20=20=20=20=20=20=20=20=20=20= (push=20["--"=20ignore]=20map)=0D=0A=20=20=20=20=20=20=20=20=20=20(push=20= (vector=20"Edit=20Annotation..."=20`(bookmark-edit-annotation=20= ,bookmark)=20:visible=20t=20:help=20bookmark)=20map)))=0D=0A=20=20=20=20=20= =20(push=20(vector=20"Delete..."=20`(and=20(y-or-n-p=20(format=20"Are=20= you=20sure=20you=20want=20to=20delete=20a=20bookmark=20%s?=20"=20= ,bookmark))=20(bookmark-delete=20,bookmark))=20:visible=20t=20:help=20= bookmark)=20map)=0D=0A=20=20=20=20=20=20(push=20(vector=20"Edit=20= Location..."=20`(bookmark-relocate=20,bookmark)=20:visible=20t=20:help=20= bookmark)=20map)=0D=0A=20=20=20=20=20=20(push=20(vector=20"Rename..."=20= `(bookmark-rename=20,bookmark)=20:visible=20t=20:help=20bookmark)=20map)=0D= =0A=20=20=20=20=20=20(push=20(vector=20"Insert=20Location"=20= `(bookmark-locate=20,bookmark)=20:visible=20t=20:help=20bookmark)=20map)=0D= =0A=20=20=20=20=20=20(push=20(vector=20"Insert=20Contents"=20= `(bookmark-insert=20,bookmark)=20:visible=20t=20:help=20bookmark)=20map)=0D= =0A=20=20=20=20=20=20(push=20(vector=20"Open=20by=20File=20Browser"=20= `(poplife-find-location=20(expand-file-name=20(bookmark-get-filename=20= ,bookmark)))=20:visible=20t=20:active=20t=20:help=20bookmark)=20map)=0D=0A= =20=20=20=20=20=20(push=20(vector=20"Open=20in=20Frame"=20= `(bookmark-jump=20,bookmark=20'switch-to-buffer-other-frame)=20:visible=20= t=20:help=20bookmark)=20map)=0D=0A=20=20=20=20=20=20(push=20(vector=20= "Open=20in=20Other=20Window"=20`(bookmark-jump-other-window=20,bookmark)=20= :visible=20t=20:help=20bookmark)=20map)=0D=0A=20=20=20=20=20=20(push=20= ["--"=20ignore]=20map)=0D=0A=20=20=20=20=20=20(push=20(vector=20"Open"=20= `(bookmark-jump=20,bookmark)=20:visible=20t=20:help=20bookmark)=20map)=20= ;=20switch-to-buffer=0D=0A=20=20=20=20=20=20(push=20(vector=20".."=20= `(let=20((poplife-file-recursive=20,poplife-file-recursive)=0D=0A=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20(poplife-func-find-file=20(quote=20= ,poplife-func-find-file)))=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20(poplife-find-dir=20= (expand-file-name=20"../"=20(bookmark-get-filename=20,bookmark))=20= ,submenu))=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20:visible=20t=20:active=20t)=20map)=0D=0A=20=20=20=20=20=20(let=20= ((annotation=20(bookmark-get-annotation=20bookmark)))=0D=0A=20=20=20=20=20= =20=20=20(cons=20(format=20"%s%s"=20bookmark=20(if=20(and=20annotation=20= (not=20(string-equal=20annotation=20"")))=20"*"=20""))=20map)))))=0D=0A= ;;=20(let=20((foo=20(poplife-bookmark-elt-easymap=20= "poplife.el\\site-lisp")))=20(describe-variable=20'foo))=0D=0A;;=20(let=20= ((foo=20(poplife-bookmark-elt-easymap=20"poplife.el\\site-lisp"=20t)))=20= (describe-variable=20'foo))=0D=0A=0D=0A(defvar=20= poplife-bookmark-annotation-detail-flag=20t=0D=0A=20=20"Show=20full=20= contents=20of=20annotation=20in=20popup-menu.")=0D=0A=0D=0A(defun=20= poplife-bookmark-annotation-easymap=20(bookmark)=0D=0A=20=20"Define=20= easymenu=20to=20list=20annotation."=0D=0A=20=20(let=20((annot=20= (bookmark-get-annotation=20bookmark))=0D=0A=20=20=20=20=20=20=20=20= (annot-column=2036))=20;=2036=20is=20arbitrary=20number=20or=20(length=20= "Open=20in=20Other=20Window")=0D=0A=20=20=20=20(if=20(and=20annot=20(not=20= (string-equal=20annot=20"")))=0D=0A=20=20=20=20=20=20=20=20(if=20= poplife-bookmark-annotation-detail-flag=0D=0A=20=20=20=20=20=20=20=20=20=20= =20=20(let=20((lines=20(poplife-split-string=20annot=20annot-column))=0D=0A= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20map)=0D=0A=20=20=20= =20=20=20=20=20=20=20=20=20=20=20(dolist=20(line=20(reverse=20lines))=0D=0A= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(push=20(vector=20line=20= `(bookmark-edit-annotation=20,bookmark)=20:visible=20t=20:active=20t=20= :help=20bookmark)=20map))=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (cons=20"Edit=20Annotation..."=20map))=0D=0A=20=20=20=20=20=20=20=20=20=20= (let=20(annot-name)=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20(setq=20= annot-name=20(format=20"Edit=20Annotation=20`%s'..."=20(if=20(>=20= (length=20annot)=20annot-column)=20(substring=20annot=200=20= annot-column)=20annot)))=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20= (vector=20annot-name=20`(bookmark-edit-annotation=20,bookmark)=20= :visible=20t=20:active=20t=20:help=20bookmark)))=0D=0A=20=20=20=20=20=20= (vector=20"Add=20Annotation..."=20`(bookmark-edit-annotation=20= ,bookmark)=20:visible=20t=20:active=20t=20:help=20bookmark))))=0D=0A=0D=0A= (defun=20poplife-split-string=20(string=20fill-length)=0D=0A=20=20"Split=20= STRING=20into=20list=20of=20string.=0D=0AArgument=20FILL-LENGTH=20= determines=20length=20of=20each=20line."=0D=0A=20=20(setq=20string=20= (replace-regexp-in-string=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20(rx=20(*=20(any=20"=20\t\n"))=20eos)=20""=20string))=20;=20Chomp=20= text.=0D=0A=20=20(with-temp-buffer=0D=0A=20=20=20=20(insert=20string)=0D=0A= =20=20=20=20(let=20((fill-column=20fill-length)=20;=20Replace=20text.=0D=0A= =20=20=20=20=20=20=20=20=20=20(find-repl-list=20'(("\\`\\'"=20.=20"=20")=20= ("=20+"=20.=20"=20"))))=20;=20Avoid=20having=20"--"=20on=20menu.=0D=0A=20= =20=20=20=20=20(fill-region=20(point-min)=20(point-max))=0D=0A=20=20=20=20= =20=20(dolist=20(find-repl=20find-repl-list)=0D=0A=20=20=20=20=20=20=20=20= (goto-char=20(point-min))=0D=0A=20=20=20=20=20=20=20=20(while=20= (re-search-forward=20(car=20find-repl)=20nil=20t)=0D=0A=20=20=20=20=20=20= =20=20=20=20(replace-match=20(cdr=20find-repl)))))=0D=0A=20=20=20=20= (split-string=20(buffer-string)=20"\n")))=20;=20List=20of=20text=20= lines.=0D=0A=0C=0D=0A;;;=20File=0D=0A(defun=20poplife-file-easymap=20= (file=20&optional=20submenu)=0D=0A=20=20"Define=20easymenu=20to=20list=20= a=20FILE.=0D=0AWhen=20SUBMENU=20it=20non-nil,=20this=20returns=20an=20= easymenu=20with=20multiple=20actions."=0D=0A=20=20(setq=20file=20= (expand-file-name=20file))=0D=0A=20=20(and=20(not=20(file-directory-p=20= file))=0D=0A=20=20=20=20=20=20=20(let*=20(map=0D=0A=20=20=20=20=20=20=20=20= =20=20=20=20=20=20(file-nickname=20(file-name-nondirectory=20file))=0D=0A= =20=20=20=20=20=20=20=20=20=20=20=20=20=20(file-readable-flag=20(and=20= (file-regular-p=20file)=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (file-readable-p=20file)))=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (open-file-flag=20(and=20(not=20(string-match-p=20= poplife-file-do-not-open-regexp=20file))=0D=0A=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20file-readable-flag))=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (dir=20(file-name-directory=20file))=0D=0A=20=20=20=20=20=20=20=20=20=20=20= =20=20=20(open-dir-flag=20(and=20(file-directory-p=20dir)=0D=0A=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20(file-accessible-directory-p=20dir))))=0D=0A=20=20=20=20=20= =20=20=20=20(if=20(not=20submenu)=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20= =20(vector=20file-nickname=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20`(funcall=20(if=20,open-file-flag=0D=0A=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20(quote=20,poplife-func-find-file)=0D=0A=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20(quote=20,poplife-func-find-file-by-default-app))=20,file)=0D=0A=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20:active=20(and=20= file-readable-flag=20;=20gray=20the=20vising=20file=20out=0D=0A=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20(not=20(string=3D=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20(and=20(buffer-file-name)=20(expand-file-name=20= (buffer-file-name)))=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= file)))=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20:help=20file)=0D=0A=20=20=20=20=20=20=20=20=20=20=20(push=20(vector=20= "Open=20with=20File=20Browser"=20`(poplife-find-location=20,file)=0D=0A=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= :visible=20t=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20:active=20open-dir-flag=0D=0A=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20:help=20dir)=20map)=0D=0A= =20=20=20=20=20=20=20=20=20=20=20(push=20(vector=20"Open=20with=20= Default=20App"=20`(,poplife-func-find-file-by-default-app=20,file)=0D=0A=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= :visible=20t=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20:active=20t=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20:help=20file)=20map)=0D=0A=20=20=20=20= =20=20=20=20=20=20=20(push=20(vector=20"Open=20and=20Bookmark..."=20= `(progn=20(find-file=20,file)=20(bookmark-set))=0D=0A=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20:visible=20= (fboundp=20'bookmark-set)=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20:active=20open-file-flag=0D=0A=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20:help=20= "Open=20and=20Bookmark=20this=20file")=20map)=0D=0A=20=20=20=20=20=20=20=20= =20=20=20(push=20(vector=20"Open=20in=20Frame"=20`(find-file-other-frame=20= ,file)=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20:visible=20t=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20:active=20open-file-flag=0D=0A=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20:help=20= file)=20map)=0D=0A=20=20=20=20=20=20=20=20=20=20=20(push=20(vector=20= "Open=20in=20Other=20Window"=20`(find-file-other-window=20,file)=0D=0A=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= :visible=20t=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20:active=20open-file-flag=0D=0A=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20:help=20file)=20map)=0D=0A= =20=20=20=20=20=20=20=20=20=20=20(push=20["--"=20ignore]=20map)=0D=0A=20=20= =20=20=20=20=20=20=20=20=20(push=20(vector=20"Open"=20`(find-file=20= ,file)=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20:visible=20t=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20:active=20(and=20open-file-flag=20;=20gray=20= the=20vising=20file=20out=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (not=20(string=3D=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20(and=20(buffer-file-name)=20(expand-file-name=20= (buffer-file-name)))=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20file)))=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20:help=20file)=20map)=0D=0A=20=20=20=20=20=20=20=20= =20=20=20(push=20(vector=20".."=20`(let=20((poplife-file-recursive=20= ,poplife-file-recursive)=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (poplife-func-find-file=20(quote=20,poplife-func-find-file)))=0D=0A=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20(poplife-find-dir=20,dir,=20submenu))=0D=0A=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20:visible=20= t=20:active=20open-dir-flag=20:help=20dir)=20map)=0D=0A=20=20=20=20=20=20= =20=20=20=20=20(cons=20file-nickname=20map)))))=0D=0A;;=20(let=20((foo=20= (poplife-file-easymap=20"~/.emacs.d/init.el")))=20(describe-variable=20= 'foo))=0D=0A;;=20(let=20((foo=20(poplife-file-easymap=20= "~/.emacs.d/init.el"=20t)))=20(describe-variable=20'foo))=0D=0A=0D=0A= (defun=20poplife-dir-easymap=20(dir=20&optional=20submenu=20depth)=0D=0A=20= =20"Define=20easymenu=20to=20list=20files=20and=20directories=20in=20= DIR.=0D=0AWhen=20SUBMENU=20is=20non-nil,=20this=20returns=20an=20= easymenu=20with=20multiple=20actions.=0D=0AWhen=20DEPTH=20is=20more=20= than=201,=20DIR=20is=20recursively=20scanned."=0D=0A=20=20(when=20= (string-match-p=20poplife-dir-do-not-scan-regexp=20dir)=0D=0A=20=20=20=20= (setq=20dir=20"~"))=0D=0A=20=20(setq=20dir=20(directory-file-name=20= (expand-file-name=20dir)))=20;=20Remove=20slash=20at=20the=20end.=0D=0A=20= =20(or=20depth=20(setq=20depth=201))=0D=0A=20=20(let=20(map=20base-dir=20= parent-dir=20rawfiles=20menufiles)=0D=0A=20=20=20=20(setq=20base-dir=20= (file-name-as-directory=20(if=20(string=3D=20(file-name-nondirectory=20= dir)=20"")=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20dir=20;=20In=20a=20case=20for=20"c:/"=0D=0A=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20(file-name-nondirectory=20dir))))=20= ;=20Add=20slash=20at=20the=20end.=0D=0A=20=20=20=20(setq=20parent-dir=20= (directory-file-name=20(file-name-directory=20dir)))=0D=0A=20=20=20=20;;=20= Obtain=20a=20file=20list.=0D=0A=20=20=20=20(setq=20rawfiles=20= (ignore-errors=20(directory-files=20dir=20t)))=0D=0A=20=20=20=20;;=20= Filter=20out=20trivial=20files.=0D=0A=20=20=20=20(dolist=20(fullfile=20= rawfiles)=0D=0A=20=20=20=20=20=20(let=20((file-nickname=20= (file-name-nondirectory=20fullfile)))=0D=0A=20=20=20=20=20=20=20=20= (unless=20(string-match-p=20poplife-file-do-not-show-regexp=20= file-nickname)=0D=0A=20=20=20=20=20=20=20=20=20=20(push=20fullfile=20= menufiles))))=0D=0A=20=20=20=20;;=20Limit=20number=20of=20menufiles=0D=0A= =20=20=20=20(when=20(and=20poplife-file-max-menu-items=0D=0A=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20(not=20submenu))=0D=0A=20=20=20=20=20=20= (let=20((nfile=20(length=20menufiles)))=0D=0A=20=20=20=20=20=20=20=20= (setq=20menufiles=20(nthcdr=20(-=20nfile=20poplife-file-max-menu-items)=20= menufiles))))=0D=0A=20=20=20=20;;=20Add=20more=20menu.=0D=0A=20=20=20=20= (push=20(vector=20"More..."=20;=20Item=20to=20open=20a=20current=20= directory.=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= `(let=20(poplife-file-max-menu-items=0D=0A=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20;;=20(poplife-file-recursive=20= ,(1+=20poplife-file-recursive))=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20(poplife-file-recursive=20= ,poplife-file-recursive)=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20(poplife-func-find-file=20(quote=20= ,poplife-func-find-file)))=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20(poplife-find-dir=20,dir=20t))=0D=0A=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20:active=20`(not=20,submenu)=0D=0A=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20:visible=20t=0D=0A=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20:help=20dir)=0D=0A=20=20=20=20= =20=20=20=20=20=20map)=0D=0A=20=20=20=20;;=20Create=20map=20with=20files=20= and=20directories.=0D=0A=20=20=20=20(dolist=20(fullfile=20menufiles)=0D=0A= =20=20=20=20=20=20(let=20((file-nickname=20(file-name-nondirectory=20= fullfile)))=0D=0A=20=20=20=20=20=20=20=20(if=20(file-directory-p=20= fullfile)=20;=20when=20item=20is=20directory=0D=0A=20=20=20=20=20=20=20=20= =20=20=20=20(push=20(if=20(or=20(>=3D=20depth=20poplife-file-recursive)=0D= =0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20(not=20(file-accessible-directory-p=20fullfile)))=0D=0A=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(vector=20= (file-name-as-directory=20file-nickname)=0D=0A=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20`(let=20= ((poplife-file-recursive=20,poplife-file-recursive)=0D=0A=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20(poplife-func-find-file=20(quote=20= ,poplife-func-find-file)))=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (poplife-find-dir=20,fullfile=20,submenu))=0D=0A=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20:active=20= (file-accessible-directory-p=20fullfile)=20:help=20fullfile)=0D=0A=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(poplife-dir-easymap=20= fullfile=20submenu=20(1+=20depth)))=20;=20recursive=0D=0A=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20map)=0D=0A=20=20=20=20=20=20=20=20=20= =20(push=20;=20when=20item=20is=20file=20(that=20is=20defined=20as=20= `not=20a=20directory')=0D=0A=20=20=20=20=20=20=20=20=20=20=20= (poplife-file-easymap=20fullfile=20submenu)=0D=0A=20=20=20=20=20=20=20=20= =20=20=20map))))=0D=0A=20=20=20=20(push=20["--"=20ignore]=20map)=0D=0A=20= =20=20=20(push=20(if=20(not=20(or=20submenu=20poplife-dir-.-submenu))=20= ;=20(not=20submenu)=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20;;=20= Single=20item=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20(vector=20= "."=20;=20item=20to=20open=20current=20directory=0D=0A=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20`(,poplife-func-find-file=20= ,dir)=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20;;=20`(,poplife-func-find-file-by-default-app=20,dir)=0D=0A=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20:visible=20t=20= :active=20t=20:help=20dir)=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20;;=20= Multiple=20items=20in=20submenu.=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20= (delq=20nil=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (list=20"."=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20(vector=20"Open"=20;=20item=20to=20open=20current=20= directory=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20`(find-file=20,dir)=20;=20= ,poplife-func-find-file=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20:visible=20t=20= :active=20t=20:help=20dir)=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20["--"=20ignore]=0D=0A=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(vector=20"Open=20in=20= Other=20Window"=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20`(find-file-other-window=20= ,dir)=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20:visible=20t=20:active=20t=20:help=20= dir)=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20(vector=20"Open=20in=20Frame"=0D=0A=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= `(find-file-other-frame=20,dir)=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20:visible=20t=20= :active=20t=20:help=20dir)=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20(vector=20"Open=20with=20Bookmarked..."=0D=0A= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20`(progn=20(find-file=20,dir)=20(bookmark-set))=0D=0A= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20:visible=20(fboundp=20'bookmark-set)=20:active=20t=20= :help=20"Open=20and=20Add=20to=20Bookmarks")=0D=0A=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(vector=20"Open=20by=20= File=20Browser"=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20= `(,poplife-func-find-file-by-default-app=20,dir)=0D=0A=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= :visible=20t=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20:active=20t=0D=0A=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20:help=20dir))))=0D=0A=20=20=20=20=20=20=20=20=20=20map)=0D=0A=20=20=20= =20(push=20(vector=20".."=20;=20Item=20to=20open=20parent=20directory.=0D= =0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20`(let=20= ((poplife-file-recursive=20,poplife-file-recursive)=0D=0A=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (poplife-func-find-file=20(quote=20,poplife-func-find-file)))=0D=0A=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (poplife-find-dir=20,parent-dir=20,submenu))=0D=0A=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20:active=20`(not=20(equal=20,parent-dir=20= ,dir))=20:help=20parent-dir)=0D=0A=20=20=20=20=20=20=20=20=20=20map)=0D=0A= =20=20=20=20(setq=20base-dir=20(replace-regexp-in-string=20"^@"=20"at"=20= base-dir=20t=20t))=0D=0A=20=20=20=20(cons=20base-dir=20map)))=0D=0A;;=20= (let=20((foo=20(poplife-dir-easymap=20"~/.emacs.d")))=20= (describe-variable=20'foo))=0D=0A;;=20(let=20((foo=20= (poplife-dir-easymap=20"~/.emacs.d"=20t)))=20(describe-variable=20'foo))=0D= =0A;;=20(popup-menu=20(poplife-dir-easymap=20"~/.emacs.d"))=0D=0A;;=20= (popup-menu=20(poplife-dir-easymap=20"~/"))=0D=0A;;=20(let=20((foo=20= (poplife-dir-easymap=20"c:/")))=20(describe-variable=20'foo))=0D=0A;;=20= (popup-menu=20(poplife-dir-easymap=20"c:/"))=0D=0A=0D=0A(defvar=20= poplife-dir-.-submenu=20t=0D=0A=20=20"Show=20always=20submenu=20for=20= the=20current=20directory.")=0D=0A=0D=0A(defun=20poplife-pwd-easymap=20= (path=20&optional=20submenu)=0D=0A=20=20"Define=20easymenu=20to=20list=20= directories=20that=20are=20above=20PATH."=0D=0A=20=20(setq=20path=20= (directory-file-name=20(expand-file-name=20path)))=20;=20remove=20slash=0D= =0A=20=20(let*=20((title=20(format=20(if=20(file-directory-p=20path)=0D=0A= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20"%s/"=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20"%s")=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20(file-name-nondirectory=20path)))=0D=0A=20= =20=20=20=20=20=20=20=20dirpath=0D=0A=20=20=20=20=20=20=20=20=20map)=0D=0A= =20=20=20=20(while=20(not=20(string=3D=20(file-name-nondirectory=20path)=20= ""=20))=0D=0A=20=20=20=20=20=20(setq=20dirpath=20(directory-file-name=20= (file-name-directory=20path)))=20;=20remove=20slash=0D=0A=20=20=20=20=20=20= (push=20(vector=20(format=20"%s/"=20(file-name-nondirectory=20dirpath))=20= ;=20dirname=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20`(poplife-find-location=20,path))=20map)=0D=0A=20=20=20=20=20=20(setq=20= path=20dirpath))=0D=0A=20=20=20=20(cons=20title=20(reverse=20map))))=0D=0A= ;;=20(let=20((foo=20(poplife-pwd-easymap=20= "~/.emacs.d/site-lisp/poplife.el")))=20(describe-variable=20'foo))=0D=0A= ;;=20(popup-menu=20(poplife-pwd-easymap=20default-directory))=0D=0A;;=20= (popup-menu=20(poplife-pwd-easymap=20"~/.emacs.d/site-lisp/"))=0D=0A=0D=0A= (defun=20poplife-pwd-menu-open=20(event)=0D=0A=20=20"Open=20popup-menu=20= that=20opens=20a=20folder=20by=20File=20Browser."=0D=0A=20=20= (interactive=20"e")=0D=0A=20=20(mouse-set-point=20event)=0D=0A=20=20= (popup-menu=0D=0A=20=20=20(poplife-pwd-easymap=20(or=20buffer-file-name=20= default-directory))))=0D=0A;;=20(poplife-pwd-menu-open=20= last-nonmenu-event)=0D=0A=0D=0A(defun=20poplife-buffer-menu-open=20= (event)=0D=0A=20=20"Open=20popup-menu=20that=20switches=20current=20= buffer."=0D=0A=20=20(interactive=20"e")=0D=0A=20=20(mouse-set-point=20= event)=0D=0A=20=20(popup-menu=20(poplife-buffer-easymap)))=0D=0A;;=20= (poplife-buffer-menu-open=20last-nonmenu-event)=0D=0A=0D=0A=0C=0D=0A;;;=20= Util=0D=0A(defun=20poplife-func-switch-to-buffer=20()=0D=0A=20=20"Return=20= switch-to-buffer=20function=20that=20corresponds=20to=20= `poplife-func-find-file'."=0D=0A=20=20(cdr=20(assoc=20= poplife-func-find-file=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20= '((find-file=20.=20switch-to-buffer)=0D=0A=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20(find-file-other-window=20.=20= switch-to-buffer-other-window)=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20(find-file-other-frame=20.=20switch-to-buffer-other-frame)))))=0D= =0A;;=20(let=20((foo=20(poplife-func-switch-to-buffer)))=20= (describe-variable=20'foo))=0D=0A=0D=0A(defun=20poplife-find-dir=20(dir=20= &optional=20submenu)=0D=0A=20=20"Visit=20directory=20DIR=20using=20= `popup-menu'.=0D=0AWhen=20SUBMENU=20is=20non-nil,=20this=20offers=20= multiple=20actions."=0D=0A=20=20;;=20(interactive=20(list=20= (read-directory-name=20"Find=20directory:=20")))=0D=0A=20=20(popup-menu=20= (poplife-dir-easymap=20dir=20submenu)=0D=0A=20=20=20=20=20=20=20=20=20=20= =20=20=20=20(popup-menu-normalize-position=20last-nonmenu-event)))=0D=0A=0D= =0A(defun=20poplife-finder-directory=20()=0D=0A=20=20"Return=20directory=20= where=20Finder=20is=20visiting."=0D=0A=20=20(when=20(eq=20system-type=20= 'darwin)=0D=0A=20=20=20=20(ns-do-applescript=0D=0A=20=20=20=20=20"tell=20= application=20\"Finder\"=0D=0A=20=20=20=20=20=20=20=20if=20exists=20= Finder=20window=201=20then=0D=0A=20=20=20=20=20=20=20=20=20=20set=20= currentDir=20to=20target=20of=20Finder=20window=201=20as=20alias=0D=0A=20= =20=20=20=20=20=20=20else=0D=0A=20=20=20=20=20=20=20=20=20=20set=20= currentDir=20to=20desktop=20as=20alias=0D=0A=20=20=20=20=20=20=20=20end=20= if=0D=0A=20=20=20=20=20=20=20=20=20=20set=20thePath=20to=20POSIX=20path=20= of=20currentDir=0D=0A=20=20=20=20=20=20end=20tell")))=0D=0A;;=20(let=20= ((foo=20(poplife-finder-selection)))=20(describe-variable=20'foo))=0D=0A=0D= =0A(defun=20poplife-find-location=20(file)=0D=0A=20=20"Visit=20directory=20= that=20contains=20FILE."=0D=0A=20=20;;=20org-open-file=0D=0A=20=20(cond=0D= =0A=20=20=20((eq=20system-type=20'darwin)=0D=0A=20=20=20=20;;=20Select=20= file=20in=20Finder.=0D=0A=20=20=20=20(ns-do-applescript=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20;=20do-applescript,=20osascript=0D=0A= =20=20=20=20=20(format=20"tell=20application=20\"Finder\"=0D=0A=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20set=20thePath=20to=20POSIX=20= file=20\"%s\"=20as=20string=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20activate=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20reveal=20thePath=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20= end=20tell"=20file)))=0D=0A=20=20=20((eq=20system-type=20'windows-nt)=0D=0A= =20=20=20=20;;=20Select=20file=20in=20File=20Explorer.=0D=0A=20=20=20=20= (w32-shell-execute=20"open"=20"explorer"=0D=0A=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20(concat=20"/e,/select,"=0D=0A=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20(poplife-convert-w32-filename=20file))))=0D=0A=20=20=20= ((eq=20system-type=20'gnu/linux)=0D=0A=20=20=20=20;;=20Visit=20dir=20= that=20contains=20file=20by=20default-app.=0D=0A=20=20=20=20;;=20= (start-process=20"select-file-by-nautilus"=20nil=20"nautilus"=20file)=0D=0A= =20=20=20=20(start-process=20"open-dir-by-xdg-open"=20nil=20"xdg-open"=20= (file-name-directory=20file)))=0D=0A=20=20=20(t=0D=0A=20=20=20=20;;=20= Select=20file=20in=20Dired=0D=0A=20=20=20=20(dired-other-frame=20= (file-name-directory=20file))=20;=20Visit=20dir=20that=20contains=20file=0D= =0A=20=20=20=20(dired-goto-file=20file))))=20;=20Move=20point=20to=20= file=0D=0A=0D=0A(defun=20poplife-convert-w32-filename=20(filename)=0D=0A=20= =20"Mirror=20slash=20characters=20in=20FILENAME=20into=20backslashes."=0D= =0A=20=20;;=20https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D24387=20= (bug#24387)=0D=0A=20=20;;=20= https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D28883=20(bug#28883)=0D=0A= =0D=0A=20=20;;=20(setq=20filename=20(convert-standard-filename=20= filename))=0D=0A=20=20(let=20((start=200))=0D=0A=20=20=20=20(while=20= (string-match=20"/"=20filename=20start)=0D=0A=20=20=20=20=20=20(aset=20= filename=20(match-beginning=200)=20?\\)=0D=0A=20=20=20=20=20=20(setq=20= start=20(match-end=200)))=0D=0A=20=20=20=20filename))=0D=0A;;;=20= (poplife-convert-w32-filename=20"c:/Users/dream/.emacs.d")=0D=0A=0D=0A= (defun=20poplife-find-file-by-default-app=20(file)=0D=0A=20=20"Visit=20= FILE=20by=20default=20application=20or=20default=20file=20browser."=0D=0A= =20=20(when=20(plist-get=20poplife-mouse-edit-cottager=20:recentf)=0D=0A=20= =20=20=20(recentf-push=20file))=0D=0A=20=20(cond=0D=0A=20=20=20((eq=20= system-type=20'gnu/linux)=0D=0A=20=20=20=20(start-process=20= "find-file-by-default-app"=20nil=20"xdg-open"=20file))=20;=20Visit=20= file=20by=20default-app.=0D=0A=20=20=20((eq=20system-type=20'darwin)=0D=0A= =20=20=20=20(start-process=20"find-file-by-default-app"=20nil=20"open"=20= file))=20;=20Visit=20file=20by=20default-app.=0D=0A=20=20=20((eq=20= system-type=20'cygwin)=0D=0A=20=20=20=20(start-process=20= "find-file-by-default-app"=20nil=20"cygstart"=20file))=20;=20Visit=20= file=20by=20default-app.=0D=0A=20=20=20((eq=20system-type=20'windows-nt)=0D= =0A=20=20=20=20(w32-shell-execute=20"open"=20"explorer"=20= (poplife-convert-w32-filename=20file)))=20;=20Visit=20file=20by=20= default-app.=0D=0A=20=20=20(t=0D=0A=20=20=20=20(find-file-other-frame=20= file))))=0D=0A=0D=0A(provide=20'poplife)=0D=0A;;;=20poplife.el=20ends=20= here=0D=0A= --Apple-Mail=_2B0DC5B4-D003-4D8B-AF4A-7CFA75EB4B09--