12

When you view your user page the search box, right at the top of the page, is updated with your user ID like so:

screenshot showing a user profile and 'user:1075247' in the search box at the top of the page. It features a red freehand circle

Searching from this page (by entering text into the search box) means I can see all of my posts (i.e. questions and answers), because the search box starts with, e.g. user:1234556. But there's no equivalent for bookmarks (or tags, I suppose).

There is a way to search for those, as shown in the advanced search guide:

  • user:mine or user:me (or any user id) returns only your posts (or only the posts from whichever user whose id you entered)
  • inbookmarks:mine (or any user id) returns only questions that you (or the user whose id you entered) have bookmarked.
  • intags:mine returns only posts that appear in tags you have marked as favorite. (If you don't have any tags, this operator does nothing. For better results, update your preferences.)

But from here I need to swap out the user:1075247 for inbookmarks:1075247.

May I request either changing the term on the bookmarks page to inbookmarks:1075247 OR allowing for and adding something like is:bookmark or is:b to switch from all posts to bookmarks.

The same could be done for is:q, is:a, and is:tag for the individual profile pages.

3 Answers 3

4
+100

Changing the search term to inbookmarks:[user id] or using a shorter search term would be the best option, but I'd also like to add my own suggestion.


For each area of the profile page that is searchable (for example, the Answers, Questions and Bookmarks tabs), clicking on the search bar should auto-select the text, after which a user can enter the first letter of the search term resulting in a dropdown list with only the search term(s) relevant for that tab/page.


Here's an example of what I mean. Consider the Bookmarks tab:

  1. Clicking on the search bar (when in the Bookmarks tab) would auto-select the text in it:

    enter image description here

    Note that the Search Help is still preserved.

  2. Typing i in the search bar would result in a dropdown list:

    [i                                           ]      <— Search bar
    > inbookmarks:[user id]         ?      <— Dropdown list

    where user id can be your own id or someone else's depending on the profile, and ? is an on-hover/button-click tooltip.

  3. Simply Tab+Enter or click on that option to switch to a bookmarks search.

So if you use a keyboard to navigate, then that's a total of three keyboard presses. Otherwise, it's only one keyboard press and a click.


This seems a bit far-fetched, but I think it's a good idea.

2
  • 2
    YES! I haven't done a full search for previous FRs but having autocomplete for tags and search operators in the search box would be ideal. It would save a lot of typing and copy-pasting every time we do a search. (If anybody finds such previous FRs please link to them in the comments...!)
    – bad_coder
    Commented May 31, 2022 at 10:20
  • 1
    @bad_coder: Here's the original FR for the autocomplete feature for tags: meta.stackexchange.com/questions/29277/…. I couldn't find one for search operators...
    – Justin
    Commented May 31, 2022 at 18:13
3

Here is a simple userscript that you could use until this functionality is implemented. It works on all user profiles (except for the Tags tab, that is limited to your own user ID) - if you visit my profile, the search bar will be prepopulated with user:295232 is:a.

// ==UserScript==
// @name        Stack Exchange, Improved Search From Profile
// @author      Glorfindel
// @version     0.1
// @match       *://*.stackexchange.com/users/*
// @match       *://*.stackoverflow.com/users/*
// @match       *://*.superuser.com/users/*
// @match       *://*.serverfault.com/users/*
// @match       *://*.askubuntu.com/users/*
// @match       *://*.stackapps.com/users/*
// @match       *://*.mathoverflow.net/users/*
// @exclude     *://stackoverflow.com/c/*
// @exclude     *://chat.stackexchange.com/*
// @exclude     *://chat.stackoverflow.com/*
// @exclude     *://chat.meta.stackexchange.com/*
// @exclude     *://stackexchange.com/*
// @exclude     *://api.stackexchange.com/*
// @exclude     *://data.stackexchange.com/*
// @exclude     *://winterbash*.stackexchange.com/*
// @grant       none
// ==/UserScript==
/* global $ */

(function() {
  "use strict";
  
  let search = $("#search input")[0];
  let params = new URLSearchParams(window.location.search);
  switch (params.get('tab')) {
    case 'answers':
      search.value += ' is:a';
      break;
    case 'bookmarks':
      search.value = search.value.replace('user:', 'inbookmarks:');
      break;
    case 'questions':
      search.value += ' is:q';
      break;
    case 'tags':
      // only works for own tags
      if (search.value == 'user:' + StackExchange.options.user.userId) {
        search.value = 'intags:mine';
      }
      break;
  }
})();
8
  • My browser doesn't let me use this because apparently some elements are blocked...!?
    – bad_coder
    Commented May 31, 2022 at 9:22
  • @bad_coder eh ... that surprises me. Do other SE userscripts work for you? Which OS and browser?
    – Glorfindel Mod
    Commented May 31, 2022 at 9:24
  • Win 10 + Firefox, just to make sure I'm supposed to copy-paste into web dev tools > console?
    – bad_coder
    Commented May 31, 2022 at 9:26
  • No... here is a guide: stackapps.com/tags/script/info
    – Glorfindel Mod
    Commented May 31, 2022 at 9:27
  • 1
    Thanks but, I don't like all the overhead that involves plus running 3rd party apps of unknown origin (I could do it on my PC but certainly not on any of my work machines) so that's a no-go for me. I'm sorry but the FR is essentially about having a simpler alias in search, while that makes some users cry "bloody murder" it seems like a reasonable FR since search is Q&A "core business" so going 3rd party seems like an unreasonable demand on users.
    – bad_coder
    Commented May 31, 2022 at 9:29
  • I'd be inclined to award the bounty on an answer stating simply: "yes, very desirable feature, shorter aliases could make search much simpler and convenient for the longer terms". Personally I find that kind of support more useful than a userscript that a lot of us (and perhaps most) won't really use.
    – bad_coder
    Commented May 31, 2022 at 9:37
  • 1
    Fair enough, but I don't think that would qualify as an answer, that's an upvote. Userscripts are commonly used by a group of power users; there's even a meme about it. But there are lots of reasons not to use them, I can see your point.
    – Glorfindel Mod
    Commented May 31, 2022 at 9:52
  • 1
    Sadly I can't run userscripts on my machine, but I could save this as a bookmarklet. I'd just have to run it every time I loaded a profile :/ Commented May 31, 2022 at 10:53
2

I very much support this FR, you have to type a minimum 12 chars for inbookmarks: and unless you're lucky enough to have a user id below 999 it's a minimum 16 chars to type inbookmarks:mine or inbookmarks:1234.

Having to type so much to search your bookmarks is especially tedious since it's likely to be a frequent search.

in:b or is:b seems like the perfect solution.

4
  • Bookmark the inbookmarks search result page. :-) Commented May 26, 2022 at 6:59
  • 2
    @ShadowWizardSaysNoMoreWar not a good solution, if I have the page with search open it's better to type in directly. Besides, if the other common operators can be written with minimal chars there's no reason to require 16 chars for the bookmarks, an alias seems very convenient and easy to implement.
    – bad_coder
    Commented May 26, 2022 at 7:02
  • Of course it's very convenient and easy to implement, just such requests usually don't get done, from what I see. They work with a roadmap these days, and don't think improving advanced search is there. Commented May 26, 2022 at 7:04
  • 2
    @ShadowWizardSaysNoMoreWar that argument is besides the point of the FR, by your logic no FR should be posted or voted. We also don't know the roadmap or how it will change, (just this week 1 year old FRs were solved I didn't see them on the roadmap).
    – bad_coder
    Commented May 26, 2022 at 7:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .