vermiculus / magithub

**DEPRECATED - please use Forge instead!** -- Magit-based interfaces to GitHub
GNU General Public License v3.0
579 stars 63 forks source link

Toggle online/offline doesn't work anymore #287

Closed PierreTechoueyres closed 6 years ago

PierreTechoueyres commented 6 years ago

Since commit 7cbf387 (Use Git configuration properties instead of toggles and variables) the Toggle online/offline throw an error. See the debug trace bellow.

Debugger entered--Lisp error: (wrong-type-argument commandp magithub-toggle-online)
  call-interactively(magithub-toggle-online)
  magit-invoke-popup-action(79)
  funcall-interactively(magit-invoke-popup-action 79)
  call-interactively(magit-invoke-popup-action nil nil)
  command-execute(magit-invoke-popup-action)

Sorry, I don't know what's the best way to correct / re-enable this feature.

vermiculus commented 6 years ago

Do you know which popup you're seeing this in? That command no longer exists (I don't think). Everything has been moved to variables.

PierreTechoueyres commented 6 years ago

With the default magithub popup:

Variables
 C Settings...

Actions
 d Dashboard                H Browse on GitHub         c Create on GitHub         f Fork this repo           i Submit an issue
 p Submit a pull request    O Toggle online/offline

Meta
 & Request a feature or report a bug    h Ask for help on Gitter

as defined in magithub-dispatch-popup:

(magit-define-popup magithub-dispatch-popup
  "Popup console for dispatching other Magithub popups."
  'magithub-commands
  :variables '((?C "Settings..." magithub-settings-popup))
  :actions '("Actions"
             (?d "Dashboard" magithub-dashboard)
             (?H "Browse on GitHub" magithub-browse)
             (?c "Create on GitHub" magithub-create)
             (?f "Fork this repo" magithub-fork)
             (?i "Submit an issue" magithub-issue-new)
             (?p "Submit a pull request" magithub-pull-request-new)
             (?O "Toggle online/offline" magithub-toggle-online)
             "Meta"
             (?& "Request a feature or report a bug" magithub--meta-new-issue)
             (?h "Ask for help on Gitter" magithub--meta-help)))
vermiculus commented 6 years ago

Aw crap, I forgot to remove O from that popup. That change is on a branch I'm still working on.

You shouldn't use that one; you should use H C c to control the magithub.cache variable. I'm still working on a way to make this easy to control at a system level, but the value of that variable replaces the elisp variable that was controlled by magithub-toggle-online.

vermiculus commented 6 years ago

If you want, you can define magithub-toggle-online using (magit-set <whatever> "--global" "magithub.cache"). That would get you the functionality back quickly. I don't think this is the right approach for master, though.

PierreTechoueyres commented 6 years ago

No worries, I opened this bug more as a reminder than as a search for a solution.