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

Easy way to unhide questions? #281

Open
kaushalmodi opened this issue Apr 20, 2015 · 5 comments
Open

Easy way to unhide questions? #281

kaushalmodi opened this issue Apr 20, 2015 · 5 comments

Comments

@kaushalmodi
Copy link

Is there an easier way to unhide questions?

I hid a question by mistake and then I had to remove ~/.emacs.d/.sx/hidden-questions.el and restart emacs to fix that.

@Malabarba
Copy link
Collaborator

Good point. What interface could we use for unhiding a question? @vermiculus

@kaushalmodi
Copy link
Author

Can you use completing-read to display the list of already hidden questions? When user hits RET on the selected question, that one gets unhidden.

  • It will be useful to store the question string in the hidden-questions.el too so that we have something to display in the completing-read list instead of just the question numbers.
  • I don't know how we can enable multiple selection using this interface though if that's a feature planned to be added later.

@vermiculus
Copy link
Owner

I think using completing-read is be a good idea, but it require storing extra information in the file (which I'd really like to avoid, personally -- this file can blow up).

The 'most pure' option is to allow popping a question off this list and re-inserting it into the question list data structure we have. This would effectively 'undo' the last hide, but having the ability to pick-and-choose which question you want to unhide is very appealing.

In addition to the simple pop/repaint solution, there might be room for hiding/unhiding a question from the question/answer view. This might be useful if we ever decide to maintain an organized index of questions -- but that time has not yet come :)

@kaushalmodi
Copy link
Author

How about moving the hidden questions to an ''sx-hidden-tab' tab. When user
hits the 'h' key on a question in that tab, the question becomes unhidden
once again and shows up when the user switches to the All Questions tab.

On Mon, Apr 20, 2015, 6:19 PM Sean Allred notifications@github.com wrote:

I think using completing-read is be a good idea, but it require storing
extra information in the file (which I'd really like to avoid, personally
-- this file can blow up).

The 'most pure' option is to allow popping a question off this list and
re-inserting it into the question list data structure we have. This would
effectively 'undo' the last hide, but having the ability to pick-and-choose
which question you want to unhide is very appealing.

In addition to the simple pop/repaint solution, there might be room for
hiding/unhiding a question from the question/answer view. This might be
useful if we ever decide to maintain an organized index of questions -- but
that time has not yet come :)

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

@Malabarba
Copy link
Collaborator

The hidden-tab suggestion would be awesome, but I personally won't have the time to do that. =/
If anyone would like to try, it's actually quite easy to define a new tab (see the sx-tab file) and the sx-question-list-mode (which is used by the tabs) is very well documented.

completing-read is trivial to implement, but asking for the quesiton number is sort of irrelevant (and I don't think we should store strings either).

Finally, poping a question off the hidden-list is easy too. The only issue is that they are stored in the list ordered by ID, not by most-recently-hidden. So the user might have to pop quite a few in order to get back the latest one he hid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants