all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#66317: Project mode-line
@ 2023-10-03  6:29 Juri Linkov
  2023-10-03  8:07 ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
                   ` (2 more replies)
  0 siblings, 3 replies; 53+ messages in thread
From: Juri Linkov @ 2023-10-03  6:29 UTC (permalink / raw)
  To: 66317

[-- Attachment #1: Type: text/plain, Size: 143 bytes --]

Here is the implementation of the mode-line project indicator prepended
before the vc indicator with the project menu discussed in bug#63469:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: project-mode-line.patch --]
[-- Type: text/x-diff, Size: 1005 bytes --]

diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index 2e6ae89a443..8798feb2c56 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -2010,5 +2102,20 @@ project-uniquify-dirname-transform
           (file-relative-name dirname root))))
     dirname))
 
+;;; Project mode-line
+
+(let ((form '(:eval (when-let (project (project-current))
+                      (concat " "
+                              (propertize
+                               (project-name project)
+                               'mouse-face 'mode-line-highlight
+                               'local-map
+                               (make-mode-line-mouse-map
+                                'down-mouse-1
+			        `(menu-item "Project"
+                                            ,menu-bar-project-menu))))))))
+  (when-let (pos (seq-position mode-line-format '(vc-mode vc-mode)))
+    (cl-pushnew form (nthcdr pos mode-line-format))))
+
 (provide 'project)
 ;;; project.el ends here

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

end of thread, other threads:[~2023-11-01  7:32 UTC | newest]

Thread overview: 53+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-03  6:29 bug#66317: Project mode-line Juri Linkov
2023-10-03  8:07 ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-03 16:24   ` Dmitry Gutov
2023-10-03 17:11   ` Juri Linkov
2023-10-03 17:51     ` Dmitry Gutov
2023-10-03 17:58       ` Juri Linkov
2023-10-03 18:04         ` Dmitry Gutov
2023-10-03 18:17         ` Eli Zaretskii
2023-10-04  6:18           ` Juri Linkov
2023-10-04  7:15             ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-04 17:06               ` Juri Linkov
2023-10-05 20:03                 ` Spencer Baugh
2023-10-05 20:16                   ` Dmitry Gutov
2023-10-06  6:46                   ` Juri Linkov
2023-10-09 18:45                 ` Juri Linkov
2023-10-09 18:57                   ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-10  6:56                     ` Juri Linkov
2023-10-10 11:46                       ` Dmitry Gutov
2023-10-11  6:27                         ` Juri Linkov
2023-10-04  7:43             ` Eli Zaretskii
2023-10-04 14:34               ` Dmitry Gutov
2023-10-04 17:04               ` Juri Linkov
2023-10-05 20:23             ` Dmitry Gutov
2023-10-06  4:50               ` Eli Zaretskii
2023-10-06  6:44                 ` Juri Linkov
2023-10-06 10:20                   ` Dmitry Gutov
2023-10-09 18:10                     ` Juri Linkov
2023-10-09 18:22                       ` Dmitry Gutov
2023-10-09 18:48                         ` Juri Linkov
2023-10-09 18:52                           ` Dmitry Gutov
2023-10-10  6:50                             ` Juri Linkov
2023-10-10  7:10                               ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-10  7:18                                 ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-10 10:45                                 ` Dmitry Gutov
2023-10-10 11:34                                   ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-10 11:42                                     ` Dmitry Gutov
2023-10-20  9:01             ` Ihor Radchenko
2023-10-20 15:52               ` Dmitry Gutov
2023-10-31  7:34                 ` Juri Linkov
2023-11-01  2:03                   ` Dmitry Gutov
2023-11-01  7:32                     ` Juri Linkov
2023-10-03 12:06 ` Stefan Kangas
2023-10-15 22:42 ` sbaugh
2023-10-16  0:57   ` Dmitry Gutov
2023-10-16 17:01     ` Juri Linkov
2023-10-16 19:12       ` Eli Zaretskii
2023-10-18 17:20         ` Juri Linkov
2023-10-18 18:41           ` Dmitry Gutov
2023-10-19  6:40             ` Juri Linkov
2023-10-19 11:23               ` Dmitry Gutov
2023-10-23 17:23                 ` Juri Linkov
2023-10-24 23:48                   ` Dmitry Gutov
2023-10-18 18:55       ` Dmitry Gutov

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.