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

[BUG] --no-label not respected by the move command #149

Closed
mckeehanheadwire opened this issue May 25, 2022 · 8 comments
Closed

[BUG] --no-label not respected by the move command #149

mckeehanheadwire opened this issue May 25, 2022 · 8 comments
Assignees

Comments

@mckeehanheadwire
Copy link

Describe the bug

--no-label not respected by the move command

To Reproduce

Execute the "move" command with --no-label. Notice that the @from label is applied.

Example:

$ doing -f ~/test.md now Testing move @work
    New entry: added "11:11am: Testing move @work" to Currently

$ doing -f ~/test.md finish
       Tagged: added tag @done to Testing move @work @done(2022-05-25 11:11)

$ doing -f ~/test.md move  --no-label --bool=AND --tag work,done --to Work
   New section: "Work" added
       Tagged: @from added to 1 item
        Moved: 1 item from Currently to Work

$ doing -f ~/test.md today
      11:11am ║ Testing move @work @done(2022-05-25 11:11) @from(Currently)                                          [Work      ]  

Expected behavior

As documented in doing help move I would expect the --no-label to NOT label moved items.

    --[no-]label          - Label moved items with @from(SECTION_NAME) (default: enabled)

Desktop (please complete the following information):

  • Platform: [e.g. Mac, Linux] Mac
  • OS: [e.g. Monterrey, Unbuntu] Monterrey
  • Version [e.g. 22] 12.3.1 (21E258)

Doing version

  • Result of doing -v
  • doing version 2.1.48

Ruby version

  • Result of ruby -v
  • ruby 2.6.8p205 (2021-07-07 revision 67951) [universal.x86_64-darwin21]

Additional context

Add any other context about the problem here.

@ttscoff
Copy link
Owner

ttscoff commented May 25, 2022

Thanks for the report, I think I have this fixed in 2.1.51, which is available now via gem install doing. Let me know if that doesn't fix it for you.

@mckeehanheadwire
Copy link
Author

It does appear to be corrected in later versions.

I'm not sure if this is relevant to anything that you're currently doing, but a gem install of 2.1.54 resulted in a broken doing for me. I was able to build from source (the develop branch) and install without issue.

sudo gem install doing
Password:
Fetching doing-2.1.54.gem
Successfully installed doing-2.1.54
Parsing documentation for doing-2.1.54
Installing ri documentation for doing-2.1.54
Done installing documentation for doing after 9 seconds
1 gem installed

mckeehan@mbp ~/headwire/golfdigest/src/sports-golfdigest-com[GOLF-1822-2]
$ doing
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:130:in `require': cannot load such file -- doing/help_monkey_patch (LoadError)
	from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:130:in `rescue in require'
	from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:34:in `require'
	from /Library/Ruby/Gems/2.6.0/gems/doing-2.1.54/bin/doing:6:in `<top (required)>'
	from /usr/local/bin/doing:23:in `load'
	from /usr/local/bin/doing:23:in `<main>'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- doing/help_monkey_patch (LoadError)
	from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
	from /Library/Ruby/Gems/2.6.0/gems/doing-2.1.54/bin/doing:6:in `<top (required)>'
	from /usr/local/bin/doing:23:in `load'
	from /usr/local/bin/doing:23:in `<main>'

@ttscoff
Copy link
Owner

ttscoff commented May 26, 2022 via email

@mckeehanheadwire
Copy link
Author

Something's not happy with 2.1.55

$ sudo gem uninstall doing
Gem 'doing' is not installed

$ sudo gem install doing
ERROR:  While executing gem ... (Errno::EPERM)
    Operation not permitted - 

I'm still able to build/install from source without issue.

@ttscoff
Copy link
Owner

ttscoff commented May 26, 2022

What do you get if you run gem info doing? Also, if you build/install from code, are you using sudo?

@ttscoff
Copy link
Owner

ttscoff commented May 26, 2022

Also, what happens if you run gem install doing --user-install (without sudo)?

@mckeehanheadwire
Copy link
Author

Something changed....it works now.

At the beginning, I had a version installed from a local repository. I then uninstalled it and tried to install again - this time it worked as you can see here.

$ gem info doing

*** LOCAL GEMS ***

doing (2.1.55)
    Author: Brett Terpstra
    Homepage: http://brettterpstra.com/project/doing/
    License: MIT
    Installed at: /Library/Ruby/Gems/2.6.0

    A command line tool for managing What Was I Doing reminders

$ sudo gem uninstall doing
Password:
Remove executables:
	doing

in addition to the gem? [Yn]  y
Removing doing
Successfully uninstalled doing-2.1.55

$ gem info doing

*** LOCAL GEMS ***



$ sudo gem install doing
Fetching doing-2.1.55.gem
Successfully installed doing-2.1.55
Parsing documentation for doing-2.1.55
Installing ri documentation for doing-2.1.55
Done installing documentation for doing after 11 seconds
1 gem installed

$ doing -v
doing version 2.1.55

@ttscoff
Copy link
Owner

ttscoff commented May 26, 2022 via email

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

No branches or pull requests

2 participants