• R/O
  • SSH

multi-project: Commit

Multi-project simplifies working with different projects in Emacs by providing support for creating, deleting, and searching with projects. Multi-project
supports interactively finding a file within a project by using a TAGS file.


Commit MetaInfo

Revision983a8125e5569a45c592b2f73c4d9740b7d69dc1 (tree)
Time2019-11-17 21:03:25
AuthorShawn Ellis <shawn.ellis17@gmai...>
CommiterShawn Ellis

Log Message

Added key binding to create a new frame for the current project.

Change Summary

Incremental Difference

diff -r bc7a89294e94 -r 983a8125e556 multi-project.el
--- a/multi-project.el Sun Nov 17 16:50:36 2019 +0800
+++ b/multi-project.el Sun Nov 17 20:03:25 2019 +0800
@@ -3,7 +3,7 @@
33 ;; Copyright (C) 2010 - 2019
44
55 ;; Author: Shawn Ellis <shawn.ellis17@gmail.com>
6-;; Version: 0.0.32
6+;; Version: 0.0.33
77 ;; Package-Requires: ((emacs "25"))
88 ;; URL: https://hg.osdn.net/view/multi-project/multi-project
99 ;; Keywords: convenience project management
@@ -47,6 +47,7 @@
4747 ;; C-xpg - Run grep-find Runs grep-find at project root
4848 ;; C-xpl - Last project or anchor Jumps to the last project or anchor
4949 ;; C-xpp - Present project Jumps to the current project root
50+;; C-xpP - Present project new frame Present project in a new frame
5051 ;; C-xpf - Find project files Interactively find project files
5152 ;; C-xpn - Add a new project Prompts for new project information
5253 ;; C-xpr - Go to project root Visits the project root
@@ -165,6 +166,7 @@
165166 (define-key map (kbd "C-x pf") 'multi-project-find-file)
166167 (define-key map (kbd "C-x pn") 'multi-project-add-project)
167168 (define-key map (kbd "C-x pp") 'multi-project-present-project)
169+ (define-key map (kbd "C-x pP") 'multi-project-present-project-new-frame)
168170 (define-key map (kbd "C-x pg") 'multi-project-interactive-grep)
169171 (define-key map (kbd "C-x ps") 'multi-project-shell)
170172 (define-key map (kbd "C-x pt") 'multi-project-recreate-tags)
@@ -174,6 +176,7 @@
174176 ["Jump to a project" multi-project-display-projects t]
175177 ["Jump to the project root" multi-project-root t]
176178 ["Jump to current project" multi-project-present-project t]
179+ ["Jump to current project in new frame " multi-project-present-project-new-frame t]
177180 ["Visit a project in new frame" multi-project-visit-project t]
178181 ["Compile..." multi-project-compile t]
179182 ["Find file..." multi-project-find-file t]
@@ -997,21 +1000,33 @@
9971000 (let ((projectlist (multi-project-current)))
9981001 (multi-project-dired-project projectlist)))
9991002
1003+(defun multi-project-create-frame-parameters ()
1004+ (let ((frame-parameters-alist default-frame-alist)
1005+ frame)
1006+ (unless frame-parameters-alist
1007+ (let ((frame-start (car (frame-position)))
1008+ (frame-width (frame-outer-width)))
1009+ (list (cons 'width (frame-width))
1010+ (cons 'height (frame-height))
1011+ (cons 'left (+ frame-start frame-width)))))))
1012+
1013+;;;###autoload
1014+(defun multi-project-present-project-new-frame ()
1015+ "Jumps to the present project in a new frame."
1016+ (interactive)
1017+ (let ((frame-parameters-alist (multi-project-create-frame-parameters))
1018+ frame)
1019+ (setq frame (make-frame frame-parameters-alist))
1020+ (select-frame-set-input-focus frame)
1021+ (multi-project-present-project)))
10001022
10011023 ;;;###autoload
10021024 (defun multi-project-visit-project ()
10031025 "Makes a new frame with the list of projects to visit."
10041026 (interactive)
10051027
1006- (let ((frame-parameters-alist default-frame-alist)
1028+ (let ((frame-parameters-alist (multi-project-create-frame-parameters))
10071029 frame)
1008- (unless frame-parameters-alist
1009- (let ((frame-start (car (frame-position)))
1010- (frame-width (frame-outer-width)))
1011- (setq frame-parameters-alist
1012- (list (cons 'width (frame-width))
1013- (cons 'height (frame-height))
1014- (cons 'left (+ frame-start frame-width))))))
10151030 (setq frame (make-frame frame-parameters-alist))
10161031 (select-frame-set-input-focus frame)
10171032 (multi-project-display-projects)))
Show on old repository browser