purcell / whole-line-or-region

In Emacs, operate on current line if no region is active
116 stars 12 forks source link

A problem with pdf-tools #14

Closed wojnicki closed 4 years ago

wojnicki commented 4 years ago

Wrong contents copied.

To reproduce:

  1. pdf-tools are used to display a pdf document.
  2. select a region
  3. copy the region with M-w
  4. yank (C-y) in another buffer: result is "%PDF-1.5" instead of the region selected before.
wojnicki commented 4 years ago

pdf-tools version: 20200512

purcell commented 4 years ago

Sorry, I don't know how to use pdf-tools to reproduce this: it just looks like a PDF support library, not a viewer.

What's the major mode? Perhaps it makes sense to avoid enabling whole-line-or-region-local-mode there.

wojnicki commented 4 years ago

pdf-tools is a replacement of DocView for PDF files. It enables viewing, searching, copying, annotations etc. The major mode, upon viewing a PDF, is PDFView.

Yes, it makes perfect sense not to enable whole-line-or-region-local-mode there, whis is a valid workaround.

purcell commented 4 years ago

Thanks. Is the major mode symbol pdf-view-mode? You can check with M-: major-mode. I can easily add a list of modes in which whole-line-or-region-global-mode should not enable whole-line-or-region-local-mode, and add that mode to the list.

wojnicki commented 4 years ago

Yes it is pdf-view-mode.

On 9/17/20 12:41 AM, Steve Purcell wrote:

Thanks. Is the major mode symbol |pdf-view-mode|? You can check with |M-: major-mode|. I can easily add a list of modes in which |whole-line-or-region-global-mode| should /not/ enable |whole-line-or-region-local-mode|, and add that mode to the list.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/purcell/whole-line-or-region/issues/14#issuecomment-693703828, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADU4ZVK2WWGNF6DQAOV2LD3SGE5LDANCNFSM4RNBX7QQ.

-- pozdrawiam, dr hab. inż. Igor Wojnicki, prof. AGH