Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add persp-next and persp-prev functions #19

Merged
merged 1 commit into from
Sep 7, 2015
Merged

Conversation

CestDiego
Copy link
Contributor

just like in perspectives.el

@CestDiego CestDiego force-pushed the master branch 3 times, most recently from 068dd0b to 30e208a Compare September 6, 2015 15:08
@CestDiego
Copy link
Contributor Author

@Bad-ptr just as a side-note, is there a way to blacklist a perspective so it's not saved? For example I have a custom perspective for ERC, and when I restart Emacs the perspective just stays there without connecting.

@Bad-ptr
Copy link
Owner

Bad-ptr commented Sep 7, 2015

is there a way to blacklist a perspective so it's not saved?

No, but it could be implemented.

@CestDiego
Copy link
Contributor Author

How could it be implemented? Any hints?
On Sep 7, 2015 3:37 AM, "Constantin Kulikov" notifications@github.com
wrote:

is there a way to blacklist a perspective so it's not saved?

No, but it could be implemented.


Reply to this email directly or view it on GitHub
#19 (comment).

(defun persp-prev ()
"Switch to previous perspective (to the left)."
(interactive)
(let* ((persp-list (persp-names-current-frame-fast-ordered))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Bad-ptr I made the changes. The function is a little too long but I guess it's ok

@Bad-ptr
Copy link
Owner

Bad-ptr commented Sep 7, 2015

I was near to press the 'merge pull request' button, but then decided to take a closer look...)
In the persp-next you use cl-position, and in the persp-prev -- position. As persp-mode currently uses cl (not cl-lib), the right function to use is position.(Am I right?)

@Bad-ptr
Copy link
Owner

Bad-ptr commented Sep 7, 2015

is there a way to blacklist a perspective so it's not saved?

How could it be implemented? Any hints?

The hint:
I think you could set something like dont-save-to-file perspective parameter(see set-persp-parameter and persp-parameter functions) and filter out perspectives which have this parameter set to t in the persps-to-savelist function.

@CestDiego
Copy link
Contributor Author

In the persp-next you use cl-position

This was a typo. I fixed it

Bad-ptr added a commit that referenced this pull request Sep 7, 2015
Add persp-next and persp-prev functions
@Bad-ptr Bad-ptr merged commit c6e78b6 into Bad-ptr:master Sep 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants