Skip to content

Conversation

@Boruch-Baum
Copy link
Contributor

  • IMPORTANT: See below for 'issues'...

  • New function w3m--send-to-gui-clipboard

  • New defcustom w3m-gui-clipboard-commands

  • Feature applied to existing functions that copy link
    information to the emacs kill-ring.

    • w3m-print-current-url
    • w3m-print-this-url
    • w3m-print-this-image-url
    • w3m-lnum-print-this-url
  • New docstrings for some functions

  • ISSUES

    • BUG! I'm still having trouble getting defcustom to do
      what I want. In this case, customize-variable
      improperly displays the car of each cons cell as the
      first radio button on the list.

    • MISSING INFORMATION! I'm only familiar with linux, so I
      wasn't able to populate w3m-gui-clipboard-commands for
      other operating systems. Even if someone gives me a set
      of command strings, I have no way of testing them.

    • Tsuchiya-san recently expressed interest in a 'private
      browsing' mode for emacs-w3m.

      • This feature does make browsing a little less private
        in that anything copied to the emacs kill-ring is
        shared with the OS clipboard.

      • I can easily set a configuration value for the
        feature, but it might be more forward-thinking to
        label that value generically as something like
        w3m-private-mode instead of something specific like
        w3m-kill-ring-copies-to-os-clipboard.

      • It might just be best to wait until there exists a
        more detailed specification or expectation of what
        some private-mode would offer. For example, it may be
        decided to allow the copies, and upon exit to clear
        both the emacs kill-ring and the OS clipboard.

+ IMPORTANT: See below for 'issues'...

+ New function w3m--send-to-gui-clipboard

+ New defcustom w3m-gui-clipboard-commands

+ Feature applied to existing functions that copy link
  information to the emacs kill-ring.
  + w3m-print-current-url
  + w3m-print-this-url
  + w3m-print-this-image-url
  + w3m-lnum-print-this-url

+ New docstrings for some functions

+ ISSUES

  + BUG! I'm still having trouble getting defcustom to do
    what I want. In this case, customize-variable
    improperly displays the car of each cons cell as the
    first radio button on the list.

  + MISSING INFORMATION! I'm only familiar with linux, so I
    wasn't able to populate w3m-gui-clipboard-commands for
    other operating systems. Even if someone gives me a set
    of command strings, I have no way of testing them.

  + Tsuchiya-san recently expressed interest in a 'private
    browsing' mode for emacs-w3m.

    + This feature does make browsing a little less private
      in that anything copied to the emacs kill-ring is
      shared with the OS clipboard.

    + I can easily set a configuration value for the
      feature, but it might be more forward-thinking to
      label that value generically as something like
      w3m-private-mode instead of something specific like
      w3m-kill-ring-copies-to-os-clipboard.

    + It might just be best to wait until there exists a
      more detailed specification or expectation of what
      some private-mode would offer. For example, it may be
      decided to allow the copies, and upon exit to clear
      both the emacs kill-ring and the OS clipboard.
@Boruch-Baum
Copy link
Contributor Author

This is a feature that I find very useful and convenient, and I have been using a defadvice version of it for a few years.

However, as a pull request, the commit has two serious flaws that I need help with:

  1. The defcustom is flawed, in that it incorrectly says that the car of each cons cell in the list is the first radio button (no matter what that radio button is). I haven't figured out how to have customize variable properly read the current setting. My suspicion is that I need to write a :set, :get, or :initialize function, but I'm not sure which or how, and my attempts were unsuccessful and frustrating.

  2. The list of command strings for the various operating systems only has an entry for linux, and it should have entries for all the major operating systems on which emacs is deployed. I'm the wrong guy for that, because I only use linux, I have no idea how things are done in those other environments, and even if I found command strings, I have no way to test them.

SUMMARY: If you use linux, and you don't use customize-variable, this pull-request is great and complete!

+ They need to be escaped as '%%' in order to be properly read by the
  shell 'printf' command.
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.

1 participant