all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: Narrowing: highlighting "Narrow" lighter?
  2012-08-04 11:55 Narrowing: highlighting "Narrow" lighter? Raffaele Ricciardi
@ 2012-08-04 11:29 ` Christopher Schmidt
       [not found] ` <mailman.6302.1344079764.855.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 3+ messages in thread
From: Christopher Schmidt @ 2012-08-04 11:29 UTC (permalink / raw)
  To: help-gnu-emacs

Raffaele Ricciardi <rfflrccrd@gmail.com> writes:
> I've thought about highlighting the "Narrow" lighter in the Mode Line, but as
> there is no Narrow mode and narrowing commands are defined in C source code, I
> can't find a way to do that without resorting to advices or writing a Narrow
> minor mode myself that manipulates the Mode Line.

    (loop
     for d in-ref mode-line-modes
     until
     (when (and (stringp d) (string= d "%n"))
       (setf d '(:eval
                 (unless (and (eq (point-min) 1)
                              (eq (point-max) (1+ (buffer-size))))
                   (propertize
                    " Liebe"
                    'face '(:foreground "pink")
                    'help-echo "mouse-2: Weniger Liebe für diesen Buffer :x"
                    'mouse-face 'mode-line-highlight
                    'local-map (make-mode-line-mouse-map 'mouse-2
                                                         'mode-line-widen)))))))

        Christopher



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Narrowing: highlighting "Narrow" lighter?
@ 2012-08-04 11:55 Raffaele Ricciardi
  2012-08-04 11:29 ` Christopher Schmidt
       [not found] ` <mailman.6302.1344079764.855.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 3+ messages in thread
From: Raffaele Ricciardi @ 2012-08-04 11:55 UTC (permalink / raw)
  To: help-gnu-emacs

Hello there,

I'd like a more visual feedback when a buffer is narrowed than what is 
provided by the standard "Narrow" lighter.

I've thought about highlighting the "Narrow" lighter in the Mode Line, 
but as there is no Narrow mode and narrowing commands are defined in C 
source code, I can't find a way to do that without resorting to advices 
or writing a Narrow minor mode myself that manipulates the Mode Line.

Any suggestions?  Thanks.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Narrowing: highlighting "Narrow" lighter?
       [not found] ` <mailman.6302.1344079764.855.help-gnu-emacs@gnu.org>
@ 2012-08-04 13:00   ` Raffaele Ricciardi
  0 siblings, 0 replies; 3+ messages in thread
From: Raffaele Ricciardi @ 2012-08-04 13:00 UTC (permalink / raw)
  To: help-gnu-emacs

On 08/04/2012 12:29 PM, Christopher Schmidt wrote:
> Raffaele Ricciardi <rfflrccrd@gmail.com> writes:
>> I've thought about highlighting the "Narrow" lighter in the Mode Line, but as
>> there is no Narrow mode and narrowing commands are defined in C source code, I
>> can't find a way to do that without resorting to advices or writing a Narrow
>> minor mode myself that manipulates the Mode Line.
>
>      (loop
>       for d in-ref mode-line-modes
>       until
>       (when (and (stringp d) (string= d "%n"))
>         (setf d '(:eval
>                   (unless (and (eq (point-min) 1)
>                                (eq (point-max) (1+ (buffer-size))))
>                     (propertize
>                      " Liebe"
>                      'face '(:foreground "pink")
>                      'help-echo "mouse-2: Weniger Liebe für diesen Buffer :x"
>                      'mouse-face 'mode-line-highlight
>                      'local-map (make-mode-line-mouse-map 'mouse-2
>                                                           'mode-line-widen)))))))
>
>          Christopher
>

Perfect.  Thank you.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-08-04 13:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-04 11:55 Narrowing: highlighting "Narrow" lighter? Raffaele Ricciardi
2012-08-04 11:29 ` Christopher Schmidt
     [not found] ` <mailman.6302.1344079764.855.help-gnu-emacs@gnu.org>
2012-08-04 13:00   ` Raffaele Ricciardi

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.