углерод emacs дергает результаты в изображениях

На установке по умолчанию Углерода Emacs на OS X, копируя файл со Средства поиска и дергая его в emacs приводит только к отображаемому значку.

Как я пошел бы о настройке его так, это вместо этого дает путь к файлу?

1
задан 10.11.2009, 05:51

1 ответ

Мне удалось отключить все дергающее изображение (перетаскивание все еще работает, если я действительно хочу изображение там) путем переопределения функции, объявленной в mac-win.el (нескомпилированный файл, не включенный в установку по умолчанию.)

в моем .emacs:

;; prohibit pasting of TIFFs
(defun x-selection-value (type)
  (let ((data-types '(public.file-url
                       public.utf16-plain-text
                       com.apple.traditional-mac-plain-text))
    text)
    (while (and (null text) data-types)
      (setq text (condition-case nil
             (x-get-selection type (car data-types))
           (error nil)))
      (setq data-types (cdr data-types)))
    (if text
    (remove-text-properties 0 (length text) '(foreign-selection nil) text))
    text))

исходный был:

(defun x-selection-value (type)
  (let ((data-types '(public.utf16-plain-text
              com.apple.traditional-mac-plain-text
              public.file-url))
    text tiff-image)
    (while (and (null text) data-types)
      (setq text (condition-case nil
             (x-get-selection type (car data-types))
           (error nil)))
      (setq data-types (cdr data-types)))
    (if text
    (remove-text-properties 0 (length text) '(foreign-selection nil) text))
    (setq tiff-image (condition-case nil
             (x-get-selection type 'public.tiff)
               (error nil)))
    (when tiff-image
      (remove-text-properties 0 (length tiff-image)
                  '(foreign-selection nil) tiff-image)
      (setq text (mac-TIFF-to-string tiff-image text)))
    text))
0
ответ дан 24.11.2019, 02:20

Теги

Похожие вопросы